On Jun 26, 2011, at 10:48 PM, Magnus Bäck wrote:

> On Monday, June 27, 2011 at 07:13 CEST,
>     Dane Springmeyer <[email protected]> wrote:
> 
>> On Jun 26, 2011, at 12:56 PM, Magnus Bäck wrote:
>> 
>>> FWIW, filtering out adjacent points that are <100 m apart made
>>> the map render perfectly with no crossing lines. I didn't need
>>> any better resolution anyway. Still curious to know why I got
>>> the described behavior in the first place though, and to know
>>> if there's any way to avoid it without preprocessing the data.
>> 
>> Magnus,
>> 
>> Just looking at your example "crossed-track.png" now. I don't see any
>> way those could be rendering artifacts, but perhaps I'm overlooking
>> something. Can you post your raw data somewhere so I can take a look?
> 
> Sure, feel free to have a look at
> http://elwood.jpl.se/~magnus/train_beijing_hunan.gpx, or
> http://elwood.jpl.se/~magnus/whole-track.png which contains
> a rendering of the whole track rather than just the cropped
> portion found in crossed-track.png.
> 
> So, I converted that GPX file into a shapefile with gpx2shp
> before feeding it to Mapnik. As I didn't see any crossing lines
> when viewing either the GPX file nor the shapefile I've assumed
> it was somehow related to Mapnik. Also, the lines are (in most
> cases) a little bit too perpendicular and of equal length to
> indicate a problem with the data itself.

Yep, rendering artifact, that I can replicate. Your hunch was right. Not looked 
closely yet as to the cause, but likely the high density of nodes triggers 
those sharp spikes in some part of AGG.

The fix, however, is easy, and likely something want you want anyway for 
smoother a looking line given the high density of node.

Add these two extra options to the LineSymbolizer:

stroke-linejoin="round" stroke-linecap="round"

That should fix things up nicely. Though your pre-processing solution is great 
too of course because things will draw faster that way.

Dane


> 
> -- 
> Magnus Bäck
> [email protected]

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to