User:Avena701

From OpenStreetMap Wiki
Jump to: navigation, search

I'm OSM user avena701. I can read and write German, English and Danish.

POI overpass extract

  • http://overpass-turbo.eu/s/aue
  • Overpass: XML, Metadata (version etc.) required for osmosis
  • osmosis --read-xml file="export.osm" --sort type="TypeThenId" --write-xml file="campsite.osm"
  • osmconvert campsite.osm --all-to-nodes -o=campsitenodes.osm
  • osmfilter campsitenodes.osm --keep-nodes="*" --drop-version -o=campsite.osm
  • gpsbabel -i osm -f campsite.osm -o gpx -F campsite.gpx

POI overpass extract, new

  • http://overpass-turbo.eu/s/bb5
  • Overpass: XML, Metadata (version etc.) required for osmosis
  • osmosis --read-xml file="export.osm" --sort type="TypeThenId" --write-xml file="campsite.osm"
  • osmconvert campsite.osm --all-to-nodes -o=campsitenodes.osm
  • osmfilter campsitenodes.osm --keep-nodes="*" -o=campsite.osm
  • osm2gpx.py campsite.osm campsite.gpx

Tagspec

  • campsite
{{tagspec1= "tourism"~"camp_site|caravan_site"}}
  • motelhotelhostlguesthouse
{{tagspec1= "tourism"~"motel|hotel|hostel|guest_house"}}
  • Accomodation other
{{tagspec1= "tourism"~"alpine_hut|apartment|chalet|wilderness_hut"}}
{{tagspec2="shelter_type"~"rock_shelter|basic_hut|lean_to"}}

Export raster map with tillmill from command line

Octave-Script to calculate bounding box for tilemill from center (lon,lat), zoomlevel and scalefactor:

lon = 13.74921;
lat = 51.07545;
z = 16; %zoomlevel
sf = 3; %scalefactor
width= 18000  %256*sf;
height= 3200 %256*sf; 

C = 40040;  % the (equatorial) circumference of the Earth

londegree_per_pixel = 360 / 2^(8+z)*cos(lat/180*pi) / sf;
latdegree_per_pixel = 180 / 2^(8+z) / sf;

%bbox:
xmin = lon - width/2  * londegree_per_pixel;
ymin = lat - height/2 * latdegree_per_pixel;
xmax = lon + width/2  * londegree_per_pixel;
ymax = lat + height/2 * latdegree_per_pixel;

% out
outcmd = sprintf('node ~/tilemill/index.js export openstreetmap-carto --format png --bbox="%f,%f,%f,%f" --width %d --height %d  --scale %f bellabike.png\n', xmin,ymin,xmax,ymax,width,height,sf);
printf(outcmd);


biketrekkingmap: Mapnik hill-shading, contours

gdalwarp srtm_42_02.tif srtm_42_03.tif srtm_41_02.tif srtm_41_03.tif ua-srtm.tif
  • Reproject:
gdalwarp -s_srs EPSG:4269 -t_srs EPSG:3785 -r bilinear ua-srtm.tif ua-srtm-3785.tif
  • Hillshade: Change standard sun altitude
gdaldem hillshade -co compress=lzw -alt 25 ua-srtm-3785.tif ua-srtm-3785-hillshade.tif
  • Create overviews to improve performance:
gdaladdo -r average ua-srtm-3785-hillshade.tif 2 4 8 16 32
gdal_contour -a elev -i 25 ua-srtm-3785.tif ua-srtm-3785.shp
  • Beware with Tilemill Geometry Field pre-caching. Set to custom -20037508.34,-20037508.34,20037508.34,20037508.34 (whole world).
mb-util uabike.mbtiles uabike

MOBAC / MyTrails

  • edit mapsources/localtiles.xml
  • enter "MyTrails" as name
  • click New, choose a atlas name, Type MGMaps/Mytrails (MGM)
  • Settings, Map Size: increase the map size
  • add a selection (can be larger than area where tiles are available)
  • go