TransWikia.com

Any example for a C#-WebGis development on the basis of DotSpatial?

Geographic Information Systems Asked by Ralph Elsaesser on June 11, 2021

I already used DotSpatial in a few projects. It is fine for reading/writing shapefiles, clipping etc..

According to the DotSpatial documentation, it is possible, to create WebGis projects, but I wonder why I cannot find any on the Web? Also, I wasn’t able to find any tutorial for it. On GitHub there is a sample project called DemoWeb (https://github.com/DotSpatial/DotSpatial/tree/master/Source/Examples/DemoWEB) but I wasn’t able to get it running.

Any hints?

2 Answers

Okay I lost quite a few hours navigating and finally found this: https://github.com/DotSpatial/DotSpatial/issues/951

The developers themselves decided no longer to describe the DotSpatial libtrabies to be Web-compatible. They are perfect for Desktop GIS but the Web Components need to be updated. The text is from 2017 so I don't know whether a better version is available.

Answered by Ralph Elsaesser on June 11, 2021

Here is an AMAZING open-source, fully managed code implementation of a GIS engine for desktop, easily ported to mobile and web.

https://github.com/Opzet/SimpleMap

It is a FOSS fully managed dot net core 5.0 codebase, It is compact and easy to use, a really nice GIS engine.

I need some minor help with the Georeference function and the raster layer loader.

Please download and try out the working demos with a small footprint

This is a fully workable sample project on C# for Visual Studio 2019

Sample demonstrates how You can use maps in your projects.

You can download and run SimpleMap.exe. Or download and compile the source code.

Features

  • All in one Winform control

  • No un-managed Code & No Dependencies.

  • Small code size

  • Lightweight

Rendering

  • Fast image draw to screen via GDI+, written pure on C# without any direct mapping to WinApi.

  • Double buffering technology, all image changes draw into memory buffer and then changes apply to the screen.

Tile servers

Download map images from tile servers (e.g google).

  • Cache map tile on disk.

  • Download google image file cache to local storage.

  • Save google Maps as one image.

  • Base classes to draw any map layers.

Georeference Raster Images Work in progress Georeference image to create world file

  • Load raster image (pngw,bmpw,jpgw,tifw, etc) as geo referenced overlay

GIS Projection

  • Projection of coordinate system through subclasses and operators.

  • Translate google coordinates to longitude and latitude.

  • Translate longitude and latitude to google coordinates.

  • Math operators support working with coordinates.

  • Spatial in-memory index with fast search by coordinates based on google map coordinate system.

  • Spatial index tuning.

  • Spatial index supported objects are: Point, Line, Rectangle, Polygon(partially supported).

SimpleMap/ExampleForms/FrmMapDownloader.cs demonstrates how to download google map area as single image (GetFullMapThread function) or how to cache google map on local disk (DownloadThread function).

SimpleMap/ExampleForms/Controls/MapCtl.cs demonstrates how to draw cached google map images to screen with custom objects as lines, bitmaps etc.

It is absolutely free for use.

Answered by DigitalGeo on June 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP