Add OGR_GEOM_AREA special field
|Reported by:||Daniel Morissette||Owned by:||Daniel Morissette|
|Cc:||warmerdam, Even Rouault|
Description (last modified by )
I'd like to use a OGR SQL statement to filter features from a shapefile based on their area. e.g. keep only the large lakes in a water layer for instance.
A simple way to allow this would be to add a new OGR_GEOM_AREA special field on OGRFeatures that calls the OGRSurface::getArea() method and would be handled similar to the OGR_GEOM_WKT and other special fields in OGRFeature::GetFieldAsString().
Another option could be to add operators on geometries in the SQL parser but that could be a bit more involved (e.g. "select ST_Area(geom) from ...").