How can I show some shapefile / Well-Known-Text file data on Google Maps / MS Virtual Earth?

I have a form file (demographic / heat map data in the USA, for example, crime in New York), imported into sql server 2008 database, field data type: geography.

How can I get this data from a selection request in a format that I can display on Google maps or Microsoft virtual earth map?

thank!

Edit 1: So far, the best solution has been to use a (free) third-party dll ( SharpMap ). I hope someone can suggest some sql tricks in sql2008 to return it in a compatible format ...

+3
source share
3 answers

Geri Langlois Sharpmap - 0.9. , : http://sharpmapv2.googlecode.com/svn

, , Lat/Long WGS84, - , KML. , SQLServer2008 (, ogr2ogr).

STX STY, , KML

select SHAPE.STX as X
    ,SHAPE.STY as Y
    ,SHAPE.STAsText() as WKT
    ,SHAPE.AsGml() as GML
from dpu.SW_SERVICE_LOCATIONS

- :

SELECT '<coordinates>'+convert(varchar,convert(decimal(20,6), SHAPE.STX),1)+
    ','+ convert(varchar,convert(decimal(20,6), SHAPE.STY),1) 
    + '</coordinates>'
FROM sw_service_locations;
+3

- Virtual Earth. , .

sql server 2008, SharpMap codeplex. , , , sql-.

+2

- XML, GeoRSS KML. Virtual Earth Google Maps KML, , , .

. , , , - AJAX . SQL 2008, . , , .

MapDotNet has many features to more conveniently retrieve your data on a virtual Earth map. It is relatively easy to execute a selection query and display the data as you wish. I am sure that there are other similar products for Google maps, but I personally have not used them. It supports polygons as well as heat maps and gives you much more functionality than just using Virtual Earth. Virtual Earth is powerful, but there are many GIS tools that someone from the background mapping will expect that you need to program in your file.

0
source

Source: https://habr.com/ru/post/1699435/


All Articles