问题
I'm looking at implementing spatial queries in .NET without using SQL2008. The first requirement is to be able to create a (BTree styled) spatial index and be able to query it.
Although SQL 2008 ships with .NET libraries for the types, you need to use SQL for the spatial indexes.
HAs anybody used any .NET libraries for spatial data (OS or commercial)? I am looking at NetTopologySuite but it looks quiet and I don't want a dead library.
回答1:
SharpMap is a (well known and used) OpenSource collection of spatial libraries for .NET
http://www.codeplex.com/SharpMap
Commercial libraries from ESRI would be the most widely used. Can I ask why you don't want to use SQL for creating spatial indexes?
http://msdn.microsoft.com/en-us/library/bb964712.aspx
If you don't want to create indexes in the database then you will be stuck using shapefiles:
http://mapserver.org/utilities/shptree.html
Update
I've not used NTS or JTS, but there is also a C++ implementation of JTS at http://trac.osgeo.org/geos/ which has an active user community, and I've used on a couple of projects.
Shapely http://gispython.org/shapely/manual.html builds on GEOS in Python. If you are doing everything in "the cloud" then it may be worth reading this article - http://sgillies.net/blog/986/manipulimization-of-whatchamacallems/
Re indexes - I found SQL Server + spatial indexes to outperform shapefile + indexes with the same data. If you require the indexes for displaying data then tile caches would perform far better than any indexing.
Python seems to have become one of the key languages in GIS. There is also an R-type index library - http://pypi.python.org/pypi/Rtree/
回答2:
NTS is good...
Other stuff which may be useful now or later:-
GDAL/OGR for accessing different raster/vector formats PROJ4 for handling projections and transformations (Check out FWTOOLS download for the above in 1 install)
You should check out Mapwindow too... ver 6 is all re-written in .NET should be out soon if not out yet.. saw it at FOSS4G in Sydney.
http://www.mapwindow.org/
Of course PostGRES with PostGIS is a very powerful spatial database you can access from .NET
Also check out SQLLite which has spatial extensions for vector dat, and now RasterLite!!
Geoserver or Mapserver if you want to web enable anything.
Other general GIS apps to checkout: GRASS and SAGA
回答3:
A Simple for QuadTree http://www.codeproject.com/KB/recipes/QuadTree.aspx
来源:https://stackoverflow.com/questions/2184469/know-of-any-c-sharp-spatial-data-libraries