Ticket #2949 (closed defect: fixed)
Add OGR_GEOM_AREA special field
| Reported by: | dmorissette | Owned by: | dmorissette |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.7.0 |
| Component: | OGR_SF | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: | warmerdam, rouault |
Description (last modified by dmorissette) (diff)
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 ...").
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

