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

New Post: DotSpatial Symbology Documentation


New Post: DotSpatial Symbology Documentation

$
0
0
I checked the documentation page first. There is no documentation available for DotSpatial.Symbology. How does one know how to work with this namespace?
Thanks, Tyler

New Post: DotSpatial Symbology Documentation

New Post: DotSpatial Symbology Documentation

New Post: Dueling DotSpatial.Symbology.IntervalMethods

$
0
0
Greetings,
I've been working using different IntervalMethods to change how a dataset is displayed. I've created a comboBox with EqualInterval, Geometrical, NaturalBeaks, Quantile, and StandardDeviation listed. The user selects the method and clicks a button to symbolize.

The application seems to work... somewhat. However, if the user selects EqualInterval, Geometrical, NaturalBeaks, or StandardDeviation the breaks are all exactly the same. The only IntervalMethod that has different breaks is Quantile. Are there EditorSettings that must be set dependent upon what IntervalMethod is applied?

I'm using the following code:
        var classification = getClassification();
        System.Diagnostics.Debug.WriteLine("classification: " + classification);
        myScheme.EditorSettings.IntervalMethod = classification;
        myScheme.EditorSettings.NumBreaks = Convert.ToInt32(npClassCount.Value);
        myScheme.EditorSettings.StartColor = Color.LightBlue;
        myScheme.EditorSettings.EndColor = Color.DarkBlue;
        myScheme.EditorSettings.IntervalRoundingDigits = 5;
        myScheme.EditorSettings.FieldName = "POP2010";
        myScheme.CreateCategories(fLayer.DataSet.DataTable);
        fLayer.Symbology = myScheme;

New Post: BgdRaster means..?

$
0
0
What does Bgd in BgdRaster stand for? Background?

New Post: Dueling DotSpatial.Symbology.IntervalMethods

$
0
0
What I usually do is test it in the small app that is part of the download (DemoMap). I look for things I might have to change and then look for them in code.

Created Unassigned: FeatureSet.Open(".shp") throws wrong error if .shx is missing [63637]

$
0
0
If the .shx file is missing from the same path the exception thrown indicates the .shp fileName is missing but should instead indicate that the .shx fileName is missing.

Created Unassigned: Incorrect selection of polygons with Holes [63638]

$
0
0
Found a bug in the PartRange class under the method of IsHole.

This:

if (i < EndIndex)
{
x2 = Vertices[(i + 1) * 2];
y2 = Vertices[(i + 1) * 2 + 1];
}
else
{
x2 = Vertices[StartIndex];
y2 = Vertices[StartIndex + 1];
}

should be changed to:

if (i < EndIndex) {
x2 = Vertices((i + 1) * 2);
y2 = Vertices((i + 1) * 2 + 1);
} else {
x2 = Vertices(StartIndex * 2);
y2 = Vertices(StartIndex * 2 + 1);
}

I have attached a shapefile to show you the problem. Try clicking on the center shape and you will notice that both shapes get selected even though the outside shape is a donut.

Edited Unassigned: Incorrect selection of polygons with Holes [63638]

$
0
0
Found a bug in the PartRange class under the method of IsHole.

This:

if (i < EndIndex)
{
x2 = Vertices[(i + 1) * 2];
y2 = Vertices[(i + 1) * 2 + 1];
}
else
{
x2 = Vertices[StartIndex];
y2 = Vertices[StartIndex + 1];
}

should be changed to:

if (i < EndIndex) {
x2 = Vertices((i + 1) * 2);
y2 = Vertices((i + 1) * 2 + 1);
} else {
x2 = Vertices(StartIndex * 2);
y2 = Vertices(StartIndex * 2 + 1);
}

I have attached a shapefile to show you the problem. Try clicking on the center shape and you will notice that both shapes get selected even though the outside shape is a donut.

Edited Unassigned: Incorrect selection of polygons with Holes [63638]

$
0
0
Found a bug in the PartRange class under the method of IsHole.

This:

if (i < EndIndex)
{
x2 = Vertices[(i + 1) * 2];
y2 = Vertices[(i + 1) * 2 + 1];
}
else
{
x2 = Vertices[StartIndex];
y2 = Vertices[StartIndex + 1];
}

should be changed to:

if (i < EndIndex) {
x2 = Vertices((i + 1) * 2);
y2 = Vertices((i + 1) * 2 + 1);
} else {
x2 = Vertices(StartIndex * 2);
y2 = Vertices(StartIndex * 2 + 1);
}

I have attached a shapefile ("ModArea", not the Union) to show you the problem. Try clicking on the bottom left shape and you will notice that both shapes get selected even though the outside shape is a donut.

Created Unassigned: I have attached references but they are not Enabled.? [63639]

$
0
0
i heve attached dotspital controler.dll

Commented Unassigned: FeatureSet.Open(".shp") throws wrong error if .shx is missing [63637]

$
0
0
If the .shx file is missing from the same path the exception thrown indicates the .shp fileName is missing but should instead indicate that the .shx fileName is missing.
Comments: Please use [github](https://github.com/DotSpatial/DotSpatial) for reporting issues.

Commented Unassigned: Incorrect selection of polygons with Holes [63638]

$
0
0
Found a bug in the PartRange class under the method of IsHole.

This:

if (i < EndIndex)
{
x2 = Vertices[(i + 1) * 2];
y2 = Vertices[(i + 1) * 2 + 1];
}
else
{
x2 = Vertices[StartIndex];
y2 = Vertices[StartIndex + 1];
}

should be changed to:

if (i < EndIndex) {
x2 = Vertices((i + 1) * 2);
y2 = Vertices((i + 1) * 2 + 1);
} else {
x2 = Vertices(StartIndex * 2);
y2 = Vertices(StartIndex * 2 + 1);
}

I have attached a shapefile ("ModArea", not the Union) to show you the problem. Try clicking on the bottom left shape and you will notice that both shapes get selected even though the outside shape is a donut.
Comments: Please use [github](https://github.com/DotSpatial/DotSpatial) for posting issues.

New Post: IDW interpolation

$
0
0
Hi All,
I'm trying to familiarize myself with DotSpatial. I found some strange behavior when applying interpolation. The resulting grid is somewhat moved/rotated/mirrored? - please see image attached. I tried all different coordinate systems even in different quadrants but nothing helped. Please can anybody give me an advice what can cause such issue?
Thank you,
Jiri

Image

New Post: IDW interpolation

$
0
0
I went through the source code and I think that I've probably found the issue. In the InverseDistanceWeighting.cs class (DotSpatial.Tools), function "Execute", the coordinates of the output raster are defined as:
        output.Xllcenter = input.Extent.MinX + (cellSize / 2);
        output.Yllcenter = input.Extent.MinY + (cellSize / 2);
If I well remember, the raster reference is generaly determined by upper left corner while the statement above uses lower left corner. So I copied the "Execute" function into my project and changed
        output.Yllcenter = input.Extent.MaxY + (cellSize / 2);
It worked perfectly and grid shew realistic values. But the new issue with contouring extension arose. I assume that it is the similar issue as above - it'd be necessary to change initial point somewhere in the code.

I'm not sure that I can make it by myself. Can I ask somebody assistance?

Thank you
Jiri

New Post: BgdRaster means..?

New Post: How can I convert pixel coordinate to map coordinate for a gridline?

$
0
0
I do it ..
Go to map Control find Onpaint override method
paste this code after existing code

            System.Drawing.Point pt1, pt2;
            System.Drawing.Graphics mapGridHorizentalLine = map1.CreateGraphics();
            Pen pen = new Pen(Color.LightGray);
            float[] dashValues = { 2, 2, 2, 2 };
            pen.DashPattern = dashValues;
            Font lblFont = new Font("tahoma", 8);
            Brush lblBrush = new SolidBrush(Color.Cyan);

            Coordinate startPoint = new Coordinate();
            startPoint = map1.PixelToProj(new System.Drawing.Point(0, 0));

            Coordinate endPoint = new Coordinate();
            endPoint = map1.PixelToProj(new System.Drawing.Point(map1.Width, map1.Height));

            Coordinate st1 = new Coordinate(startPoint);
            Coordinate en1 = new Coordinate(endPoint);

            for (int i = (int)endPoint.Y + 1; i < startPoint.Y; i += 2)
            {
                st1.Y = i;
                en1.Y = i;
                pt1 = map1.ProjToPixel(new Coordinate(st1));
                pt2 = map1.ProjToPixel(new Coordinate(en1));
                mapGridHorizentalLine.DrawLine(pen, pt1, pt2);
                mapGridHorizentalLine.DrawString(Convert.ToString(i) + "°", lblFont, lblBrush, pt1);
            }
            //Vertical UTM Grid Line
            st1 = new Coordinate(startPoint);
            en1 = new Coordinate(endPoint);
            for (int i = (int)startPoint.X + 1; i < endPoint.X; i += 2)
            {
                
                st1.X = i;
                en1.X = i;
                pt1 = map1.ProjToPixel(new Coordinate(st1));
                pt2 = map1.ProjToPixel(new Coordinate(en1));
                mapGridHorizentalLine.DrawLine(pen, pt1, pt2);
                mapGridHorizentalLine.DrawString(Convert.ToString(i) + "°", lblFont, lblBrush, pt1);
            }

New Post: How to Add/Draw utm grid on map

$
0
0
I do it ..
Go to map Control find Onpaint override method
paste this code after existing code

            System.Drawing.Point pt1, pt2;
            System.Drawing.Graphics mapGridHorizentalLine = map1.CreateGraphics();
            Pen pen = new Pen(Color.LightGray);
            float[] dashValues = { 2, 2, 2, 2 };
            pen.DashPattern = dashValues;
            Font lblFont = new Font("tahoma", 8);
            Brush lblBrush = new SolidBrush(Color.Cyan);

            Coordinate startPoint = new Coordinate();
            startPoint = map1.PixelToProj(new System.Drawing.Point(0, 0));

            Coordinate endPoint = new Coordinate();
            endPoint = map1.PixelToProj(new System.Drawing.Point(map1.Width, map1.Height));

            Coordinate st1 = new Coordinate(startPoint);
            Coordinate en1 = new Coordinate(endPoint);

            for (int i = (int)endPoint.Y + 1; i < startPoint.Y; i += 2)
            {
                st1.Y = i;
                en1.Y = i;
                pt1 = map1.ProjToPixel(new Coordinate(st1));
                pt2 = map1.ProjToPixel(new Coordinate(en1));
                mapGridHorizentalLine.DrawLine(pen, pt1, pt2);
                mapGridHorizentalLine.DrawString(Convert.ToString(i) + "°", lblFont, lblBrush, pt1);
            }
            //Vertical UTM Grid Line
            st1 = new Coordinate(startPoint);
            en1 = new Coordinate(endPoint);
            for (int i = (int)startPoint.X + 1; i < endPoint.X; i += 2)
            {
                
                st1.X = i;
                en1.X = i;
                pt1 = map1.ProjToPixel(new Coordinate(st1));
                pt2 = map1.ProjToPixel(new Coordinate(en1));
                mapGridHorizentalLine.DrawLine(pen, pt1, pt2);
                mapGridHorizentalLine.DrawString(Convert.ToString(i) + "°", lblFont, lblBrush, pt1);
            }

New Post: BgdRaster means..?

$
0
0
I think the class needs some documentation. I was first thinking of binary number and not binary code.
Viewing all 3973 articles
Browse latest View live


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