]> git.openstreetmap.org Git - rails.git/commitdiff
eight zillion more presets for 0.5 Potlatch
authorRichard Fairhurst <richard@systemed.net>
Wed, 21 Jan 2009 00:31:55 +0000 (00:31 +0000)
committerRichard Fairhurst <richard@systemed.net>
Wed, 21 Jan 2009 00:31:55 +0000 (00:31 +0000)
config/potlatch/autocomplete.txt
config/potlatch/presets.txt
lib/potlatch.rb
public/potlatch/potlatch.swf

index 86b6c62b800a68a3ba7982cd6537dd02e6346d0c..a3c80c7da1ac2b3fead6d2f4210214af1077e20b 100755 (executable)
@@ -1,8 +1,9 @@
 # Potlatch autocomplete values
 # each line should be: key / way|point|POI (tab) list_of_values
 # '-' indicates no autocomplete for values
-highway/way            motorway,motorway_link,trunk,trunk_link,primary,primary_link,secondary,tertiary,unclassified,residential,service,bridleway,cycleway,footway,pedestrian,steps,living_street,track
+highway/way            motorway,motorway_link,trunk,trunk_link,primary,primary_link,secondary,tertiary,unclassified,residential,service,bridleway,cycleway,footway,pedestrian,steps,living_street,track,road
 highway/point  mini_roundabout,traffic_signals,crossing,gate,stile,cattle_grid,toll_booth,incline,viaduct,motorway_junction,services,ford,bus_stop,turning_circle
+tracktype/way  grade1,grade2,grade3,grade4,grade5
 junction/way   roundabout
 cycleway/way   lane,track,opposite_lane,opposite_track,opposite
 waterway/way   river,canal,stream,drain,dock,riverbank
@@ -81,12 +82,31 @@ is_in/way           -
 note/point             -
 note/POI               -
 note/way               -
-source/point   -
-source/POI             -
-source/way             -
+source/point   survey,Yahoo,NPE,local_knowledge,GPS,cadastre
+source/POI             survey,Yahoo,NPE,local_knowledge,GPS,cadastre
+source/way             survey,Yahoo,NPE,local_knowledge,GPS,cadastre
 postal_code/point      -
 postal_code/POI                -
 postal_code/way                -
 description/point      -
 description/POI                -
 description/way                -
+addr:housenumber/point -
+addr:street/point              -
+addr:full/point                        -
+addr:postcode/point            -
+addr:city/point                        -
+addr:country/point             -
+addr:housenumber/POI   -
+addr:street/POI                        -
+addr:full/POI                  -
+addr:postcode/POI              -
+addr:city/POI                  -
+addr:country/POI               -
+addr:housenumber/way   -
+addr:street/way                        -
+addr:full/way                  -
+addr:postcode/way              -
+addr:city/way                  -
+addr:country/way               -
+addr:interpolation/way even,odd,all,alphabetic
index 464204edb4e721bfe0e7c1a9fa46b0a1895f250f..6be23b99327243ab08fccb655eebcfa7f0fb2b5d 100644 (file)
@@ -9,16 +9,19 @@ residential road: highway=residential,ref=,name=(type road name)
 service road: highway=service,ref=,name=
 
 way/footway
-footpath: highway=footway,foot=yes
-bridleway: highway=bridleway,foot=yes
-byway: highway=unsurfaced,foot=yes
-permissive path: highway=footway,foot=permissive
+public footpath: highway=footway,foot=yes,tracktype=
+permissive path: highway=footway,foot=permissive,tracktype=
+bridleway: highway=bridleway,foot=yes,tracktype=
+paved track: highway=track,foot=,surface=paved
+gravel track: highway=track,foot=,surface=gravel
+dirt track: highway=track,foot=,surface=dirt
+grass track: highway=track,foot=,surface=grass
 
 way/cycleway
-cycle lane: highway=cycleway,cycleway=lane,ncn_ref=
-cycle track: highway=cycleway,cycleway=track,ncn_ref=
-cycle lane (NCN): highway=cycleway,cycleway=lane,name=(type name here),ncn_ref=(type route number)
-cycle track (NCN): highway=cycleway,cycleway=track,name=(type name here),ncn_ref=(type route number)
+cycle track: highway=cycleway,ncn_ref=,rcn_ref=,lcn_ref=
+cycle track (national route): highway=cycleway,ncn_ref=(type route number)
+cycle track (regional route): highway=cycleway,rcn_ref=(type route number)
+cycle track (local route): highway=cycleway,lcn_ref=(type route number)
 
 way/waterway
 canal: waterway=canal,name=(type name here)
@@ -36,10 +39,59 @@ light railway: railway=light_rail
 preserved railway: railway=preserved
 disused railway tracks: railway=disused
 course of old railway: railway=abandoned
+railway platform: railway=platform
+
+way/tourism
+archaeological: place=,tourism=,historic=archaeological_site,name=(type name here)
+attraction: place=,tourism=attraction,historic=,amenity=,name=(type name here)
+campsite: place=,tourism=camp_site,historic=,amenity=,name=(type name here)
+caravan site: place=,tourism=camp_site,historic=,amenity=,name=(type name here)
+castle: place=,tourism=,historic=castle,name=(type name here)
+hotel: place=,tourism=hotel,historic=,amenity=,name=(type name here),operator=(type chain here)
+museum: place=,tourism=museum,historic=,amenity=,name=(type name here)
+ruins: place=,tourism=,historic=ruins,name=(type name here)
+
+way/recreation
+golf course: landuse=,leisure=golf_course
+pitch: landuse=,leisure=pitch, sport=(type sport here)
+playground: landuse=,leisure=playground
+recreation ground: landuse=recreation_ground,leisure=
+sports centre: landuse=,leisure=sports_centre
+stadium: landuse=,leisure=stadium
+
+way/utility
+college: place=,tourism=,amenity=college,name=(type name here)
+school: place=,tourism=,amenity=school,name=(type name here)
+hospital: place=,tourism=,amenity=hospital,name=(type name here)
+library: place=,tourism=,amenity=library,name=(type name here)
+university: place=,tourism=,amenity=university,name=(type name here)
 
 way/natural
-lake: natural=water,landuse=
-forest: landuse=forest,natural=
+coastline: natural=coastline,landuse=,leisure=
+fell: natural=fell,landuse=,leisure=
+heath: natural=heath,landuse=,leisure=
+lake: natural=water,landuse=,leisure=
+forest: landuse=forest,natural=,leisure=
+marsh: natural=marsh,landuse=,leisure=
+nature reserve: leisure=nature_reserve,landuse=,natural=
+scree: natural=scree,landuse=,leisure=
+woodland: natural=wood,landuse=,leisure=
+
+way/landuse
+allotments: landuse=allotments,leisure=
+building site: landuse=construction,leisure=
+commercial: landuse=commercial,leisure=
+common: landuse=,leisure=common
+farm: landuse=farm,leisure=
+farmyard: landuse=farmyard,leisure=
+industry: landuse=industrial,leisure=
+landfill site: landuse=landfill,leisure=
+park: leisure=park,landuse=
+quarry: landuse=quarry,leisure=
+reservoir: landuse=reservoir,leisure=
+residential: landuse=residential,leisure=
+retail: landuse=retail,leisure=
+village green: landuse=village_green,leisure=
 
 point/road
 mini roundabout: place=,highway=mini_roundabout
@@ -52,20 +104,25 @@ stile: place=,highway=stile
 cattle grid: place=,highway=cattle_grid
 
 point/cycleway
-gate: place=,highway=gate
+bike park: place=,highway=,amenity=bicycle_parking,capacity=(type number of spaces)
+gate: place=,highway=gate,amenity=,capacity=
 
 point/waterway
-lock gate: place=,waterway=lock_gate
-weir: place=,waterway=weir
-aqueduct: place=,waterway=aqueduct
-winding hole: place=,waterway=turning_point
-mooring: place=,waterway=mooring
+lock: place=,waterway=,lock=yes,name=(type name here)
+single lockgate: place=,waterway=lock_gate,lock=
+weir: place=,waterway=weir,lock=
+aqueduct: place=,waterway=aqueduct,lock=
+winding hole: place=,waterway=turning_point,lock=
+mooring: place=,waterway=mooring,lock=
 
 point/railway
 station: place=,railway=station,name=(type name here)
 viaduct: place=,railway=viaduct
 level crossing: place=,railway=crossing
 
+point/landmark
+pylon: man_made=,power=tower
+
 point/natural
 peak: place=,natural=peak
 
@@ -73,8 +130,13 @@ POI/road
 car park: place=,amenity=parking
 petrol station: place=,amenity=fuel
 
+POI/footway
+bench: amenity=bench
+
 POI/cycleway
-bike park: place=,amenity=bicycle_parking
+bike park: place=,shop=,amenity=bicycle_parking,capacity=(type number of spaces)
+bike rental: place=,amenity=bicycle_rental,capacity=(type number of bikes)
+bike shop: place=,shop=bicycle
 
 POI/place
 city: place=city,name=(type name here),is_in=(type region or county)
@@ -84,14 +146,78 @@ village: place=village,name=(type name here),is_in=(type region or county)
 hamlet: place=hamlet,name=(type name here),is_in=(type region or county)
 
 POI/tourism
-attraction: place=,tourism=attraction,amenity=,religion=,denomination=
-church: place=,tourism=,amenity=place_of_worship,name=(type name here),religion=christian,denomination=(type denomination here)
-hotel: place=,tourism=hotel,amenity=,religion=,denomination=
-other religious: place=,tourism=,amenity=place_of_worship,name=(type name here),religion=(type religion),denomination=
-post box: place=,amenity=post_box,tourism=,name=,religion=,denomination=
-post office: place=,amenity=post_office,tourism=,name=,religion=,denomination=
-pub: place=,tourism=,amenity=pub,name=(type name here),religion=,denomination=
-school: place=,tourism=,amenity=school,name=(type name here),religion=,denomination=
+archaeological: place=,tourism=,historic=archaeological_site,name=(type name here)
+artwork: place=,tourism=artwork,historic=,amenity=
+attraction: place=,tourism=attraction,historic=,amenity=,name=(type name here)
+cafe: place=,tourism=,historic=,amenity=cafe,name=(type name here)
+campsite: place=,tourism=camp_site,historic=,amenity=,name=(type name here)
+caravan site: place=,tourism=camp_site,historic=,amenity=,name=(type name here)
+castle: place=,tourism=,historic=castle,name=(type name here)
+cinema: place=,tourism=,historic=,amenity=cinema,name=(type name here),operator=(type chain here)
+fast food: place=,tourism=,historic=,amenity=fast_food,name=(type name here)
+guesthouse: place=,tourism=guest_house,historic=,amenity=,name=(type name here)
+hostel: place=,tourism=hostel,historic=,amenity=,name=(type name here),operator=(type chain here)
+hotel: place=,tourism=hotel,historic=,amenity=,name=(type name here),operator=(type chain here)
+monument: place=,tourism=,historic=monument,name=(type name here)
+museum: place=,tourism=museum,historic=,amenity=,name=(type name here)
+picnic site: place=,tourism=picnic_site,historic=
+pub: place=,tourism=,historic=,amenity=pub,name=(type name here)
+restaurant: place=,tourism=,historic=,amenity=restaurant,name=(type name here)
+ruins: place=,tourism=,historic=ruins,name=(type name here)
+viewpoint: place=,tourism=viewpoint,historic=
+
+POI/landmark
+church: man_made=,amenity=place_of_worship,name=(type name here),religion=christian,denomination=(type denomination here),power=
+other religious: man_made=,amenity=place_of_worship,name=(type name here),religion=(type religion),denomination=,power=
+lighthouse: man_made=lighthouse,power=,amenity=,name=,religion=,denomination=
+pylon: man_made=,power=tower,amenity=,name=,religion=,denomination=
+windmill: man_made=windmill,power=,amenity=,name=,religion=,denomination=
+
+POI/recreation
+golf course: leisure=golf_course
+pitch: leisure=pitch, sport=(type sport here)
+playground: leisure=playground
+recreation ground: landuse=recreation_ground,leisure=
+sports centre: leisure=sports_centre
+stadium: leisure=stadium
+
+POI/shop
+bank: amenity=bank,shop=,operator=(type bank name)
+bike shop: amenity=,shop=bicycle,name=(type name here),operator=(type chain here)
+bookshop: amenity=,shop=books,name=(type name here),operator=(type chain here)
+butchers: amenity=,shop=butcher,name=(type name here),operator=(type chain here)
+chemists: amenity=,shop=chemist,name=(type name here),operator=(type chain here)
+convenience store: amenity=,shop=convenience,operator=(type chain here)
+department store: amenity=,shop=department_store,operator=(type chain here)
+DIY: amenity=,shop=doityourself,operator=(type chain here)
+garden centre: amenity=,shop=garden_centre,name=(type name here),operator=(type chain here)
+laundry: amenity=,shop=laundry,name=(type name here),operator=(type chain here)
+off-licence: amenity=,shop=alcohol,name=(type name here),operator=(type chain here)
+outdoor: amenity=,shop=outdoor,name=(type name here),operator=(type chain here)
+pharmacy: amenity=pharmacy,shop=,name=(type name here),operator=(type chain here)
+post office: amenity=post_office,shop=,name=(type name here)
+supermarket: amenity=,shop=supermarket,operator=(type chain here)
+
+POI/utility
+college: place=,tourism=,amenity=college,name=(type name here)
+post box: place=,amenity=post_box,tourism=,name=,ref=(type code here)
+recycling: place=,amenity=recycling,tourism=,name=,ref=(type code here)
+school: place=,tourism=,amenity=school,name=(type name here)
+surgery: place=,tourism=,amenity=doctors,name=(type name here)
+hospital: place=,tourism=,amenity=hospital,name=(type name here)
+library: place=,tourism=,amenity=library,name=(type name here)
+phone box: place=,tourism=,amenity=telephone,name=(type name here)
+toilets: place=,tourism=,amenity=toilets,name=(type name here)
+university: place=,tourism=,amenity=university,name=(type name here)
 
 POI/natural
 peak: place=,natural=peak
+
+point/address
+address: addr:housenumber=(type house number),addr:street=(type street name),addr:postcode=(type postcode),addr:city=(type town name)
+
+POI/address
+address: addr:housenumber=(type house number),addr:street=(type street name),addr:postcode=(type postcode),addr:city=(type town name)
+
+way/address
+address: addr:housenumber=(type house number),addr:street=(type street name),addr:interpolation=(type pattern of house numbers),addr:postcode=(type postcode),addr:city=(type town name)
index cf8f5903dde5fe72aae759155e5ef89b5273e6d6..cfb6028177e1579e5ed3f1e014768864d938eed1 100644 (file)
@@ -92,6 +92,10 @@ module Potlatch
         0.chr+encodedouble(n)
       when 'NilClass'
         5.chr
+         when 'TrueClass'
+        0.chr+encodedouble(1)
+         when 'FalseClass'
+        0.chr+encodedouble(0)
       else
         RAILS_DEFAULT_LOGGER.error("Unexpected Ruby type for AMF conversion: "+n.class.to_s)
       end
@@ -143,7 +147,7 @@ module Potlatch
             presetcategory=$2
             presetmenus[presettype].push(presetcategory)
             presetnames[presettype][presetcategory]=["(no preset)"]
-          elsif (t=~/^(.+):\s?(.+)$/) then
+          elsif (t=~/^([\w\s]+):\s?(.+)$/) then
             pre=$1; kv=$2
             presetnames[presettype][presetcategory].push(pre)
             presets[pre]={}
@@ -187,7 +191,7 @@ module Potlatch
       File.open("#{RAILS_ROOT}/config/potlatch/autocomplete.txt") do |file|
         file.each_line {|line|
           t=line.chomp
-          if (t=~/^(\w+)\/(\w+)\s+(.+)$/) then
+          if (t=~/^([\w:]+)\/(\w+)\s+(.+)$/) then
             tag=$1; type=$2; values=$3
             if values=='-' then autotags[type][tag]=[]
             else autotags[type][tag]=values.split(',').sort.reverse end
index 9ec9bd2f712bbf3d5cc0449d934cb0403fd0a560..73055b9662c628c59dfd47c94a2f3b2dbc325740 100755 (executable)
Binary files a/public/potlatch/potlatch.swf and b/public/potlatch/potlatch.swf differ