SharpMap: overview of the GIS engine

Good afternoon, respected Hebraist.
In my opinion themes work with spatial data and, in particular, GIS systems, poorly lit habré. Resulting in my first article I would like to devote a wonderful tool called SharpMap. The object of consideration is quite interesting from the point of view of the development of GIS applications and information in Russian language about his use of little. The search will return only a few results on the forums dedicated to programming.

Introduction


On the official website of the project is given by the following definition:
SharpMap is an easy to use mapping library for use in desktop and web applications. The engine is written in C# and is based on the framework .NET 2.0. Licensed under GNU Lesser General Public License.

Capabilities


Currently, the development of two engine versions, differing in their capabilities.
the the the the the the the the the the the the the the the
Capabilities SharpMap v1.0 SharpMap v2.0
Usage .NET programming languages (C#, VB.NET etc.) + +
Representation of attributes as labels + Beta 2
Support for points, lines, polygons, multipolygons, multipoint, etc. in accordance with the specification OpenGIS + +
Zoom and pan the map + +
Advanced topic map + +
changing the projection "on the fly" + +
Layer spatial indexing - +
the Ability to highlight geometries - +
Spatial analysis and processing geometries - +
the Ability to replace geometry, spatial indexes, and libraries of projections - +
WEB SharpMap v1.0 SharpMap v2.0
Http Handler to generate images + not completed
AJAX — control + not completed
Use server for WMS 1.3.0 + not completed

Extensions


By default SharpMap only works with vector Shape format files, however, due to the extension, the number of formats supported can be increased.
the the the the the the the the
Extension Description
OGR Povider a Library that adds support for many vector data formats
GDAL Raster Layer Add support for multiple raster formats
PostGIS Provider PostgreSQL/PostGIS
Oracle Provider of spatial information Oracle
NetTopologySuite Data Provider Adds functionality NTS
Simple Chart Adds to the map chart based on attribute data
SpatialLine Provider SQLite/spatiallite as

Library GDAL/OGR, which also reported on habré, deserves separate consideration and a separate article.


Into action


The implementation of the application using SharpMap, and in particular the inclusion of library of GDAL/OGR at first sight seemed not very obvious. Had to see many English-speaking forums to figure out what's what.
An example will be given to the SharpMap v.1.0 in the development environment Visual Studio 2008.
So, to begin downloadable ChangeSet project. At the moment of writing of article the actual version # 74794.
Unpack.

To demonstrate the capabilities of the engine is available in the Trunk directory to run the project file SharpMap.VS2008.sln. In SolutionExplorer to set the project as StartUp Project WinFormSamples.

image
In the right pane of the form shows a set of RadioButton c sootvestvuyuschim file types. All test files geo-data are stored in the directory: Trunk\WinFormSamples\bin\Debug\GeoData.
By default in the right pane, the map opens Shapefile.
Likewise, the viewing point Gradiet Theme.

image

When you try to display the file format MapInfo (vector) and "GeoTiff" (raster), an error occurs due to the fact that it is not connected the corresponding library GDAL/OGR. For their connection, you will need to download a set of libraries is FWTools and install.
Then in the directory Trunk\WinFormSamples open the file "app.config" and in the appSettings change all the way on the path to the folder FWTools and its subdirectories (if required).
Precompiledweb project Build - > Rebuild Solution. Run.
After the manipulations, it is possible to open many vector and raster formats and to work with them.

image

image

On I want to finish. More information about SharpMap, as well as documentation and forum on the project website:
SharpMap v1.0
SharpMap v2.0
Thank you for your attention!
Article based on information from habrahabr.ru

Популярные сообщения из этого блога

Approval of WSUS updates: import, export, copy

The Hilbert curve vs. Z-order

Kaspersky Security Center — the fight for automation