ckan / ckan/ckanext-spatial

Feature request: spatial form widget

Open
#91 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
XSLT
Stars
136
Forks
207
PR merge metrics
No merged PRs in 30d

Description

Cross post from [ckanext-scheming](https://github.com/open-data/ckanext-scheming/issues/11).

Our CKAN users love the dataset extent map to bits, but regularly despair on providing valid GeoJSON geometries. Drawing polygons on a Leaflet map, or uploading a GeoJSON file is basically where it ends for them.

It would be ideal if the "spatial" field would allow the user to either
- paste a valid geojson geometry as usual, or
- let users select geometries from a list of custom geometries (e.g. administrative boundaries like marine parks), or
- [draw a polygon on a leaflet map](http://leafletjs.com/2013/02/20/guest-post-draw.html), writing back the geojson geometry of the convex hull (if several polygons are drawn) or
- upload a geojson file with the bounding polygon (or a bunch of features), then [calculate](https://docs.djangoproject.com/en/dev/ref/contrib/gis/geos/) the convex hull post-upload.

If we can edit "spatial" inline, it would be most logical to display the Dataset extent map also inline, replacing the unreadable WKT - that's easy enough, see my [poc](https://github.com/open-data/ckanext-scheming/issues/11).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the linked ckanext-scheming issue and the existing spatial field and dataset extent map. Compare the referenced Leaflet drawing example and proof of concept, then define which input modes and inline map behavior are in scope. Done should mean an agreed, testable scope for geometry selection, drawing, upload, and display.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, javascript
Domain
backend, frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.