[gdal-dev] vector drivers with mixed topology types in a single layer?

Michael Sumner mdsumner at gmail.com
Sun Feb 21 15:09:03 PST 2016


On Wed, 17 Feb 2016 at 23:24 Michael Sumner <mdsumner at gmail.com> wrote:

>
>
> On Wed, 17 Feb 2016 11:18 pm Even Rouault <even.rouault at spatialys.com>
> wrote:
>
>> Le mercredi 17 février 2016 12:25:24, Michael Sumner a écrit :
>> > Hi there, is there an easy way to discover which formats allow mixing of
>> > vector types in a single layer?
>>
>> No, there is no such driver metadata currently. You need to open the
>> dataset
>> and query the layer geometry type. If it is unknown, then it allows mix of
>> geometry types.
>>
>> >
>> > I.e. a single layer MapInfo file with points, lines, and polygons - I
>> know
>> > there is MapInfo (tab) and MapInfo (mif) and GeoJSON,
>> >
>> > I'd also like to know what drivers can present as a single data set but
>> > with these types separated into different layers, like SDTS.
>> >
>> > I consider the multiple shapefiles in one folder feature to be a
>> somewhat
>> > different, third case.
>> From the point of view of the OGR API, a directory of shapefile = a
>> dataset
>> with several layers
>> >
>> > Is there a clear way to categorize these three kinds, and classify all
>> > existing drivers this way?
>>
>> I think there are 2 orthogonal isssues :
>> - which drivers support mixed of geometry type in a single layer
>> - which drivers support multiple layers in a dataset (in general, datasets
>> that support multiple layers do not set a constraint on the unicity of the
>> geometry type among layers)
>>
>> And perhaps to address your shapefile case :
>> - which drivers support only opening a file
>> - which drivers support only opening a directory
>> - which drivers support both
>> - which drivers are not file related (already addressed by checking if the
>> GDAL_DMD_CONNECTION_PREFIX / "DMD_CONNECTION_PREFIX" metadata item is
>> present.
>> Was added in GDAL 2.0)
>>
>>
>>
>>
>> >
>> > Am I on the right track, or is it more complicated?
>> >
>> > Cheers, Mike.
>>
>> --
>> Spatialys - Geospatial professional services
>> http://www.spatialys.com
>
>
> Thank you Even, very helpful.
>
> Cheers, Mike
>
>
>

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:

http://gis.stackexchange.com/questions/89423/combining-different-geometry-types-into-same-feature-class

I'm interested in GDAL-specific discussions, or any packages that use GDAL
that allow this.

The now defunct  Eonfusion project supported this mixing with a
spatial-primitives-based data model (I worked on the project it for a
time).

FWIW I'm a long-term Manifold user so I take this capability for granted:

 http://www.georeference.org/doc/drawings.htm

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.

Keen to see any links to discussions that folks might remember, or that are
active currently.

Cheers, Mike.




>
>> --
> Dr. Michael Sumner
> Software and Database Engineer
> Australian Antarctic Division
> 203 Channel Highway
> Kingston Tasmania 7050 Australia
>
> --
Dr. Michael Sumner
Software and Database Engineer
Australian Antarctic Division
203 Channel Highway
Kingston Tasmania 7050 Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160221/88a6a6cd/attachment.html>


More information about the gdal-dev mailing list