rinigus / osmscout-server

Maps server providing tiles, geocoder, and router
https://rinigus.github.io/osmscout-server
GNU General Public License v3.0
164 stars 28 forks source link

Sailfish:setup:directory Use SDCARD as default #313

Open sbridger opened 5 years ago

sbridger commented 5 years ago

In Sailfish, where I have an SDCARD, I am going to want to use it for the bulk map files, rather than the internal storage.

I suggest that when there is an SD , have a second button to create the directory on the SD.

You might want to have the directory below a "maps" folder that all mapping apps can use. e.g. sdcard/maps/maps.osm


Further it would be nice if the data is able to be copied into the SD and picked up for use by OSMscout-server.

My windowsphone has ~16G of various map data. None of it can be used on another phone, backed up via a PC etc. It can only be slowly and painfully downloaded again if I change phone / reset phone.

rinigus commented 5 years ago

You can select SDCard folder in preferences for storage. As for sharing with OSM Scout app - if its what you mean - its impossible due to format differences

sbridger commented 5 years ago

Yes it is possible to add it. You have to find and install a working file manager application. Then you have to create a new directory, which (in the case of the FM I used) you can't from "..sdcard" but have to go find /media/sdcard and create it from there. This is far more painful and obscure than "the man on the Clapham omnibus" would want.

As using the SD would be the default when one is installed (in my opinion) , I think having a button to make the dir on the SD would be a friction eliminating feature.

fyi, in case you don't have an sdcard: The dir is: /media/sdcard/6163-6661/Maps/Maps.OSM I assume that "6163-6661" is the individual sdcards name

rinigus commented 5 years ago

:) true - good point. agreed

sbridger commented 5 years ago

As for sharing with OSM Scout app - if its what you mean - its impossible due to format differences

No (didn't know there was such an app), (btw should I make an issue for this topic?)

What I meant is that you could copy the directory to your laptop for backup, reflash the phone, reinstall OSMServer, then copy the directory back to your phone (or to another phone), and have osmsserver pick it up (re-index it for example) and use it again. Without having to download it all again.

Or you could change SDcard (eg a bigger one), and just copy the maps dir over from the old sdcard to the new sdcard and it would work.


As context, On my winphone topomap

rinigus commented 5 years ago

already now you can download on PC and move data to phone. All you have to do is to point the server to correct directory. I don't think I am going to implement some kind of auto-discovery. What is planned is an easy config on start and ability to make new maps folder on SDCard or Home. For more advanced use, I would expect the users to make the folder and point to it in the settings.

Olf0 commented 5 years ago

P.S.: @sbridger, I agree with @rinigus, all you are asking for is already possible, except for the auto-discovery aspects. As the latter are failure prone (e.g., the path to an SD-Card was altered in 2018 with SFOS 2.2.0), it is well understandable not to tackle them.

@rinigus and @sbridger:

As for sharing with OSM Scout app - if its what you mean - its impossible due to format differences

Well, this has been working fine since both OSM Scout Server and OSMscout exist and still is, with OSM map data downloaded and managed solely by OSM Scout Server and a symbolic / "soft" link ~nemo/Documents/Maps --> /run/media/nemo/XXXXXXXX/maps/osmscout/osmscout for OSMscout. Mind that this is failure prone: Once you start to use OSMscout's map management, things will break.

P.S.: @sbridger, for the general aspects of "outsourcing" files and directories to an SD-card see this guide at TJC.

Olf0 commented 5 years ago

@sbridger, are you O.K. with closing this issue, or are there still some open points from your perspective?

sbridger commented 5 years ago

Well when it (below) has been implemented, then yes.

What is planned is an easy config on start and ability to make new maps folder on SDCard or Home. For more advanced use, I would expect the users to make the folder and point to it in the settings.

BTW that is fine with me. I don't expect "autodiscovery" of directories, just that it can use the already downloaded files when it has been pointed at them.

rinigus commented 5 years ago

BTW that is fine with me. I don't expect "autodiscovery" of directories, just that it can use the already downloaded files when it has been pointed at them.

This should work already