Opened 10 years ago
Last modified 10 years ago
#2492 new defect
v.generalize: incorrect handling of wrap at 180 meridian
Reported by: | jkaplan | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.4.6 |
Component: | Vector | Version: | svn-trunk |
Keywords: | v.generalize | Cc: | |
CPU: | OSX/Intel | Platform: | All |
Description
I am running GRASS 7.1.svn on Mac OS X.
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
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 ticket, 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 meridian, results in the incorrect identification of the “next" point, hence the long horizontal lines connecting points “the wrong way around” the earth. The behavior is the same when using any of the generalization or smoothing tools.
I have tested this with a simpler vector containing points farther away from the 180 meridian 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.
Thank you in advance!
Best regards,
Jed Kaplan
--
If you would like to download the original lines file and try my procedure yourself, I have also attached a test vector file to this ticket. It can also be downloaded 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
Attachments (2)
Change History (3)
by , 10 years ago
Attachment: | GRASS_wrap_problem.png added |
---|
by , 10 years ago
Attachment: | GRASS_wrap_problem_samplevector.gmt added |
---|
Sample vector lines object in OGR_GMT format
comment:1 by , 10 years ago
Milestone: | → 6.4.6 |
---|
Example of erroneous v.generalize output