[GRASS-dev] [GRASS GIS] #2320: PyGRASS doesn't write 3D vector map

GRASS GIS trac at osgeo.org
Fri Jun 20 01:56:28 PDT 2014


#2320: PyGRASS doesn't write 3D vector map
-------------------------+--------------------------------------------------
 Reporter:  annakrat     |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  Python       |     Version:  svn-trunk                
 Keywords:  pygrass      |    Platform:  All                      
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------

Comment(by zarch):

 Replying to [comment:2 annakrat]:
 > > Actually I don't like too much the is2D parameter
 > > in the open method, perhaps is3D could be clearer,
 > > but we should change the attribute of the geometry
 > > features from is2D to is3D for consistency.
 >
 > Yes, I definitely agree, is3D would be much more intuitive.

 I didn't change that part for now...


 > Probably we don't need to change 2D/3D, user specifies
 > 3D when opening the vector map and there is already a
 > parameter for that in ```Vect_open_new```.

 ok, done.

 Now you should be able to create a 3D vector map with:

 {{{
 with VectorTopo("new3D", mode="w", with_z=True) as vect:
     vect.write(Point(10, 20, 100))
 }}}

 or using the with_z parameter with the open method:

 {{{
 vect = VectorTopo("new3D")
 vect.open(mode="w", with_z=True)
 vect.write(Point(10, 20, 100))
 vect.close()
 }}}

 I did some tests and it seems to work, let me know if you have problems.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2320#comment:3>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list