[gdal-dev] New OGR_GEOM_AREA special field

Tamas Szekeres szekerest at gmail.com
Thu Apr 16 18:03:01 EDT 2009


Daniel,

The patch seems reasonable to me. The function in the select list would also
be reasonable but it would require quite more of work and probably an RFC
would also be required in that case.

Best regards,

Tamas



2009/4/16 Daniel Morissette <dmorissette at mapgears.com>

> No comments? I'll go ahead and commit support for the new OGR_GEOM_AREA
> special field to trunk tomorrow then...
>
> Daniel
>
>
>
> Daniel Morissette wrote:
>
>> Hi GDAL Dev's,
>>
>> 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
>> ...").
>>
>> I have created a ticket about this which includes a patch for the new
>> OGR_GEOM_AREA special field:
>>
>> http://trac.osgeo.org/gdal/ticket/2949
>>
>> What would you think of adding this to the SVN trunk? Or can anyone
>> provide hints on the way to implement operators on geometries since that
>> would clearly be a better solution but I'm not clear on the best way to add
>> this to the OGR SQL engine.
>>
>> Daniel
>>
>
>
> --
> Daniel Morissette
> http://www.mapgears.com/
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090417/f5ae5571/attachment.html


More information about the gdal-dev mailing list