Skip to content

Instantly share code, notes, and snippets.

@yohanboniface
Created August 6, 2013 10:50
Show Gist options
  • Save yohanboniface/6163520 to your computer and use it in GitHub Desktop.
Save yohanboniface/6163520 to your computer and use it in GitHub Desktop.
SELECT way ,
name ,
amenity ,
shop ,
tourism ,
highway ,
man_made,
access ,
religion,
waterway,
LOCK ,
historic,
leisure ,
CASE
WHEN tags ? 'iata'
THEN 'airport'
WHEN aeroway='aerodrome'
THEN 'airfield'
ELSE NULL
END AS aeroway ,
tags->'office' AS office ,
tags->'craft' AS craft ,
tags->'pump' AS pump ,
tags->'drinking_water' AS drinking_water,
"tower:type" ,
tags->'emergency' AS emergency ,
power ,
tags->'content' AS content ,
barrier
FROM planet_osm_point
WHERE amenity IS NOT NULL
OR shop IS NOT NULL
OR tags ? 'craft'
OR tourism IN ('alpine_hut' ,
'camp_site' ,
'caravan_site' ,
'guest_house' ,
'hostel' ,
'hotel' ,
'motel' ,
'museum' ,
'viewpoint' ,
'bed_and_breakfast',
'information' ,
'chalet')
OR highway IN ('bus_stop' ,
'traffic_signals',
'ford' ,
'street_lamp')
OR man_made IN ('mast' ,
'water_tower',
'tower' ,
'water_well' ,
'watermill' ,
'storage_tank')
OR historic IN ('memorial',
'archaeological_site')
OR leisure IN ('playground',
'slipway' ,
'beach_resort')
OR tags @ > hstore('office', 'ngo')
OR tags @ > hstore('office', 'government')
OR aeroway='aerodrome'
OR tags @ > hstore ('emergency', 'fire_hydrant')
OR power IN ('generator' ,
'sub_station',
'tower' ,
'pole')
OR barrier IN ('border_control')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment