[Talk-GB] Public Rights of Way in Oxfordshire and Hampshire
sk53.osm at gmail.com
Tue Jun 27 20:17:29 UTC 2017
I still do this on an ad hoc basis, but have never automated the process.
For those who might be interested here's what I currently do:
1. Download a pbf file from Geofabrik (usually gb but could be smaller area)
2. Convert it to .o5m format with osmconvert
3. Run a filter to find only highways with osmfilter
4. Return the data to .pbf format with osmconvert
== These stages could be automated to keep a current gb_highways.pbf file
5. Import the data to PostGIs using osm2pgsql with a custom style (so
designation for instance is a column). It may be that the custom style
makes the filtering for highways unnecessary. I normally import using the
default projection, but using 27700 would be sensible.
6. Download Shape/MapInfo/GeoJSON files from rowmaps.
7. Load them into image tables (ones where each column 1:1 with source data)
8. Normalise all the PROW data into a single table
== These steps only need to be done once, and repeated occasionally when
there is an update on rowmaps.
I do all the analysis/processing in QGIS. I've tried apparently the same
operations in PostGIS but get different results. I have a suspisciion why
but have never tried to resolve it.
9. Load OSM Highways & Rowmap-sourced Prow data in QGIS
10. Buffer all the OSM highways in 27700 projection by a suitable amount. I
currently use 20 or 25 metres which is broad enough to avoid highlighting
11. Copy the QGIS layer & filter for designation tag (it's probably best to
filter for explicit values).
12. Do the difference between the OSM Highways & the PROW layer. This
should give you all PROWS which are completely missing.
13. Do the intersection of the same two layers, which provides the
complement (all PROWS which are mapped in some way).
14. Repeat 12 using the output of 13 and the layer of highways with
designation. This should return all mapped paths missing a designation tag.
15. Repeat 13, using the same two layers in 14. This gives PRoWs mapped on
OSM as such.
The three result layers can be saved as Geojson, Shape files or loaded back
I find that 4-5 counties worth of Prow data can be done quite quickly.
Using QGIS and PostGIS layers is however slower than simply saving them as
Shape files (PostGIS data gets re-queried, and insn't indexed for use in
I've just started today experimenting with the Graphical Modeller in QGIS.
It looks as though the core of steps 10-15 could be built as a model: which
would certainly help me when I forget which layer comes first in difference
On a smaller scale (county level, or 10 km around somewhere) this all works
well with rowmaps geojson & overpass turbo queries for the highways (the
geojson still needs to be converted to 27700).
Obviously this process does not, except in a crude way, tell one how much
of a path is present in OSM. The outputs are entirely based on the original
PROW data too. (The process can be reversed and the prow data buffered not
the osm data).
On 27 June 2017 at 20:30, Robert Norris <rw_norris at hotmail.com> wrote:
> I agree with SK53 that identifying missing RoW is the primary importance.
> Robert: Is your code open / available anywhere such that one can help
> improve it / take inspiration from / run it locally ?
> I would like to use something better than flipping on/off a display of the
> ways in a Hampshire KML file over an OSM view and visually trying to spot
> ways in OSM that are missing!
> SK53 has previously generated something along these lines - see
> I'd like to be able generate & keep these up to date myself, but never
> found out (or took the time to learn) the exact process and commands to do
> Personally I don't really have much motivation for putting in prow_ref
> tags (IMHO I think they could be either be imported or have a tool to
> convert from lat/lon (or OSM way Id) to a prow_ref) - since they aren't
> often signed on the ground unless on diversion notice or planning
> application or similar.
> Be Seeing You - Rob.
> If at first you don't succeed,
> then skydiving isn't for you.
> From: Robert Whittaker (OSM lists) <robert.whittaker+osm at gmail.com>
> Sent: 27 June 2017 15:05:55
> To: talk-gb
> Subject: Re: [Talk-GB] Public Rights of Way in Oxfordshire and Hampshire
> On 27 June 2017 at 13:30, SK53 <sk53.osm at gmail.com> wrote:
> > It appears that the tool only accepts as mapped rights of way mapped with
> > some local identifier, rather than those with a designation tag.
> > is one of the better mapped places in England and Wales. have no problem
> > with us eventually adding identifiers for PRoW, but surely at this stage
> > really should be focussing on finding and mapping paths which are not on
> > at all, and/or getting designation tags on those already mapped but
> > them.
> > I personally do not find a tool which focuses on identifiers useful for
> > task.
> Fair enough. In an ideal world I agree that you might want to do the
> comparison / matching without needing identifiers. But I decided that
> would be too difficult (for me) to programme, and possibly too
> computationally expensive to do well. So I see adding the identifiers
> as a useful tool to allow the matching to be cone more conveniently,
> and hence allow gaps / missing paths to be more apparent. YMMV :)
> Robert Whittaker
> Talk-GB mailing list
> Talk-GB at openstreetmap.org
> Talk-GB mailing list
> Talk-GB at openstreetmap.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Talk-GB