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

Source code checked in, #73624

$
0
0
Allow to find Transforms by alternative names (space instead of underscore, and vice versa). #23223

Commented Issue: Alternative (or wrong?) name in DotSpatial.Projections.Transforms.TransverseMercator [23223]

$
0
0
In the constructor for TransverseMercator so does a line say:
 
Name = "Transverse_Mercator";
 
In my .prj file so is the name actually "Transverse Mercator" (space instead of underscore). I don't know if it's always named like this, or if it's an alternative spelling.
 
This makes my shapefiles get an error "Projection Not Found".
Comments: Associated with changeset 73624: Allow to find Transforms by alternative names (space instead of underscore, and vice versa). #23223

Edited Issue: Alternative (or wrong?) name in DotSpatial.Projections.Transforms.TransverseMercator [23223]

$
0
0
In the constructor for TransverseMercator so does a line say:
 
Name = "Transverse_Mercator";
 
In my .prj file so is the name actually "Transverse Mercator" (space instead of underscore). I don't know if it's always named like this, or if it's an alternative spelling.
 
This makes my shapefiles get an error "Projection Not Found".
Comments: ** Comment from web user: mogikanin **

Fix applied to trunk. Thank you for posting this.

Source code checked in, #73625

$
0
0
Allow to load PointZ shapefiles without M-values. #23123

Commented Issue: Crash upon loading .shp-file without M-values [23123]

$
0
0
I have created a .shp-file from a Oracle database via ogr2ogr.exe, this can't be loaded into DotSpatial and my research seems to be because the .shp-file doesn't have any M-values.
 
Tried the trial version of a program called FME, who created another .shp-file from the same data and it included some M-values to the shp-file, and it worked loading into DotSpatial.
 
However, ogr2ogr is free and I want to use that one. And ogr2ogr doesn't seem to output M-values (haven't found any options about it), so the only solution left (I think) is that DotSpatial can support .shp-files without M-values.
 
I attach my .shp-file from ogr2ogr.
Comments: Associated with changeset 73625: Allow to load PointZ shapefiles without M-values. #23123

Edited Issue: Crash upon loading .shp-file without M-values [23123]

$
0
0
I have created a .shp-file from a Oracle database via ogr2ogr.exe, this can't be loaded into DotSpatial and my research seems to be because the .shp-file doesn't have any M-values.
 
Tried the trial version of a program called FME, who created another .shp-file from the same data and it included some M-values to the shp-file, and it worked loading into DotSpatial.
 
However, ogr2ogr is free and I want to use that one. And ogr2ogr doesn't seem to output M-values (haven't found any options about it), so the only solution left (I think) is that DotSpatial can support .shp-files without M-values.
 
I attach my .shp-file from ogr2ogr.
Comments: ** Comment from web user: mogikanin **

Thank you for posting this issue. Now it's fixed.

Commented Unassigned: OverflowException when adding shapefile with all features at 0,0 [24744]

$
0
0
Creating a shapefile with Dotspatial where all points are at 0, 0 (data returned from database query). When trying to add a shapefile with all points at 0, 0 Dotspatial throws an OverflowException.

This only happens when all points are at 0, 0. If they are all at the same, but a non-0,0 coordinate it works.

Exception occurs when adding the generated shapefile in custom code, or when using the "Add Layer..." button in the Dotspatial toolbar.

Dotspatial libraries from NuGet: v1.5.1
C# x86 solution in Visual Studio 2012

Exception: OverflowException

Message: Value was either too large or too small for an Int32.

Source: mscorlib

Stacktrace:
at System.Convert.ToInt32(Double value)
at DotSpatial.Controls.MapPointLayer.DrawFeatures(MapArgs e, IEnumerable`1 indices)
at DotSpatial.Controls.MapPointLayer.DrawFeatures(MapArgs args, List`1 indices, List`1 clipRectangles, Boolean useChunks)
at DotSpatial.Controls.MapPointLayer.DrawRegions(MapArgs args, List`1 regions)
at DotSpatial.Controls.MapFrame.Initialize(List`1 regions)
at DotSpatial.Controls.MapFrame.Initialize()
at DotSpatial.Controls.MapFrame.ResetBuffer()
at DotSpatial.Controls.MapFrame.set_ViewExtents(Extent value)
at DotSpatial.Controls.MapFrame.LayerColection_LayerAdded(Object sender, LayerEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at DotSpatial.Symbology.LayerEventList`1.OnLayerAdded(Object sender, LayerEventArgs e)
at DotSpatial.Symbology.LayerEventList`1.OnIncludeComplete(T item)
at DotSpatial.Serialization.BaseCollection`1.Add(T item)
at DotSpatial.Controls.MapLayerCollection.Add(IFeatureSet featureSet)
at DotSpatial.Controls.MapLayerCollection.Add(IDataSet dataSet)
at DotSpatial.Controls.MapLayerCollection.Add(String fileName)
at DotSpatial.Controls.Map.AddLayer(String fileName)
Comments: ** Comment from web user: mogikanin **

Hi, can you attach sample shape file?

Source code checked in, #73629


Edited Issue: Reading shapefile with null values throws exception [24969]

$
0
0
Hi,

I have a shapefile with some columns having null values. When I attempt to get the feature set from it, it throws the following exception:

Value cannot be null.
Parameter name: src
at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at DotSpatial.Data.BufferedBinaryReader.Read(Byte[] buffer, Int32 index, Int32 count)
at DotSpatial.Data.PointShapefile.FillPoints(String fileName, IProgressHandler progressHandler)
at DotSpatial.Data.PointShapefile.Open(String fileName, IProgressHandler progressHandler)
at DotSpatial.Data.Shapefile.OpenFile(String fileName, IProgressHandler progressHandler)
at DotSpatial.Data.Shapefile.OpenFile(String fileName)
at DotSpatial.Data.ShapefileDataProvider.Open(String fileName)
at DotSpatial.Data.ShapefileDataProvider.DotSpatial.Data.IDataProvider.Open(String fileName)
at DotSpatial.Data.DataManager.OpenFile(String fileName, Boolean inRam, IProgressHandler progressHandler)
at DotSpatial.Data.DataManager.OpenVector(String fileName, Boolean inRam, IProgressHandler prog)
at DotSpatial.Data.FeatureSet.Open(String fileName)
....
Comments: ** Comment from web user: mogikanin **

Thank you for posting this issue. Now it's fixed.

New Post: Writing NMEA string

$
0
0
I have programmed using the Geoframeworks 2.x dlls and bought a license back in 2006.

In the programs that I made, I was reading NMEA data from sailboat instruments and then recording them to a GPS

I saw today that the project has become open source.

I have a new project that I am working on. I am looking to write NMEA data that will get read by a GPS device. I am going to be telling the GPS to navigate to specific lat/long. The GPS is capable of receiving commands from third party devices.

Is there a way with Geoframeworks 2, GPS 3, or DotSpatial to output NMEA sentence that will get read by another device?

Edited Issue: DBF text field size from fs.SaveAs() [24181]

$
0
0
DBF text field size in a shapefile created through fs.SaveAs(“F:\...\test.shp”, true) is set to “254” rather than the maxwidth property of the input featureset datatable.

The modified sample code (attached) correctly sets the "Text" field to a maxwidth of 15 in the featureset, however the generated dbf file has a width of 254. This seems to lead to a large dbf file size when multiple text fields are included as attributes.

Source code checked in, #73634

$
0
0
DBF files: Write text field size according to MaxLength. #24181

Commented Issue: DBF text field size from fs.SaveAs() [24181]

$
0
0
DBF text field size in a shapefile created through fs.SaveAs(“F:\...\test.shp”, true) is set to “254” rather than the maxwidth property of the input featureset datatable.

The modified sample code (attached) correctly sets the "Text" field to a maxwidth of 15 in the featureset, however the generated dbf file has a width of 254. This seems to lead to a large dbf file size when multiple text fields are included as attributes.
Comments: Associated with changeset 73634: DBF files: Write text field size according to MaxLength. #24181

Edited Issue: DBF text field size from fs.SaveAs() [24181]

$
0
0
DBF text field size in a shapefile created through fs.SaveAs(“F:\...\test.shp”, true) is set to “254” rather than the maxwidth property of the input featureset datatable.

The modified sample code (attached) correctly sets the "Text" field to a maxwidth of 15 in the featureset, however the generated dbf file has a width of 254. This seems to lead to a large dbf file size when multiple text fields are included as attributes.
Comments: ** Comment from web user: mogikanin **

Thank you for posting this. Now this issue is fixed.

Edited Issue: FeatureSet.Open crashes with ArgumentOutOfRangeException [23945]

$
0
0
When opening a shape file, the FeatureSet.Open method raise an ArgumentOutOfRangeException.

The code raising the exception is really basic:
DotSpatial.Data.FeatureSet fs = (DotSpatial.Data.FeatureSet)DotSpatial.Data.FeatureSet.Open("c:\\temp\\ARCHI_13-01-01.shp");

Here the stack trace:

in System.Collections.Generic.List`1.get_Item(Int32 index)
in DotSpatial.Data.LineShapefile.FillLines(String fileName, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\LineShapefile.cs:riga 299
in DotSpatial.Data.LineShapefile.Open(String fileName, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\LineShapefile.cs:riga 89
in DotSpatial.Data.Shapefile.OpenFile(String fileName, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\Shapefile.cs:riga 329
in DotSpatial.Data.Shapefile.OpenFile(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\Shapefile.cs:riga 269
in DotSpatial.Data.ShapefileDataProvider.Open(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\ShapefileDataProvider.cs:riga 119
in DotSpatial.Data.ShapefileDataProvider.DotSpatial.Data.IDataProvider.Open(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\ShapefileDataProvider.cs:riga 65
in DotSpatial.Data.DataManager.OpenFile(String fileName, Boolean inRam, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\DataManager.cs:riga 375
in DotSpatial.Data.DataManager.OpenVector(String fileName, Boolean inRam, IProgressHandler prog) in E:\dev\dotSpatial\DotSpatial.Data\DataManager.cs:riga 281
in DotSpatial.Data.FeatureSet.Open(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\FeatureSet.cs:riga 1145
in DeleteMe.Form1.button1_Click(Object sender, EventArgs e) in C:\Disco_D\Source\DeleteMe\Form1.cs:riga 33
in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ButtonBase.WndProc(Message& m)
in System.Windows.Forms.Button.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
in System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
in DeleteMe.Program.Main() in C:\Disco_D\Source\DeleteMe\Program.cs:riga 18
in System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
in System.Threading.ThreadHelper.ThreadStart()

Source code checked in, #73648

$
0
0
Allow to read and export lineshape files with NullShapes. #23945

Commented Issue: FeatureSet.Open crashes with ArgumentOutOfRangeException [23945]

$
0
0
When opening a shape file, the FeatureSet.Open method raise an ArgumentOutOfRangeException.

The code raising the exception is really basic:
DotSpatial.Data.FeatureSet fs = (DotSpatial.Data.FeatureSet)DotSpatial.Data.FeatureSet.Open("c:\\temp\\ARCHI_13-01-01.shp");

Here the stack trace:

in System.Collections.Generic.List`1.get_Item(Int32 index)
in DotSpatial.Data.LineShapefile.FillLines(String fileName, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\LineShapefile.cs:riga 299
in DotSpatial.Data.LineShapefile.Open(String fileName, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\LineShapefile.cs:riga 89
in DotSpatial.Data.Shapefile.OpenFile(String fileName, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\Shapefile.cs:riga 329
in DotSpatial.Data.Shapefile.OpenFile(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\Shapefile.cs:riga 269
in DotSpatial.Data.ShapefileDataProvider.Open(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\ShapefileDataProvider.cs:riga 119
in DotSpatial.Data.ShapefileDataProvider.DotSpatial.Data.IDataProvider.Open(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\ShapefileDataProvider.cs:riga 65
in DotSpatial.Data.DataManager.OpenFile(String fileName, Boolean inRam, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\DataManager.cs:riga 375
in DotSpatial.Data.DataManager.OpenVector(String fileName, Boolean inRam, IProgressHandler prog) in E:\dev\dotSpatial\DotSpatial.Data\DataManager.cs:riga 281
in DotSpatial.Data.FeatureSet.Open(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\FeatureSet.cs:riga 1145
in DeleteMe.Form1.button1_Click(Object sender, EventArgs e) in C:\Disco_D\Source\DeleteMe\Form1.cs:riga 33
in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ButtonBase.WndProc(Message& m)
in System.Windows.Forms.Button.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
in System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
in DeleteMe.Program.Main() in C:\Disco_D\Source\DeleteMe\Program.cs:riga 18
in System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
in System.Threading.ThreadHelper.ThreadStart()
Comments: Associated with changeset 73648: Allow to read and export lineshape files with NullShapes. #23945

Edited Issue: FeatureSet.Open crashes with ArgumentOutOfRangeException [23945]

$
0
0
When opening a shape file, the FeatureSet.Open method raise an ArgumentOutOfRangeException.

The code raising the exception is really basic:
DotSpatial.Data.FeatureSet fs = (DotSpatial.Data.FeatureSet)DotSpatial.Data.FeatureSet.Open("c:\\temp\\ARCHI_13-01-01.shp");

Here the stack trace:

in System.Collections.Generic.List`1.get_Item(Int32 index)
in DotSpatial.Data.LineShapefile.FillLines(String fileName, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\LineShapefile.cs:riga 299
in DotSpatial.Data.LineShapefile.Open(String fileName, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\LineShapefile.cs:riga 89
in DotSpatial.Data.Shapefile.OpenFile(String fileName, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\Shapefile.cs:riga 329
in DotSpatial.Data.Shapefile.OpenFile(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\Shapefile.cs:riga 269
in DotSpatial.Data.ShapefileDataProvider.Open(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\ShapefileDataProvider.cs:riga 119
in DotSpatial.Data.ShapefileDataProvider.DotSpatial.Data.IDataProvider.Open(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\ShapefileDataProvider.cs:riga 65
in DotSpatial.Data.DataManager.OpenFile(String fileName, Boolean inRam, IProgressHandler progressHandler) in E:\dev\dotSpatial\DotSpatial.Data\DataManager.cs:riga 375
in DotSpatial.Data.DataManager.OpenVector(String fileName, Boolean inRam, IProgressHandler prog) in E:\dev\dotSpatial\DotSpatial.Data\DataManager.cs:riga 281
in DotSpatial.Data.FeatureSet.Open(String fileName) in E:\dev\dotSpatial\DotSpatial.Data\FeatureSet.cs:riga 1145
in DeleteMe.Form1.button1_Click(Object sender, EventArgs e) in C:\Disco_D\Source\DeleteMe\Form1.cs:riga 33
in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ButtonBase.WndProc(Message& m)
in System.Windows.Forms.Button.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
in System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
in DeleteMe.Program.Main() in C:\Disco_D\Source\DeleteMe\Program.cs:riga 18
in System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
in System.Threading.ThreadHelper.ThreadStart()
Comments: ** Comment from web user: mogikanin **

Thank you for posting this. Now issue is fixed.

Updated Wiki: Home

$
0
0
Contents:Overview, Contribute, Support

Overview

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.

What does DotSpatial do?

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

Who uses DotSpatial?

Getting Started

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.

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.

Updated Release: DotSpatial 1.6

$
0
0
Changes since 1.5.1
Entire list of changes see in the issue tracker.

You can also get binaries as nuget packages at Nuget.org or at official Cuahsi feed.
Viewing all 3973 articles
Browse latest View live


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