= GIS module for Sahana Eden 2.0 = == Upgrade to new !JavaScript libraries == The core !JavaScript Mapping Library that we use is still [https://openlayers.org/two/ OpenLayers 2.x][[BR]] This is very old and we would benefit from upgrading to the [https://openlayers.org/ current 6.x release] - no need to maintain the old one for browser changes (Just 1 instance of that so far: ) - we can take advantage of new features & performance upgrades (like [https://openlayers.org/en/latest/examples/tilejson.html TileJSON]) At the core this isn't too hard and [https://github.com/sahana/eden/blob/master/modules/s3/s3gis.py#L7396 much progress has already been made] (& UCCE already uses OL5 within the DC Editor) The big issue is the User Interface, especially for the main map. This is currently built on [https://geoext.org/v1/ GeoExt 1.1] & !ExtJS 3.4. The obvious solution would be to upgrade to the [https://geoext.github.io/geoext/ current GeoExt], and hence [https://docs.sencha.com/extjs/6.2.0/index.html ExtJS 6.2], however that version of ExtJS is no longer available and has [https://www.sencha.com/legal/gpl/ strict GPL licensing] around it, which doesn't really make it suitable for us.[[BR]] !GeoExt are also not moving very fast and a dependency on that seems unwise if we're making a big change anyway.[[BR]] Although we could bring in the !GeoExt code that we use and maintain it ourselves (it is BSD-licensed), it depends on !ExtJS, which is not, so this isn't really an option.[[BR]] So what UI toolkit should we use instead?[[BR]] An obvious option would be [https://jqueryui.com/ jQueryUI], since we already use that extensively for custom widgets in Eden, and we already use the widget factory for our [https://github.com/sahana/eden/blob/master/static/scripts/S3/s3.ui.gis.js OL6-version of the Map][[BR]] Although it hasn't received many upgrades recently, it is still maintained with a [https://blog.jqueryui.com/2021/09/jquery-ui-1-13-0-rc-2-released/ new release coming soon]. It has limited Widgets available: Buttons, Dialog, Menus, Tabs all there, but no Toolbar (we can probably use Controlgroup for this) Panels or Tree (using [https://www.jstree.com/ JSTree] seems the right approach here, as we already use this elsewhere & it's well-maintained). We can also see about bringing in components from [https://github.com/primefaces/primeui PrimeUI]...that isn't maintained, however the Apache 2 license means we can take anything we want from there. There are other options which we could consider: * !VueJS * Basic Tree example: https://v3.vuejs.org/examples/tree-view.html * !PrimeVue has widgets: https://primefaces.org/primevue/ * Angular * !TypeScript-only :/ * !BackBone/Mustache * !BluePrint * https://blog.palantir.com/scaling-product-design-with-blueprint-25492827bb4a * looks good, but Palantir :/ & no Mobile :/ & TS :/ * Ember * Lit (lightweight web components) * React * https://react-md.dev/packages/tree/demos * [https://webix.com Webix] * GPL, but can be combined with MIT * Has a Tree == Other Issues == * Import / Export [https://www.ogc.org/standards/sld SLD] <> gis_style * Should be pretty easy as our model is basically a JSON version of SLD anyway * Import / Export [https://www.ogc.org/standards/wmc WMC] <> gis_config * Import for Shapefile needs completing * https://github.com/sahana/eden/blob/master/modules/s3/codecs/shp.py#L239 * Export to Shapefile should use Python-GDAL bindings not shell utilities * https://github.com/sahana/eden/blob/master/modules/s3/codecs/shp.py#L179 * Filtered Maps (e.g. !Summary/Map methods) trigger 2x requests to the server for the GeoJSON