[Gdal-dev] python, multipolygon creation

Didrik Pinte dpinte at itae.be
Thu Feb 9 07:00:44 EST 2006


Le mercredi 08 février 2006 à 21:20 -0500, Frank Warmerdam a écrit :
> 
> The AddGeometryDirectly() method tests certain assumptions,
> like the that multipolygons are only allowed to hold polygons, and
> takes no action if the assumption fails.  I imagine it is returning
> an error code.   It would perhaps be better if it issue an error
> message or possibly threw an exception.

I got an error message. It's 3. I looked in the ogr.py file but there is
no definition of the return messages.

May I suggest one of the following :

[1] add a definition for OGRERR_NONE and
OGRERR_UNSUPPORTED_GEOMETRY_TYPE in ogr.py
[2] as suggested by you, issue an error message or throw an exception
(that should be more pythonic).

Thank you for the help

Didrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060209/3d1bc51d/attachment.bin


More information about the Gdal-dev mailing list