[GRASS-dev] [bug #5455] (grass) support for wrapping around 180 lon in vector modules

Request Tracker grass-bugs at intevation.de
Sun Jan 28 23:36:40 EST 2007


this bug's URL: http://intevation.de/rt/webrt?serial_num=5455
-------------------------------------------------------------------------

Subject: support for wrapping around 180 lon in vector modules

Hi,

there is little/no support for wrapping around 180 longitude in most of the
vector libs and modules. this leads to some weirdness--

Test data:  GSHHS world coastline shapefiles from David Divins at NGDC:
 http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/version1.5/shapefiles/


lat/lon location:

G63> g.region n=-25 s=-55 w=165 e=185
G63> v.in.region nz_box
G63> v.info -g nz_box
north=-25
south=-55
east=185
west=165

G63> v.select ain=gshhs_land bin=nz_box out=gshhs_land_nz_West
## islands east of 180 lon are missing!!
Number of lines     :   1099

#############
# select islands to be patched in

G63> g.region n=-25 s=-55 w=180 e=-175
G63> v.in.region chathams_box_W
G63> v.info -g chathams_box_W
north=-25
south=-55
east=185
west=180

G63> v.select ain=gshhs_land bin=chathams_box_W out=gshhs_land_nz_East
Number of lines     :   0


### try again, changing sign of 'g.region w='

G63> g.region n=-25 s=-55 w=-180 e=-175
G63> v.in.region chathams_box_E
G63> v.info -g chathams_box_E
north=-25
south=-55
east=-175
west=-180

G63> v.select ain=gshhs_land bin=chathams_box_E out=gshhs_land_nz_East --o
Number of lines     :   46



# patch together:
G63> v.patch in=gshhs_land_nz_East,gshhs_land_nz_West out=gshhs_land_nz
G63> v.info gshhs_land_nz -t
lines=1145
# ok!

v.type      # lines -> boundaries
v.centroids # boundaries -> areas


Hamish


-------------------------------------------- Managed by Request Tracker




More information about the grass-dev mailing list