mirror of
https://github.com/kidwellj/hacking_religion_cookbook.git
synced 2025-07-12 09:04:10 +00:00
first commit
This commit is contained in:
parent
14676c530c
commit
986fe916af
3 changed files with 74 additions and 0 deletions
25
openstreetmap_parse.R
Normal file
25
openstreetmap_parse.R
Normal file
|
@ -0,0 +1,25 @@
|
|||
require(sqldf) # using sqldf to filter while loading very large data sets
|
||||
require(data.table)
|
||||
require(sf) # new simplefeature data class, supercedes sp in many ways, also includes gdal functions
|
||||
|
||||
# setup workspace
|
||||
|
||||
setwd("/Users/kidwellj/gits/mapping_worship")
|
||||
|
||||
if (dir.exists("data") == FALSE) {
|
||||
dir.create("data")}
|
||||
|
||||
# Import filtered geojson files
|
||||
# Note: preferred option here is to use R package osmdata, but the server loads generated by this extraction are too high and cause timeouts.
|
||||
# Processing data outside R using osmium for now: https://github.com/mapcomm/cookbook/blob/master/osm_extracts/osm_extract_pow_osmium_uk.sh
|
||||
|
||||
osm_uk_points <- st_read(system.file("pow_osm.gpkg", package = "spData"))
|
||||
|
||||
vector_filepath = system.file("data/osm-gb-2018Aug29_pow_osm.pbf", package = "sf")
|
||||
osm_uk_points = st_read(vector_filepath)
|
||||
|
||||
rbind(osm_uk_points, ___)
|
||||
|
||||
# Processing handled outside R for now in QGIS
|
||||
|
||||
# Command for identifying candidates in OSM raw csv files: grep -E 'Masjid|islamic|muslim|mosque|Madrasah|Imam' *|wc -l
|
Loading…
Add table
Add a link
Reference in a new issue