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 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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