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

Geospatial equivalent of create_from_dataframe() #373

Open
tiems90 opened this issue Apr 16, 2020 · 0 comments
Open

Geospatial equivalent of create_from_dataframe() #373

tiems90 opened this issue Apr 16, 2020 · 0 comments
Labels
🙋‍♀️ Feature Request New feature or request

Comments

@tiems90
Copy link
Contributor

tiems90 commented Apr 16, 2020

🙋 feature request

Just as normal pandas DataFrames can be created using the create_from_dataframe() method, it would be great if we could do the same for a GeoPandasDataFrame.

🤔 Expected Behavior

tc.create_from_geodataframe(geodf, primary_key='primary_key', name='my_dataset')

Which would create the dataset, generate the attributes—and set the geometry as the correct type.

⚠️ Warning!

When setting the primary key and using the __geo_interface__ implementation of geopandas, the value in feature['id'] is based on the index of the GeoDataFrame.
To manually set this to a different column, geodf.index = geodf['my_primary_key'] can be used.

🔦 Context

Using the geoJSON API endpoint is less than ideal as all column fields need to be specified in the curl command.
Having it integrated neatly would also allow us to leverage the many types of geospatial data that geopandas can read. (shape files, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋‍♀️ Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant