3

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?

3

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 http://blogs.msdn.com/b/sqlserverstorageengine/archive/2015/10/01/parsing-geojson-format-in-sql-server-2016.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.