msOffsetPolyline does not handle lines with 1 point #4383

Closed
petlof opened this Issue Jul 6, 2012 · 2 comments

2 participants

@petlof

msOffsetPolyline crashes if a line with only 1 point is available.

Currently this can occur since when offsetting lines coordinates are first transformed to image-coordinates, rounded to integers and then duplicates are removed.
Short lines can therefore end of with only 1 point.

Don't know if msOffsetPolyline should handle this, or if the reduction algorithm should make sure that a line at least contains two points.

@petlof

See also: #4382

@tbonfort tbonfort was assigned Jul 16, 2012
@tbonfort
MapServer member

msOffsetPolyline definitely can't handle this itself as there is no way to calculate an offset direction. The segfault should be corrected in this case. also see #4143 for an undocumented (as of yet) workaround, whereyou can change the simplification method use for that specific layer so the lines are not degenerated into a single point.

@tbonfort tbonfort closed this in bca7fd1 Jul 16, 2012
@mkofahl mkofahl pushed a commit to faegi/mapserver that referenced this issue Apr 9, 2013
@tbonfort tbonfort don't crash on ofsetting degenerate lines (#4383)
closes #4383
7217bcc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment