# get OSM data library(osmar) library(maptools) rotewandsteig <- get_osm(way(166274005), full = T) sp_rotewandsteig <- as_sp(rotewandsteig, what = "lines") # convert to KML kmlLine(sp_rotewandsteig@lines[], kmlfile = "rotewandsteig.kml", lwd = 3, col = "blue", name = "Rotewandsteig") # view it shell.exec("rotewandsteig.kml")
26 Sep 2014
Ever wished to use a trail on OSM on your GPS or smartphone? With this neat little R-Script this can easily be done. You'll just need to search OpenStreetMap for the ID of the trail (way), put this as argument to osmar::get_osm, convert to KML and you're good to go!
14 Jul 2014
For anyone interested in the capabilities of customized feature edit forms in QGIS I'd like to reference the following GIS-Stackexchange posting: http://gis.stackexchange.com/questions/107090/auto-populate-field-as-concatenation-of-other-fields
Here's a short shell-script (I have C:\OSGeo4W64\bin\ on my PATH) for sorting GIS data, a sqlite-db in this case, and saving it in the newly created order to a file. The DB is sorted in ascending order by the attribute 'Name' and written to a file with the KML Driver.
cd C:/Users/Kay/Documents/Web/Openlayers/Docs/Digitizing ogr2ogr -sql "SELECT * FROM 'trails-db' ORDER BY Name ASC" -f "KML" trails.kml trails.sqlite