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

Better management of coverage layers #93

Open
zacharlie opened this issue Jul 18, 2022 · 0 comments
Open

Better management of coverage layers #93

zacharlie opened this issue Jul 18, 2022 · 0 comments

Comments

@zacharlie
Copy link
Collaborator

Currently, a project coverage is defined by a simple MultiPolygon field provided by GeoDjango. A "Project Coverage File" (which is limited to a single file per project, .i.e. no shp/dbf) model provides a way to upload a layer, including an "on save" hook/ signal that will attempt to convert the file (if it is an OGR data source with Multipolygon type) into a valid coverage for the project.

The GeoDjango "LayerMapping" is not a suitable approach for gathering "just" the geometry and applying it to an existing record.

No user message is generated on error (simply logs to console), and only the first feature is used.

Basically this requires the input to be a valid, single feature multipolygon geojson file, and there is no validation on this during upload.

A more robust mechanism, such as unzipping a folder and processing it, or supporting multiple geometry types, would be needed in the future.

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

No branches or pull requests

1 participant