[GRASS-user] v.generalize dateline wrap problem

Jed O. Kaplan jed.kaplan at unil.ch
Mon Nov 17 06:16:17 PST 2014


Dear GRASS gurus,

I am running GRASS 7.1.svn on Mac OS X.

I am having a problem with the behavior of v.generalize when attempting to generalize a vector feature - lines or polygons it does not seem to matter - that crosses the 180 meridian, using a location that is EPSG:4326 with global extents.

The problem is probably best illustrated with a picture, which I have attached to this email, but can also be viewed here:

http://arve.unil.ch/pub/GRASS_wrap_problem.png

In the picture two line vector features are displayed. The black-lined feature is the original vector line feature (test1). The red-lined feature is produced from test1 using the following command:

 v.generalize input=test1 output=test2 method=sliding_averaging look_ahead=5 slide=1 threshold=1

It appears that v.generalize, when smoothing between vertices that are very close to the 180 line, results in the incorrect identification of the “next" point, hence the long horizontal lines connecting points “the wrong way around” the earth.

I have tested this with a simpler vector containing points farther away from the 180 line and it doesn’t appear to show the same behavior.

I would very much appreciate any help anyone could give me to solve this problem, or alternatively confirm that this could be a bug.

Thank you in advance!

Best regards,

Jed Kaplan

--

If you would like to download the original lines file and try my procedure yourself, the file is available here:

http://arve.unil.ch/pub/GRASS_wrap_problem_samplevector.gmt

Assuming you have OGR support for GMT in your version of GRASS, you can import the vector using this command:

v.in.ogr dsn=GRASS_wrap_problem_samplevector.gmt output=test1



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20141117/92061ff8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GRASS_wrap_problem.png
Type: image/png
Size: 112070 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20141117/92061ff8/attachment-0001.png>


More information about the grass-user mailing list