<div>Frank,</div>
<div> </div>
<div>
<div>I can imagine that adding multiple geometries to OGR would touch some core components. </div>
<div> </div></div>
<div>> The OGR data model assumes at most one geometry per feature.</div>
<div> </div>
<div>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?</div>
<div> </div>
<div>Stefan<br> </div>
<div><span class="gmail_quote">2008/1/30, Frank Warmerdam <<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Stefan Keller wrote:<br>> Hi all,<br>><br>> There are formats which allow a feature class to have multiple geometry<br>
> attributes.<br>> I currently look at the INTERLIS input driver with a dataset which<br>> contains label features.<br>> They have a position (POINT) and direction (LINESTRING) and obviously<br>> the input<br>
> driver takes the last one. The same problem can occur with GML.<br>><br>> How can I select a geometry attribute from input to be passed to an<br>> OGR simple feature when there are many?<br><br>Stefan,<br><br>
The OGR data model assumes at most one geometry per feature. In theory<br>you could merge multiple features as a feature collection, but that will<br>generally be unsatisfactory in actual use. I have contemplated having<br>
drivers like the PostGIS driver treat this case as distinct layers. So<br>for instance, a table with two geometry columns might appear through<br>OGR as two layers, one for each geometry column.<br><br>We could potentially extend the OGR API to allow multiple geometries. It<br>
would *likely* have to be accomplished by basically reporting the geometry<br>properties available for a layer, and providing a call to select which of<br>them would be in use for a given set of operations. But even this modest<br>
change would be a non-trivial effort. It would require an RFC and someone<br>willing to work on it.<br><br>Best regards,<br>--<br>---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush | President OSGeo, <a href="http://osgeo.org">http://osgeo.org</a><br>
<br></blockquote></div><br>