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

Closed Issue: AttributeTable.Columns.Add [310]

$
0
0
Adding an IField column through the AttributeTable.Columns property does not actually add the IField. Adding an IField through AttributeTable.Table.Columns.Add does however works. Is it possible to sink these properties, or remove the Columns property altogether since it is confusing to have to different access points to the AttributeTable's columns, especially since they don't behave the same.

Thanks for your efforts!
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Feature: DataManager.OpenFile ignores InRam when opening Files [288]

$
0
0
DataManager.OpenFile has argument InRam, but it is not passed down to the data provider so we eventually get to InRamImageData.Open where Out of Memory occurs at Image.FromFile.

Is there another way to open a large file that could be used instead?
The implementation of this feature would include passing inRam to the provider and rewriting some of the providers to pay attention to this flag.

Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Feature: Selection Options [290]

$
0
0
The selection tool should include the following capabilities (similar to ArcGIS):
-set selectable layers/ make only selectable layer
-add to/ replace/ remove from current selection (from Home tab, not just from attribute table)
-clear selected features (from Home tab, not just from attribute table)
-select by attributes/ select by location.

(http://hydrodesktop.codeplex.com/workitem/7370)
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Feature: Add/Remove Vertices [44]

$
0
0
We have a current need for updating the Shape editing vertex editor to insert or remove vertices.

Original Post (JamesP):

I have got adding shapes and moving vertices on an existing shape working (based on the editor plugin - but I have modified a bit as I had some specific requirements).

As far as I can see there is currently no support for adding / deleting nodes when editing an existing shape - just dragging existing ones.

Anyone got any ideas on how best to approach this ? I assume I need to somehow add a node - maybe half way between the existing nodes on a line segment and then allow it to be dragged ?

Any examples of something similar being done ?

Thanks
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Feature: Opening Project should work in background and show progress [276]

$
0
0
Some .dspx project files take longer time to open.
I suggest running the "Open Project" as "Background Thread" and report the progress (update progress bar). I suggest creating the overloaded method SerializationManager.OpenProject(ProjectFileName, ProgressHandler).
Progress bar should be updated for every layer which is added to the map.
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Issue: SelectByAttributes - Unhandled Exception [260]

$
0
0
Create a new FeatureSet (FeatureType.Point) and add it as a layer to the map.
In DemoMap main menu, go to Selection - Select By Attribute
An unhandled exception is thrown in SQLQueryControl.cs :
Unable to cast object of type 'System.Data.DataColumn' to type 'DotSpatial.Data.Field'.
This exception occurs for all types of shapefiles.
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Issue: Two point layers - Selection Stops Working [261]

$
0
0
If there are two or more point layers in the map, selection stops working (selected features are no longer highlighted in the map)
Steps to reproduce using DotSpatial DemoMap
1) Add the first point layer to the map
2) Add a second point layer to the map
3) Click on the first point layer in the legend
4) Select some features in the first point layer by dragging a rectangle in the map - this works (selected points are highlighted)
5) Click on the second point layer in the legend
6) Try to select some features in the second point layer by dragging a rectangle in the map - this doesn't work (no points are highlighted in the map)
7) Click again on the first point layer in the map and try to select some features in the first point layer - now this also doesn't work (nothing gets highlighted, and I can't unselect the previously selected points)
5)
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Feature: How to support fdo [37]

$
0
0
How to support fdo?
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Issue: Scroll problem with legend control [231]

$
0
0
I am currently running a version from 1/26/11 and I noticed that the legend control doesn't always scroll correctly. I have attached a screenshot below that shows an example of the problem.
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Issue: Dynamic visibility not working correctly [229]

$
0
0
The dynamic visibility for layers and labels doesn't work properly. The layer is displayed but not at the scale set using the layer context menu Set Dynamic Visibility Scale. I used the DemoMap and the standard State and County shapefiles.
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Feature: Read MW4 rendering information for grids *.mwleg [226]

$
0
0
MapWindow 4 saves rendering information for a grid in a file named after the grid with the extension .mwleg.

Attached file with extension .mwa is a MW4 archive file which MW4 can open using File/Archive/Restore Project. If you don't see Archive/Restore Project in the File menu, make sure Plugins/Archive Project Tool is enabled. If you need to open the archive without MW4, you can add a .zip extension and open it as a zip file.
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Issue: Projection Issue needs testing [211]

$
0
0
Here is a transcription from a discussion topic from October. I don't know if we ever addressed this or what. I am putting it in as an issue so that we can test it when we get time. If we have a unit test for this one and it works, then we can close this I think.

Ted


Hi guys.

I'm having problems transforming my Projection (Hartebeesthoek 1994) to WGS 1984.

I wrote a calculator that lets you set the source and destination Coordinate system. It also allows you to choose geographic or projection transformation.

My problem is that my coordinate system returns infinite values for WGS84.

My Coordinates :

Hartebeesthoek 1994 --> Northing: -3727963 , Easting: -52720
WGS 1984 --> Lat -33.6767, Lng: 18.4312

My Code:

private void fillDatums(bool projected)
{
cmbFromDatumn.Items.Clear();
cmbToDatumn.Items.Clear();

if (projected)
{
foreach (string _name in KnownCoordinateSystems.Projected.Names)
{
cmbFromDatumn.Items.Add(_name);
cmbToDatumn.Items.Add(_name);
}
}
else
{
foreach (string _name in KnownCoordinateSystems.Geographic.Names)
{
cmbFromDatumn.Items.Add(_name);
cmbToDatumn.Items.Add(_name);
}
}
}

private void cmbFromDatumn_SelectedIndexChanged(object sender, EventArgs e)
{
//GeographicInfo g = new GeographicInfo();

try
{
//g.Name = cmbFromDatumn.Text;
CoordinateSystemCategory csg = KnownCoordinateSystems.Geographic.GetCategory(cmbFromDatumn.Text);

cmbFromGrid.Items.Clear();

foreach (string item in csg.Names)
{
cmbFromGrid.Items.Add(item);
}

cmbFromGrid.Enabled = true;
cmbFromGrid.SelectedIndex = 0;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

}

private void cmbToDatumn_SelectedIndexChanged(object sender, EventArgs e)
{
//GeographicInfo g = new GeographicInfo();

try
{
//g.Name = cmbToDatumn.Text;
CoordinateSystemCategory csg = KnownCoordinateSystems.Geographic.GetCategory(cmbToDatumn.Text);

cmbToGrid.Items.Clear();

foreach (string item in csg.Names)
{
cmbToGrid.Items.Add(item);
}

cmbToGrid.Enabled = true;
cmbToGrid.SelectedIndex = 0;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

private void btnConvert_Click(object sender, EventArgs e)
{
saveSelectedDatums();
double[] xy = new double[1];
GeographicSystems gs = new GeographicSystems();
pFrom = new ProjectionInfo();
pTo = new ProjectionInfo();

pFrom = gs.GetCategory(cmbFromDatumn.Text).GetProjection(cmbFromGrid.Text);
pTo = gs.GetCategory(cmbToDatumn.Text).GetProjection(cmbToGrid.Text);

lblConvertion.Text = "Transforming form " + pFrom.GeographicInfo.Name + " to " + pTo.GeographicInfo.Name;
xy = transformDatum(pFrom,pTo);

txtToLat.Text = xy[0].ToString();
txtToLng.Text = xy[1].ToString();
}

private double[] transformDatum(ProjectionInfo _from,ProjectionInfo _to)
{
double[] xy = new double[] {Convert.ToDouble(txtFromLat.Text),Convert.ToDouble(txtFromLng.Text)};
double[] z = new double[] {1};

Reproject.ReprojectPoints(xy, z, _from, _to, 0, 1);
return xy;
}


Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Issue: RemoveAt does not remove Attributes [178]

$
0
0
When a featureset is in index mode and RemoveFeaturesAt is called it eventually gets to

FeatureSet.
public void RemoveShapesAt(IEnumerable<int> indices)
{
...
foreach (int index in remove)
{
if (AttributesPopulated)
{
DataTable.Rows.RemoveAt(index);
}
ProgressMeter.Next();
}
...}
}

But AttributesPopulated is false. so the data table is not maintained correctly.

Shapes are deleted but the corresponding rows are not.

Now call FeatureSet.Save and you will have a file where there are more data rows than shapes.



Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Issue: delete 3d point fails [174]

$
0
0
- Open a 3d point featureset.
- call RemoveShapesAt()
- call Save();

_m contains 0 "M" values. and this will cause outof range exception at this line

PointShapeFile.SaveAs()
{
...
if (M != null) shpStream.WriteLe(M[shp]);
...}

Everywhere else it seems t otbe the rule that ifa file has z then it must have M also.

So this code in

FeatureSet.RemoveShapeAt() fails to copy and remove the M values
if (CoordinateType == CoordinateType.M)
{
double[] mShape = new double[sr.NumPoints];
Array.Copy(_m, sr.StartIndex, mShape, 0, sr.NumPoints);
m.AddRange(mShape);
}

is I adjust as follows it SEEMS to work

// remove the z values if necessary
if (CoordinateType == CoordinateType.Z)
{
double[] zShape = new double[sr.NumPoints];
Array.Copy(_z, sr.StartIndex, zShape, 0, sr.NumPoints);
z.AddRange(zShape);
double[] mShape = new double[sr.NumPoints];
Array.Copy(_m, sr.StartIndex, mShape, 0, sr.NumPoints);
m.AddRange(mShape);
}

Who can verify that this is the correct fix?




}



foreach (int index in remaining)
{
if (index < 0 || index >= _shapeIndices.Count) continue;
ShapeRange sr = _shapeIndices[index];
double[] xyShape = new double[sr.NumPoints * 2];
Array.Copy(_vertices, sr.StartIndex*2, xyShape, 0, sr.NumPoints * 2);
vertex.AddRange(xyShape);

// remove the m values if necessary
if (CoordinateType == CoordinateType.M)
{
double[] mShape = new double[sr.NumPoints];
Array.Copy(_m, sr.StartIndex, mShape, 0, sr.NumPoints);
m.AddRange(mShape);
}

// remove the z values if necessary
if (CoordinateType == CoordinateType.Z)
{
double[] zShape = new double[sr.NumPoints];
Array.Copy(_z, sr.StartIndex, zShape, 0, sr.NumPoints);
z.AddRange(zShape);
double[] mShape = new double[sr.NumPoints];
Array.Copy(_m, sr.StartIndex, mShape, 0, sr.NumPoints);
m.AddRange(mShape);
}
sr.StartIndex = pointTotal;
pointTotal += sr.NumPoints;
ProgressMeter.Next();
}
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Feature: Add Layer should work if Projection.dll is missing. [166]

$
0
0
One task will be to remove the NAD tables from DotSpatial, but there is little benefit from our modularity if the app crashes when you open a shapefile but don't have the projection library. I will need to think of something clever to manage the bridge because we don't want projection to reference Data, and we want Data to survive without referencing Projection, and only fail if you specifically attempt to reproject. It should be able to pass around a proj4 string or something when no Projection provider is available.

We can use a dynamic loading scheme similar to what plug-ins use, but use reflection to hunt down the projection provider using simply using naming definitions. Hosting a "ProjectionInfo" class in Data that is defined in Projections doesn't work very well if you take away DotSpatial.Projections. Interestingly, it doesn't seem to crash until opening data tries to access that projection info class. We could store the proj4 string on Data, and if you want to do anything clever with that, then you need a reference to ProjectionInfo.

The projection provider could simply take the proj4 strings as arguments. A third idea is that we can create a third library like DotSpatial.Projections.Extender.dll which would reference both DotSpatial.Data and DotSpatial.Projections and provide extension methods on FeatureSet that allow Reproject() by adding a reference, but this could lead to lots of confusion and the extra library may be too much of a penalty to pay. Also, it seems that having the ProjectionInfo is only a problem if you access it in code. So what we need to prevent crashing in our own code is to host the proj4 string. Based on the fact that AOR is able to develop code with FeatureSet references without a DotSpatial.Projections library tells me that you can work with the FeatureSet in code even with the ProjectionInfo class sitting on it, without breaking until you touch it. So we just need to make sure our internal code doesn't touch it and uses reflection to test to see if it can reproject and fail that method if not. We could also support a "CanReproject" property to test so that GUI designers can tip-toe around the issue if necessary.
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Issue: If group layer is unchecked, children should not be visible [97]

$
0
0
I'm open to discussion on this behavior, but I think if a group layer is unchecked, then checking a child should not display the child. Currently, even if a parent is unchecked, checking a child will show the child in the map.

To reproduce this behavior:
1. Make sure you have at least one theme in your database.
2. Uncheck Themes in Map Layers.
3. Toggle the check box next to your theme name under the Themes group layer.

Even though Themes is unchecked, placing a check next to the theme name will show the theme.
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

Closed Issue: Voronoi (Thiessen) Polygons -- invalid results [64]

$
0
0
I'm using DotSpatial.Analysis.Voronoi.VoronoiPolygons, and it is producing invalid results for some cases. I've attached an example point shapefile and an image of the results I'm getting.
Comments: This issue list is no longer active. This issue has been copied to our issue list on github (https://github.com/DotSpatial/DotSpatial/issues) Please check there to find out whether this issue was fixed.

New Post: Web Application

$
0
0
I have seen a couple of questions in the forum in regards to using DotSpatial for creating maps within my web application.

Since no one has answered that question, I thought I would bring it to the forefront again and ask:

Can DotSpatial be used within a web application and if so, are there any tutorials for doing so?

"Stuck like Chuck" on this one.

Created Unassigned: Is it possible to modify "Layer Properties" window? [63642]

$
0
0
Hello, is there any possibility to modify the layout and the functions in the "Layer Properties" window?
If it is realizable, where I can go to see the source code? I have already download all scripts of DotSpatial but I have no idea which one control the "Layer Properties" window. Thanks for your time to answer my question.

New Post: Web Application

Viewing all 3973 articles
Browse latest View live


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