azuredatastudio icon indicating copy to clipboard operation
azuredatastudio copied to clipboard

Support spatial types

Open xfischer opened this issue 7 years ago • 12 comments

Feature request : It would be nice to get the "spatial tab" like SMSS to preview spatial data types. Could be done via a third party plugin such as leaflet or open layers. There's a bunch of code to speedup things like using TopoJSON for feeding the map and generalizing features at the same time.

xfischer avatar Dec 01 '17 10:12 xfischer

@xfischer unfortunately .Net Core SqlClient doesn't support querying spatial column types (except as binary data). We've been discussing with them to add this support, but apparently it is a significant amount of work. I'll tag this suggestion as upstream for now.

kburtram avatar Dec 01 '17 17:12 kburtram

Thanks @kburtram. Should it be possible to use GeoJSON.NET.Contrib.Wkb to handle WKB to GeoJSON conversion ? I think will a little effort it could be done in .Net Core.

xfischer avatar Dec 01 '17 18:12 xfischer

An nice add in would be to convert to Geojson and then visualize the results as this extension for VS Code https://github.com/jumpinjackie/vscode-map-preview

Charmatzis avatar Feb 09 '18 07:02 Charmatzis

@xfischer Parsing the geometry/geography binary data in javascript appears to already be a solved problem

https://github.com/tediousjs/node-mssql/blob/289171fbddfe523ae09ac4c3f29dc89846d53b02/lib/udt.js#L186

I haven't been keeping up on the extensibility story of sqlopss. Does the query results UI have extension points for extensions to contribute different ways to view the query result? The Chart Viewer suggests this is conceptually possible, but the Chart Viewer is baked into the product itself and not an extension is it?

I'd give this a crack as a sqlopss extension if I knew the extension points are there (which makes @Charmatzis comment amusing for me 😆 )

jumpinjackie avatar Jul 25 '18 09:07 jumpinjackie

I didn’t dive into the technical details of how extensibility is handled into sqlops. What I know so far from what exists and how it will encourage more devs to contribute :

  • @Charmatzis proposal if fine but will lead to “general” map systems. We need a map with projections here. (See the spatial results tab of SMSS with local spatial data or Antarctica and play with projections : things gets complicated as Earth is not planar)
  • Do not reinvent the wheel. Take for example OpenLayers which is well suited for complicated things. OR D3.js which is not a mapping system but a vizualisation lib that could handle easily projections and performance issues (see samples : this is HUGE).

This is how I can contribute. Cheers !

xfischer avatar Jul 25 '18 10:07 xfischer

.Net 6 now supports querying spatial data. Do we have an update on this issue?

https://docs.microsoft.com/en-us/ef/core/modeling/spatial

mattiaskagstrom avatar Feb 17 '22 08:02 mattiaskagstrom

It's been more than 5 years, any ETA for this feature?

madgkuntz avatar Mar 17 '22 18:03 madgkuntz

It's been 'staging' for about half a year now. Anyone knows what that means, progress-wise?

SQLThomas avatar Dec 29 '23 17:12 SQLThomas

Really missing this feature from Azure Data Studio

alucard-o avatar Mar 12 '24 09:03 alucard-o

Hello, yeh we use a lot of Spatial data with SQL server (yes, we know we are a unicorn.) And part of us developer love to use Azure data Studio. Sometimes you need to check, what you do in Spatial -Query. So, you need to check the Polygons, Lines, Points. But you won’t star a GIS System, only a filter check. and all the time we need to change to SSMS. Then come back to ADS and continue your development. this is an incredible time-consuming task. Yes, we know we are unicorn but we would appreciate if this function could be available.

:) Luigi

luigialtomari avatar Mar 22 '24 12:03 luigialtomari

Hello, yeh we use a lot of Spatial data with SQL server (yes, we know we are a unicorn.) And part of us developer love to use Azure data Studio. Sometimes you need to check, what you do in Spatial -Query. So, you need to check the Polygons, Lines, Points. But you won’t star a GIS System, only a filter check. and all the time we need to change to SSMS. Then come back to ADS and continue your development. this is an incredible time-consuming task. Yes, we know we are unicorn but we would appreciate if this function could be available.

:) Luigi

You might be interested in this : https://github.com/xfischer/SqlServerSpatial.Toolkit This is a dev tool I did a while ago when there was only SSMS, and lots of geom manipulation were done in C# with no good way of "seeing" what was going on. We had to dump in memory geometries as WKT and paste on SSMS, but we needed to find who's who, so this tool was born. It enables you to trace geometries for review.

xfischer avatar Mar 22 '24 14:03 xfischer

Hello, yeh we use a lot of Spatial data with SQL server (yes, we know we are a unicorn.) And part of us developer love to use Azure data Studio. Sometimes you need to check, what you do in Spatial -Query. So, you need to check the Polygons, Lines, Points. But you won’t star a GIS System, only a filter check. and all the time we need to change to SSMS. Then come back to ADS and continue your development. this is an incredible time-consuming task. Yes, we know we are unicorn but we would appreciate if this function could be available. :) Luigi

You might be interested in this : https://github.com/xfischer/SqlServerSpatial.Toolkit This is a dev tool I did a while ago when there was only SSMS, and lots of geom manipulation were done in C# with no good way of "seeing" what was going on. We had to dump in memory geometries as WKT and paste on SSMS, but we needed to find who's who, so this tool was born. It enables you to trace geometries for review.

Thanks a lot, I will check. but it is still a workaround ;) The most important take a way is we are not the only one unicorn using complex spatial data on Sql server :) Thank folk :)

luigialtomari avatar Mar 22 '24 15:03 luigialtomari