Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map detail for outdoor activities #304

Open
piggz opened this issue Apr 29, 2019 · 19 comments
Open

Map detail for outdoor activities #304

piggz opened this issue Apr 29, 2019 · 19 comments

Comments

@piggz
Copy link

piggz commented Apr 29, 2019

Id like to use Puremaps + OSM scout server for hiking/biking, however the level of detail in the maps is insufficient when using the offline profile and the OSM maps. The OpenCycleMap maps are far better, but only work online. See attached screenshots for comparison.
Screenshot_20190429_003
Screenshot_20190429_002

@zwieberl
Copy link

zwieberl commented May 1, 2019

mapbox outdoor looks even better, IMHO.

@piggz
Copy link
Author

piggz commented May 1, 2019

yeah, it too is better, but for me, it doesnt differentiate aswell footpaths and bridelways.

@rinigus
Copy link
Owner

rinigus commented May 2, 2019

those are all solvable by styling. altitude, though, requires extra info

@sbridger
Copy link

OpenTopomap has usable contours and detail for me (in NZ).
It would be my first choice/priority for cacheing

@martinetd
Copy link

those are all solvable by styling. altitude, though, requires extra info

I've just tried Pure Maps on linux and in online mode with the 'terrain' view the results are pretty impressive, good work there!

So when I installed OSM Scout Server for offline use I was very sad to see there is no terrain layer available when switching server. Is that work in progress? Or is the data just too big? If so maybe conditioning it to an option in the profile?

Anyway would love to hear where this is at, and if there's anything easy enough to help on.

@rinigus
Copy link
Owner

rinigus commented May 2, 2020

Terrain style, as many others, require work on import and styling. Online styles were imported by Mapbox and styled by them, we cannot use those in OSM Scout Server. Anyone wishing to help with the work on the stack and styling is welcome. So far, nobody has really picked it up.

@martinetd
Copy link

Ok so just to make sure I understand, pure maps can use Mapbox's styles but osmscout-server cannot just redistribute these so they need to be rewritten from scratch, ideally by someone who hasn't read Mapbox's style file to avoid copyright issues?

I've looked at ./styles/mapboxgl/styles/osmbright.json to give myself an idea of the required work; that would basically need to be copied and adapted to do something somewhat similar to the online style? e.g. remove poi, add level lines and similar?
Removing and small adjustments (e.g. font sizes etc) would be easy enough but I have no idea how to add new infos not displayed anywhere, because I don't know how altitude data is stored in the first place. Is it already stored as lines like ferry/roads/etc in osmscout source in some layer?
(Anywhere I could see what is stored how to be independant on that? I tried directly peeking into one of ./mapboxgl/packages/tiles-section-*.sqlite with a big-ish size and cannot make much sense out of it, probably need a proper client that understands pbf...)

Then in pure-maps (or other client but you also seem to manage that one) add something equivalent to maps/osmscout_0_day.json using the new style? Anything else?

(Not making any promise I'll do anything, just recompiling everything will likely take me a couple of weeks, but having a clear idea of what to do might help people step up... And if nobody does I might eventually get there, just not much time and disk space to give right now)

Thanks!

@martinetd
Copy link

Forgive the "spam", just answering some of my own questions.. The styles seem to be more generic than I thought they were so I already found some other terrain styles e.g. https://github.com/openmaptiles/maptiler-terrain-gl-style/blob/master/style.json from https://openmaptiles.org/styles/ - which also points to something called Maputnik I'll have a look.
License wise it's not very clear but the page states "The styles and schema are free and open-source and you can adapt the design and code for your project or commercial product however you like, if you keep the copyright attributtion" so it shouldn't be too hard to start from there; I guess that's what you had meant by "import" ?

The rest of my questions still stand, sorry for asking things that are probably obvious for you.

@rinigus
Copy link
Owner

rinigus commented May 3, 2020

If you seriously want to look into styles, I can bring you up to speed with it.

All mapbox styles go hand-in-hand with the imported data. Overall, pipeline is as follows:

  1. PostGIS OSM database --- import --> MapboxGL tiles (store on server/phone).
  2. Get tile and style it using MapboxGL style.

Step 1 is done while I import the data, step 2 is done by Pure Maps. To be able to work on styles, corresponding import has to be done as well. So, we cannot use Mapbox generated styles as we cannot distribute Mapbox tiles.

OSM Scout Server styles and imports are done via https://github.com/rinigus/mapbox-gl-styles and https://github.com/rinigus/mapbox-gl-importer . In general, I tried to reduce repetitions that are common in MapboxGL JSON style files. All is split into layers and later combined into different OSM Scout Server styles.

Import layers are at https://github.com/rinigus/mapbox-gl-importer/tree/master/layers . So, any additional needed data should go there.

Styles are in layers at https://github.com/rinigus/mapbox-gl-styles/tree/master/styles/src/layers and, as an example of merge, https://github.com/rinigus/mapbox-gl-styles/tree/master/styles/src/osmbright.

To develop new style, you don't need to import the planet. You can download smaller PBF and work on import using it.

Ideally, new styles should be developed using the same approach. As layers are split and combined later, it simplifies generation of day/night versions, versions for car/pedastrian and so on transportation.

@mdehollander
Copy link

mdehollander commented Sep 13, 2020

I am also taking a look at creating/adjusting an outdoor style for offline use. I used osmscout-server with pure-maps on a ubuntu-touch phone this summer on a hiking trip and it worked quite well (thanks a lot!). But in the mountains the map is quite empty :(
I am thinking of first to get things displayed that are already present in the current vector data / layers. For example showing mountain peaks. Later adding more pois, like huts, marked trails etc. I am taking a look at the thunderforest outdoor and Maptiler Terrain styles to get an idea which layers would be good to add.

It would be nice to hear if I am on the right track and if there has been some work maybe already done.

Questions:

  • If I wan to adjust a style or a new one, shouldn't that be done in the osmscout-server repository, for example in the osmbright.json file? Above the links are all to mapbox-gl-importer.
  • When are the vector tiles produced that are distributed at https://data.modrana.org/osm_scout_server/, mainly the tiles-section-***.sqlite.bz2 files?

The approach I am currently taking is running osmscout-server locally (ubuntu laptop) and open the style with Maputnik to edit it and look at the rendering. Now I want to take a look at adjusting the style. Afterwards adding more layers and generate new vector tiles. Any feedback on this approach is welcome.

Finally, for the long run, I thought of adding contour lines (vector) and hillshade (terrain rgb or raster) for offline use. I see there is an osmbright-topo style and a repo to export contour lines to a pbf file using SRTM or LiDAR data, that maybe is of use.

So far my thoughts. Happy to hear yours.

@rinigus
Copy link
Owner

rinigus commented Sep 13, 2020

This is absolutely correct approach, please continue. In the end, we will have to incorporate it into https://github.com/rinigus/mapbox-gl-styles which is used to generate the styles.

mapbox-gl-importer (https://github.com/rinigus/mapbox-gl-importer) is a repo that is used to generate tiles as distributed by OSM Scout Server. You can setup the same on your PC and just import smaller PBFs. If you get stuck somewhere, open an issue and we will update the docs as well scripts.

@Gorsh2
Copy link

Gorsh2 commented May 3, 2021

I am also taking a look at creating/adjusting an outdoor style for offline use. I used osmscout-server with pure-maps on a ubuntu-touch phone this summer on a hiking trip and it worked quite well (thanks a lot!). But in the mountains the map is quite empty :(
I am thinking of first to get things displayed that are already present in the current vector data / layers. For example showing mountain peaks. Later adding more pois, like huts, marked trails etc. I am taking a look at the thunderforest outdoor and Maptiler Terrain styles to get an idea which layers would be good to add.

It would be nice to hear if I am on the right track and if there has been some work maybe already done.

Questions:

* If I wan to adjust a style or a new one, shouldn't that be done in the osmscout-server repository, for example in the [osmbright.json](https://github.com/rinigus/osmscout-server/blob/master/styles/mapboxgl/styles/osmbright.json) file? Above the links are all to mapbox-gl-importer.

* When are the vector tiles produced that are distributed at https://data.modrana.org/osm_scout_server/, mainly the tiles-section-***.sqlite.bz2 files?

The approach I am currently taking is running osmscout-server locally (ubuntu laptop) and open the style with Maputnik to edit it and look at the rendering. Now I want to take a look at adjusting the style. Afterwards adding more layers and generate new vector tiles. Any feedback on this approach is welcome.

Finally, for the long run, I thought of adding contour lines (vector) and hillshade (terrain rgb or raster) for offline use. I see there is an osmbright-topo style and a repo to export contour lines to a pbf file using SRTM or LiDAR data, that maybe is of use.

So far my thoughts. Happy to hear yours.

Hi rinigus, hi Mattias.
I was coming to place a feature request with this same ideas. Please let me know if there's anything I can do to help make this work. Whenever we're allowed back into the wild (we're still somewhat in lockdown here) I'd be glad to use this feature.

@rinigus
Copy link
Owner

rinigus commented May 3, 2021

@Gorsh2 - it is mainly investment in time. As I have a set of projects, I am just not able to work on it in any reasonable time. So, it is up to the users to work on styles. See messages above on how to get started.

@sbridger
Copy link

sbridger commented May 6, 2021

I am quite confused about what stylesheets (SS) are where.
Does PM use the same SS for online and offline via osmscout server?
Are they PM stylesheets or they come from the map source and are different formats for each map provider?
Is there any commonality with OSMScout SS?

@rinigus
Copy link
Owner

rinigus commented May 6, 2021

I am quite confused about what stylesheets (SS) are where.

Styles, in general, come from the map provider. For Mapbox and OSM Scout Server, styles are loaded from the provider with the definitions of data tiles. These providers fully support Mapbox GL data tiles and styles.

For raster maps, style is generated on-fly by Pure Maps. As there is nothing to style there, I have to include mainly font source into the style and make sure that raster tiles are rendered correctly.

So, in context of this issue, styles have to be generated for OSM Scout Server to show data provided by the server better.

If you wish to improve style of some other provider (Mapbox for example), there are tools for that as well. In case of Mapbox, they allow you to create a style using their online editor. This will create URL that can be used for style definition in Pure Maps (as in https://github.com/rinigus/pure-maps/blob/master/maps/mapbox_0_streets.json#L17).

@kaelte
Copy link

kaelte commented Jul 22, 2021

As far as I understand, the created style cannot be used in offline mode:

"profiles": ["mixed", "online"],

@rinigus
Copy link
Owner

rinigus commented Jul 22, 2021

If you create a style for OSM Scout Server data it can be used with the offline profile as well. "Just" the style is needed and maybe you would have to tell which additional data do you want to get imported from OSM to support that style.

@kaelte
Copy link

kaelte commented Jul 22, 2021

But the styles do already exist.
Would it not be more efficient to use those styles?

@rinigus
Copy link
Owner

rinigus commented Jul 22, 2021

Styles exist for their data representation. To use with OSM Scout Server, separate styles have to be written (please see discussion above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants