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.

46 questions
9
votes
1 answer

Reading shapefile coordinates in c#

I want to draw a polyline on "XAML Map Control" with latitude/longitude, using the content of a shapefile. I have 2 types of shapefile: One with .dbf, .prj, qpj, .shx and obviously .shp file. One with only .shp file Reading with both type of files…
iRubens
  • 315
  • 1
  • 2
  • 11
6
votes
1 answer

NettopologySuite and Dotspatial WKTReader

So I have a bunch of WKT representing a multi-polygon. I exclusively use DotSpatial to manipulate geometries. Specifically I'm trying to get a DotSpatial.Topology.IGeometry out of my WKT. Unfortunately the DotSpatial guys recently moved a lot of…
Ed Kramer
  • 131
  • 1
  • 12
4
votes
2 answers

Raster Data Loading from FilePath in Dotspatial

I have this simple line of code in DotSpatial var raster = Raster.OpenFile("X://Data//4mr_project.tif"); Why raster just getting null value?? I also have .aux, .ovr, .tfw files in the same directory. EDITED: I found that the line below works…
Moshi
  • 1,385
  • 2
  • 17
  • 36
3
votes
1 answer

How do I create random dots concentrated in a particular area in JS?

Need some conceptual help here. Currently, I have a random-dot function that creates two sets of dots (orange and blue) that spread out over a canvas. But I'm looking for a way to concentrate the dot density in random areas around the screen. The…
glizzard
  • 137
  • 6
3
votes
0 answers

DotSpatial - How to save Turkish symbols (like 'ə' 'ü' and etc.) in dbf file correctly? (Or how to change encoding while saving shape file)

I need to add Turkish symbols to shape file. But I cannot change the encoding during the saving shape file. Below is my code snippet: FeatureSet fs = new FeatureSet(FeatureType.Polygon); ProjectionInfo pStart = new ProjectionInfo(); pStart =…
Murad
  • 523
  • 4
  • 17
3
votes
0 answers

Reading From a Stream using DotSpatial

Is it possible, using DotSpatial, to read data from a stream (or set of streams) instead of from a specific file? I was hoping that I could point it at the encompassing ZIP file and it'd just work. I've looked at the Shapefile.Open() and…
Adrian Thompson Phillips
  • 6,893
  • 6
  • 38
  • 69
2
votes
1 answer

Set field value in a Featureset Dotspatial

I am creating a shapefile using DotSpatial library in Microsoft Visual Studio and C# programming language. The shapefile consists of a Polygon layer. Each polygon in the layer needs to have a specific fertilizer value. As far as my understanding…
Umar Dastgir
  • 688
  • 9
  • 25
2
votes
0 answers

Directly read a zipped shapefile using DotSpatial

I have an application in which users can upload a shapefile which is then converted to WKT in C# and saved to the database. I'm using DotSpatial for this purpose. In this case, I can use the following code and then proceed to do what I…
Raj
  • 315
  • 4
  • 15
2
votes
1 answer

Programmatically Set Attribute Table in new Shapefile

I have a program that loads a shapefile into memory, groups some of the features based on business logic, creates a shapefile out of each group of features, and then saves the files to a cloud location for use in other applications. The one sticking…
jdmac020
  • 557
  • 1
  • 5
  • 18
2
votes
1 answer

Define polygon cross 180 meridian in DotSpatial

I am new to DotSpatial and I try to define a polygon cross 180 meridian by following: FeatureSet fs = new FeatureSet(FeatureType.Polygon); Coordinate[] coord = new Coordinate[5]; coord[0] = new Coordinate(30, 48); coord[1] = new Coordinate(120,…
kunluncat
  • 21
  • 1
2
votes
2 answers

Very slow performance with DotSpatial shapefile

I'm trying to read all of the feature data from particular shapefile. In this case, I'm using DotSpatial to open the file, and I'm iterating through the features. This particular shapefile is only 9mb in size, and the dbf file is 14mb. There is…
Juzzbott
  • 1,737
  • 2
  • 25
  • 44
2
votes
1 answer

Intersects but not contains a feature to another feature in DotSpatial

I need just intersected features not fully contained in DotSpatial. If I use feature.Intersects(), it gives me intersected and contained features and when I use feature.Contains(), it gives me just contained features. I have done it manually like…
Moshi
  • 1,385
  • 2
  • 17
  • 36
1
vote
0 answers

DotSpatial (C#) re-projections - 'InitializeExternalGrids' causes .Net to 'freeze'

I am trying to apply an NTv2 gridshift package (OSTN15 from the UK Ordnance Survey) to some DotSpatial re-projections. This is the code I have so far: const string Proj4_4326 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"; const string OSTN15…
Columbo
  • 2,896
  • 7
  • 44
  • 54
1
vote
0 answers

DotSpatial.Projections.Reproject.ReprojectPoints with Height?

https://github.com/DotSpatial/DotSpatial/blob/master/Source/DotSpatial.Projections/Reproject.cs Please can someone explain the Z array that the '.ReprojectPoints' command uses. Using the 'Earth from Space' projection: '+proj=ortho' I would like to…
Tim Makins
  • 394
  • 4
  • 12
1
vote
1 answer

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 and click "Get Position on Map" and enter in the above coordinates, it places the point in the correct place on the map (at the…
Kellie
  • 193
  • 15
1
2 3 4