[Gdal-dev] RFC 6: OGR support for querying and selection by geometry and feature style

Tamas Szekeres szekerest at gmail.com
Fri Oct 20 19:45:02 EDT 2006


Hi Folks,

Let me introduce a proposed new feature described in RFC-6.

This proposal addresses and issue have been discovered long ago, and
OGR provides
no equivalent solution so far.

Some of the supported formats like Mapinfo.tab may contain multiple
geometry types
and style information. In order to handle this kind of data sources properly a
support for selecting the layers by geometry type or by the style info would be
highly required.

All of the proposed changes can be found at the tracking bug of this RFC
referenced later in this letter.

The most reasonable way to support this feature is to extend the currently
existing 'special field' approach to allow specifying more than one fields.
Along with the already definied 'FID' field we will add the following ones:

'OGR_GEOMETRY' containing the geometry type like 'POINT' or 'POLYGON'.
'OGR_STYLE' containing the style string.
'OGR_GEOM_WKT' containing the full WKT of the geometry.

By providing the aforementioned fields one can make for example
the following selections:

select FID, OGR_GEOMETRY, OGR_STYLE, OGR_GEOM_WKT, * from MyTable
where OGR_GEOMETRY='POINT' OR OGR_GEOMETRY='POLYGON'

select FID, OGR_GEOMETRY, OGR_STYLE, OGR_GEOM_WKT, * from MyTable
where OGR_STYLE LIKE '%BRUSH%'

select FID, OGR_GEOMETRY, OGR_STYLE, OGR_GEOM_WKT, * from MyTable
where OGR_GEOM_WKT LIKE 'POLYGON%'

select distinct OGR_GEOMETRY from MyTable order by OGR_GEOMETRY desc

For more details see RFC-6 and the related bugs:

http://bugzilla.remotesensing.org/show_bug.cgi?id=1333
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1129
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1438

Best Regards,

Tamas



More information about the Gdal-dev mailing list