After reprojecting a world polygon shapefile's vertices into Azimuthal Equidistant Projection, and trying to plot the resultant points as PolyLines, I find that some of my PolyLines can not longer be plotted in their original order: a typical example is shown above.
I am not sure how to interpret your question. Are you adding the original Shapefile to Geocart as a database, or do you first (somehow) reproject a world polygon Shapefile’s vertices into azimuthal equidistant projection (in some format) and then add the latter to Geocart as a database…? Or…?
What I see in the graphic you posted does not look like Geocart’s output. Is Geocart involved at all? If it is not, then maybe consider using Geocart, since it will not give the terrible results that you show.
Hi Daan,
Thanks for replying. No, I am not using GeoCart. Yes, I have reprojected a shapefile's vertices to azimuthal equidistant projection, and now want to plot the resultant points, and connect the points with lines to form polygons, in my VB.Net program. The issue that I would like answered is how to order the points such that when I connect the points with lines, they follow in a logical order.
I don’t think your problem is in the “order” the lines get drawn; your problem is that consecutive vertices in the polygon land at distance places on the map due to the fact that short distances on the globe get stretched to vast distances on the map with this projection in this orientation.
The way to fix this is to synthesize (many) points between the two consecutive points in the source. You need to do this in geographic space (latitude/longitude) before projecting.
If that's true, isn't there a way to predict when it will happen, and only densify the segments in question? Dividing every line in a world map adds significantly to the processing time.
gnomeplanet wrote:If that's true, isn't there a way to predict when it will happen, and only densify the segments in question?
Sure. Project. Measure distance between successive mapped points. If more than 2 or 3 pixels (or whatever threshold you choose), then densify. After all densification, render.
Conversely, if distance on plane is less than a pixel, consider dropping one of the two points to avoid crowding and improve rendering speed.