
RobJN's Diary
Recent diary entries
As of a few weeks ago, it is now possible to add Mapbox Vector Tile (MVT) layers to JOSM. I have been playing around with these to learn how to apply basic styling to the layer. For this tutorial we will use a postcodes layer in Great Britain.
Styling requires us to first create a style.json file. Copy the contents below in to a plain text file (notepad) and save as style.json. If doing this on Windows you will want to make sure it doesn’t also have a .txt extension.
{
"version": 8,
"name": "Postcodes",
"owner": "Postcodes",
"id": "postcodes",
"sources": {
"postcodes-source": {
"maxzoom": 13,
"tiles": [
"https://api.mapbox.com/v4/robjn.3uur23nz/{zoom}/{x}/{y}.mvt?access_token=pk.eyJ1Ijoicm9iam4iLCJhIjoid0dYNkY1QSJ9.A-0lzQOawGYICYPfURsjDA"
],
"type": "vector"
}
},
"layers": [
{
"id": "something",
"type": "circle",
"source": "postcodes-source",
"source-layer": "results-4326-deduped",
"minzoom": 13,
"paint": {
"circle-color": "#C70039",
"circle-radius": 6
}
},
{
"id": "secondthing",
"type": "symbol",
"source": "postcodes-source",
"source-layer": "results-4326-deduped",
"minzoom": 13,
"layout": {
"text-field": "{postcode}",
"text-size": 18,
"text-allow-overlap": true,
"text-ignore-placement": true
},
"paint": {
"text-color": "#C70039",
"text-halo-color": "#000000"
}
}
]
}
Next you will want to find where this file was saved and construct it’s path using the file:// protocol. For me the file is in “file:///home/rob/Documents/OSM/style.json”. For those using Windows yours is likely to start with “file:///C:/” (and I believe all backslashes in the Windows filepath should be changed to forward slashes). Avoid spaces in the filepath as I suspect that will break. You can test you have the right path by pasting it in your web browser as if it was like any other URL.
Finally in JOSM, go to Imagery -> Imagery preferences and click the +MVT button. Paste the filepath in the top box and type a suitable name in box 5 (e.g. postcodes).
The layer can now be added just like any other. If you want to edit the style (e.g. a different hex colour code) then you can do that by editing the style.json file. If you edit the style you will also need to find where JOSM stores it’s cache on you computer and delete postcodes-source.mapcss from the cache folder. The reason for this is because JOSM converts the style.json into a .mapcss format and doesn’t re-create this unless it is first deleted.
There is a lot more that can be done to style MVT layers. For those interest the full MVT style spec is here, however I don’t think it is all implemented in JOSM yet. For example, I couldn’t not get text sizes to vary by zoom level (interpolation). Hopefully that will come soon or someone can show me what I was doing wrong if already available.
I hope this helps. If stuck, give me a shout.
Proposed resolution allowing time to make informed decisions
Posted by RobJN on 24 October 2020 in English (English).Last year I pushed a resolution to change the membership fees of OSM UK at very short notice. The OSM UK members rightly (albeit much to my frustration at the time) rejected this resolution at the OSM UK general meeting. The following year, we started discussing fees much earlier and the members subsequently accepted a resolution this time around.
This week, posts to osmf-talk indicate that the OSMF board is considering a number of resolutions for their general meeting. These resolutions are much more complicated than a simple change in membership fee as they relate to changes to the Articles of Association to help prevent “evil takeover”. You would therefore expect significantly more upfront discussion. Changes to the Articles of Association shouldn’t be taken lightly as they can have weird, unforeseen consequences so you would also expect legal advise to be sought well in advance and some sort of summary of this to be presented to the members. This should occur in advance of a final decision as to what should go onto into the general meeting notice for voting.
Now I fully support provisions that help protect the OSMF; in fact I have been proposing options to the OSMF for at least 2 years. However I doubt many of us our experts in the field (our intelligence lies mainly in other domains). Are we even sure that an AoA change is the right option? You may get much more protection from other changes such as changing the companies status from the current “Ltd” organisation to something more suited to a non-profit organisation.
Perhaps there is a middle ground involving putting a policy to the vote at an AGM, or something similar. [quote from Andy Allan]
Yes. Here is a proposed Ordinary Resolution which would require just 50% of the vote to pass:
Proposed Resolution: That the board must undertake an assessment of the options that would provide greater protection to OSMF from a hostile takeover. The assessment should include a review of provisions in the Articles of Association and also other options that are available including a change of status. The assessment should consider both the legal implications but also any consequences to the health of the OpenStreetMap community. Professional legal advise should be sought and a summary of the findings must be presented back to the members no later than 30 June 2021.
The board would be bound by this and once the members and the board are fully armed with all the relevant info we can then take the next step. This next step could come from the board or be driven by the members.
I’m responding to an OSMF post ( https://lists.openstreetmap.org/pipermail/osmf-talk/2020-August/007095.html ) here as I’m unsubscribed from osmf-talk as I find it to be too intense / unwelcoming.
The point I would like to make echos some other points raised in the discussion. Namely I feel that this is a good opportunity to assess how osmf communicates in general. As others have pointed out, a commitment to open platforms is great but it does miss huge proportions of our community. Reading the responses, it sounds like (some) board members are basically saying other people should re-post to the wider communication channels. I do not think this is sufficient. The board, and it’s working groups, have a responsibility for making informed decisions and to do so well they should gather views from a wide as audience as possible.
There are services that will post messages across multiple platforms all at once. I strongly recommend that these options are explored. Often these services require a fee, although I suspect we have the right skills to develop something ourselves. It would be great if the osmf committed to making this available to all working groups and local chapters.
So in this case, I think scope creep is worth exploring.
Best regards Rob
…so say a minority of people.
If you read the OpenStreetMap mailing lists, or follow (non-OSM) news then you’d be forgiven for thinking that we live in a world where people’s views have become incredibly narrow. But in shock news from State of the Map 2017 we discover that most people can happily live alongside their fellow mappers.
During my live-polling session at SotM, I asked the audience to participate in a series of questions via the online polling system, DirectPoll. You can watch the video and review the results in full.
But today, say hooray to the 85% who say that “We need all forms of mapping / they are all equally important”.
Thanks.
What’s happened to maps.me app? I used to be able to add details to existing POI and now I just get “claim this business” which errors.
Obviously some attempt to better commercialise the app but massive shame for the OSM community.
Other apps to check out are Street Complete and (when it launches) the new Kory app.
Starting 17th December: OpenStreetMap UK/GB Group
Posted by RobJN on 8 December 2015 in English (English).I’m posting this here so that it catches the same people as the original “an OpenStreetMap UK/GB Group? survey”.
Join us for the first meeting from the comfort of your own home at 8pm December 17th. All the details you need including the link to the survey results can be found at https://lists.openstreetmap.org/pipermail/talk-gb/2015-December/018075.html
Help us make a logo! (and win tickets to State of the Map 2016!)
Posted by RobJN on 16 July 2015 in English (English).The State of the Map working group is pleased[1] to announce a call for logo designs. We need your help to build a strong recognisable logo for State of the Map 2016 (SotM) conference taking place in Brussels, Belgium. The conference is the OpenStreetMap Foundation’s annual gathering of the OSM community, interested parties and others.
We’ve put together a Design Brief which outlines what we’re looking for in a logo. Entrants can be an individual or team of people, even a design company.
http://wiki.openstreetmap.org/wiki/State_Of_The_Map_2016/Logo_brief
The deadline for entries is 23:59 UTC (before midnight) on Saturday 15th August 2015 and we can’t wait to see your all your wonderful entries!
Good luck!
Rob,
On behalf of the SotM WG
[1] In fact we’re delighted - this has been something we’ve done for previous SotM’s and it is always amazing to see your logo ideas :-D
Dear UK/GB OpenStreetMappers,
From time to time we talk about the potential of setting up a “UK/GB OpenStreetMap group” (name yet to be decided) but we never quite know what it should look like.
Survey time!! Please fill in the following 2 minute survey:
http://goo.gl/forms/Z797QhC27c
Your responses to page 1 will be shared when we close the survey (in a few weeks). If you respond to the optional page 2 questions (your details), your responses will be used for the purpose of administrating the group only (they will only be seen by myself and any designated administrator should a UK/GB group be set up).
So stop reading and go to the survey:
http://goo.gl/forms/Z797QhC27c
Best regards and happy mapping,
A few OSM members interested in historic maps are working on our own version of the New York Public Library “Building Inspector”. If you’ve not yet tried it out, go take a look - it’s a great site:
http://buildinginspector.nypl.org/
So, the core function they are asking contributors to do is to check (inspect) and fix the rough building outlines produced by the computer script. Our version will be the same but will cover any city and any library we can get good maps for. But we need a name.
Current names suggested are:
- Historic Map Marker
- Old Map Marker
- OHM Buildings
- Historic Map Inspector
- Building Surveyor
- Historic Building Constructor
- Historic Building Fixer
- Ghost Mapper
- Ghost Building Mapper
- Ghost Brick
- Ghost Bricks and Mortar
- Houses and History
- Historic Map Booth
- Old Building Kiosk
- Historic Building Outliner
We’re after your thoughts - which name works best? Is there some amazing name we haven’t thought of yet?
Roam - A new tablet friendly data collection app
Posted by RobJN on 22 March 2014 in English (English).I spotted this in the QGIS blogs page and thought it may be of interest. For example, if you’re interested in collecting data about post boxes/listed buildings/cafes/etc you could set up a project in ‘Roam’ to help you. Other people could also help you with your project (gathering a consistent set of data using the project template).
‘Roam’ is a standalone application that was created to do data collection. The primary use of Roam is in situations where you might not have internet connection. It comes with a config manager that can be used to create and manage Roam [data collection] projects.
It’s Windows tablet only at the moment, but aims to extend to Android. Worth keeping an eye on development as it could help data collection for OSM.
More info here.
Introduction
One of the things we have spoken about at Mappa Mercia is how to extract data from OpenStreetMap.
As the UK government makes strides to improve access to it’s location based data (e.g. the new data.gov.uk), I decided that its about time I wrote up some notes on how to get at OSM’s data.
I will be looking at two tools. Both work roughly in the same way and both return .osm files. I will discuss how to convert from osm to other formats in a later post.
MapQuest XAPI
Hosted at http://open.mapquestapi.com/xapi/ MapQuet’s tool is very intuitive. Simply select how you would like to filter the data by selecting to retrieve nodes, ways, or relations, enter a tag to filter by and pan the map to the area you are interested in.
This provides a data URL and a “run” button. The resulting output can be saved as a .osm file and used in the JOSM editor (amongst others).
Overpass API
I provide this second option as I often find MapQuest to be slow/unresponsive. We will be using the compatibility layer and constructing our own data URL. Lets look at an example:
http://www.overpass-api.de/api/xapi?way[landuse=allotments][bbox=-1.56962,52.38471,-1.500960,52.40827][@meta]
We can break this down into it’s individual components:
-
The base url
The base urlhttp://www.overpass-api.de/api/xapi?
is always required -
Feature selection
Next we specify whether we want to retrieve justnode
’s,way
’s orrelation
’s. Alternatively we retrieve everything using*
-
Filtering by tags
In the next part of the URL I have filtered for just those elements with the taglanduse=allotments
. We could also add additional filters in the same format in order to further refine the output. Note tat the wildcard character can also be used, e.g.[landuse=allotments][name=*]
would retrieve only allotments with a name tag. -
Bounding box
As with the the MapQuest API, we can opt to restrict the search to just one area. The bounding box is in the same format as that of the MapQuest API so I suggest using their website to find the correct longitude and latitude values (simply copy the whole bbox section from the URL you create on MapQuests website. -
Include metadata Finally we add
[@meta]
to the end of the URL. This ensures that we retrieve all the metadata needed to be able to open the .osm file in JOSM. The metadata is also required if you intend to upload any changes back to OpenStreetMap.
Once you have constructed your URL in the same fashion, paste into your web browser and save the resulting output as a .osm file.
For more info see the wiki page.