Datatamer / Datatamer/tamr-client
Geospatial equivalent of `create_from_dataframe()`
- Dominant language
- Python
- Stars
- 11
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
# 🙋 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.)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the existing create_from_dataframe() implementation and then inspect how a GeoPandasDataFrame exposes data through __geo_interface__. Done means adding the requested geospatial creation path so it creates the dataset, generates attributes, and preserves geometry types, including the documented primary-key behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100