Opened 13 years ago

Closed 7 years ago

#1443 closed defect (invalid)

GRASS 7: d.vect grid drawing problem

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.0.6
Component: wxGUI Version: svn-trunk
Keywords: d.vect Cc:
CPU: x86-64 Platform: Linux

Description

When importing attached SHAPE file of a 10 degree lines grid, the horizontal lines are not draw. See attachments.

v.in.ogr worldgrid_10deg.shp out=worldgrid_10deg
g.region n=90 s=-90 w=-180 e=180
d.mon wx0
d.vect myworld_political type=area
d.vect worldgrid_10deg

Attachments (2)

bug_grass7_draw_gridlines.png (170.8 KB ) - added by neteler 13 years ago.
horizontal lines omitted in grid
worldgrid_10deg_SHAPE_LL_WGS84.tar.gz (1.7 KB ) - added by neteler 13 years ago.
World grid 10 degrees SHAPE file

Download all attachments as: .zip

Change History (7)

by neteler, 13 years ago

horizontal lines omitted in grid

by neteler, 13 years ago

World grid 10 degrees SHAPE file

comment:1 by martinl, 8 years ago

Milestone: 7.0.07.0.5

comment:2 by neteler, 8 years ago

Keywords: d.vect added

in reply to:  description comment:3 by mmetz, 8 years ago

Replying to neteler:

When importing attached SHAPE file of a 10 degree lines grid, the horizontal lines are not draw.

This is because for Lat/Lon, the display drivers draw the shortest line between two vertices (longitude wrapping). A line with two vertices -180,0 and 180,0 has length zero because start and end coordinates are identical, the line is not displayed. Another line with two vertices -10,0 and 10,0 is drawn from -10,0 going east to 10,0 (the shortest line) and not from -10,0 going west over -180, then to 10,0. Special treatment for zero-length lines is not an option because they can appear after vector cleaning.

For the attached shapefile, the horizontal lines need to be broken at their intersections with vertical lines (v.clean tool=break), then the horizontal lines become visible in the display.

comment:4 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:5 by neteler, 7 years ago

Resolution: invalid
Status: newclosed

Thanks for the explanations, I added a note to the v.in.ogr manual page. Closing.

Note: See TracTickets for help on using tickets.