[gdal-dev] Select a geometry attribute from multiple geometry input?

Stefan Keller sfkeller at gmail.com
Wed Jan 30 15:46:25 EST 2008


Frank,

 I can imagine that adding multiple geometries to OGR would touch some core
components.

> The OGR data model assumes at most one geometry per feature.

I assumed that. My proposal rather would be, that users have at least a
choice which geometry the input driver takes. This would restrict the
solution to the input drivers (GML, Interlis 1, Interlis 2, others?). I
would simply add a (common) format specific option (e.g. -dsco
GeometryField=fieldname). What do you think?

Stefan

2008/1/30, Frank Warmerdam <warmerdam at pobox.com>:
>
> Stefan Keller wrote:
> > Hi all,
> >
> > There are formats which allow a feature class to have multiple geometry
> > attributes.
> > I currently look at the INTERLIS input driver with a dataset which
> > contains label features.
> > They have a position (POINT) and direction (LINESTRING) and obviously
> > the input
> > driver takes the last one. The same problem can occur with GML.
> >
> > How can I select a geometry attribute from input to be passed to an
> > OGR simple feature when there are many?
>
> Stefan,
>
> The OGR data model assumes at most one geometry per feature.  In theory
> you could merge multiple features as a feature collection, but that will
> generally be unsatisfactory in actual use.  I have contemplated having
> drivers like the PostGIS driver treat this case as distinct layers.  So
> for instance, a table with two geometry columns might appear through
> OGR as two layers, one for each geometry column.
>
> We could potentially extend the OGR API to allow multiple geometries.  It
> would *likely* have to be accomplished by basically reporting the geometry
> properties available for a layer, and providing a call to select which of
> them would be in use for a given set of operations.  But even this modest
> change would be a non-trivial effort.  It would require an RFC and someone
> willing to work on it.
>
> Best regards,
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | President OSGeo, http://osgeo.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080130/7378e1d3/attachment.html


More information about the gdal-dev mailing list