[GRASS-user] v.generalize dateline wrap problem

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

Dear all,

Further to my question, here is the output of g.version:

GRASS 7.1.svn (global_lonlat):~ > g.version -g
version=7.1.svn
date=2014
revision=62762
build_date=2014-11-17
build_platform=x86_64-apple-darwin10.8.0

Thanks,

Jed

On 17 Nov 2014, at 15:34, Markus Neteler <neteler@osgeo.org> wrote:

Hi,

can you please send also the output of

g.version -g

to the list?

thanks
Markus

On Mon, Nov 17, 2014 at 3:37 PM, Jed O. Kaplan <jed.kaplan@unil.ch> wrote:

Dear all,

Further to my question, here is the output of g.version:

GRASS 7.1.svn (global_lonlat):~ > g.version -g
version=7.1.svn
date=2014
revision=62762
build_date=2014-11-17

I can confirm the issue also in G7.0.svn on Linux.

Markus