<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, 17 Feb 2016 at 23:24 Michael Sumner <<a href="mailto:mdsumner@gmail.com">mdsumner@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, 17 Feb 2016 11:18 pm Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le mercredi 17 février 2016 12:25:24, Michael Sumner a écrit :<br>
> Hi there, is there an easy way to discover which formats allow mixing of<br>
> vector types in a single layer?<br>
<br>
No, there is no such driver metadata currently. You need to open the dataset<br>
and query the layer geometry type. If it is unknown, then it allows mix of<br>
geometry types.<br>
<br>
><br>
> I.e. a single layer MapInfo file with points, lines, and polygons - I know<br>
> there is MapInfo (tab) and MapInfo (mif) and GeoJSON,<br>
><br>
> I'd also like to know what drivers can present as a single data set but<br>
> with these types separated into different layers, like SDTS.<br>
><br>
> I consider the multiple shapefiles in one folder feature to be a somewhat<br>
> different, third case.<br>
>From the point of view of the OGR API, a directory of shapefile = a dataset<br>
with several layers<br>
><br>
> Is there a clear way to categorize these three kinds, and classify all<br>
> existing drivers this way?<br>
<br>
I think there are 2 orthogonal isssues :<br>
- which drivers support mixed of geometry type in a single layer<br>
- which drivers support multiple layers in a dataset (in general, datasets<br>
that support multiple layers do not set a constraint on the unicity of the<br>
geometry type among layers)<br>
<br>
And perhaps to address your shapefile case :<br>
- which drivers support only opening a file<br>
- which drivers support only opening a directory<br>
- which drivers support both<br>
- which drivers are not file related (already addressed by checking if the<br>
GDAL_DMD_CONNECTION_PREFIX / "DMD_CONNECTION_PREFIX" metadata item is present.<br>
Was added in GDAL 2.0)<br>
<br><br><br><br>
><br>
> Am I on the right track, or is it more complicated?<br>
><br>
> Cheers, Mike.<br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a></blockquote></div><div><br></div><div>Thank you Even, very helpful.</div><div><br></div><div>Cheers, Mike</div><div><br></div><div><br></div></blockquote><div><br></div><div><br></div><div>Is there much discussion recorded about this issue in general? I find it odd that QGIS does not allow mixing - at all - given that OGR supports it. I found this: </div><div><br></div><div><a href="http://gis.stackexchange.com/questions/89423/combining-different-geometry-types-into-same-feature-class">http://gis.stackexchange.com/questions/89423/combining-different-geometry-types-into-same-feature-class</a><br></div><div><br></div><div>I'm interested in GDAL-specific discussions, or any packages that use GDAL that allow this. </div><div><br></div><div>The now defunct  Eonfusion project supported this mixing with a spatial-primitives-based data model (I worked on the project it for a time). </div><div><br></div><div>FWIW I'm a long-term Manifold user so I take this capability for granted:  </div><div><br></div><div> <a href="http://www.georeference.org/doc/drawings.htm">http://www.georeference.org/doc/drawings.htm</a></div><div><br></div><div>I'm exploring geometry models in R that allow both traditional "features" alongside triangulated meshes and other primitves-based structures.  This is a much better fit for database-aligned data sets, and obviously mixed geometry is an obvious need for query-based GIS. </div><div><br></div><div>Keen to see any links to discussions that folks might remember, or that are active currently. </div><div><br></div><div>Cheers, Mike. </div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
</blockquote></div><div dir="ltr">-- <br></div><div dir="ltr"><span>Dr. Michael Sumner</span><br><span>Software and Database Engineer</span><br><span>Australian Antarctic Division</span><br><span>203 Channel Highway</span><br><span>Kingston Tasmania 7050 Australia</span><br><br></div></blockquote></div></div><div dir="ltr">-- <br></div><div dir="ltr"><span>Dr. Michael Sumner</span><br><span>Software and Database Engineer</span><br><span>Australian Antarctic Division</span><br><span>203 Channel Highway</span><br><span>Kingston Tasmania 7050 Australia</span><br><br></div>