4

I'm writing an app to query spatial data from SQL Server and add the results to an Elasticsearch index.

Is there an effective method to convert SQL Server Geometry data (point, line, or polygon) to corresponding Elasticsearch Geo Shapes?

Harlan Wescott
  • 279
  • 2
  • 7
  • SQL Server 2016 is supposed to have [native JSON support](https://msdn.microsoft.com/en-us/library/dn921897.aspx), including FOR JSON which is presumably similar to FOR XML. Elasticsearch Geo Shapes appear to be in JSON format (GEOJSON). – Bacon Bits Oct 07 '15 at 18:20
  • Is there an extension in earlier version of SQL Server to get the same capability? – Harlan Wescott Oct 07 '15 at 20:33
  • I'm sure there are CLR tools out there, but nothing from MS that I'm aware of. – Bacon Bits Oct 07 '15 at 22:34
  • You might want to check out [this answer](http://gis.stackexchange.com/a/93098). – Val Oct 08 '15 at 03:18
  • Here is my answer that did this within SQL Server https://stackoverflow.com/questions/36141323/spatial-datatype-geometry-to-geojson/44168943#44168943 – Geobility Nov 17 '20 at 22:08

0 Answers0