Skip to main content

Questions tagged [dotspatial]

DotSpatial is a geographic information system library written for .NET 4. It allows developers to incorporate spatial data, analysis and mapping functionality into their applications or to contribute GIS extensions to the community. DotSpatial provides a map control for .NET.

Filter by
Sorted by
Tagged with
0 votes
0 answers
53 views

Add point name and style point layer C# NetTopo DotSpatial

How can I add point name and style? The point layer as blue and ellipse. My code is below: for (int i = 0; i < featureCollection.Count; i++) { List<Coordinate> ...
ayaz's user avatar
  • 1
0 votes
0 answers
71 views

How to make online map projection from DotSpatial.Plugins.WebMap same as current map projection

When I upload a shapefile (its projection is WGS84 UTM Zone 37N) to the map, mouse coordinates on map are in WGS84 UTM Zone 37N. When I add online map using DotSpatial.Plugins.WebMap, it changes the ...
ayaz's user avatar
  • 1
0 votes
0 answers
213 views

Creating line on map using DotSpatial C#

To create a line on map using DotSpatial, I wrote below code but it returns Error CS0029 Cannot implicitly convert type 'NetTopologySuite.Geometries.Coordinate' to 'DotSpatial.Topology.Coordinate' #...
ayaz's user avatar
  • 1
2 votes
1 answer
297 views

Incorrect coordinate conversion results from ProjNET when converting across horizontal datums

Been fighting this for almost a week now, so I'm hoping that someone here has some insight or can tell me the obvious thing I'm missing. I am trying to add programmatic coordinate conversion on the ...
Ruud A.'s user avatar
  • 21
0 votes
0 answers
177 views

Error in projNET and DotSpatial projection to EPSG:2950 coordinates

I need to convert a point from EPSG:4326 to EPSG:2950. But I am consistently getting a wrong result. On the platform I’m using I can only use the following libraries: projNET (link) DotSpatial (link) ...
Mitch_V's user avatar
0 votes
0 answers
289 views

How to read shapefile with DotSpatial while I don't have dbf,prj,shx

I'm writing application to read and display shapefile. I'm using DotSpatial 2.0.1 ( because I have Visual Studio 2017 ) Now I have shapefile to read. If I have all the package: shp,shx,dbf,prj I'm ...
CAD Developer's user avatar
0 votes
1 answer
158 views

Proj4 string for USGS Bulletin 1532

I'm using an application that uses equations from USGS Bulletin 1532 (see source code - line 295: http://docs.ros.org/en/kinetic/api/robot_localization/html/api/navsat__conversions_8h_source.html#...
Samuel's user avatar
  • 91
1 vote
0 answers
170 views

Calculating area with DotSpatial from GPS

I have a problem when taking the information from the GPS of my car. I want to calculate the worked area according to the latitude and longitude provided by the equipment. So far I am using .Net core ...
ArturW's user avatar
  • 11
1 vote
0 answers
105 views

How to use gridshift file with DotSpatial

I am trying to reproject from British National Grid to EPSG:3035. Here's the code: GridShift.InitializeExternalGrids(@"OSTN15", true); ProjectionInfo source = ProjectionInfo.FromProj4String(@...
Columbo's user avatar
  • 151
1 vote
1 answer
158 views

Unexpected DotSpatial reprojection results - OSGB36 to 4326

I am trying to reproject from OSGB1936 to 4326 using DotSPatial. I'm doing this as follows ('shapefile' is my loaded shapefile) pulling the source projection from the shapfile which I believe it picks ...
Columbo's user avatar
  • 151
1 vote
1 answer
253 views

KnownCoordinateSystems.Geographic.Europe.OSGB1936 showing as WGS84 in Visual Studio

I'm trying to get my head around DotSpatial. I'm specifically trying to convert the geographic points of a feature from OSGB1936 (27700) to WGS84. This is the line of C# that I was hoping would do the ...
Columbo's user avatar
  • 151
1 vote
1 answer
905 views

Arc 1960 / UTM zone 36S to Lat Long for Google Maps

I have this coordinate (778597.3125000001, 9148353). I am told this coordinate is Arc 1960 / UTM zone 36S. When I go here: https://epsg.io/21036 and click "Get Position on Map" and enter in ...
Kellie's user avatar
  • 121
0 votes
2 answers
2k views

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

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 ...
Ralph Elsaesser's user avatar
0 votes
0 answers
178 views

Split a polygon by another polygon and remove the overlapping area

Using DotSpatial I want to split a polygon by another overlapping polygon. The overlapped area can be clipped using the Intersection method but I did not find any way to split the original source ...
Fourkanul Islam Mobin's user avatar
0 votes
1 answer
266 views

DotSpatial reprojection introduces offset compared with QGIS

Im writing a converter from shape file to Geojson using C# and DotSpatial to do coordinate conversion. Currently this mostly works, with newly created shape files in QGIS the coordinates are perfect ...
Kennyist's user avatar
2 votes
3 answers
2k views

Is there a proj4 string for GDA2020 (epsg:7844) that we use to transform from 3857 or 4326 to gda2020 using dot spatial .net library

We are using dot spatial library for transformation from one projection to other. We are planning to include the new release GDA 2020 projections. Is it as simple as just adding the proj string for ...
Sameer's user avatar
  • 21
1 vote
0 answers
200 views

Getting EPSG codes from Dotspatial.Projections

I have installed Dotspatial.Projections in my Visual Studio C# project. I have not found a way to get the EPSG codes. Is there a way to do this using the Dotspatial.Projections library?
Chris's user avatar
  • 11
2 votes
2 answers
143 views

Re-projection issues with Azimuthal Equidistant

When reprojecting country-border polygons from longlat: +proj=longlat +datum=WGS84 +no_defs to Azimuthal Equidistant: +proj=aeqd +lat_0=26 +lon_0=126 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +...
Tim Makins's user avatar
3 votes
1 answer
1k views

Multipolygon to single polygon

I am trying to merge the three polygon to make a single Polygon. The WKT of the polygon is as below //TMP_6 POLYGON ((626480.63252975536 3069129.8280593003, 626489.846006365 3069133.60864098, 626490....
rughimire's user avatar
  • 189
1 vote
0 answers
148 views

Problem reprojecting coordinates using DotSpatial

I'm trying to reproject some coordinates from EPSG:27700 to WGS84. I can do this fine in JS using the proj4 port, but I'm getting different results using DotSpatial. Here is my .NET code: var wgs84 =...
Ian Newson's user avatar
2 votes
0 answers
447 views

Reprojecting using Dotspatial?

I am using dotspatial version 1.9 to reproject a shapefile form EPSG:2326 to EPSG:3857 and I am getting wrong results. For a single point x:835869.4538390070 y:815974.4885250400 the result is x:...
eblOnSO's user avatar
  • 65
0 votes
1 answer
692 views

Reading Esri file geodatabase (*.gdb) using DotSpatial?

I am a big user of DotSpatial and have even contributed some source code. However, I am having some roadblocks in trying to figure out if DotSpatial can read a file geodatabase. I have posted on the ...
sinDizzy's user avatar
  • 437
0 votes
1 answer
338 views

CRS conversion using Lambert Azimuthal Equal Area project goes wrong for LAEA EUROPE using C#

When I try convert Lat Long from shapefile using Dotspatial for Europe LAEA and it gives null values for whole Europe region. It is a custom CRS provided by client I have used Dotspatial and tried ...
Jey's user avatar
  • 31
0 votes
0 answers
488 views

Reprojecting shapefile using DotSpatial gives unexpected lat/long coordinates?

I need to take an uploaded polygon shapefile and extract some information from it, including the lat/long positions of the centroids of the features. Using DotSpatial I attempt to Reproject the ...
Nick's user avatar
  • 1
0 votes
1 answer
852 views

Merge feature data rows of a shapefile

I'm using NetTopologySuite to read a shapefile like below code: private FeatureDataTable GetFeatureTableFromShapefile(string shapeFilePath) { GeoAPI.GeometryServiceProvider....
kamal hamidi's user avatar
1 vote
1 answer
650 views

How to obtain a WKT from a DotSpatial IFeature geometry?

I am using DotSpatial 1.9 and I have a feature (sourced from a shapefile). According to the docs, I should be able to call: ToString() on IFeature. // // Summary: // Returns the Well-...
Jay Cummins's user avatar
  • 14.6k
0 votes
0 answers
174 views

DotSpatial M and Z values not displaying in ArcGIS Desktop?

I'm making a polyline with M and Z values using DotSpatial. The M an Z values are displayed when the shapefile is dropped in QGIS, but in ArcGIS, though the attribute table indicates that its a ...
user123442's user avatar
1 vote
1 answer
2k views

Convert WGS84 to ED50 (non-UTM)

I'm trying to convert between WSG84 and ED50 (non-UTM) using C# and DotSpatial.Projections: using DotSpatial.Projections; using System; using System.Linq; namespace ConvertWGS84ToEd50 { class ...
Dan's user avatar
  • 131
1 vote
1 answer
262 views

DotSpatial Versions on GitHub

Trying to understand how version releases work on GitHub. In particular the DotSpatial library https://github.com/DotSpatial/DotSpatial. If I download the master branch and compile it, the results ...
sinDizzy's user avatar
  • 437
3 votes
2 answers
1k views

Reproject SRID using DotSpatial

I'm nota GIS guy so I need some help. I need to reproject from one SRID to another. I'm trying to take global lat/longs (4326), reproject them to a local SRID (2336). This is basically the line of ...
Doug's user avatar
  • 31
3 votes
1 answer
1k views

How to Add Field to a Shapefile Using DotSpatial

I tried a lots on Google to find a sample of showing how to add a Field to attribute table of an existing shapefile. For example I have a Shapefile at C://data/Streets.shp and need to add two ...
Mona Coder's user avatar
1 vote
1 answer
722 views

Does DotSpatial Reproject work for non-global to global projections?

As a small part of a project i need to convert shapefile geometry from OSGB1936 (EPSG:27700) to WGS1984/Pseudo (EPSG:3857) and output as wkt. I found the DotSpatial library which looked promising and ...
benj's user avatar
  • 145
0 votes
1 answer
271 views

Removing "Invalid or Missing Projection" window when adding an image with DotSpatial

I want to add an image to my win form app using DotSpatial. I use the code below (it works): private void Form1_Load(object sender, EventArgs e) { map1.AddLayer(@"C:\image.png"); } But I see "...
Mohsen's user avatar
  • 51
2 votes
1 answer
6k views

Loading a shapefile and image using DotSpatial

I am using DotSpatial 1.7 in my win form app. I have an image (original image) downloaded from Universal Map Downloder and then loaded this file with a shapefile in QGIS and then georeferencing the ...
Mohsen's user avatar
  • 51
2 votes
0 answers
329 views

formula to calculate geo-referencing paramerters

I am trying to overlap the vector and raster data. I have two control points on both raster and vector data. Now I want to generate world file parameters for overlapping two data. I am using ...
rughimire's user avatar
  • 189
1 vote
3 answers
621 views

Why does DotSpatial return NaN for point reprojection?

From the master branch and examples @ https://github.com/DotSpatial/DotSpatial the following fills the xy array with NaN but we expect 1755668,5922511 Dim x As Double() = {2666109} Dim y As Double() =...
ajayel's user avatar
  • 413
2 votes
0 answers
346 views

Define polygon across the 180 meridian in DotSpatial

I am new to DotSpatial and I try to define a polygon that crosses the 180 meridian by following: FeatureSet fs = new FeatureSet(FeatureType.Polygon); Coordinate[] coord = new ...
Wenhai Li's user avatar
0 votes
0 answers
237 views

Dotspatial SpatialToolStrip buttons disabled

I have a stand alone map application that uses the DotSpatial.Controls.SpatialToolStrip control, when I added it to the form, only the 'Print' button is enabled, while all others are disabled. I went ...
For Comment's user avatar
  • 1,115
1 vote
0 answers
478 views

Creating features(point) grid on polygon

I am working on GIS based desktop application using C#. I am using dotspatial library in this project. Now I need to create a grid of features on polygon. This grid cell (rectangle) should be 20*20 ...
Shoaib Ijaz's user avatar
2 votes
0 answers
326 views

Looking for a raster calculator C# class

I am developing an application using C# and dotspatial. I need to performs raster calculation a lot..I need a library which helps me to do it..Do you know any library for this purpose? The library ...
Majid Hojati's user avatar
1 vote
0 answers
1k views

Dotspatial.Projections with custom Proj.4 string

I have lat,long values that I need to convert to x,y in a custom Lambert Conformal Conic projection defined as +units=m +a=6371229 +b=6371229 +x_0=0 +y_0=0 +proj=lcc +lon_0=0 +lat_2=25.0 +lat_1=25.0 +...
exfizik's user avatar
  • 191
2 votes
2 answers
1k views

Error Dotspatial featureset

Writing code using C# and the DotSpatial library, with the following code: FeatureSet fs = new FeatureSet(FeatureType.Polygon); fs = FeatureSet.Open(Application.StartupPath + "\\MapFile\\Land....
ZAJ's user avatar
  • 23
2 votes
1 answer
2k views

How do I read the attribute data associated with my SHP?

I'm using DotSpatial to aid in processing some geospatial data. I'm using the code below to determine if a point (lat/lon location) is within a polygon contained in the SHP. If the point is in a ...
DenaliHardtail's user avatar
3 votes
1 answer
2k views

How do you set a polygon layers transparency in DotSpatial

How do you set a polygon layers transparency in DotSpatial? I'm using vb.net in visual studio express 2013 and using a Dotspatial nugets package which has given me DotSpatial version 1.7. Please see ...
MBT86's user avatar
  • 138
4 votes
1 answer
2k views

DotSpatial problems with reprojecting shapefiles

I have a shapefile with this projection: PROJCS["RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0....
CPA's user avatar
  • 143
0 votes
1 answer
2k views

Drawing a line and getting the length of the line C#?

I am trying to get the length of a drawn line to a textbox but its throwing an NullReferenceException at var length = f.ToShape().ToGeometry().Length;. what else should i use in the code to finish ...
usamakhan90's user avatar
5 votes
3 answers
21k views

Coordinate transformation/reprojection using DotSpatial?

The following piece of code worked with an older version of DotSpatial. public static Geometry Project_EPSG25832_To_EPSG3857(byte[] wkb, int SRID) { NetTopologySuite.IO.WKBReader reader = ...
Claus_L's user avatar
  • 417
1 vote
3 answers
2k views

MS Sql Server 2012 UnionAggregate geometry fails in ArcMap [closed]

I have following two geometries. Geometry 1 (G1): MULTIPOLYGON (((148.134707676 -34.1519003565, 148.143738823 -34.1540810687, 148.14648294 -34.1396863245, 148.143196834 -34.1392361445, 148.140859243 ...
RasikaSam's user avatar
  • 111
2 votes
0 answers
1k views

Draw Polygons by Longitude/Latitude [closed]

I am getting sql spatial results from my database query that consists of long/lat polygons. I am using these results in my c# windows form application. How can I draw each polygon from their long/...
user3125776's user avatar
1 vote
0 answers
3k views

How to convert multipolygons to a single polygon

I have converted a set of gps points to polygon and then using .makevalid() I saved them in sql server.But It converted them to multypolygons.Is there any way to fix this problem and convert them to ...
Majid's user avatar
  • 445