Task #1805
User Story #1114: Polygone erfassen
Creating and editing polygons on web map
Added by Kurt Gerber almost 7 years ago. Updated about 6 years ago.
0%
Description
Creating and editing polygons on web map
Updated by Kurt Gerber almost 7 years ago
- Target version changed from GIZ Proposal 2017 to Carbon Benefit
Updated by Kurt Gerber almost 7 years ago
- Assignee set to Lukas Vonlanthen
Da haben wir noch eine Zeitschätzung versprochen...
Updated by Lukas Vonlanthen almost 7 years ago
- Estimated time set to 52.00 h
Summary of tasks¶
Extend data model¶
There is already a DB field for geometry (questionnaire_questionnaire.geom
, used to store point data). Probably it makes sense to use a different DB field (e.g. questionnaire_questionnaire.poly_geom
) to store polygons? (Bonus: If only polygons were submitted and no point data, then calculate centroid point out of polygon?)
Estimation: 2h
Configuration¶
Currently, the configuration (e.g. technologies.json
) knows which question is used for point data by having attribute "is_geometry": true
. This needs to be updated (extended by "has_polygons": true
?). Will all questionnaire have polygons? (see open questions). Write helper functions to access this question and its data
Estimation: 8h
Store data¶
Correctly store new/updated polygons after form submission (as GeometryCollection
, similar to points)
Estimation: 4h
Map in details (1)¶
Map (static) in questionnaire details: A static preview image is created to show the location relative to the country. It probably does not make sense to show polygons there as they are too small.
Estimation: -
Map in details (2)¶
Map (dynamic) in questionnaire details:- pass geometry data of questionnaire to view
- extend existing map toolbar to toggle display of polygons (visible by default?)
- adapt "zoom to all points on the map" to zoom to entire extent of map data (points and polygons)
- show count of polygons
Estimation: 8h
Map in form¶
- allow drawing and editing of polygons (add new layer)
- extend existing map toolbar to toggle draw/edit-mode
- button to delete all polygons
Estimation: 16h
API¶
No geometries (neither point nor polygon) visible in list. In details, include polygon (as geojson)
Estimation: 6h
Tests¶
Estimation: 8h
Tech considerations¶
- Caution: OpenLayers v3.16.0 is used (current version: v4.6.4). Probably hard to find documentation, examples and scripts to facilitate drawing of polygons. Upgrading OpenLayers or even switch other mapping library (e.g. LeafletJS) would be highly recommended, also for long-term sustainability of the application, but is expensive as existing code (e.g. functionality to add points) needs to be rewritten. (rough estimation: + 30-40h)
Open questions¶
- Draw polygons for all types of questionnaires (technologies, approaches, cca, ...)?
Updated by Kurt Gerber about 6 years ago
- Target version changed from Carbon Benefit to QCAT Backlog