Skip to main content
5 votes
Accepted

How to extract the integer-based geometry type code from an OGR feature

After poking around a little longer, I found out that while OGR geometries don't have access to the GetGeomType method, they DO have access to the GetGeometryType method, which outputs exactly what I'...
Felipe D.'s user avatar
  • 2,579
3 votes

Specify layer when using a geopackage in ogr2ogr

Based on the ogr2ogr documentation, this should work: ogr2ogr -clipsrc clip_polygons.gpkg -clipsrclayer clip_polygons_layer -nln output_layer output.gpkg input.gpkg input_layer
Pieter's user avatar
  • 2,151
2 votes

How to set a 'dataset open option' in ogr on a file geodatabase?

For information, this is also possible using fiona, a library that offers alternative, more "pythonic", bindings to GDAL: tables = fiona.listlayers( "data/filegdb/testopenfilegdb....
Pieter's user avatar
  • 2,151
2 votes
Accepted

How to set a 'dataset open option' in ogr on a file geodatabase?

You can find an example from the GDAL Python tests https://github.com/OSGeo/gdal/blob/master/autotest/ogr/ogr_openfilegdb.py#L2115 # Test LIST_ALL_TABLES=YES open option ds_all_table = gdal....
user30184's user avatar
  • 65.6k
1 vote

Read only the structure of a geopackage using GDAL/OGR?

According to https://www.geopackage.org/guidance/getting-started.html : A GeoPackage is an SQLite Database file with a .gpkg extension. If you are unsure whether a file is an SQLite database, you can ...
swiss_knight's user avatar
  • 10.3k

Only top scored, non community-wiki answers of a minimum length are eligible