[Gdal-dev] FeatureDefn.getGeometryType and actual geometry type
Andrea Aime
aaime at openplans.org
Sun Feb 4 16:56:49 EST 2007
Frank Warmerdam ha scritto:
> Andrea Aime wrote:
> Well, i'm not a huge fan of "adding more flags to control..." such things.
Agreed, after a while the code becomes a maze of ifs and special case
elements...
> Perhaps though we could or should add a config option to enforce
> rigerous geometry typing and then ensure it is enforced for all drivers.
Yup, that would work for me. I have to prepare a custom gdal build
anyways since java bindings do not seem to be included in normal
builds.
> It isn't necessarily always the case that the only problem is getting
> multi types when expecting non-multi-types. But that is generally the
> issue. For now the only way to be certain to be rigerous would be to
> ignore the geometry types and treat all layers as generic geometries.
>
> But from a practical point of view, I think the shapefile driver
> is the only one likely to trigger problems. So you could just add
> an exception for it - perhaps forcing everything to the multi types
> in your code.
Well, if special cases are needed just for shapefiles, I just need
to add a little modification. Will try that one, I prefer to publish
real geometry types if possible, and possibly stay with the non
multi-ones since people are sometimes surprised by them.
Thanks for the insights :-)
Cheers
Andrea
More information about the Gdal-dev
mailing list