Opened 15 years ago
Last modified 15 years ago
#2949 closed defect
Add OGR_GEOM_AREA special field — at Initial Version
Reported by: | Daniel Morissette | Owned by: | Daniel Morissette |
---|---|---|---|
Priority: | normal | Milestone: | 1.7.0 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | warmerdam, Even Rouault |
Description
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 (e.g. but that could be a bit more involved (e.g. "select ST_Area(geom) from ...").
Note:
See TracTickets
for help on using tickets.