Import Instructions for Public Rights of Way Progress Tool
Setup
- Run
setup-dirs.pl [fcounty]
to create directories.
- Set the source tag, licence and attribution/disclaimer for the GIS
data in the
osm_prow_counties
table, via
the PRoW Open Data
edit page.
- Add an appropriate attribution to the
OSM
Wiki Contributors page
Extract and Import PRoW Data
- Run
download_rowmaps.pl [fname] [iso date]
to download KML file.
- Either use a parish list file (
parishes.tsv
)
and add-parishes.pl
to set up the parishes in the
database (needed if only reference numbers are used in the
converted.kml
file), or uncomment the
$qpi->execute()
lines
in extract-rowmaps.pl
(which works for full parish
names). If rowmaps file does not contain distict information for a
non-unitary authority, then this needs to be provided via
parishes.tsv
.
- Run
extract-rowmaps.pl [fcounty]
. You may need to manually add
district and parish conversion hashes to get everything working
properly. For unitary authorities, add a '' =>
'[fcounty]'
line in %districtcorrect.
prow_ref Format Settings
- If necessary, set prow_ref_regex, prow_ref_format and
prow_ref_short_format in osm_prow_counties table, via
the Open Data
edit page.
prow_ref_format
is a printf string, which is passed the
arguments ([parish-name], [parish-id], [row-type],
[row-number], [row-suffix]). For example: "%2$s%4$d%5$s
". The
default used if none given in "%1$s %3$s %4$d%5$s
".
prow_ref_short_format
(if given) is used to format the numbers
in the tables on the parish pages. Same as above, but a vertical
pipe character is used to show the separation between the number
and any suffix for alignment purposes.
prow_ref_regexp
is a regular expression to parse
the prow_ref=*
tag. It should contin five capturing
groups, corresponding to the five arguments of
prow_ref_format. For example
"^()([A-Z][A-Z]?)()([1-9][0-9]*)([A-Za-z]{0,2})$
".
Parish Boundary File Creation
- Create parish boundaries file using QGIS:
- Add new vector layers from the
district-borough-unitary-region.shp
and
parish_region.shp
BoundaryLine files in QGIS. (Layer
→ Add Layer → Vector Layer)
- For each District / Unitary authority, select the authority in
the layer, and make sure this layer is still selected.
- Open the Processing Toolbax (cog on toolbar), then select
"Vector Selection" → "Select by Location".
- Chose to select from the parishes layer, where features "are
within" the district layer's "slected features only", and
"create a new selection".
- Right Click on the parish layer in the layers box, and select
"save as". Save locally
in
OSM/PRoW Tool/borders/[fcounty]/
with the
file names [fdistict].geojson
. Set the CRS to "WGS
84", check "save only selected features", uncheck "add saved
file to map", and set the "coordinate precision" to 8.
- Load the geojson file
in MapShaper. Simplify to 10%
while preventing shapre removal. Export as geojson, with the
default
[fdistrict].json
file name.
- Save the district boundary files locally as
/prow/progress/[fcounty]/[fdistict].json
and upload to
/osm/prow/progress/[fcounty]
.
Parish Boundaries and Matching with DS Parishes / Areas
- Run
process-boundaries.pl [fcounty]
to copy
boundary files to htdocs and report any matching errors.
- Unparished areas need a record in
the
osm_prow_unparishes_areas
table. Construct a fake
GSS ID from zero-padding to 4 digits in the two numbers.
- Add records to the
osm_prow_parish_link
table to
link parishes with different names and splits/joins.
- Parishes without any PRoWs will need to be added to the
osm_parishes_ds
table manually if a complete parish
list was not used above.
- Run
parish-bounds.pl [fcounty]
to correctly sort
bounding boxes of parishes.