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

Source code checked in, #73700

$
0
0
Ignore tests which do not want to work on x64

Source code checked in, #73701

New Post: Download documentation as chm: No Unblock option in Properties of the CHM file

$
0
0
SkeeterDeeter wrote:
Copy the file to your local computer. .chm files can't be opened over a network
Cheers SkeeterDeeter.

Commented Task: DotSpatial.Topology vs NetTopologySuit [25064]

$
0
0
At the moment in the NetTopologySuit there are a lot of fixes\improvements, which not included into DotSpatial.Topology. I think we need to think how to syncronize these two projects. I think we should reuse NetTopologySuit as a reference dll insde DotSpatial.Topology with some converters from NTS to DS classes.
Comments: ** Comment from web user: FObermaier **

There is an issue on the NTS issue tracker
http://code.google.com/p/nettopologysuite/issues/detail?id=157&can=1&q=signed

We've had troubles with signed assemblies, that's why we quit doing that.
Now, if that is a requirement for you to use NTS, we need to reconsider that.

Commented Task: DotSpatial.Topology vs NetTopologySuit [25064]

$
0
0
At the moment in the NetTopologySuit there are a lot of fixes\improvements, which not included into DotSpatial.Topology. I think we need to think how to syncronize these two projects. I think we should reuse NetTopologySuit as a reference dll insde DotSpatial.Topology with some converters from NTS to DS classes.
Comments: ** Comment from web user: D_Guidi **

>Now, if that is a requirement for you to use NTS, we need to reconsider that.
+1

Commented Unassigned: Distance.Parse is inconsistant with invalid input [24937]

$
0
0
Distance.Parse throws an exception when a number with an unrecognized unit is entered:

```
Distance.Parse("3 this should not be valid");
```

This is fine, but if the number is removed:

```
Distance.Parse("this should not be valid");
```

Then the function returns a Distance object set to "0 ft" and IsInvalid=false.

Invalid text without a number should throw an exception.
Comments: ** Comment from web user: RayHarwood **

For VB, this is actually "technically consistent". In the first case, it parses a 3 and discards the rest. In the second case, it cannot find any valid numerical at the beginning, so it throws an error.

I recommend using the alternative TryParse instead.

New Post: Projections for Hawaii

$
0
0

Mogikanin,

I have finally solved my problem, at least to my satisfaction. I am still not sure if it is the correct way to implement but it gives me the answers I need. Here is a snipped from my VB code. The key was to add the +towgs84=-1,=1,1 parameter to the Proj4 string. That produces about a 50cm translation in both easting and northing on the big island.

The reference string is EPSG:1252, or so I think.

Hope this helps

Regards,

Dim pLatLon As ProjectionInfo

If bHawaiiUTM Then

pLatLon = ProjectionInfo.FromProj4String(" +proj=latlong +ellps=WGS84 +towgs84=-1,-1,1")

'ref EPSG 1252: is practically same as NAD83 but includes offsets of 1,1,-1

pLatLon.Name = "[NAD83] (4m) United States (USA) - Hawaii"

Else

pLatLon = KnownCoordinateSystems.Geographic.World.WGS1984

End If

Source code checked in, #73706

$
0
0
Fixed #25121: Project (dspx) serialization and GDAL Imagery.

Closed Issue: Project (dspx) serialization and GDAL Imagery [25121]

$
0
0
This seems to happen even when using the DemoMap.exe.

1.) Start up DemoMap.exe
2.) Add a gdal imagery layer to the application
3.) Save the project file
4.) Close DemoMap.exe
5.) Reopen DemoMap.exe
6.) Open the saved project file
7.) -- Error Here --

Link to a relatively small sid file I was using for this test:
https://dl.dropboxusercontent.com/u/16831965/gdal_sid.zip
Comments: Resolved with changeset 73706: Fixed #25121: Project (dspx) serialization and GDAL Imagery.

Commented Issue: Setting FilePath property of a FeatureSet doesn't populate the FeatureSet [22287]

$
0
0
I have the following test code:
 
var fs = new FeatureSet()
fs.FilePath = ("c:\\temp\\test.shp")
Assert.Greater(fs.Features.Count) //fails - Features.Count is still zero
 
The test fails, because setting the FilePath doesn't have the expected side effect of populating the Features and the AttributeTable.
 
This creates a problem in Serialization. Sometimes a FeatureSet instance is serialized using the DotSpatial.Data.FeatureSet data type. When it is being deserialized, first the default constructor is used (this creates a new empty FeatureSet) and then the FilePath property is being set (this doesn't populate the features as the original author of XmlDeserializer expected).
 
Suggested solution ideas:
Option 1 - When the FeatureSet is empty and the FilePath property is set, populate the features and attributes of the current instance from the FilePath file.
Option 2 - When serializing a FeatureSet, try to serialize all its geometry features and attributes to the xml file (this would solve the issue of user-generated in-memory FeatureSets that don't have a source file)
Option 3 - When serializing a FeatureSet, try to check the data type. If it's SHP, then serialize it as a PointShapefile, LineShapefile or PolygonShapefile. In other words, delegate the responsibility of serializing from FeatureSet to the DataProvider. For example, the ShapefileProvider would serialize the FilePath but the SpatiaLite provider would serialize the database connection and table name.
Comments: ** Comment from web user: mogikanin **

Populating inner FeatureSet when FilePath changed will break a lot of code which uses DS.
If you want to use FeatureSet directly in such manner (without using specific classes like PointShapefile, PolygonShapefile,....) you need to create your own FeatureSet inheritor:
```
public class FeatureSetSerializableFilePath : FeatureSet
{
private void OpenFileInternal(string filePath)
{
// Open logic...
}

[Serialize("FilePath")]
public override string FilePath
{
get { return base.FilePath; }
set
{
if (FilePath == value) return;
base.FilePath = value;
OpenFileInternal(value);
}
}
}
```

New Post: How to disable the "invalid or Missing Projection Message box"

$
0
0
Can you also explain where to put this part of code?

Edited Issue: Problem with GDAL write filter [23730]

$
0
0
I am using the default set of GDAL providers. When I try to set my SaveFileDialog.Filter to DotSpatial.Data.DataManager.DefaultDataManager.DialogWriteFilter, an error appears saying invalid format. The value for me is:

All Supported Formats|.tif;.tiff;.adf;*.bgd;*.bmp;*.emf;*.exf;*.gif;*.ico;*.jpg;*.mbp;*.png;*.tif;*.wmf; *.bmp;*.shp;*.gen;*.thf;*.blx;*.xlb;*.bag;*.kap;*.bt;*.doq;*.dt0;*.dt2;*.ers;*.n1;*.fits;*.hdr;*.grb;*.img;*.mpr;*.mpl;*.j2k;*.sid;*.ecw;*.jp2;*.ppm;*.pgm;*.rik;*.rsw;*.mtw;*.ddf;*.ter;*.dem;*.toc;*.asc;*.adf;*.dt1;*.tiff;*.bil;*.nc;*.gff|Vectors|*.shp|Rasters|*.bgd;*.asc;*.adf;*.dt1;*.tiff;*.bil;*.nc;*.gff|Images|*.bmp;*.emf;*.exf;*.gif;*.ico;*.jpg;*.mbp;*.png;*.tif;*.wmf; *.bmp;*.gen;*.thf;*.blx;*.xlb;*.bag;*.kap;*.bt;*.doq;*.dt0;*.dt2;*.ers;*.n1;*.fits;*.hdr;*.grb;*.img;*.mpr;*.mpl;*.j2k;*.sid;*.ecw;*.jp2;*.ppm;*.pgm;*.rik;*.rsw;*.mtw;*.ddf;*.ter;*.dem;*.toc| [.tif] - GDAL Raster Provider| .tif| [.tiff] - GDAL Raster Provider| .tiff| [.adf] - GDAL Raster Provider| .adf|DotSpatial - Binary Files (*.bgd)|*.bgd|DotNet Image - Images|*.bmp;*.emf;*.exf;*.gif;*.ico;*.jpg;*.mbp;*.png;*.tif;*.wmf|DotNet Image - Images|DotNet Image - Bitmap | *.bmp|DotSpatial.Shapefile - Shapefiles (*.shp)|*.shp|GDAL - Images|*.bmp;*.jpg;*.gif;*.gen;*.thf;*.blx;*.xlb;*.bag;*.kap;*.bt;*.doq;*.dt0;*.dt2;*.ers;*.n1;*.fits;*.hdr;*.grb;*.img;*.mpr;*.mpl;*.j2k;*.tif;*.sid;*.ecw;*.jp2;*.png;*.ppm;*.pgm;*.rik;*.rsw;*.mtw;*.ddf;*.ter;*.dem;*.toc|GDAL Raster Provider - AAIGrid|*.asc;*.adf|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|*.dt0;*.dt1;*.dt2|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|*.tif;*.tiff|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|*.ter|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|GDAL Raster Provider - GenBin|*.bil|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|GDAL Raster Provider - GenBin|GDAL Raster Provider - netCDF|*.nc|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|GDAL Raster Provider - GenBin|GDAL Raster Provider - netCDF|GDAL Raster Provider - Imagine|*.img|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|GDAL Raster Provider - GenBin|GDAL Raster Provider - netCDF|GDAL Raster Provider - Imagine|GDAL Raster Provider - GFF|*.gff|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|GDAL Raster Provider - GenBin|GDAL Raster Provider - netCDF|GDAL Raster Provider - Imagine|GDAL Raster Provider - GFF|GDAL Raster Provider - Terragen|*.ter|All Files (*.*) |*.*

I think the error is here:

GDAL Raster Provider - AAIGrid|*.asc;*.adf|GDAL Raster Provider - AAIGrid

There seem to be many duplicates and the format is not consistent. For example:

[.tiff] - GDAL Raster Provider| .tiff

I don't know why the [.tiff] - is preceding the name.

In general, this huge list of file types with many duplicates is confusing.

Source code checked in, #73707

$
0
0
Fixed #23730: Problem with GDAL write filter

Closed Issue: Problem with GDAL write filter [23730]

$
0
0
I am using the default set of GDAL providers. When I try to set my SaveFileDialog.Filter to DotSpatial.Data.DataManager.DefaultDataManager.DialogWriteFilter, an error appears saying invalid format. The value for me is:

All Supported Formats|.tif;.tiff;.adf;*.bgd;*.bmp;*.emf;*.exf;*.gif;*.ico;*.jpg;*.mbp;*.png;*.tif;*.wmf; *.bmp;*.shp;*.gen;*.thf;*.blx;*.xlb;*.bag;*.kap;*.bt;*.doq;*.dt0;*.dt2;*.ers;*.n1;*.fits;*.hdr;*.grb;*.img;*.mpr;*.mpl;*.j2k;*.sid;*.ecw;*.jp2;*.ppm;*.pgm;*.rik;*.rsw;*.mtw;*.ddf;*.ter;*.dem;*.toc;*.asc;*.adf;*.dt1;*.tiff;*.bil;*.nc;*.gff|Vectors|*.shp|Rasters|*.bgd;*.asc;*.adf;*.dt1;*.tiff;*.bil;*.nc;*.gff|Images|*.bmp;*.emf;*.exf;*.gif;*.ico;*.jpg;*.mbp;*.png;*.tif;*.wmf; *.bmp;*.gen;*.thf;*.blx;*.xlb;*.bag;*.kap;*.bt;*.doq;*.dt0;*.dt2;*.ers;*.n1;*.fits;*.hdr;*.grb;*.img;*.mpr;*.mpl;*.j2k;*.sid;*.ecw;*.jp2;*.ppm;*.pgm;*.rik;*.rsw;*.mtw;*.ddf;*.ter;*.dem;*.toc| [.tif] - GDAL Raster Provider| .tif| [.tiff] - GDAL Raster Provider| .tiff| [.adf] - GDAL Raster Provider| .adf|DotSpatial - Binary Files (*.bgd)|*.bgd|DotNet Image - Images|*.bmp;*.emf;*.exf;*.gif;*.ico;*.jpg;*.mbp;*.png;*.tif;*.wmf|DotNet Image - Images|DotNet Image - Bitmap | *.bmp|DotSpatial.Shapefile - Shapefiles (*.shp)|*.shp|GDAL - Images|*.bmp;*.jpg;*.gif;*.gen;*.thf;*.blx;*.xlb;*.bag;*.kap;*.bt;*.doq;*.dt0;*.dt2;*.ers;*.n1;*.fits;*.hdr;*.grb;*.img;*.mpr;*.mpl;*.j2k;*.tif;*.sid;*.ecw;*.jp2;*.png;*.ppm;*.pgm;*.rik;*.rsw;*.mtw;*.ddf;*.ter;*.dem;*.toc|GDAL Raster Provider - AAIGrid|*.asc;*.adf|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|*.dt0;*.dt1;*.dt2|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|*.tif;*.tiff|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|*.ter|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|GDAL Raster Provider - GenBin|*.bil|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|GDAL Raster Provider - GenBin|GDAL Raster Provider - netCDF|*.nc|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|GDAL Raster Provider - GenBin|GDAL Raster Provider - netCDF|GDAL Raster Provider - Imagine|*.img|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|GDAL Raster Provider - GenBin|GDAL Raster Provider - netCDF|GDAL Raster Provider - Imagine|GDAL Raster Provider - GFF|*.gff|GDAL Raster Provider - AAIGrid|GDAL Raster Provider - DTED|GDAL Raster Provider - GTiff|GDAL Raster Provider - TERRAGEN|GDAL Raster Provider - GenBin|GDAL Raster Provider - netCDF|GDAL Raster Provider - Imagine|GDAL Raster Provider - GFF|GDAL Raster Provider - Terragen|*.ter|All Files (*.*) |*.*

I think the error is here:

GDAL Raster Provider - AAIGrid|*.asc;*.adf|GDAL Raster Provider - AAIGrid

There seem to be many duplicates and the format is not consistent. For example:

[.tiff] - GDAL Raster Provider| .tiff

I don't know why the [.tiff] - is preceding the name.

In general, this huge list of file types with many duplicates is confusing.
Comments: Resolved with changeset 73707: Fixed #23730: Problem with GDAL write filter

Source code checked in, #73708

$
0
0
Fixed #22237: FeatureToRaster tool doesn't recognize GeoTiff as valid output format

Commented Feature: FeatureToRaster tool doesn't recognize GeoTiff as valid output format [22237]

$
0
0
Steps to duplicate:
Run Demo Map
Add a polygon shapefile
Run the FeatureToRaster tool
In the Output file dialog, BGD is offered as the only possible file type.
 
Expectation: If GDALExtension is loaded, then all GDAL raster file formats should be available as output.
Note: The same problem also occurs with the "Clip Raster Layer" tool and with all "Raster Overlay" tools.
Comments: Associated with changeset 73708: Fixed #22237: FeatureToRaster tool doesn't recognize GeoTiff as valid output format

Closed Feature: FeatureToRaster tool doesn't recognize GeoTiff as valid output format [22237]

$
0
0
Steps to duplicate:
Run Demo Map
Add a polygon shapefile
Run the FeatureToRaster tool
In the Output file dialog, BGD is offered as the only possible file type.
 
Expectation: If GDALExtension is loaded, then all GDAL raster file formats should be available as output.
Note: The same problem also occurs with the "Clip Raster Layer" tool and with all "Raster Overlay" tools.

Closed Issue: Point Symbology possible error [23339]

$
0
0
Have some problems with diffined symbology for a point layer, have attached a project which reproduces the error. after pressing button1, on mouse click within the mapcontrol should add a point to one layer in the centre of the grid and turn the grid cell grey.
First click adds the point but does not turn grid cell grey.
Second click behaves as intended.
Third click give error in MapPointLayer.DrawFeatures.
I have to admit not to sure if I've put this together correctly, or if I've crossed wires some where.
Been having plenty of problems refreshing with the correct symbology within the mapcontrol after adding features.
Feeling very clumsy using DotSpatial, so I'm sure I'm missing some concept.
Thanks for any help.
Did want to place this under the discussion section but could not attach a file.
Comments: Please use discussions tab for such questions.
You can share your files using dropbox or any other free services for sharing.

Closed Unassigned: Cross-thread operation not valid [24848]

$
0
0
I am attempting to reproject a raster. When I get to the point of output.saveas(outputfilename) I get a cross-thread error with the ribbonstatusbar (see below). Is there a way to work around this or fix it?


System.InvalidOperationException: Cross-thread operation not valid: Control 'ribbonStatusBar' accessed from a thread other than the thread it was created on.
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.PointToClientInternal(Point p)
at System.Windows.Forms.Control.PointToClient(Point p)
at DevExpress.XtraBars.Ribbon.ViewInfo.RibbonItemViewInfo.PointToClient(Point p)
at DevExpress.XtraBars.BarItemLink.ScreenToLinkPoint(Point p)
at DevExpress.XtraBars.ViewInfo.BarLinkViewInfo.get_MousePosition()
at DevExpress.XtraBars.ViewInfo.BarEditLinkViewInfo.CompareLinkState(BarLinkState newState, BarLinkState current)
at DevExpress.XtraBars.ViewInfo.BarLinkViewInfo.UpdateLinkState()
at DevExpress.XtraBars.BarItemLink.CheckUpdateLinkState()
at DevExpress.XtraBars.BarItemLink.LayoutChanged()
at DevExpress.XtraBars.BarItemLink.OnLinkChanged()
at DevExpress.XtraBars.BarItem.OnItemChanged(BarItemLink link, Boolean onlyInvalidate, Boolean onlyUpdateAppearance)
at DevExpress.XtraBars.BarItem.OnItemChanged(Boolean onlyInvalidate, Boolean onlyUpdateAppearance)
at DevExpress.XtraBars.BarItem.OnItemChanged(Boolean onlyInvalidate)
at DevExpress.XtraBars.BarEditItem.OnEditValueChanged()
at DevExpress.XtraBars.BarEditItem.set_EditValue(Object value)
at DotSpatial.RibbonHeader.Progress(String key, Int32 percent, String message)
at DotSpatial.Data.ProgressMeter.SendProgress()
at DotSpatial.Data.ProgressMeter.set_CurrentPercent(Int32 value)
at DotSpatial.Data.ProgressMeter.set_CurrentValue(Object value)
at DotSpatial.Data.Raster`1.GetStatistics()
at DotSpatial.Data.Raster.SaveAs(String fileName, String driverCode, String[] options)
at DotSpatial.Data.Raster.SaveAs(String fileName)
Comments: Not DS issue. Probably you are saving raster in not GUI thread and you need to synchronize this by yourself.

Closed Unassigned: 一个问题 [25052]

$
0
0
DotSpatial.Data.IFeatureSet fs = DotSpatial.Data.FeatureSet.Open(fileName);
foreach (DotSpatial.Data.IFeature f in __fs.Features__)
{
//
}
从外部导入一个shp文件(我的测试文件大小为5MB),每当调用fs.Features时,内存直线上升。
Comments: Not an issue.
Viewing all 3973 articles
Browse latest View live


Latest Images

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