Posts

Welcome

Image
Welcome to my ramblings on the web. This blog is planned to contain some useful tips on the projects I'm working on. This is currently things related to SQL, .Net, C#, WPF, Bing Maps, XAML Maps, Geography functions, some 3D woks in .net and Unity. It is meant to be a reposityory to find back when I have wandered off on my many side-tracks. If this is interesting for other too I will just regard that as a non-intended positive side-effect. Photo by Andrew Neel on Unsplash

Ten Steps to Mastering the Fetch API

Image
For redactor:  How To... | Upload images (imperavi.com)

How To Limit Lines Of Text With CSS Only

Image

Simplify your CSS with these 3 grid layout solutions

Image

CSS Tips: min-content, max-content, fit-content - intrinsic sizing with CSS

Image
For the part of max-content: For the full layout:

Learn CSS Grid the easy way

Image

The .NET 8 Auth Changes You Must Know About!

Image
This is a test for embedding videos. Here's a video on  .Net 8 security simplification:

Handy queries and features for Sql Server geography data from OSM

 I'm using SQL for a lot of work on geographic data and here I wanted to share a few of the "not-so-obious" snippets I use when working with OpenStreetMap (OSM) data. When providing data to be parsed as Latitude and Longitude We can use the STRING_AGG function. select w.Id, STRING_AGG( cast(n.Lat as nvarchar(max)) + ' ' + cast(n.Lon as nvarchar(max)), ', ') within group (order by wn.NodeOrder) as LatLon from Way w inner join WayNode wn on wn.WayId = w.Id inner join Node n on n.Id = wn.NodeId group by w.Id This example is based on my working OSM data model (way - waynode -node etc.) The list above will provide a clean list of "lat lon, lat lon ...". But when I need for instancce WKT it can ve altered by switching the "n.Lat" and "n.Lon" above.   Of couse one can use the built-in functions such as: select w.shape.STAsText() as wkt, w.Shape.AsGml() as gml from.... Firstly, I used the agg function to make the sql g...