nptscot / nptscot.github.io

Network Planning Tool for Scotland: front end.
https://www.npt.scot
GNU Affero General Public License v3.0
7 stars 5 forks source link

Replace OpenCycleMap with vector data #135

Closed mem48 closed 7 months ago

mem48 commented 8 months ago

Not high piorirty but something to think about.

Currently the basemap option is for the Open Cycle Map uses Thunderforest raster tiles See https://github.com/nptscot/npt/issues/51

But protomaps has a method for making pmtiles from OSM https://github.com/protomaps/basemaps

Switching to a self hosted pmtiles for the OSM based map would have two advantages:

1) No reliance on 3rd part service (but would pay for storage of pmtiles) 2) Could have multiple OSM based styles

I think point 2 is the key one as the OpenCycleMap is useful for showing location of infrastructure, but is otherwise a very noisy base map. It would be nice to have something more like the OS basemaps currently in the tool, but also highlight the cycling infrastructure.

On the downside I don't think mapbox styles can do the thing where the road is one colour but the edge is a different colour if there is a cycle lane.

image

So some futher investigation is needed.

Robinlovelace commented 8 months ago

Good example of vector tiles for open cycling infrastructure data is ATIP's browse page:

image

Source: https://acteng.github.io/atip/browse.html?style=dataviz#12.54/53.79201/-1.52591

Code: https://github.com/acteng/atip/

mvl22 commented 8 months ago

I think point 2 is the key one as the OpenCycleMap is useful for showing location of infrastructure, but is otherwise a very noisy base map.

It is, but it has the unique advantage of showing official (signed on-street) routes.

Generally I recommend setting 0.7 opacity when using it as a basemap. That washes it out slightly but gives a good balance between the official routes it shows and any foreground data lines.

It would be nice to have something more like the OS basemaps currently in the tool, but also highlight the cycling infrastructure.

Bear in mind that writing a stylesheet isn't free. It's a very large amount of time/work to do properly. Thunderforest have spent years developing their cartgography.

mem48 commented 8 months ago

Generally I recommend setting 0.7 opacity when using it as a basemap. That washes it out slightly but gives a good balance between the official routes it shows and any foreground data lines.

That might not work for NPT as the canvas background is not white. Its a funky gradient of colours so that in 3D mode the sky is blue but if you go really low angle the sun sets.Screenshot_20240120-140200_Firefox.jpg

mvl22 commented 8 months ago

I was referring to the OpenCycleMap tile layer. Opacity can be set on a per layer basis. Obviously this shouldn't be applied to other layers or to the sky canvas.

mvl22 commented 7 months ago

I've reduced the opacity of the OCM tiles in 08f9785dde4c91b877cc5ed67f45ec0abea344c3 so they work better now as a background. (I've also switched to the x2 retina tile rendering, which gives better appearance on mobile, in d418344a92a5d91862e00c81253736b48987a329.)

I suggest this ticket be closed, as I suspect spending months emulating the OpenCycleMap detailed cartography in vector format is beyond the scope of this project.

Robinlovelace commented 7 months ago

:+1: great stuff, I think reducing the oppacity is a good fix and agreed re emulating established product, we don't need to invent the wheel!