Quantcast
Channel: DotSpatial
Viewing all 3973 articles
Browse latest View live

Updated Wiki: Home

$
0
0

What is 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.Dr. Dan Ames is the project manager for DotSpatial.

DotSpatial provides a map control for .NET and several GIS capabilities including: 

  • Display a map in a .NET Windows Forms or Web application.
  • Open shapefiles, grids, rasters and images.
  • Render symbology and labels
  • Reproject on the fly
  • Manipulate and display attribute data
  • Scientific analysis
  • Read GPS data

News

  • September 15, 2015: DotSpatial 1.8 released
  • July 6, 2015: Source control has been changed from TFS to Git
  • June 5, 2015: Added an updated Developer Getting Started Guide. The tutorial section has also been updated.
  • July 25, 2014: Released DotSpatial 1.7. Details here.
  • May 1, 2014: Added several YouTube videos of sample projects (below)

Watch Videos of Sample DotSpatial Projects

The following videos show a custom application and then describe the source code used:

  • Mountain Top Mining - includes map and legend, raster/vector analysis, how to create new rasters, map algebra, etc.
  • Cut Fill Calculator - map, legend, graph, buffer, intersect, clip, map algebra, inverse distance weighting (IDW) interpolation, etc.
  • Trail Map - online basemaps, support for plugins, simple layout, map, legend, graph, digitize, etc.
  • TrailMaker- another simple raster/vector analysis tool. Shows how to use line drawing on the map (LineDrawing.cs). 
  • Soil Profiler - GUI based plugins, LineDrawing, graph, map, legend, adding your buttons to the existing plugin toolbar, etc. 

You can also get started by trying a tutorial or downloading the Visual Studio template.
Click the Source Code tab to browse or download the source.
DotSpatial automatic builds, automated tests and more.

Who uses DotSpatial?

Contribute

Download the source and learn how to contribute.

Support

Please join the OSGeo .NET mailing list or subscribe to the discussions feed.

You can also see a list of our steering committee members and our volunteers

  • Join the MapWindow/DotSpatial Announcements Mailing List for occasional announcements about major releases, conferences, and workshops.
  • General discussions about the DotSpatial project specifically should be shared through the CodePlex Discussion Forum.
  • Issues and bugs should be posted to the CodePlex Issue Tracker.
  • General discussions about use, role and application of DotNet in the Open Source GIS community should be sent through the OSGeo DotNet mailing list: dotnet@lists.osgeo.org. This is an open list that anyone can join.

New Post: is there an equivalent for SharpMap's VectorLayer.MaxVisible ?

$
0
0
ok, i got it; i'v found DynamicVisibilityWidth , maybe i'm on the right path ...

Released: DotSpatial 1.8 (Sep 15, 2015)

$
0
0
DotSpatial 1.8 release notes:
  • Simplified DotSpatial Controls Toolbox
  • Various minor bugfixes
  • Increased support for German
  • Branches other than Trunk are obsolete (please do not update them)
  • Added possibility to set image layer opacity
  • Save image layer/raster layer opacity to dspx
  • Don't set new layers extent to (-180, -90, 180, 90) because this causes ZoomToMaxExtent to show to much white space if we have an empty layer and a layer with much bigger coordinates
  • Added IMap.ZoomOutFartherThanMaxExtent because sometimes we have layers that have a small extent and we want to look at them from farther out
  • Changed GetMaxExtent to be able to get a 10% buffered Extent to use for zooming like requested by issue 84
  • Added options window to allow user to change ZoomOutFartherThanMaxExtent
  • Added move-function to move layer inside MapLayerCollection. This allows to move layers without raising LayerAdded and LayerRemoved event. It raises LayerMoved instead.
  • Added possibility to label features with FID
  • Added possibility to save created shapefile to harddisk by selecting a filename
  • Show line decorations in legend
  • Added possibilty to label multipoint layers
  • Corrected label orientation for rotated labels
  • Added possibility to rotate line labels parallel or perpendicular to the line
  • Added possibility to show a single linecap at a percentual offset from the startpoint
  • Spread the DecorationPoints evenly on lines with more than one part
  • Show DecorationPoints with offset always on the same side of the line as shown in the preview of the LineSymbol window
  • Corrected the direction of DecorationPoints on vertical lines
  • Flip first DecorationPoint back to initial position if FlipFirst and FlipAll are applied together
  • Updated to Brutile 0.10.1, removed non-working maps and fixed the Esri Hydro Base Map.
  • Added plugin SetSelectable to allow users to choose in which layers features should be selected.
  • Allow LegendItem.IsExpandable to be saved to dspx so user doesn't have to re-fold legend after loading the project if it was folded on saving.
  • Fixed issue #22515 Character Symbol does not scale with DPI
  • Fixed issue #22514 DotSpatial.Controls.Map.Print() does not correctly position some layers (Point, Labels, etc?) when Rectangle bounds is not 0, 0 origin
  • Fixed Issue #25513 CopySubset does not work with shapefiles

Updated Release: DotSpatial 1.8 (Sep 15, 2015)

$
0
0
DotSpatial 1.8 release notes:
  • Simplified DotSpatial Controls Toolbox
  • Various minor bugfixes
  • Increased support for German
  • Branches other than Trunk are obsolete (please do not update them)
  • Added possibility to set image layer opacity
  • Save image layer/raster layer opacity to dspx
  • Don't set new layers extent to (-180, -90, 180, 90) because this causes ZoomToMaxExtent to show to much white space if we have an empty layer and a layer with much bigger coordinates
  • Added IMap.ZoomOutFartherThanMaxExtent because sometimes we have layers that have a small extent and we want to look at them from farther out
  • Changed GetMaxExtent to be able to get a 10% buffered Extent to use for zooming like requested by issue 84
  • Added options window to allow user to change ZoomOutFartherThanMaxExtent
  • Added move-function to move layer inside MapLayerCollection. This allows to move layers without raising LayerAdded and LayerRemoved event. It raises LayerMoved instead.
  • Added possibility to label features with FID
  • Added possibility to save created shapefile to harddisk by selecting a filename
  • Show line decorations in legend
  • Added possibilty to label multipoint layers
  • Corrected label orientation for rotated labels
  • Added possibility to rotate line labels parallel or perpendicular to the line
  • Added possibility to show a single linecap at a percentual offset from the startpoint
  • Spread the DecorationPoints evenly on lines with more than one part
  • Show DecorationPoints with offset always on the same side of the line as shown in the preview of the LineSymbol window
  • Corrected the direction of DecorationPoints on vertical lines
  • Flip first DecorationPoint back to initial position if FlipFirst and FlipAll are applied together
  • Updated to Brutile 0.10.1, removed non-working maps and fixed the Esri Hydro Base Map.
  • Added plugin SetSelectable to allow users to choose in which layers features should be selected.
  • Allow LegendItem.IsExpandable to be saved to dspx so user doesn't have to re-fold legend after loading the project if it was folded on saving.
  • Fixed issue #22515 Character Symbol does not scale with DPI
  • Fixed issue #22514 DotSpatial.Controls.Map.Print() does not correctly position some layers (Point, Labels, etc?) when Rectangle bounds is not 0, 0 origin
  • Fixed Issue #25513 CopySubset does not work with shapefiles

Commented Unassigned: Polygon with hole [63600]

$
0
0
Hello
I am sorry for my English
I have short fragment of code

```
static void Main(string[] args)
{
FeatureSet fs = new FeatureSet(FeatureType.Polygon);
fs.Projection = KnownCoordinateSystems.Geographic.World.WGS1984;
List<Coordinate> coorBig = new List<Coordinate> { new Coordinate(0, 0), new Coordinate(0, 100), new Coordinate(100, 100), new Coordinate(100, 0) };
List<Coordinate> coordCenter = new List<Coordinate> { new Coordinate(25, 25), new Coordinate(25, 75), new Coordinate(75, 75), new Coordinate(75, 25) };

LinearRing lr1 = new LinearRing(coorBig);
LinearRing[] lr2 = { new LinearRing(coordCenter) };
Polygon pgHole = new Polygon(lr1, lr2);

fs.AddFeature(pgHole);
fs.SaveAs("C:\\Temp\\testD.shp", true);
}
```

When I open this shape file, I see multipolygon instead polygon this hole. Could somebody help me, what I did wrong? Thanks for your help.
Comments: You have to make sure, that the points of your shell (lr1) are ordered clockwise and the points of your holes (lr2) are ordered counter clockwise. Have a look at the example below on how to make sure that your holes are counter clockwise. ``` using DotSpatial.Topology; using System.Collections.Generic; using DotSpatial.Topology.Algorithm; LinearRing[] lr2 = { new LinearRing(coordCenter) }; //make sure the holes are oriented counterclockwise for (int i = 0; i < lr2.Length; i++) { if (!CgAlgorithms.IsCounterClockwise(lr2[i].Coordinates)) { lr2[i] = new LinearRing(lr2[i].Reverse()); } } Polygon pgHole = new Polygon(lr1, lr2); ```

New Post: Parallel implementation of DotSpatial.Symbology raster opperations.

$
0
0
Hi Ben, thank you for this excellent contribution, I have tested your code but there is a little issue, the image in the map has white stripes and colors are not represented like in the original image. Do you have an idea on how to fix this problem?

New Post: Crop area in ShapeFile

$
0
0
Hi!

I am a newbie in DotSpatial.

I am developing desktop application and trying to use DotSpatial library to display ShapeFile.

In most of cases, my users will be concerned with only a small portion of city area. One example is a part of Manhattan of NYC (the attached file shows an example).

However most of ShapeFiles are quite huge and it includes a large area (entire city).

I'd like to know how to perform pre-process when this large ShapeFile is loaded in order to include only the area a user is interested in.

The application has a Bing Map or Open Street Map so that before loading a ShapeFile, a user selects an interesting area. By selecting the area, the application knows geocode(four sets of longitude and latitude) of rectangular area selected.

If the huge ShapeFile is loaded, it is too slow and too many useless points are loaded. Therefore I'd like to exclude all unnecessary information and include only the ones inside the interesting.
Exampel of Google Map

Q1: While parsing the ShapeFile, how can I include only the interested area and display that area?

Q2: How do I save a new ShapeFile for that small area?


Thanks -

New Post: dotspatial it's beginning to impress me

$
0
0
I blew my head off to make groups with subgroups with subgroups in sharpmap (which doesn't have groups). I can see that dotspatial's got it. I'm really impressed.

New Post: dotspatial it's beginning to impress me

$
0
0
dotSpatial is really starting to impress me also! BUT the tools are not that particularly useful. When you use a specific tool (say Thiessien Polygons), the resulting layer does not contain any attribute data from the original data layer. As a result, the new layer is not that useful. If they can upgrade that aspect, I would use my dotSpatial applications over ArcGIS 10.3 any day. ALSO, they really need to make some clear and concise documentation and or tutorials on how to implement the modeler and GPS. If this already exists, for the life of me, I cant find it. Aside from that, dotSpatial is amazing!

New Post: Parallel implementation of DotSpatial.Symbology raster opperations.

$
0
0
Hi Joseteques,

Could you post images? I figure that'll give me a better idea (hopefully)

What format and operation are you performing? It's working well on my stuff but that's obviously only one project. Regarding the white lines, I've noticed that there were always diagonal lines on the hillshade surface which didn't change after doing it in parallel which I'm hoping is what you mean?

Oh yea, if you need to do IDW I can give the code I use to speed that up too.
  • Ben

New Post: Projection Mismatch

$
0
0
Hi,
I'm using plugin DotSpatial.Plugins.WebMap for add a layer to my project.
The projection of this layer is WGS84.

Above it, I'm adding the layer with projection equals to 3004.

The system returns me an error about "Projection Mismatch" with Yes or Not.

How can I correct this error?

Thanks.

New Post: DrawingLayers vs Manual Graphics Creation

$
0
0
I had been creating temporary symbology (such as GPS points) manually using some ideas I discovered here:

https://dotspatial.codeplex.com/discussions/349648

I then discovered 'DrawingLayers' I was curious if there is any reason to continue generating symbols manually or if I can switch over to using the DrawingLayers. Is there any sort of performance trade off? Or perhaps I am not fully understanding the use case of the 'Drawing Layers'?

thanks,
-justin

also i noticed some patches i submitted have disappeared since the switch to Git, should I resubmit them as pull requests?

New Post: DrawingLayers vs Manual Graphics Creation

$
0
0
Hey Justin,

the patches that were not added to the source code disappeared when the source control was switched from TFS to Git. It Would be nice if you could resubmit your patch either as a pull request or as an issue.

jany_

New Post: Some advice on adding open streetmap to my project

$
0
0
Thank you Felix, so I can change the color easy for my Application.

There is an other issue, with the new DotSpatial.Plugins.BruTileLayer

The old one, when I saved a Project to a dspx file and load again the DotSpatial.Plugins.BruTileLayer was loaded with the Project.

Now all the shp layers are loaded but the DotSpatial.Plugins.BruTileLayer not.

I load the DotSpatial.Plugins.BruTileLayer this way.
        Private Sub _buttonAddOSMLayer_ExecuteEvent(ByVal sender As Object, ByVal e As ExecuteEventArgs)

            Dim _btLayer As DotSpatial.Plugins.BruTileLayer.BruTileLayer
           
            Map1.FunctionMode = FunctionMode.None

           _btLayer = DotSpatial.Plugins.BruTileLayer.BruTileLayer.CreateKnownLayer(BruTile.Predefined.KnownTileSource.OpenStreetMap, "")

            _btLayer.LegendText = "Open Street Map"

            Map1.Projection = KnownCoordinateSystems.Projected.World.WebMercator

            Map1.Layers.Add(_btLayer)
            Map1.MapFrame.ZoomIn()
            Map1.Refresh()

        End Sub
This works perfect as before and now the BruTile layer is also shown at the Print Layout Dialog (the old one not)

Have you tested to create a dspx file with the DotSpatial.Plugins.BruTileLayer ?

Thanks

New Post: Some advices on editing feature SHP (polygon)

$
0
0
Hi All, I was able to create polygon shapefile based on the tutorial 4. Now I would like to edit the same polygon shapefile. I would like to do something like:
1- select the polygon layer
2- activate edit mode
3- show vertices
4- add/remove/move vertex
5- save edits
I know that there is this DotSpatial.Plugins.ShapeEditor but I need some advices on how to use and implement it and whether it can cover those 5 steps or not.
PS: I am using VB.NET but I am open to any suggestions

Thank you,
Sypou

New Post: ShapeEditor.dll,How to Save shape to current feature layer

$
0
0
Hi am2, I was just looking for how to use this shapeeditor.dll. I would like to edit polygon (add/remove/move vertex). Can you guide me on the steps to follow? I already added Dotspatial.Plugins.shapeEditor in my references but no clue how to use it.
And you might have already found a solution to save the changes.

Thank you,
sypou

New Post: Some advice on adding open streetmap to my project

$
0
0
Have you tested to create a dspx file with the DotSpatial.Plugins.BruTileLayer ?
At least not thouroughly enough. Unfortunatly the lead BruTile developer made a lot of changes under the hood that screwed up most of the necessary reflection code to get the values needed to serialize properly.

I will have a look asap.

New Post: Parallel implementation of DotSpatial.Symbology raster opperations.

$
0
0
Hi Ben, sorry for my late response... here are the images. I'm loading a raster (Geotiff file, around 80 Mb ) using your modifications, loading time is improved but as you can see the image has some stripes all around. Image1 shows the map with your modifications, Image2 corresponds to old code and Image3 shows how QGIS renders the same image.

Image
Image
Image

New Post: ShapeEditor.dll,How to Save shape to current feature layer

$
0
0
Hi,

Not sure whether you already found a way to save the changes or not, but for me, I save the edits from table editor (tried it from Demo Map).

Sypou

New Post: AddShapeFunction and MoveVertexFunction (ShapeEditor) like in DemoMap

$
0
0
Hi All,

Anyone can help on how to use AddShapeFunction and MoveVertexFunction like in DemoMap?

Thank you.
sypou
Viewing all 3973 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>