I’m trying to write a new area to a new vector map, without success.
If I do the following :
new_boundary = Boundary(points=coordinates)
new_centroid = Point(point_x,point_y)
new_area = Area(boundary = new_boundary, centroid=new_centroid)
new_vect_map.write(new_area)
I get this error:
AttributeError: ‘VectorTopo’ object has no attribute ‘_write_area’
But if I write the boundary and centroids independently, the areas are not properly created, and centroids are just recognized as “points”, not centroids.
I should I proceed to have the vector map properly written?
Below is my version of GRASS:
GRASS 7.0.0svn (2014)
libgis Revision: 62395
libgis Date: 2014-10-26 18:17:27 -0600 (dom 26 de oct de 2014)
On Tue, Dec 9, 2014 at 9:13 PM, Laurent C. <lrntct@gmail.com> wrote:
I'm trying to write a new area to a new vector map, without success.
I have no solution for that right now. At the moment you can only read
the areas.
If I do the following :
new_boundary = Boundary(points=coordinates)
new_centroid = Point(point_x,point_y)
new_area = Area(boundary = new_boundary, centroid=new_centroid)
new_vect_map.write(new_area)
I get this error:
AttributeError: 'VectorTopo' object has no attribute '_write_area'
But if I write the boundary and centroids independently, the areas are not
properly created, and centroids are just recognized as "points", not
centroids.
I should I proceed to have the vector map properly written?
You should go a step inside the C API of GRASS through ctypes and
write your own function, I was not directly interested on write areas
and therefore as far as I no, there is not an high level interface to
do this task.
Probably there is some error when pygrass write the centroids that are
just simple points without the topology meaning...