I'm using javascript and Openlayers 3 and to draw shapes or geometry in osm map. The data is in geojson format and i want to store it in SQL server 2008 R2 using SQL geometry or spatial data types. Is there a way to convert GeoJSON Format into SQL geometry?
1 Answer
There is no built-in support in SQL Server 2008. If you want to do it in DB layer then you should use some CLR assembly that parses JSON (Json4sql, JsonSelect, etc.) In SQL Server 2016 you have OPENJSON function that can parse GeoJSON text.