[GRASS-dev] [GRASS GIS] #2311: PyGRASS points read from map are always 2D although they have z coordinate

#2311: PyGRASS points read from map are always 2D although they have z coordinate
-------------------------+--------------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Python | Version: svn-trunk
Keywords: pygrass | Platform: All
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
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
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2311&gt;
GRASS GIS <http://grass.osgeo.org>

#2311: PyGRASS points read from map are always 2D although they have z coordinate
-------------------------+--------------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Python | Version: svn-trunk
Keywords: pygrass | Platform: All
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2311#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2311: PyGRASS points read from map are always 2D although they have z coordinate
-------------------------+--------------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Python | Version: svn-trunk
Keywords: pygrass | Platform: All
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by zarch):

Replying to [ticket:2311 annakrat]:
> When I read a 3D vector map
> [snip]

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2311#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2311: PyGRASS points read from map are always 2D although they have z coordinate
-------------------------+--------------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Python | Version: svn-trunk
Keywords: pygrass | Platform: All
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2311#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2311: PyGRASS points read from map are always 2D although they have z coordinate
-----------------------+----------------------------------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.1.0
Component: Python | Version: svn-trunk
Resolution: fixed | Keywords: pygrass
  Platform: All | Cpu: Unspecified
-----------------------+----------------------------------------------------
Changes (by lucadelu):

  * status: new => closed
  * resolution: => fixed

Comment:

Replying to [comment:3 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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2311#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>