ckan / ckan/ckanext-scheming

Feature request: spatial widget

Open
#11 14 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
102
Forks
182
PR merge metrics
No merged PRs in 30d

Description

Ok this is stretching it a bit, but since scheming tackles custom form widgets, and ckanext-spatial provides this really good to have but (for end users) quite challenging `spatial` field, it would be very useful to integrate both.

A form_snippet spatial.html should allow users to
- paste a valid GeoJSON geometry as per ckanext-spatial, or
- [draw a polygon](http://leafletjs.com/2013/02/20/guest-post-draw.html) on a leaflet map, 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 save the convex hull's geometry

A display_snippet spatial.html could render the dataset extent just like ckanext-spatial does as a map, hiding the unhelpful WKT blurb. Edit: [done](https://github.com/florianm/ckanext-scheming/tree/11-spatial)
![image](https://cloud.githubusercontent.com/assets/762815/5373181/e309eeb2-808d-11e4-9f73-0abbd81c817a.png)

Also posted to [ckanext-spatial](https://github.com/ckan/ckanext-spatial/issues/91).

Contributor guide

No contributing guide indexed for this repository

Research direction

The request names form_snippet spatial.html and display_snippet spatial.html; start by reviewing the existing ckanext-spatial behavior and the linked 11-spatial branch. Check the Leaflet drawing reference and confirm that GeoJSON input, upload, convex-hull handling, and map display all match the requested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.