Opened 5 years ago

Closed 5 years ago

Last modified 4 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 Changed 5 years ago by annakrat

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

comment:2 in reply to:  description Changed 5 years ago by zarch

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 Changed 5 years ago by annakrat

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

comment:4 in reply to:  3 Changed 5 years ago by lucadelu

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 Changed 4 years ago by neteler

Milestone: 7.1.07.2.0

Milestone renamed

Note: See TracTickets for help on using tickets.