Opened 11 years ago

Closed 10 years ago

Last modified 9 years ago

#2311 closed defect (fixed)

PyGRASS points read from map are always 2D although they have z coordinate

Reported by: annakrat Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: Python Version: svn-trunk
Keywords: pygrass Cc:
CPU: Unspecified Platform: All

Description

When I read a 3D vector map

from grass.pygrass.vector import VectorTopo
vect = VectorTopo('precip_30ynormals_3d')
vect.open()
for point in vect[:3]:
    print point.is2D, point.z

gives

True None
True None
True None

I am not sure how to fix it. Temporary workaround is (when I know the map is 3D):

for point in vect[:3]:
    point.is2D = False

Change History (5)

comment:1 by annakrat, 11 years ago

A similar problem: I create a line from 3D points and the line is 2D. The same workaround as above works.

in reply to:  description comment:2 by zarch, 11 years ago

Replying to annakrat:

When I read a 3D vector map [snip]

ok should be fix in r60880, please test it and let me know.

comment:3 by annakrat, 11 years ago

It seems to work, thank you. Could you backport it before we close it? And the fix for #2320 as well.

in reply to:  3 comment:4 by lucadelu, 10 years ago

Resolution: fixed
Status: newclosed

Replying to annakrat:

It seems to work, thank you. Could you backport it before we close it? And the fix for #2320 as well.

Pietro backported these changes in r60913. Close this ticket, reopen if needed

comment:5 by neteler, 9 years ago

Milestone: 7.1.07.2.0

Milestone renamed

Note: See TracTickets for help on using tickets.