enable parallel/offset lines using chainable coordinate transformations #927

Closed
springmeyer opened this Issue Oct 22, 2011 · 10 comments

Comments

Projects
None yet
4 participants
@springmeyer
Member

springmeyer commented Oct 22, 2011

We have a new class of coordinate transforms that support fairly robust offsetting of lines (#180). But, I'm not comfortable exposing this (adding support for the symbolizer properties to trigger it) until I figure out the best way to make this transform be combinable with other transforms. The idea here is to reduce code duplication but also to sketch out a decent framework for being able to chain more/future operations. E.g. you should be able to both smooth and offset lines. Doable, just needs some serious focus.

@ghost ghost assigned springmeyer Oct 22, 2011

springmeyer pushed a commit that referenced this issue Oct 22, 2011

Dane Springmeyer
add a new, experimental coord_transform impl to support offsetting li…
…ne verticies - closes #180 - next task of exposing functionality refs #927
@xificurk

This comment has been minimized.

Show comment
Hide comment
@xificurk

xificurk Oct 22, 2011

I've planned to take a look at the offset part of the transformation, because after testing I'm not really satisfied with the results. Imho there is still one major problem - short segments with large offset (relatively to the length of the segment) create loops, see http://img803.imageshack.us/img803/7703/riveroffset.png

I've planned to take a look at the offset part of the transformation, because after testing I'm not really satisfied with the results. Imho there is still one major problem - short segments with large offset (relatively to the length of the segment) create loops, see http://img803.imageshack.us/img803/7703/riveroffset.png

@springmeyer

This comment has been minimized.

Show comment
Hide comment
@springmeyer

springmeyer Oct 26, 2011

Member

@xificurk - you should check out the code I added in cad0c60 - it has some improvements over previous iterations as far as avoiding spikes.

Member

springmeyer commented Oct 26, 2011

@xificurk - you should check out the code I added in cad0c60 - it has some improvements over previous iterations as far as avoiding spikes.

kkaefer pushed a commit to kkaefer/mapnik that referenced this issue Feb 16, 2012

Dane Springmeyer
add a new, experimental coord_transform impl to support offsetting li…
…ne verticies - closes #180 - next task of exposing functionality refs #927
@springmeyer

This comment has been minimized.

Show comment
Hide comment
@springmeyer

springmeyer May 29, 2012

Member

This is now done in a475b6e. The line symbolizer supports an 'offset' parameter that can be positive or negative. In the future this could be exposed for the line pattern symbolizer as well, if desired.

Member

springmeyer commented May 29, 2012

This is now done in a475b6e. The line symbolizer supports an 'offset' parameter that can be positive or negative. In the future this could be exposed for the line pattern symbolizer as well, if desired.

@mirecta

This comment has been minimized.

Show comment
Hide comment
@mirecta

mirecta Jun 18, 2012

Hi all this offseting line doesn't work as we can see
http://i48.tinypic.com/33pen1s.png
Black: original linestring
Red: offset line made by mapnik
Blue: offset line made by postgis 2 select (ST_OffsetCurve)

i try to discover where is the problem

mirecta commented Jun 18, 2012

Hi all this offseting line doesn't work as we can see
http://i48.tinypic.com/33pen1s.png
Black: original linestring
Red: offset line made by mapnik
Blue: offset line made by postgis 2 select (ST_OffsetCurve)

i try to discover where is the problem

@xificurk

This comment has been minimized.

Show comment
Hide comment
@xificurk

xificurk Jun 18, 2012

mirecta: The problem occurs when the offset is significantly larger than shortest segments of the line as I wrote above. But afaik there is no trivial fix.

mirecta: The problem occurs when the offset is significantly larger than shortest segments of the line as I wrote above. But afaik there is no trivial fix.

@mirecta

This comment has been minimized.

Show comment
Hide comment
@mirecta

mirecta Jun 18, 2012

yes i know but i try implement algo from postgis 2.0 into mapnik
http://postgis.refractions.net/documentation/manual-2.0/ST_OffsetCurve.html

mirecta commented Jun 18, 2012

yes i know but i try implement algo from postgis 2.0 into mapnik
http://postgis.refractions.net/documentation/manual-2.0/ST_OffsetCurve.html

@springmeyer

This comment has been minimized.

Show comment
Hide comment
@springmeyer

springmeyer Jun 18, 2012

Member

Great there is interest in improving the algorithm. The original need (now several years back) was only high zoom levels, so the spiking (more common as you zoom out) was not a big issue, but I agree it would be nice to completely avoid it.

Member

springmeyer commented Jun 18, 2012

Great there is interest in improving the algorithm. The original need (now several years back) was only high zoom levels, so the spiking (more common as you zoom out) was not a big issue, but I agree it would be nice to completely avoid it.

@springmeyer

This comment has been minimized.

Show comment
Hide comment
@springmeyer

springmeyer Aug 17, 2012

Member

note: offsetting algo was radically improved, see #1269

Member

springmeyer commented Aug 17, 2012

note: offsetting algo was radically improved, see #1269

@PetrDlouhy

This comment has been minimized.

Show comment
Hide comment
@PetrDlouhy

PetrDlouhy Sep 8, 2012

Contributor

Hi. I use offset for LinePatternSymbolizer in my Prague bycicle map (mapa.prahounakole.cz). Would it be possible to enable this feature also for that? Should I open a new ticket for that?

Contributor

PetrDlouhy commented Sep 8, 2012

Hi. I use offset for LinePatternSymbolizer in my Prague bycicle map (mapa.prahounakole.cz). Would it be possible to enable this feature also for that? Should I open a new ticket for that?

@springmeyer

This comment has been minimized.

Show comment
Hide comment
@springmeyer

springmeyer Sep 8, 2012

Member

I think there may already be a ticket for enabling offset on more symbolizes. If you can't find one then sure, create one.

Member

springmeyer commented Sep 8, 2012

I think there may already be a ticket for enabling offset on more symbolizes. If you can't find one then sure, create one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment