-
Notifications
You must be signed in to change notification settings - Fork 2
Desktop GUI
Several ways to create a map canvas each with pros and cons
Downloads small html with folium map api. Can use WX's WebView to visualize the map, efficiently stream tiles. However the user would need to be connected to the internet.
Folium does provide a drawing api folium.plugins.draw
in addition to GeoJson export. This is nice, however it will be tricky to properly read the events, and if we create WX widgets which are designed to read and react to json calls then it could be difficult to make the gui modular enough to be used in other WX frameworks like GRASS.
Example layout for folium based gui.
Problems arise however with Folium serving solely as a visualization library and not a bidirectional processing library between leaflet JavaScript and Python. So in order to be able to get the coordinates from the drawn geometries, additional JavaScript functions would need to be written and then Python functions to turn the results into Python objects.
Another option would be to use the export functionality to write the geometry as a GeoJson to disk. This could easily be turned into a python object and would allow for multiple geometries and geometry types to be used in a single query so long as an efficient parser for geojson -> projpicker strings is used.
Would allow for user maptiles / features to be loaded. Potential higher install size, but dont believe that will be too big of an issue.
Could use GRASS provinces or countries geometries from Basic global dataset. Countries would have lower number of verticies (faster), provinces would have more but imagine would still be optimized.
Not even sure if possible, but could be neat.