-
Notifications
You must be signed in to change notification settings - Fork 3
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 MultiPolygon Support to Submission Shapes #127
Labels
Task 3.3
Django back-end
Comments
rajadain
added a commit
that referenced
this issue
Nov 2, 2022
If the payload's shape is a zipped shapefile or a geojson, they will be parsed as shapes and added to the database. In the case of geojson, the file is parsed and ingested directly. In the case of zipped shapefiles, we save them to a temporary directory, then load them via fiona and extract the shape from within. fiona cannot read files from memory, and the uploaded files could potentially be really heavy, so doing so helps manage the load. These are the only two formats we are supporting at the moment, more may be added in the future. This assumes a single Polygon input. Support for MultiPolygons will be added in #127.
rajadain
added a commit
that referenced
this issue
Nov 2, 2022
If the payload's shape is a zipped shapefile or a geojson, they will be parsed as shapes and added to the database. In the case of geojson, the file is parsed and ingested directly. In the case of zipped shapefiles, we save them to a temporary directory, then load them via fiona and extract the shape from within. fiona cannot read files from memory, and the uploaded files could potentially be really heavy, so doing so helps manage the load. These are the only two formats we are supporting at the moment, more may be added in the future. This assumes a single Polygon input. Support for MultiPolygons will be added in #127.
rajadain
added a commit
that referenced
this issue
Nov 2, 2022
If the payload's shape is a zipped shapefile or a geojson, they will be parsed as shapes and added to the database. In the case of geojson, the file is parsed and ingested directly. In the case of zipped shapefiles, we save them to a temporary directory, then load them via fiona and extract the shape from within. fiona cannot read files from memory, and the uploaded files could potentially be really heavy, so doing so helps manage the load. These are the only two formats we are supporting at the moment, more may be added in the future. This assumes a single Polygon input. Support for MultiPolygons will be added in #127.
rajadain
added a commit
that referenced
this issue
Nov 4, 2022
If the payload's shape is a zipped shapefile or a geojson, they will be parsed as shapes and added to the database. In the case of geojson, the file is parsed and ingested directly. In the case of zipped shapefiles, we save them to a temporary directory, then load them via fiona and extract the shape from within. fiona cannot read files from memory, and the uploaded files could potentially be really heavy, so doing so helps manage the load. These are the only two formats we are supporting at the moment, more may be added in the future. This assumes a single Polygon input. Support for MultiPolygons will be added in #127.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
Currently, a submission is only allowed to have simple polygon shapes:
iow-boundary-tool/src/django/api/models/submission.py
Line 17 in 100e8d0
However, a number of real world utility boundaries are complex multipolygons. While we may not support drawing complex multipolygons at this stage, we should still allow users to upload shapefiles or geojsons created elsewhere. To store this, we'll need to change this field to be a MultiPolygon.
Also update any test data and tests to match this.
The text was updated successfully, but these errors were encountered: