Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dataset, Domain, and Relationship Info in Pyogrio #406

Open
Youssef-Harby opened this issue May 2, 2024 · 3 comments
Open

Add Dataset, Domain, and Relationship Info in Pyogrio #406

Youssef-Harby opened this issue May 2, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Youssef-Harby
Copy link

Hello Pyogrio Team,

I'm using pyogrio for working with ESRI FileGDB files and found a couple of features that could be improved:

  1. Datasets in List Layers:
    The list_layers function only shows layers, not the datasets holding them. In ogrinfo, you can see both layers and their datasets. It would be helpful if pyogrio could also show this information to better understand how data is organized.

  2. Access to Domains and Relationships:
    I also noticed that pyogrio.read_info doesn’t show domains and relationships. These are important for knowing how data is connected and its rules. ogrinfo can show this with a command like this:

ogrinfo -ro -al -json -so input.gdb > output.json

Here’s a short version of what ogrinfo outputs in output.json:

{
  "description": "input-gdb",
  "driverShortName": "OpenFileGDB",
  "driverLongName": "ESRI FileGDB",
  "layers": [...],
  "metadata": 1,
  "domains": {...},
  "rootGroup": {
    "layerNames": [...],
    "groups": [...],
  },
    "relationships": {...}
}
@brendan-ward
Copy link
Member

Thanks for the suggestion; handling of advanced driver specific properties like domains / relationships could be improved.

Can you point us to a small, publicly accessible FileGDB file that has domains / relationships set, or instructions on how to use ogr2ogr to create them from an existing dataset?

I don't understand what you mean by showing datasets in the context of listing layers; since the dataset is input to the list_layers function, there is only the one, right? Can you give us more of an example where listing layers would be showing layers from multiple datasets?

@brendan-ward brendan-ward added the enhancement New feature or request label May 2, 2024
@rouault
Copy link

rouault commented May 16, 2024

publicly accessible FileGDB file that has domains / relationships set

https://github.com/OSGeo/gdal/tree/master/autotest/ogr/data/filegdb/Domains.gdb
https://github.com/OSGeo/gdal/tree/master/autotest/ogr/data/filegdb/relationships.gdb

I don't understand what you mean by showing datasets

They meant "feature datasets" which is a Esri FileGeodatabase specifc terminology to designate a sort of group of layers.

Cf https://github.com/OSGeo/gdal/tree/master/autotest/ogr/data/filegdb/featuredataset.gdb

@brendan-ward
Copy link
Member

Thanks for the example datasets @rouault !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants