הלוגו של OpenStreetMap OpenStreetMap

Using custom Mapbox layers for mapping missing features in JOSM

פורסם על־ידי pratikyadav ב־26 בדצמבר 2015 בEnglish.

I prefer staying on JOSM while mapping and try to find missing features using satellite imagery. This becomes hard sometimes as one has to download OSM data to actually see if that feature (building, road, waterway etc) is present or not. To make this a little simple, I use custom Mapbox layers made using Mapbox Studio Classic.

The url of the layer created will be something like https://api.mapbox.com/v4/pratikyadav.93f1df6f/page.html?access_token=pk.eyJ1IjoicHJhdGlreWFkYXYiLCJhIjoiMTA2YWUxNjRkNmFmZGQ4YzAxZWFiNDk0NDM1YjE1YjAifQ.4P6N5dNmA_WQXd3BsJvu5w#14/23.2687/77.3938

Add tms[99]: at the start of the layer url, remove zoom/lat/log from the end and replace page.html? with {zoom}/{x}/{y}.png?.

The new TMS url ready to be used in JOSM will look something like this-

tms[99]:https://api.mapbox.com/v4/pratikyadav.93f1df6f/{zoom}/{x}/{y}.png?access_token=pk.eyJ1IjoicHJhdGlreWFkYXYiLCJhIjoiMTA2YWUxNjRkNmFmZGQ4YzAxZWFiNDk0NDM1YjE1YjAifQ.4P6N5dNmA_WQXd3BsJvu5w

Open imagery preferences in JOSM and use add new tms tab to add the layer url and layer name.

Roads

tms[99]:https://api.mapbox.com/v4/pratikyadav.93f1df6f/{zoom}/{x}/{y}.png?access_token=pk.eyJ1IjoicHJhdGlreWFkYXYiLCJhIjoiMTA2YWUxNjRkNmFmZGQ4YzAxZWFiNDk0NDM1YjE1YjAifQ.4P6N5dNmA_WQXd3BsJvu5w

screen shot 2015-12-26 at 12 09 19 pm Missing service roads

Buildings

tms[99]:https://api.mapbox.com/v4/pratikyadav.332dd523/{zoom}/{x}/{y}.png?access_token=pk.eyJ1IjoicHJhdGlreWFkYXYiLCJhIjoiMTA2YWUxNjRkNmFmZGQ4YzAxZWFiNDk0NDM1YjE1YjAifQ.4P6N5dNmA_WQXd3BsJvu5w

screen shot 2015-12-26 at 12 10 17 pm Missing buildings

Water and Waterways

tms[99]:https://api.mapbox.com/v4/pratikyadav.93b9339f/{zoom}/{x}/{y}.png?access_token=pk.eyJ1IjoicHJhdGlreWFkYXYiLCJhIjoiMTA2YWUxNjRkNmFmZGQ4YzAxZWFiNDk0NDM1YjE1YjAifQ.4P6N5dNmA_WQXd3BsJvu5w

screen shot 2015-12-26 at 12 12 25 pm Incomplete waterway

Landuse

tms[99]:https://api.mapbox.com/v4/pratikyadav.4417f8bf/{zoom}/{x}/{y}.png?access_token=pk.eyJ1IjoicHJhdGlreWFkYXYiLCJhIjoiMTA2YWUxNjRkNmFmZGQ4YzAxZWFiNDk0NDM1YjE1YjAifQ.4P6N5dNmA_WQXd3BsJvu5w

screen shot 2015-12-26 at 12 29 56 pm Missing parking areas

Road names

tms[99]:https://api.mapbox.com/v4/pratikyadav.640d9a4d/{zoom}/{x}/{y}.png?access_token=pk.eyJ1IjoicHJhdGlreWFkYXYiLCJhIjoiMTA2YWUxNjRkNmFmZGQ4YzAxZWFiNDk0NDM1YjE1YjAifQ.4P6N5dNmA_WQXd3BsJvu5w

screen shot 2015-12-26 at 12 28 59 pm Road without name tag in red color

Admin level 2 boundary

tms[99]:https://api.mapbox.com/v4/pratikyadav.60790d53/{zoom}/{x}/{y}.png?access_token=pk.eyJ1IjoicHJhdGlreWFkYXYiLCJhIjoiMTA2YWUxNjRkNmFmZGQ4YzAxZWFiNDk0NDM1YjE1YjAifQ.4P6N5dNmA_WQXd3BsJvu5w

screen shot 2015-12-26 at 12 28 18 pm

Happy Mapping

סמל דוא״ל סמל בלוסקיי סמל פייסבוק סמל לינקדאין סמל מסטודון סמל טלגרם סמל X

דיון

תגובה מאת Stereo על 26 בדצמבר 2015 בשעה 16:48

Have you looked into creating JOSM colour styles? It looks like that would be a more efficient way of doing it.

תגובה מאת pratikyadav על 26 בדצמבר 2015 בשעה 16:55

@Stereo not sure if we can use color styles without downloading the data in JOSM. The idea behind using these layers was to visualize features as a semi-transparent layer without downloading the OSM data.

תגובה מאת Sanderd17 על 27 בדצמבר 2015 בשעה 09:37

Pratikyadav: IMO, it would be better to serve these layers on a browser site, with links to edit in JOSM, iD or P2.

Something similar to http://tools.geofabrik.de/osmi/ or http://product.itoworld.com/map/main . But of course, with the imagery background, other features can be highlighted.

תגובה מאת pratikyadav על 27 בדצמבר 2015 בשעה 10:34

Sanderd17 : agreed with your suggestion, but the main purpose was to get custom layers for those who prefer staying is JOSM. I would definitely love to see someone using them for browser site.

תגובה מאת pnorman על 3 בינואר 2016 בשעה 02:55

I’d suggest using tms[19] instead of tms[99]. You don’t want JOSM to request the imagery for silly-high zoom levels.

תגובה מאת pratikyadav על 3 בינואר 2016 בשעה 15:20

pnorman sure :thumbsup:

תגובה מאת morray על 7 בינואר 2016 בשעה 16:25

thunbsup. Can you enrich the building layer with info if address is present or not?

תגובה מאת pratikyadav על 8 בינואר 2016 בשעה 07:10

http://pratikyadav.github.io/OSM_QA/#14/38.8922/-77.0348

A quick way for Visual QA using these layers on browser.

תגובה מאת pguillot על 25 בנובמבר 2020 בשעה 17:47

Hi pratikyadav,

Juste want today tu use your layer to update Cadastre in a french area, but i have this message when i add the layer on JOSM :

“Not Authorized : Invalid token”

So, I found another token somwhere, and then I have this message :

“Classic styles are no longer supported”

I found the way to change the url format to use this layer URL : tms[19]:https://api.mapbox.com/styles/v1/pratikyadav.332dd523/tiles/{zoom}/{x}/{y}.png?access_token={your_token}, but now I have this error :

no tile at this zoom level

Did you have any idea for resolv this problem?

Thank you!

נא להיכנס כדי להשאיר תגובה