Unwanted Flyback Lines In Azimuthal Equidistant Projection

General discussion of map projections.
Post Reply
gnomeplanet
Posts: 3
Joined: Sun Dec 09, 2018 4:34 am

Unwanted Flyback Lines In Azimuthal Equidistant Projection

Post by gnomeplanet »

Image

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.

What is the best way to approach this problem?
daan
Site Admin
Posts: 977
Joined: Sat Mar 28, 2009 11:17 pm

Re: Unwanted Flyback Lines In Azimuthal Equidistant Projecti

Post by daan »

Hello gnomeplanet. Welcome to the forums.

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.
:-)

Best,
— daan
gnomeplanet
Posts: 3
Joined: Sun Dec 09, 2018 4:34 am

Re: Unwanted Flyback Lines In Azimuthal Equidistant Projecti

Post by gnomeplanet »

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.
daan
Site Admin
Posts: 977
Joined: Sat Mar 28, 2009 11:17 pm

Re: Unwanted Flyback Lines In Azimuthal Equidistant Projecti

Post by daan »

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.

Good luck.
— daan
gnomeplanet
Posts: 3
Joined: Sun Dec 09, 2018 4:34 am

Re: Unwanted Flyback Lines In Azimuthal Equidistant Projecti

Post by gnomeplanet »

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.
daan
Site Admin
Posts: 977
Joined: Sat Mar 28, 2009 11:17 pm

Re: Unwanted Flyback Lines In Azimuthal Equidistant Projecti

Post by daan »

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.

Good luck.
— daan
Post Reply