From: Andy Allan Date: Wed, 28 Feb 2018 07:55:28 +0000 (+0800) Subject: Merge branch 'master' into moderation X-Git-Tag: live~2985^2~44 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/a20e28809f5ca1e3f3579faeaf118fff3ecc4994?hp=424b6ef1cf760c4a3e27ac1e6f612ae42a9cd493 Merge branch 'master' into moderation --- diff --git a/Gemfile b/Gemfile index 55493b9b6..a9a6cb4b6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" # Require rails -gem "rails", "5.1.4" +gem "rails", "5.1.5" # Require things which have moved to gems in ruby 1.9 gem "bigdecimal", "~> 1.1.0", :platforms => :ruby_19 diff --git a/Gemfile.lock b/Gemfile.lock index 601477824..02bb3e5fd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,41 +3,41 @@ GEM specs: SystemTimer (1.2.3) aasm (4.1.0) - actioncable (5.1.4) - actionpack (= 5.1.4) + actioncable (5.1.5) + actionpack (= 5.1.5) nio4r (~> 2.0) websocket-driver (~> 0.6.1) - actionmailer (5.1.4) - actionpack (= 5.1.4) - actionview (= 5.1.4) - activejob (= 5.1.4) + actionmailer (5.1.5) + actionpack (= 5.1.5) + actionview (= 5.1.5) + activejob (= 5.1.5) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.1.4) - actionview (= 5.1.4) - activesupport (= 5.1.4) + actionpack (5.1.5) + actionview (= 5.1.5) + activesupport (= 5.1.5) rack (~> 2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) actionpack-page_caching (1.1.0) actionpack (>= 4.0.0, < 6) - actionview (5.1.4) - activesupport (= 5.1.4) + actionview (5.1.5) + activesupport (= 5.1.5) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.1.4) - activesupport (= 5.1.4) + activejob (5.1.5) + activesupport (= 5.1.5) globalid (>= 0.3.6) - activemodel (5.1.4) - activesupport (= 5.1.4) - activerecord (5.1.4) - activemodel (= 5.1.4) - activesupport (= 5.1.4) + activemodel (5.1.5) + activesupport (= 5.1.5) + activerecord (5.1.5) + activemodel (= 5.1.5) + activesupport (= 5.1.5) arel (~> 8.0) - activesupport (5.1.4) + activesupport (5.1.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) @@ -73,8 +73,8 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - composite_primary_keys (10.0.2) - activerecord (~> 5.1.0, >= 5.1.4) + composite_primary_keys (10.0.3) + activerecord (~> 5.1.0, >= 5.1.5) concurrent-ruby (1.0.5) coveralls (0.8.21) json (>= 1.8, < 3) @@ -98,7 +98,7 @@ GEM railties (>= 3.0.0) faraday (0.12.2) multipart-post (>= 1.2, < 3) - ffi (1.9.21) + ffi (1.9.23) fspath (3.1.0) geoip (1.6.3) globalid (0.4.1) @@ -218,8 +218,8 @@ GEM mime-types mimemagic (~> 0.3.0) parallel (1.12.1) - parser (2.4.0.2) - ast (~> 2.3) + parser (2.5.0.2) + ast (~> 2.4.0) pg (0.21.0) poltergeist (1.17.0) capybara (~> 2.1) @@ -239,17 +239,17 @@ GEM rack-test (0.8.2) rack (>= 1.0, < 3) rack-uri_sanitizer (0.0.2) - rails (5.1.4) - actioncable (= 5.1.4) - actionmailer (= 5.1.4) - actionpack (= 5.1.4) - actionview (= 5.1.4) - activejob (= 5.1.4) - activemodel (= 5.1.4) - activerecord (= 5.1.4) - activesupport (= 5.1.4) + rails (5.1.5) + actioncable (= 5.1.5) + actionmailer (= 5.1.5) + actionpack (= 5.1.5) + actionview (= 5.1.5) + activejob (= 5.1.5) + activemodel (= 5.1.5) + activerecord (= 5.1.5) + activesupport (= 5.1.5) bundler (>= 1.3.0) - railties (= 5.1.4) + railties (= 5.1.5) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.2) actionpack (~> 5.x, >= 5.0.1) @@ -263,9 +263,9 @@ GEM rails-i18n (4.0.2) i18n (~> 0.6) rails (>= 4.0) - railties (5.1.4) - actionpack (= 5.1.4) - activesupport (= 5.1.4) + railties (5.1.5) + actionpack (= 5.1.5) + activesupport (= 5.1.5) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) @@ -400,7 +400,7 @@ DEPENDENCIES r2 (~> 0.2.7) rack-cors rack-uri_sanitizer - rails (= 5.1.4) + rails (= 5.1.5) rails-controller-testing rails-i18n (~> 4.0.0) record_tag_helper diff --git a/app/assets/javascripts/index/directions/osrm.js b/app/assets/javascripts/index/directions/osrm.js index e31c053ef..84f085c5a 100644 --- a/app/assets/javascripts/index/directions/osrm.js +++ b/app/assets/javascripts/index/directions/osrm.js @@ -117,19 +117,14 @@ function OSRMEngine() { instText += I18n.t(template + '_without_exit', { name: name } ); } } else if (step.maneuver.type.match(/on ramp|off ramp/)) { - if (step.destinations) { - if (namedRoad) { - instText += I18n.t(template + '_with_name_and_directions', { name: name, directions: destinations } ); - } else { - instText += I18n.t(template + '_with_directions', { directions: destinations } ); - } - } else { - if (namedRoad) { - instText += I18n.t(template + '_without_exit', { name: name }); - } else { - instText += I18n.t(template + '_without_directions'); - } + var params = {}; + if (step.exits && step.maneuver.type.match(/off ramp/)) params.exit = step.exits; + if (step.destinations) params.directions = destinations; + if (namedRoad) params.directions = name; + if (Object.keys(params).length > 0) { + template = template + "_with_" + Object.keys(params).join("_"); } + instText += I18n.t(template, params); } else { instText += I18n.t(template + '_without_exit', { name: name }); } diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 3e64728a7..665ea8c24 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -38,7 +38,7 @@ textarea, body { font: #{$typeheight}/#{$lineheight} "Helvetica Neue",Arial,sans-serif; } abbr, acronym { - border-bottom: .1em dotted; + text-decoration: underline dotted; cursor: help; } diff --git a/app/controllers/geocoder_controller.rb b/app/controllers/geocoder_controller.rb index e9fa7f26a..384f2c24c 100644 --- a/app/controllers/geocoder_controller.rb +++ b/app/controllers/geocoder_controller.rb @@ -19,7 +19,6 @@ class GeocoderController < ApplicationController if @params[:query] =~ /^\d{5}(-\d{4})?$/ @sources.push "osm_nominatim" elsif @params[:query] =~ /^(GIR 0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]|[ABEHMNPRV-Y]))|[0-9][A-HJKS-UW])\s*[0-9][ABD-HJLNP-UW-Z]{2})$/i - @sources.push "uk_postcode" @sources.push "osm_nominatim" elsif @params[:query] =~ /^[A-Z]\d[A-Z]\s*\d[A-Z]\d$/i @sources.push "ca_postcode" @@ -55,32 +54,6 @@ class GeocoderController < ApplicationController end end - def search_uk_postcode - # get query parameters - query = params[:query] - - # create result array - @results = [] - - # ask npemap.org.uk to do a combined npemap + freethepostcode search - response = fetch_text("http://www.npemap.org.uk/cgi/geocoder.fcgi?format=text&postcode=#{escape_query(query)}") - - # parse the response - unless response =~ /Error/ - dataline = response.split(/\n/)[1] - data = dataline.split(/,/) # easting,northing,postcode,lat,long - postcode = data[2].delete("'") - zoom = POSTCODE_ZOOM - postcode.count("#") - @results.push(:lat => data[3], :lon => data[4], :zoom => zoom, - :name => postcode) - end - - render :action => "results" - rescue StandardError => ex - @error = "Error contacting www.npemap.org.uk: #{ex}" - render :action => "error" - end - def search_ca_postcode # get query parameters query = params[:query] diff --git a/app/models/diary_comment.rb b/app/models/diary_comment.rb index 8a99c7b2c..63eae3f21 100644 --- a/app/models/diary_comment.rb +++ b/app/models/diary_comment.rb @@ -26,6 +26,8 @@ class DiaryComment < ActiveRecord::Base belongs_to :user belongs_to :diary_entry + scope :visible, -> { where(:visible => true) } + validates :body, :presence => true validates :diary_entry, :user, :associated => true diff --git a/app/models/user.rb b/app/models/user.rb index 352c58fb5..2d51b5af5 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -267,8 +267,8 @@ class User < ActiveRecord::Base def spam_score changeset_score = changesets.size * 50 trace_score = traces.size * 50 - diary_entry_score = diary_entries.inject(0) { |acc, elem| acc + elem.body.spam_score } - diary_comment_score = diary_comments.inject(0) { |acc, elem| acc + elem.body.spam_score } + diary_entry_score = diary_entries.visible.inject(0) { |acc, elem| acc + elem.body.spam_score } + diary_comment_score = diary_comments.visible.inject(0) { |acc, elem| acc + elem.body.spam_score } score = description.spam_score / 4.0 score += diary_entries.where("created_at > ?", 1.day.ago).count * 10 diff --git a/config/locales/en.yml b/config/locales/en.yml index a40f15719..6b70afea7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -371,7 +371,6 @@ en: search: title: latlon: 'Results from Internal' - uk_postcode: 'Results from NPEMap / FreeThe Postcode' ca_postcode: 'Results from Geocoder.CA' osm_nominatim: 'Results from OpenStreetMap Nominatim' geonames: 'Results from GeoNames' @@ -1765,7 +1764,7 @@ en: public_traces: "Public GPS traces" your_traces: "Your GPS traces" public_traces_from: "Public GPS traces from %{user}" - description: "Browse recent GPS track uploads" + description: "Browse recent GPS trace uploads" tagged_with: " tagged with %{tags}" empty_html: "Nothing here yet. Upload a new trace or learn more about GPS tracing on the wiki page." delete: @@ -2437,13 +2436,17 @@ en: instructions: continue_without_exit: Continue on %{name} slight_right_without_exit: Slight right onto %{name} - offramp_right_without_exit: Take the ramp on the right onto %{name} + offramp_right: Take the ramp on the right + offramp_right_with_exit: Take exit %{exit} on the right + offramp_right_with_exit_name: Take exit %{exit} on the right onto %{name} + offramp_right_with_exit_directions: Take exit %{exit} on the right towards %{directions} + offramp_right_with_exit_name_directions: Take exit %{exit} on the right onto %{name}, towards %{directions} + offramp_right_with_name: Take the ramp on the right onto %{name} offramp_right_with_directions: Take the ramp on the right towards %{directions} - offramp_right_with_name_and_directions: Take the ramp on the right onto %{name}, towards %{directions} - offramp_right_without_directions: Take the ramp on the right + offramp_right_with_name_directions: Take the ramp on the right onto %{name}, towards %{directions} onramp_right_without_exit: Turn right on the ramp onto %{name} onramp_right_with_directions: Turn right onto the ramp towards %{directions} - onramp_right_with_name_and_directions: Turn right on the ramp onto %{name}, towards %{directions} + onramp_right_with_name_directions: Turn right on the ramp onto %{name}, towards %{directions} onramp_right_without_directions: Turn right onto the ramp endofroad_right_without_exit: At the end of the road turn right onto %{name} merge_right_without_exit: Merge right onto %{name} @@ -2453,13 +2456,17 @@ en: uturn_without_exit: U-turn along %{name} sharp_left_without_exit: Sharp left onto %{name} turn_left_without_exit: Turn left onto %{name} - offramp_left_without_exit: Take the ramp on the left onto %{name} + offramp_left: Take the ramp on the left + offramp_left_with_exit: Take exit %{exit} on the left + offramp_left_with_exit_name: Take exit %{exit} on the left onto %{name} + offramp_left_with_exit_directions: Take exit %{exit} on the left towards %{directions} + offramp_left_with_exit_name_directions: Take exit %{exit} on the left onto %{name}, towards %{directions} + offramp_left_with_name: Take the ramp on the left onto %{name} offramp_left_with_directions: Take the ramp on the left towards %{directions} - offramp_left_with_name_and_directions: Take the ramp on the left onto %{name}, towards %{directions} - offramp_left_without_directions: Take the ramp on the left + offramp_left_with_name_directions: Take the ramp on the left onto %{name}, towards %{directions} onramp_left_without_exit: Turn left on the ramp onto %{name} onramp_left_with_directions: Turn left onto the ramp towards %{directions} - onramp_left_with_name_and_directions: Turn left on the ramp onto %{name}, towards %{directions} + onramp_left_with_name_directions: Turn left on the ramp onto %{name}, towards %{directions} onramp_left_without_directions: Turn left onto the ramp endofroad_left_without_exit: At the end of the road turn left onto %{name} merge_left_without_exit: Merge left onto %{name} diff --git a/config/potlatch/locales/en.yml b/config/potlatch/locales/en.yml index 9da6d565e..207c5f9ac 100644 --- a/config/potlatch/locales/en.yml +++ b/config/potlatch/locales/en.yml @@ -70,7 +70,7 @@ en: error_readfailed: Sorry - the OpenStreetMap server didn't respond when asked for data.\n\nWould you like to try again? existingrelation: Add to an existing relation findrelation: Find a relation containing - gpxpleasewait: Please wait while the GPX track is processed. + gpxpleasewait: Please wait while the GPX trace is processed. heading_drawing: Drawing heading_introduction: Introduction heading_pois: Getting started @@ -79,7 +79,7 @@ en: heading_tagging: Tagging heading_troubleshooting: Troubleshooting help: Help - help_html: "Welcome to Potlatch\nPotlatch is the easy-to-use editor for OpenStreetMap. Draw roads, paths, landmarks and shops from your GPS surveys, satellite imagery or old maps.\n\nThese help pages will take you through the basics of using Potlatch, and tell you where to find out more. Click the headings above to begin.\n\nWhen you've finished, just click anywhere else on the page.\n\n\n\nUseful stuff to know\nDon't copy from other maps! \n\nIf you choose 'Edit live', any changes you make will go into the database as you draw them - like, immediately. If you're not so confident, choose 'Edit with save', and they'll only go in when you press 'Save'.\n\nAny edits you make will usually be shown on the map after an hour or two (a few things take a week). Not everything is shown on the map - it would look too messy. But because OpenStreetMap's data is open source, other people are free to make maps showing different aspects - like OpenCycleMap or Midnight Commander.\n\nRemember it's both a good-looking map (so draw pretty curves for bends) and a diagram (so make sure roads join at junctions).\n\nDid we mention about not copying from other maps?\n\n\nFind out more\nPotlatch manual\nMailing lists\nOnline chat (live help)\nWeb forum\nCommunity wiki\nPotlatch source-code\n\n\n\nGetting started\nNow that you have Potlatch open, click 'Edit with save' to get started.\n\t\nSo you're ready to draw a map. The easiest place to start is by putting some points of interest on the map - or \"POIs\". These might be pubs, churches, railway stations... anything you like.\n\nDrag and drop\nTo make it super-easy, you'll see a selection of the most common POIs, right at the bottom of the map for you. Putting one on the map is as easy as dragging it from there onto the right place on the map. And don't worry if you don't get the position right first time: you can drag it again until it's right. Note that the POI is highlighted in yellow to show that it's selected.\n\t\nOnce you've done that, you'll want to give your pub (or church, or station) a name. You'll see that a little table has appeared at the bottom. One of the entries will say \"name\" followed by \"(type name here)\". Do that - click that text, and type the name.\n\nClick somewhere else on the map to deselect your POI, and the colourful little panel returns.\n\nEasy, isn't it? Click 'Save' (bottom right) when you're done.\nMoving around\nTo move to a different part of the map, just drag an empty area. Potlatch will automatically load the new data (look at the top right).\n\nWe told you to 'Edit with save', but you can also click 'Edit live'. If you do this, your changes will go into the database straightaway, so there's no 'Save' button. This is good for quick changes and mapping parties.\n\nNext steps\nHappy with all of that? Great. Click 'Surveying' above to find out how to become a real mapper!\n\nSurveying with a GPS\nThe idea behind OpenStreetMap is to make a map without the restrictive copyright of other maps. This means you can't copy from elsewhere: you must go and survey the streets yourself. Fortunately, it's lots of fun!\n\t\nThe best way to do this is with a handheld GPS set. Find an area that isn't mapped yet, then walk or cycle up the streets with your GPS switched on. Note the street names, and anything else interesting (pubs? churches?) , as you go along.\n\nWhen you get home, your GPS will contain a 'tracklog' recording everywhere you've been. You can then upload this to OpenStreetMap.\n\nThe best type of GPS is one that records to the tracklog frequently (every second or two) and has a big memory. Lots of our mappers use handheld Garmins or little Bluetooth units. There are detailed GPS Reviews on our wiki.\nUploading your track\nNow, you need to get your track off the GPS set. Maybe your GPS came with some software, or maybe it lets you copy the files off via USB. If not, try GPSBabel. Whatever, you want the file to be in GPX format.\n\nThen use the 'GPS Traces' tab to upload your track to OpenStreetMap. But this is only the first bit - it won't appear on the map yet. You must draw and name the roads yourself, using the track as a guide.\nUsing your track\nFind your uploaded track in the 'GPS Traces' listing, and click 'edit' right next to it. Potlatch will start with this track loaded, plus any waypoints. You're ready to draw!\n\nYou can also click this button to show everyone's GPS tracks (but not waypoints) for the current area. Hold Shift to show just your tracks.\nUsing satellite photos\nIf you don't have a GPS, don't worry. In some cities, we have satellite photos you can trace over, kindly supplied by Yahoo! (thanks!). Go out and note the street names, then come back and trace over the lines.\n\nIf you don't see the satellite imagery, click the options button and make sure 'Yahoo!' is selected. If you still don't see it, it's probably not available for your city, or you might need to zoom out a bit.\n\nOn this same options button you'll find a few other choices like an out-of-copyright map of the UK, and OpenTopoMap for the US. These are all specially selected because we're allowed to use them - don't copy from anyone else's maps or aerial photos. (Copyright law sucks.)\n\nSometimes satellite pics are a bit displaced from where the roads really are. If you find this, hold Space and drag the background until it lines up. Always trust GPS tracks over satellite pics.\n\nDrawing ways\nTo draw a road (or 'way') starting at a blank space on the map, just click there; then at each point on the road in turn. When you've finished, double-click or press Enter - then click somewhere else to deselect the road.\n\nTo draw a way starting from another way, click that road to select it; its points will appear red. Hold Shift and click one of them to start a new way at that point. (If there's no red point at the junction, shift-click where you want one!)\n\nClick 'Save' (bottom right) when you're done. Save often, in case the server has problems.\n\nDon't expect your changes to show instantly on the main map. It usually takes an hour or two, sometimes up to a week.\nMaking junctions\nIt's really important that, where two roads join, they share a point (or 'node'). Route-planners use this to know where to turn.\n\t\nPotlatch takes care of this as long as you are careful to click exactly on the way you're joining. Look for the helpful signs: the points light up blue, the pointer changes, and when you're done, the junction point has a black outline.\nMoving and deleting\nThis works just as you'd expect it to. To delete a point, select it and press Delete. To delete a whole way, press Shift-Delete.\n\nTo move something, just drag it. (You'll have to click and hold for a short while before dragging a way, so you don't do it by accident.)\nMore advanced drawing\nIf two parts of a way have different names, you'll need to split them. Click the way; then click the point where it should be split, and click the scissors. (You can merge ways by clicking with Control, or the Apple key on a Mac, but don't merge two roads of different names or types.)\n\t\nRoundabouts are really hard to draw right. Don't worry - Potlatch can help. Just draw the loop roughly, making sure it joins back on itself at the end, then click this icon to 'tidy' it. (You can also use this to straighten out roads.)\nPoints of interest\nThe first thing you learned was how to drag-and-drop a point of interest. You can also create one by double-clicking on the map: a green circle appears. But how to say whether it's a pub, a church or what? Click 'Tagging' above to find out!\n\nWhat type of road is it?\nOnce you've drawn a way, you should say what it is. Is it a major road, a footpath or a river? What's its name? Are there any special rules (e.g. \"no bicycles\")?\n\nIn OpenStreetMap, you record this using 'tags'. A tag has two parts, and you can have as many as you like. For example, you could add highway | trunk to say it's a major road; highway | residential for a road on a housing estate; or highway | footway for a footpath. If bikes were banned, you could then add bicycle | no. Then to record its name, add name | Market Street.\n\nThe tags in Potlatch appear at the bottom of the screen - click an existing road, and you'll see what tags it has. Click the '+' sign (bottom right) to add a new tag. The 'x' by each tag deletes it.\n\nYou can tag whole ways; points in ways (maybe a gate or a traffic light); and points of interest.\nUsing preset tags\nTo get you started, Potlatch has ready-made presets containing the most popular tags.\n\nSelect a way, then click through the symbols until you find a suitable one. Then, choose the most appropriate option from the menu.\n\nThis will fill the tags in. Some will be left partly blank so you can type in (for example) the road name and number.\nOne-way roads\nYou might want to add a tag like oneway | yes - but how do you say which direction? There's an arrow in the bottom left that shows the way's direction, from start to end. Click it to reverse.\nChoosing your own tags\nOf course, you're not restricted to just the presets. By using the '+' button, you can use any tags at all.\n\nYou can see what tags other people use at OSMdoc, and there is a long list of popular tags on our wiki called Map Features. But these are only suggestions, not rules. You are free to invent your own tags or borrow from others.\n\nBecause OpenStreetMap data is used to make many different maps, each map will show (or 'render') its own choice of tags.\nRelations\nSometimes tags aren't enough, and you need to 'group' two or more ways. Maybe a turn is banned from one road into another, or 20 ways together make up a signed cycle route. You can do this with an advanced feature called 'relations'. Find out more on the wiki.\n\nUndoing mistakes\nThis is the undo button (you can also press Z) - it will undo the last thing you did.\n\nYou can 'revert' to a previously saved version of a way or point. Select it, then click its ID (the number at the bottom left) - or press H (for 'history'). You'll see a list of everyone who's edited it, and when. Choose the one to go back to, and click Revert.\n\nIf you've accidentally deleted a way and saved it, press U (for 'undelete'). All the deleted ways will be shown. Choose the one you want; unlock it by clicking the red padlock; and save as usual.\n\nThink someone else has made a mistake? Send them a friendly message. Use the history option (H) to select their name, then click 'Mail'.\n\nUse the Inspector (in the 'Advanced' menu) for helpful information about the current way or point.\nFAQs\nHow do I see my waypoints?\nWaypoints only show up if you click 'edit' by the track name in 'GPS Traces'. The file has to have both waypoints and tracklog in it - the server rejects anything with waypoints alone.\n\nMore FAQs for Potlatch and OpenStreetMap.\n\n\n\nWorking faster\nThe further out you're zoomed, the more data Potlatch has to load. Zoom in before clicking 'Edit'.\n\nTurn off 'Use pen and hand pointers' (in the options window) for maximum speed.\n\nIf the server is running slowly, come back later. Check the wiki for known problems. Some times, like Sunday evenings, are always busy.\n\nTell Potlatch to memorise your favourite sets of tags. Select a way or point with those tags, then press Ctrl, Shift and a number from 1 to 9. Then, to apply those tags again, just press Shift and that number. (They'll be remembered every time you use Potlatch on this computer.)\n\nTurn your GPS track into a way by finding it in the 'GPS Traces' list, clicking 'edit' by it, then tick the 'convert' box. It'll be locked (red) so won't save. Edit it first, then click the red padlock to unlock when ready to save.\n\nWhat to click\nDrag the map to move around.\nDouble-click to create a new POI.\nSingle-click to start a new way.\nHold and drag a way or POI to move it.\nWhen drawing a way\nDouble-click or press Enter to finish drawing.\nClick another way to make a junction.\nShift-click the end of another way to merge.\nWhen a way is selected\nClick a point to select it.\nShift-click in the way to insert a new point.\nShift-click a point to start a new way from there.\nControl-click another way to merge.\n\nKeyboard shortcuts\nB\tAdd background source tag\nC\tClose changeset\nG\tShow GPS tracks\nH\tShow history\nI\tShow inspector\nJ\tJoin point to what's below ways\n (+Shift)\tUnjoin from other ways\nK\tLock/unlock current selection\nL\tShow current latitude/longitude\nM\tMaximise editing window\nP\tCreate parallel way\nR\tRepeat tags\nS\tSave (unless editing live)\nT\tTidy into straight line/circle\nU\tUndelete (show deleted ways)\nX\tCut way in two\nZ\tUndo\n-\tRemove point from this way only\n+\tAdd new tag\n/\tSelect another way sharing this point\nDelete\tDelete point\n (+Shift)\tDelete entire way\nReturn\tFinish drawing line\nSpace\tHold and drag background\nEsc\tAbort this edit; reload from server\n0\tRemove all tags\n1-9\tSelect preset tags\n (+Shift)\tSelect memorised tags\n (+S/Ctrl)\tMemorise tags\n§ or `\tCycle between tag groups\n" + help_html: "Welcome to Potlatch\nPotlatch is the easy-to-use editor for OpenStreetMap. Draw roads, paths, landmarks and shops from your GPS surveys, satellite imagery or old maps.\n\nThese help pages will take you through the basics of using Potlatch, and tell you where to find out more. Click the headings above to begin.\n\nWhen you've finished, just click anywhere else on the page.\n\n\n\nUseful stuff to know\nDon't copy from other maps! \n\nIf you choose 'Edit live', any changes you make will go into the database as you draw them - like, immediately. If you're not so confident, choose 'Edit with save', and they'll only go in when you press 'Save'.\n\nAny edits you make will usually be shown on the map after an hour or two (a few things take a week). Not everything is shown on the map - it would look too messy. But because OpenStreetMap's data is open source, other people are free to make maps showing different aspects - like OpenCycleMap or Midnight Commander.\n\nRemember it's both a good-looking map (so draw pretty curves for bends) and a diagram (so make sure roads join at junctions).\n\nDid we mention about not copying from other maps?\n\n\nFind out more\nPotlatch manual\nMailing lists\nOnline chat (live help)\nWeb forum\nCommunity wiki\nPotlatch source-code\n\n\n\nGetting started\nNow that you have Potlatch open, click 'Edit with save' to get started.\n\t\nSo you're ready to draw a map. The easiest place to start is by putting some points of interest on the map - or \"POIs\". These might be pubs, churches, railway stations... anything you like.\n\nDrag and drop\nTo make it super-easy, you'll see a selection of the most common POIs, right at the bottom of the map for you. Putting one on the map is as easy as dragging it from there onto the right place on the map. And don't worry if you don't get the position right first time: you can drag it again until it's right. Note that the POI is highlighted in yellow to show that it's selected.\n\t\nOnce you've done that, you'll want to give your pub (or church, or station) a name. You'll see that a little table has appeared at the bottom. One of the entries will say \"name\" followed by \"(type name here)\". Do that - click that text, and type the name.\n\nClick somewhere else on the map to deselect your POI, and the colourful little panel returns.\n\nEasy, isn't it? Click 'Save' (bottom right) when you're done.\nMoving around\nTo move to a different part of the map, just drag an empty area. Potlatch will automatically load the new data (look at the top right).\n\nWe told you to 'Edit with save', but you can also click 'Edit live'. If you do this, your changes will go into the database straightaway, so there's no 'Save' button. This is good for quick changes and mapping parties.\n\nNext steps\nHappy with all of that? Great. Click 'Surveying' above to find out how to become a real mapper!\n\nSurveying with a GPS\nThe idea behind OpenStreetMap is to make a map without the restrictive copyright of other maps. This means you can't copy from elsewhere: you must go and survey the streets yourself. Fortunately, it's lots of fun!\n\t\nThe best way to do this is with a handheld GPS set. Find an area that isn't mapped yet, then walk or cycle up the streets with your GPS switched on. Note the street names, and anything else interesting (pubs? churches?) , as you go along.\n\nWhen you get home, your GPS will contain a 'tracklog' recording everywhere you've been. You can then upload this to OpenStreetMap.\n\nThe best type of GPS is one that records to the tracklog frequently (every second or two) and has a big memory. Lots of our mappers use handheld Garmins or little Bluetooth units. There are detailed GPS Reviews on our wiki.\nUploading your trace\nNow, you need to get your trace off the GPS set. Maybe your GPS came with some software, or maybe it lets you copy the files off via USB. If not, try GPSBabel. Whatever, you want the file to be in GPX format.\n\nThen use the 'GPS Traces' tab to upload your trace to OpenStreetMap. But this is only the first bit - it won't appear on the map yet. You must draw and name the roads yourself, using the trace as a guide.\nUsing your trace\nFind your uploaded trace in the 'GPS Traces' listing, and click 'edit' right next to it. Potlatch will start with this trace loaded, plus any waypoints. You're ready to draw!\n\nYou can also click this button to show everyone's GPS traces (but not waypoints) for the current area. Hold Shift to show just your traces.\nUsing satellite photos\nIf you don't have a GPS, don't worry. In some cities, we have satellite photos you can trace over, kindly supplied by Yahoo! (thanks!). Go out and note the street names, then come back and trace over the lines.\n\nIf you don't see the satellite imagery, click the options button and make sure 'Yahoo!' is selected. If you still don't see it, it's probably not available for your city, or you might need to zoom out a bit.\n\nOn this same options button you'll find a few other choices like an out-of-copyright map of the UK, and OpenTopoMap for the US. These are all specially selected because we're allowed to use them - don't copy from anyone else's maps or aerial photos. (Copyright law sucks.)\n\nSometimes satellite pics are a bit displaced from where the roads really are. If you find this, hold Space and drag the background until it lines up. Always trust GPS traces over satellite pics.\n\nDrawing ways\nTo draw a road (or 'way') starting at a blank space on the map, just click there; then at each point on the road in turn. When you've finished, double-click or press Enter - then click somewhere else to deselect the road.\n\nTo draw a way starting from another way, click that road to select it; its points will appear red. Hold Shift and click one of them to start a new way at that point. (If there's no red point at the junction, shift-click where you want one!)\n\nClick 'Save' (bottom right) when you're done. Save often, in case the server has problems.\n\nDon't expect your changes to show instantly on the main map. It usually takes an hour or two, sometimes up to a week.\nMaking junctions\nIt's really important that, where two roads join, they share a point (or 'node'). Route-planners use this to know where to turn.\n\t\nPotlatch takes care of this as long as you are careful to click exactly on the way you're joining. Look for the helpful signs: the points light up blue, the pointer changes, and when you're done, the junction point has a black outline.\nMoving and deleting\nThis works just as you'd expect it to. To delete a point, select it and press Delete. To delete a whole way, press Shift-Delete.\n\nTo move something, just drag it. (You'll have to click and hold for a short while before dragging a way, so you don't do it by accident.)\nMore advanced drawing\nIf two parts of a way have different names, you'll need to split them. Click the way; then click the point where it should be split, and click the scissors. (You can merge ways by clicking with Control, or the Apple key on a Mac, but don't merge two roads of different names or types.)\n\t\nRoundabouts are really hard to draw right. Don't worry - Potlatch can help. Just draw the loop roughly, making sure it joins back on itself at the end, then click this icon to 'tidy' it. (You can also use this to straighten out roads.)\nPoints of interest\nThe first thing you learned was how to drag-and-drop a point of interest. You can also create one by double-clicking on the map: a green circle appears. But how to say whether it's a pub, a church or what? Click 'Tagging' above to find out!\n\nWhat type of road is it?\nOnce you've drawn a way, you should say what it is. Is it a major road, a footpath or a river? What's its name? Are there any special rules (e.g. \"no bicycles\")?\n\nIn OpenStreetMap, you record this using 'tags'. A tag has two parts, and you can have as many as you like. For example, you could add highway | trunk to say it's a major road; highway | residential for a road on a housing estate; or highway | footway for a footpath. If bikes were banned, you could then add bicycle | no. Then to record its name, add name | Market Street.\n\nThe tags in Potlatch appear at the bottom of the screen - click an existing road, and you'll see what tags it has. Click the '+' sign (bottom right) to add a new tag. The 'x' by each tag deletes it.\n\nYou can tag whole ways; points in ways (maybe a gate or a traffic light); and points of interest.\nUsing preset tags\nTo get you started, Potlatch has ready-made presets containing the most popular tags.\n\nSelect a way, then click through the symbols until you find a suitable one. Then, choose the most appropriate option from the menu.\n\nThis will fill the tags in. Some will be left partly blank so you can type in (for example) the road name and number.\nOne-way roads\nYou might want to add a tag like oneway | yes - but how do you say which direction? There's an arrow in the bottom left that shows the way's direction, from start to end. Click it to reverse.\nChoosing your own tags\nOf course, you're not restricted to just the presets. By using the '+' button, you can use any tags at all.\n\nYou can see what tags other people use at OSMdoc, and there is a long list of popular tags on our wiki called Map Features. But these are only suggestions, not rules. You are free to invent your own tags or borrow from others.\n\nBecause OpenStreetMap data is used to make many different maps, each map will show (or 'render') its own choice of tags.\nRelations\nSometimes tags aren't enough, and you need to 'group' two or more ways. Maybe a turn is banned from one road into another, or 20 ways together make up a signed cycle route. You can do this with an advanced feature called 'relations'. Find out more on the wiki.\n\nUndoing mistakes\nThis is the undo button (you can also press Z) - it will undo the last thing you did.\n\nYou can 'revert' to a previously saved version of a way or point. Select it, then click its ID (the number at the bottom left) - or press H (for 'history'). You'll see a list of everyone who's edited it, and when. Choose the one to go back to, and click Revert.\n\nIf you've accidentally deleted a way and saved it, press U (for 'undelete'). All the deleted ways will be shown. Choose the one you want; unlock it by clicking the red padlock; and save as usual.\n\nThink someone else has made a mistake? Send them a friendly message. Use the history option (H) to select their name, then click 'Mail'.\n\nUse the Inspector (in the 'Advanced' menu) for helpful information about the current way or point.\nFAQs\nHow do I see my waypoints?\nWaypoints only show up if you click 'edit' by the trace name in 'GPS Traces'. The file has to have both waypoints and tracklog in it - the server rejects anything with waypoints alone.\n\nMore FAQs for Potlatch and OpenStreetMap.\n\n\n\nWorking faster\nThe further out you're zoomed, the more data Potlatch has to load. Zoom in before clicking 'Edit'.\n\nTurn off 'Use pen and hand pointers' (in the options window) for maximum speed.\n\nIf the server is running slowly, come back later. Check the wiki for known problems. Some times, like Sunday evenings, are always busy.\n\nTell Potlatch to memorise your favourite sets of tags. Select a way or point with those tags, then press Ctrl, Shift and a number from 1 to 9. Then, to apply those tags again, just press Shift and that number. (They'll be remembered every time you use Potlatch on this computer.)\n\nTurn your GPS trace into a way by finding it in the 'GPS Traces' list, clicking 'edit' by it, then tick the 'convert' box. It'll be locked (red) so won't save. Edit it first, then click the red padlock to unlock when ready to save.\n\nWhat to click\nDrag the map to move around.\nDouble-click to create a new POI.\nSingle-click to start a new way.\nHold and drag a way or POI to move it.\nWhen drawing a way\nDouble-click or press Enter to finish drawing.\nClick another way to make a junction.\nShift-click the end of another way to merge.\nWhen a way is selected\nClick a point to select it.\nShift-click in the way to insert a new point.\nShift-click a point to start a new way from there.\nControl-click another way to merge.\n\nKeyboard shortcuts\nB\tAdd background source tag\nC\tClose changeset\nG\tShow GPS traces\nH\tShow history\nI\tShow inspector\nJ\tJoin point to what's below ways\n (+Shift)\tUnjoin from other ways\nK\tLock/unlock current selection\nL\tShow current latitude/longitude\nM\tMaximise editing window\nP\tCreate parallel way\nR\tRepeat tags\nS\tSave (unless editing live)\nT\tTidy into straight line/circle\nU\tUndelete (show deleted ways)\nX\tCut way in two\nZ\tUndo\n-\tRemove point from this way only\n+\tAdd new tag\n/\tSelect another way sharing this point\nDelete\tDelete point\n (+Shift)\tDelete entire way\nReturn\tFinish drawing line\nSpace\tHold and drag background\nEsc\tAbort this edit; reload from server\n0\tRemove all tags\n1-9\tSelect preset tags\n (+Shift)\tSelect memorised tags\n (+S/Ctrl)\tMemorise tags\n§ or `\tCycle between tag groups\n" hint_drawmode: click to add point\ndouble-click/Return\nto end line hint_latlon: "lat $1\nlon $2" hint_loading: loading data @@ -195,7 +195,7 @@ en: prompt_revertversion: "Revert to an earlier saved version:" prompt_savechanges: Save changes prompt_taggedpoints: Some of the points on this way are tagged or in relations. Really delete? - prompt_track: Convert GPS track to ways + prompt_track: Convert GPS trace to ways prompt_unlock: Click to unlock prompt_welcome: Welcome to OpenStreetMap! retry: Retry @@ -213,7 +213,7 @@ en: tip_anticlockwise: Anti-clockwise circular way - click to reverse tip_clockwise: Clockwise circular way - click to reverse tip_direction: Direction of way - click to reverse - tip_gps: Show GPS tracks (G) + tip_gps: Show GPS traces (G) tip_noundo: Nothing to undo tip_options: Set options (choose the map background) tip_photo: Load photos diff --git a/config/routes.rb b/config/routes.rb index 8a5dca166..8160c878c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -246,7 +246,6 @@ OpenStreetMap::Application.routes.draw do # geocoder match "/search" => "geocoder#search", :via => :get, :as => :search match "/geocoder/search_latlon" => "geocoder#search_latlon", :via => :get - match "/geocoder/search_uk_postcode" => "geocoder#search_uk_postcode", :via => :get match "/geocoder/search_ca_postcode" => "geocoder#search_ca_postcode", :via => :get match "/geocoder/search_osm_nominatim" => "geocoder#search_osm_nominatim", :via => :get match "/geocoder/search_geonames" => "geocoder#search_geonames", :via => :get diff --git a/config/wiki_pages.yml b/config/wiki_pages.yml index bc8719bcf..ccf8744af 100644 --- a/config/wiki_pages.yml +++ b/config/wiki_pages.yml @@ -2630,6 +2630,7 @@ de: segregated: DE:Key:segregated self_service: DE:Key:self service service: DE:Key:service + service:bicycle:repair: DE:Key:service:bicycle:repair service_times: DE:Key:service times shelter: DE:Key:shelter shelter_type: DE:Key:shelter type @@ -2834,6 +2835,7 @@ de: amenity=prison: DE:Tag:amenity=prison amenity=prison_camp: DE:Tag:amenity=prison camp amenity=pub: DE:Tag:amenity=pub + amenity=public_bath: DE:Tag:amenity=public bath amenity=public_bookcase: DE:Tag:amenity=public bookcase amenity=ranger_station: DE:Tag:amenity=ranger station amenity=recycling: DE:Tag:amenity=recycling @@ -3822,6 +3824,7 @@ de: tunnel=culvert: DE:Tag:tunnel=culvert vending=animal_feed: DE:Tag:vending=animal feed vending=bicycle_tube: DE:Tag:vending=bicycle tube + vending=bottle_return: DE:Tag:vending=bottle return vending=bread: DE:Tag:vending=bread vending=candles: DE:Tag:vending=candles vending=chewing_gums: DE:Tag:vending=chewing gums @@ -4162,6 +4165,7 @@ en: centre_turn_lane: Key:centre turn lane cep: Key:cep change: Key:change + changesets_count: Key:changesets count charge: Key:charge charity: Key:charity check_date: Key:check date @@ -4564,6 +4568,7 @@ en: inscription: Key:inscription inscription:url: Key:inscription:url int_name: Key:int name + int_name:ar: Key:int name:ar int_ref: Key:int ref int_ref:ar: Key:int ref:ar intermittent: Key:intermittent @@ -4654,8 +4659,10 @@ en: living_street: Key:living street loading_gauge: Key:loading gauge loc_name: Key:loc name + loc_name:ar: Key:loc name:ar loc_ref: Key:loc ref local_ref: Key:local ref + locale: Key:locale location: Key:location lock: Key:lock lock_name: Key:lock name @@ -4757,6 +4764,7 @@ en: mtb_scale: Key:mtb scale museum: Key:museum museum_type: Key:museum type + musical_instrument: Key:musical instrument name: Key:name name:ar: Key:name:ar name:be: Key:name:be @@ -4796,6 +4804,7 @@ en: name:ko_rm: Key:name:ko rm name:ku: Key:name:ku name:left: Key:name:left + name:left:ar: Key:name:left:ar name:left:fr: Key:name:left:fr name:lg: Key:name:lg name:mg: Key:name:mg @@ -4812,6 +4821,7 @@ en: name:pronunciation: Key:name:pronunciation name:pt: Key:name:pt name:right: Key:name:right + name:right:ar: Key:name:right:ar name:ru: Key:name:ru name:ru:word_stress: Key:name:ru:word stress name:sc: Key:name:sc @@ -4831,6 +4841,7 @@ en: name_1: Key:name 1 narrow: Key:narrow nat_name: Key:nat name + nat_name:ar: Key:nat name:ar nat_ref: Key:nat ref natural: Key:natural naturbase: Key:naturbase @@ -4876,6 +4887,7 @@ en: official_ref: Key:official ref offshore: Key:offshore ois:fixme: Key:ois:fixme + old_name: Key:old name old_name:ar: Key:old name:ar old_name:etymology:wikidata: Key:old name:etymology:wikidata old_railway_operator: Key:old railway operator @@ -5136,6 +5148,7 @@ en: reference: Key:reference reference_point: Key:reference point reg_name: Key:reg name + reg_name:ar: Key:reg name:ar reg_ref: Key:reg ref regelbau: Key:regelbau religion: Key:religion @@ -5313,6 +5326,7 @@ en: social_facility:for: Key:social facility:for socket: Key:socket sorting_name: Key:sorting name + sorting_name:ar: Key:sorting name:ar source: Key:source source:ProRail: Key:source:ProRail source:addr: Key:source:addr @@ -5478,6 +5492,7 @@ en: url: Key:url url:restrictions: Key:url:restrictions usage: Key:usage + user_defined_other: Key:user defined other utahagrc:parcelid: Key:utahagrc:parcelid validate:no_name: Key:validate:no name validate:no_ref: Key:validate:no ref @@ -5793,6 +5808,7 @@ en: amenity=shelter: Tag:amenity=shelter amenity=shop: Tag:amenity=shop amenity=shower: Tag:amenity=shower + amenity=ski_rental: Tag:amenity=ski rental amenity=ski_school: Tag:amenity=ski school amenity=smoking_area: Tag:amenity=smoking area amenity=social_centre: Tag:amenity=social centre @@ -5814,6 +5830,7 @@ en: amenity=theatre: Tag:amenity=theatre amenity=ticket_booth: Tag:amenity=ticket booth amenity=ticket_validator: Tag:amenity=ticket validator + amenity=toilet: Tag:amenity=toilet amenity=toilets: Tag:amenity=toilets amenity=townhall: Tag:amenity=townhall amenity=trolley_bay: Tag:amenity=trolley bay @@ -6097,6 +6114,7 @@ en: craft=key_cutter: Tag:craft=key cutter craft=locksmith: Tag:craft=locksmith craft=metal_construction: Tag:craft=metal construction + craft=musical_instrument: Tag:craft=musical instrument craft=oil_mill: Tag:craft=oil mill craft=optician: Tag:craft=optician craft=organ_builder: Tag:craft=organ builder @@ -6845,6 +6863,7 @@ en: name=The_Church_of_Jesus_Christ_of_Latter-day_Saints: Tag:name=The Church of Jesus Christ of Latter-day Saints name=Walmart: Tag:name=Walmart + name=Продукты: Tag:name=Продукты natural=anthill: Tag:natural=anthill natural=arete: Tag:natural=arete natural=avalanche_dam: Tag:natural=avalanche dam @@ -7162,6 +7181,7 @@ en: operator=independent: Tag:operator=independent operator=stadtmobil: Tag:operator=stadtmobil operator=teilAuto: Tag:operator=teilAuto + organ: Tag:organ parking:lane:hgv=on_street: Tag:parking:lane:hgv=on street parking=surface: Tag:parking=surface passenger=international: Tag:passenger=international @@ -7178,6 +7198,7 @@ en: pipeline=marker: Tag:pipeline=marker pipeline=substation: Tag:pipeline=substation pipeline=valve: Tag:pipeline=valve + piste:type=connection: Tag:piste:type=connection piste:type=downhill: Tag:piste:type=downhill piste:type=nordic: Tag:piste:type=nordic place=allotments: Tag:place=allotments @@ -7861,6 +7882,7 @@ en: shop=photography: Tag:shop=photography shop=piercing: Tag:shop=piercing shop=pottery: Tag:shop=pottery + shop=printer_ink: Tag:shop=printer ink shop=printing: Tag:shop=printing shop=pyrotechnics: Tag:shop=pyrotechnics shop=pépinière: Tag:shop=pépinière @@ -7969,6 +7991,7 @@ en: source:geometry=NSW_LPI_Base_Map: Tag:source:geometry=NSW LPI Base Map source:geometry=NSW_LPI_Imagery: Tag:source:geometry=NSW LPI Imagery source:maxspeed=implicit: Tag:source:maxspeed=implicit + source:name=LPI_NSW_Base_Map: Tag:source:name=LPI NSW Base Map source:name=NSW_LPI_Base_Map: Tag:source:name=NSW LPI Base Map source=ACT2016: Tag:source=ACT2016 source=ACTMapiRoads: Tag:source=ACTMapiRoads @@ -7981,6 +8004,7 @@ en: 1:25000 map (2007) source=Isle_of_Man_Government_aerial_imagery_(2001): Tag:source=Isle of Man Government aerial imagery (2001) + source=LPI_NSW_Base_Map: Tag:source=LPI NSW Base Map source=LPI_NSW_Imagery: Tag:source=LPI NSW Imagery source=NAIP: Tag:source=NAIP source=NSW_LPI_Base_Map: Tag:source=NSW LPI Base Map @@ -8068,6 +8092,7 @@ en: sport=paragliding: Tag:sport=paragliding sport=pelota: Tag:sport=pelota sport=racquet: Tag:sport=racquet + sport=rc_car: Tag:sport=rc car sport=roller_skating: Tag:sport=roller skating sport=rowing: Tag:sport=rowing sport=rugby: Tag:sport=rugby @@ -8413,6 +8438,7 @@ es: leaf_type: ES:Key:leaf type leisure: ES:Key:leisure local_ref: ES:Key:local ref + locale: ES:Key:locale man_made: ES:Key:man made manufacturer: ES:Key:manufacturer mapillary: ES:Key:mapillary @@ -8437,6 +8463,7 @@ es: operator:type: ES:Key:operator:type organic: ES:Key:organic origin: ES:Key:origin + osmc:symbol: ES:Key:osmc:symbol overtaking: ES:Key:overtaking owner: ES:Key:owner parking: ES:Key:parking @@ -8541,6 +8568,7 @@ es: amenity=crematorium: ES:Tag:amenity=crematorium amenity=crypt: ES:Tag:amenity=crypt amenity=dentist: ES:Tag:amenity=dentist + amenity=device_charging_station: ES:Tag:amenity=device charging station amenity=doctors: ES:Tag:amenity=doctors amenity=drinking_water: ES:Tag:amenity=drinking water amenity=driving_school: ES:Tag:amenity=driving school @@ -8746,6 +8774,7 @@ es: landuse=construction: ES:Tag:landuse=construction landuse=depot: ES:Tag:landuse=depot landuse=farmland: ES:Tag:landuse=farmland + landuse=farmyard: ES:Tag:landuse=farmyard landuse=forest: ES:Tag:landuse=forest landuse=garages: ES:Tag:landuse=garages landuse=grass: ES:Tag:landuse=grass @@ -8883,6 +8912,7 @@ es: place=hamlet: ES:Tag:place=hamlet place=island: ES:Tag:place=island place=islet: ES:Tag:place=islet + place=isolated_dwelling: ES:Tag:place=isolated dwelling place=neighbourhood: ES:Tag:place=neighbourhood place=plot: ES:Tag:place=plot place=square: ES:Tag:place=square @@ -9028,6 +9058,7 @@ et: fa: key: highway: Fa:Key:highway + level: Fa:Key:level name: FA:Key:name tag: amenity=fountain: Fa:Tag:amenity=fountain @@ -9174,6 +9205,7 @@ fr: capacity:disabled: FR:Key:capacity:disabled class:bicycle:commute: FR:Key:class:bicycle:commute clothes: FR:Key:clothes + club: FR:Key:club collection_times: FR:Key:collection times color: FR:Key:color colour: FR:Key:colour @@ -9466,6 +9498,7 @@ fr: amenity=dentist: FR:Tag:amenity=dentist amenity=doctors: FR:Tag:amenity=doctors amenity=drinking_water: FR:Tag:amenity=drinking water + amenity=driving_school: FR:Tag:amenity=driving school amenity=embassy: FR:Tag:amenity=embassy amenity=fast_food: FR:Tag:amenity=fast food amenity=fire_station: FR:Tag:amenity=fire station @@ -9546,6 +9579,7 @@ fr: building=sty: FR:Tag:building=sty building=terrace: FR:Tag:building=terrace building=warehouse: FR:Tag:building=warehouse + club=sport: FR:Tag:club=sport construction=yes: FR:Tag:construction=yes craft=beekeeper: FR:Tag:craft=beekeeper craft=brewery: FR:Tag:craft=brewery @@ -9673,6 +9707,7 @@ fr: leaf_cycle=deciduous: FR:Tag:leaf cycle=deciduous leisure=dog_park: FR:Tag:leisure=dog park leisure=fishing: FR:Tag:leisure=fishing + leisure=fitness_centre: FR:Tag:leisure=fitness centre leisure=garden: FR:Tag:leisure=garden leisure=golf_course: FR:Tag:leisure=golf course leisure=hackerspace: FR:Tag:leisure=hackerspace @@ -9811,6 +9846,7 @@ fr: shop=boutique: FR:Tag:shop=boutique shop=butcher: FR:Tag:shop=butcher shop=car: FR:Tag:shop=car + shop=car_parts: FR:Tag:shop=car parts shop=car_repair: FR:Tag:shop=car repair shop=carpet: FR:Tag:shop=carpet shop=charity: FR:Tag:shop=charity @@ -10404,6 +10440,7 @@ ja: distance: JA:Key:distance disused: JA:Key:disused 'disused:': 'JA:Key:disused:' + dog: JA:Key:dog donation:compensation: JA:Key:donation:compensation drink: JA:Key:drink drinking_water: JA:Key:drinking water @@ -10425,6 +10462,7 @@ ja: exit_to: JA:Key:exit to expressway: JA:Key:expressway facebook: JA:Key:facebook + fair_trade: JA:Key:fair trade fax: JA:Key:fax fee: JA:Key:fee fence_type: JA:Key:fence type @@ -10612,6 +10650,7 @@ ja: old_ref: JA:Key:old ref oneway: JA:Key:oneway oneway:bicycle: JA:Key:oneway:bicycle + openfire: JA:Key:openfire opening_date: JA:Key:opening date opening_hours: JA:Key:opening hours operator: JA:Key:operator @@ -10689,6 +10728,7 @@ ja: seamark:type: JA:Key:seamark:type second_hand: JA:Key:second hand segregated: JA:Key:segregated + self_service: JA:Key:self service service: JA:Key:service service_times: JA:Key:service times shelter: JA:Key:shelter @@ -10719,6 +10759,7 @@ ja: source:ref: JA:Key:source:ref source_ref: JA:Key:source ref species: JA:Key:species + speech_output: JA:Key:speech output sport: JA:Key:sport stars: JA:Key:stars start_date: JA:Key:start date @@ -12351,6 +12392,7 @@ pl: amenity=drinking_water: Pl:Tag:amenity=drinking water amenity=driving_school: Pl:Tag:amenity=driving school amenity=events_venue: Pl:Tag:amenity=events venue + amenity=fast_food: Pl:Tag:amenity=fast food amenity=ferry_terminal: Pl:Tag:amenity=ferry terminal amenity=fire_station: Pl:Tag:amenity=fire station amenity=food_court: Pl:Tag:amenity=food court @@ -12866,6 +12908,7 @@ pl: traffic_sign=city_limit: Pl:Tag:traffic sign=city limit tunnel=culvert: Pl:Tag:tunnel=culvert type=public_transport: Pl:Tag:type=public transport + vending=bottle_return: Pl:Tag:vending=bottle return vending=candles: Pl:Tag:vending=candles wall=noise_barrier: Pl:Tag:wall=noise barrier water=lake: Pl:Tag:water=lake @@ -13061,6 +13104,7 @@ pt: voltage: Pt:Key:voltage water: Pt:Key:water waterway: Pt:Key:waterway + wetland: Pt:Key:wetland wheelchair: Pt:Key:wheelchair wikidata: Pt:Key:wikidata wikipedia: Pt:Key:wikipedia @@ -15079,6 +15123,7 @@ ru: military=airfield: RU:Tag:military=airfield military=bunker: RU:Tag:military=bunker military=naval_base: RU:Tag:military=naval base + name=Продукты: RU:Tag:name=Продукты natural=arete: RU:Tag:natural=arete natural=bare_rock: RU:Tag:natural=bare rock natural=beach: RU:Tag:natural=beach diff --git a/lib/country.rb b/lib/country.rb index 3af7e0a21..ab88072ec 100644 --- a/lib/country.rb +++ b/lib/country.rb @@ -19,7 +19,7 @@ class Country def self.load_countries countries = {} - xml = REXML::Document.new(File.read("config/countries.xml")) + xml = REXML::Document.new(File.read(Rails.root.join("config", "countries.xml"))) xml.elements.each("geonames/country") do |ele| code = ele.get_text("countryCode").to_s diff --git a/test/controllers/geocoder_controller_test.rb b/test/controllers/geocoder_controller_test.rb index 0d062cf42..e05c8d06a 100644 --- a/test/controllers/geocoder_controller_test.rb +++ b/test/controllers/geocoder_controller_test.rb @@ -13,10 +13,6 @@ class GeocoderControllerTest < ActionController::TestCase { :path => "/geocoder/search_latlon", :method => :get }, { :controller => "geocoder", :action => "search_latlon" } ) - assert_routing( - { :path => "/geocoder/search_uk_postcode", :method => :get }, - { :controller => "geocoder", :action => "search_uk_postcode" } - ) assert_routing( { :path => "/geocoder/search_ca_postcode", :method => :get }, { :controller => "geocoder", :action => "search_ca_postcode" } @@ -263,7 +259,7 @@ class GeocoderControllerTest < ActionController::TestCase "CR2 6XH", "DN55 1PT" ].each do |code| - search_check code, %w[uk_postcode osm_nominatim] + search_check code, %w[osm_nominatim] end end @@ -298,24 +294,6 @@ class GeocoderControllerTest < ActionController::TestCase results_check_error "Longitude 180.23 out of range" end - ## - # Test the UK postcode search - def test_search_uk_postcode - with_http_stubs "npemap" do - get :search_uk_postcode, :xhr => true, - :params => { :query => "CV4 7AL", :zoom => 10, - :minlon => -0.559, :minlat => 51.217, - :maxlon => 0.836, :maxlat => 51.766 } - results_check :name => "CV4 7AL", :lat => 52.381748701968, :lon => -1.56176420939232 - - get :search_uk_postcode, :xhr => true, - :params => { :query => "XX9 9XX", :zoom => 10, - :minlon => -0.559, :minlat => 51.217, - :maxlon => 0.836, :maxlat => 51.766 } - results_check - end - end - ## # Test the Canadian postcode search def test_search_ca_postcode diff --git a/test/http/npemap.yml b/test/http/npemap.yml deleted file mode 100644 index 28074d089..000000000 --- a/test/http/npemap.yml +++ /dev/null @@ -1,10 +0,0 @@ -/cgi/geocoder.fcgi?format=text&postcode=CV4%207AL: - code: 200 - body: | - # Easting,Northing,Matched Postcode,Latitude,Longitude - 429926,276058,'CV4 7AL',52.381748701968,-1.56176420939232 - -/cgi/geocoder.fcgi?format=text&postcode=XX9%209XX: - code: 200 - body: | - Error: Postcode area 'XX' not found, postcode probably invalid