<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">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><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>