faunalia / trackprofile2web

GNU General Public License v3.0
5 stars 1 forks source link

My Two Cents #2

Open Raruto opened 5 years ago

Raruto commented 5 years ago

First of all I would like to thank you for your interest in choosing the leaflet-elevation.js library, below some of my thoughts about this plugin:

PS although lately I have made several changes to the code, the ideator of the elevation library is Felix “MrMufflon” Bache, at most I might be considered a maintainer...

ghtmtt commented 5 years ago

also based on what it was reported in the issue #1, I believe that the name "trackprofile2web" is too long to be memorized by an average user (more than eight consecutive lowercase characters can be really many to remember) and perhaps too much focused on the "gpx" concept, for eg. here are some possible variations: _qgis-elevation, qgis-profiles, highcharts, tracks2web, web-profiles, qgis-tracks, d3-elevation, qgis-leaflet-elevation and so on...

well the name took me almost longer than code writing :) I think the suffix 2web has to stay there. The main problem (but we should be in time) is that changing the name is of course easy but requires lots of changes throughout the code. In case I agree with track2web

I think that an essential feature for this type of product may be also the possibility of simplifying the whole process of adding missing "elevation data" (also understood in the broadest sense of issue #1) to our qgis vector layers, for example by adding an option that allows us to add/replace the z value of the vector layer directly from the single/multiple raster DTM layers (avoiding the average user cumbersome steps)

here I'm +0. The user can use the Drape algorithm to add Z values (altitude or whatever values) to the line, but I think the plugin should just inform the user (as it does right now when Z values are missing) but not do the job.

as for the srtm data, I think that this plugin is quite interesting and should be adequately reported / integrated with this plugin, so that even the most inexperienced users can easily add altimetries to their tracks

yep, I know (and heavily use that plugin) but as you correctly stated in the next poing and in issue #1 maybe an user wants to add some other specific profile data and not elevation one.

as for the srtm data, I think that this plugin is quite interesting and should be adequately reported / integrated with this plugin, so that even the most inexperienced users can easily add altimetries to their tracks

this is the how the plugin is designed right? The user has to manually update the map. I thought it was better to let the user make many changes and only then refresh the map view.

there should be only one button export map and some checkboxes that will allow the user to choose the export options (like the one of the .geojson file)

correct. I'll open an issue

I think that the open in the browser button should works only on linux machines...

really? It is python job of webbrowser module and should be cross-platform. https://docs.python.org/2/library/webbrowser.html

we will should be able to add more than one base map at a time (eg. ESRI World Imagery, OpenTopoMap and OpenStreetMap).

definitely. Do you have a list of other TileMaps urls to add?

we will should be able to add more than one vector layer at a time (here it is a fairly complete example).

also yes, but I'm thinking of how to manage if one of the many vector miss Z values and other potential errors related. But yes.

PS although lately I have made several changes to the code, the ideator of the elevation library is Felix “MrMufflon” Bache, at most I might be considered a maintainer...

OK, I thought that addressing the link of the plugin to your page was enough because you listed the original work. Should I change something?

We can add a Help button or a Help tab where we explain how to use the plugin and related errors (no Z values....).

Raruto commented 5 years ago

well the name took me almost longer than code writing :) I think the suffix 2web has to stay there. The main problem (but we should be in time) is that changing the name is of course easy but requires lots of changes throughout the code. In case I agree with track2web

nothing more easy than this: https://doc.qt.io/qtcreator/creator-editor-finding.html#advanced-search

here I'm +0. The user can use the Drape algorithm to add Z values (altitude or whatever values) to the line, but I think the plugin should just inform the user (as it does right now when Z values are missing) but not do the job.

if this solution is too complex to code, at least, it would be nice to have a button that directly opens the right processing algorithm, like this https://gis.stackexchange.com/a/160146 (using the "native:setzfromraster" window), for adding missing elevation data.

yep, I know (and heavily use that plugin) but as you correctly stated in the next poing and in issue #1 maybe an user wants to add some other specific profile data and not elevation one.

yep, but the main case use of this type of plugins is still to display altitude data..

this is the how the plugin is designed right? The user has to manually update the map. I thought it was better to let the user make many changes and only then refresh the map view.

not so nice when you have to set "manually" style your colors...

really? It is python job of webbrowser module and should be cross-platform. https://docs.python.org/2/library/webbrowser.html

it says: could not locate runnable browser, by the way I don't understand much the plus of having an another "preview" button (if you really want to test in a web browser you can already export to html...)

definitely. Do you have a list of other TileMaps urls to add?

At least there must be a Satellite, Topo and Streets layer (like here), but probably in the future someone might want to use a wms layer loaded directly into qgis.

OK, I thought that addressing the link of the plugin to your page was enough because you listed the original work. Should I change something?

no, I think I think that's okay (I said so because I saw it on this page)

We can add a Help button or a Help tab where we explain how to use the plugin and related errors (no Z values....).

Ok, I would also add a webpage that shows how to easily add missing elevation data to a track and display it on the map

ghtmtt commented 5 years ago

nothing more easy than this: https://doc.qt.io/qtcreator/creator-editor-finding.html#advanced-search

there are already 160 download of the plugin, I think changing the name could lead to some confusion. I can change the name in the menu but I wouldn't change the name of the entire plugin. Do you agree?

if this solution is too complex to code, at least, it would be nice to have a button that directly opens the right processing algorithm, like this https://gis.stackexchange.com/a/160146 (using the "native:setzfromraster" window), for adding missing elevation data.

I'll add a button that opens the algorithm windows directly so that the user can handle all the steps in one place (#4)

yep, but the main case use of this type of plugins is still to display altitude data..

what about adding a link to the plugin? So that users that don't have elevation data know where to download them.

not so nice when you have to set "manually" style your colors...

still don't get it. Do you mean to auto-update the map at every style change users made?

it says: could not locate runnable browser, by the way I don't understand much the plus of having an another "preview" button (if you really want to test in a web browser you can already export to html...)

well, that's rally strange. #5

At least there must be a Satellite, Topo and Streets layer (like here), but probably in the future someone might want to use a wms layer loaded directly into qgis.

woooo.. your example is a complex GIS by itself :) #3

Ok, I would also add a webpage that shows how to easily add missing elevation data to a track and display it on the map

yep. I can do this on faunalia.eu or do you have another location in mind? My idea is to provide a kind of small tutorial with all these ideas (download a dem, style you map, ecc).

Raruto commented 5 years ago

there are already 160 download of the plugin, I think changing the name could lead to some confusion. I can change the name in the menu but I wouldn't change the name of the entire plugin. Do you agree?

what about adding a link to the plugin? So that users that don't have elevation data know where to download them.

yep. I can do this on faunalia.eu or do you have another location in mind? My idea is to provide a kind of small tutorial with all these ideas (download a dem, style you map, ecc).

As you see fit.

still don't get it. Do you mean to auto-update the map at every style change users made?

a simple checkbox (next to the update button) that allows you to disable / enable automatic preview updates

Raruto commented 5 years ago

Some other possible future additions:

ghtmtt commented 5 years ago

gpx export option

should not be a big problem. https://qgis.org/pyqgis/master/core/QgsVectorFileWriter.html#qgis.core.QgsVectorFileWriter.writeAsVectorFormat

set automatically meaningful names for the exported .geojson file (eg. the same name of the vector layer)

correct. Done in 0ce0aac

allow to set a relative path where the .geojson file will be saved (eg. "./data" folder)

isn't already relative? https://github.com/faunalia/trackprofile2web/blob/master/track_profile_2_web_dialog.py#L359

Raruto commented 5 years ago

correct. Done in 0ce0aac

Ok, maybe it would be better to assign meaningful names also to the HTML file

isn't already relative? https://github.com/faunalia/trackprofile2web/blob/master/track_profile_2_web_dialog.py#L359

I mean, the .geojson file could be saved (optionally) in a folder that is relative to the html file? In this way if you wanted to load many tracks on a sever you should not edit the html file every time...

ghtmtt commented 5 years ago

Ok, maybe it would be better to assign meaningful names also to the HTML file

2a68183 done

I mean, the .geojson file could be saved (optionally) in a folder that is relative to the html file?

you mean a folder with geojson within the folder with the html? Like:

.
├── 2019-02-09-sennes-tracks.html
└── tracks
    └── 2019-02-09-sennes-tracks.geojson
Raruto commented 5 years ago

you mean a folder with geojson within the folder with the html? Like:

.
├── 2019-02-09-sennes-tracks.html
└── tracks
   └── 2019-02-09-sennes-tracks.geojson

Yes, something like that.