[GRASS-dev] G_area_of_polygon through ctypes return 0.0

Pietro peter.zamb at gmail.com
Sun Jan 20 08:42:24 PST 2013


On Sun, Jan 20, 2013 at 5:33 PM, Martin Landa <landa.martin at gmail.com> wrote:
> Hi,
>
> 2013/1/20 Pietro <peter.zamb at gmail.com>:
>> I'm not able to compute the area of a polygon using G_area_of_polygon,
>
> try to call before G_area_of_polygon() fn
> G_begin_polygon_area_calculations(). It should help.

Thank you Martin!
it's working :-)

>>> libgis.G_begin_polygon_area_calculations()
1
>>> libgis.G_area_of_polygon(bound.c_points.contents.x,
...                          bound.c_points.contents.y,
...                          bound.c_points.contents.n_points)
4.0


More information about the grass-dev mailing list