Esri / Esri/arcgis-python-api

Empty SHAPE

Open
#1,790 4 comments 0 reactions 0 assignees View on GitHub
enhancement under consideration
Dominant language
Python
Stars
2.2k
Forks
1.2k
Avg merge
2h 40m
Merged PRs (30d)
2

Description

**I'd like the spatial dataframes geometry to have empty geometry**

when reading data from database(sqls) we can often see empty geometry columns.

having an empty geometry
"Imagine that a system creates a trigger to insert a new row, than an webhook does an etl to get data and geometrie from an external api"

The geoaccessor can read empty geometries, but creates the row with None. And the column becomes object.
```python
geom = sdf.SHAPE.iloc[0]

geom.isEmpty
# would return True
```
Gracefully handle empty geom would be a good thing, if possible.

**Describe the solution you'd like**
Proposed Changes
I suggest that to implement the following changes:

Modify the spatial dataframe structure to accommodate empty geometries.

Ensure that operations on the dataframes (like transformations, visualizations, and exports, validation, svg) gracefully handle empty geometries.
Provide clear documentation on how empty geometries are represented and managed within the dataframes.
I believe that incorporating these changes will enhance the robustness and flexibility of our spatial data handling capabilities. I look forward to discussing this further and exploring the best ways to integrate this feature.

**Describe alternatives you've considered**
Implement ORM with sqlalchemy. Or geoaccessor and split the spatial dataframe.
**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.