]> git.openstreetmap.org Git - rails.git/commitdiff
trap for #971 until I can work out why it's doing it
authorRichard Fairhurst <richard@systemed.net>
Wed, 11 Jun 2008 14:45:36 +0000 (14:45 +0000)
committerRichard Fairhurst <richard@systemed.net>
Wed, 11 Jun 2008 14:45:36 +0000 (14:45 +0000)
app/controllers/amf_controller.rb

index 4eda7b00aa27456b246ee1b4d16ce39f4abba712..359b45326b99137b89bfaaba944959b15a45d503 100644 (file)
@@ -376,10 +376,11 @@ class AmfController < ApplicationController
 
     RAILS_DEFAULT_LOGGER.info("  Message: putway, id=#{originalway}")
 
 
     RAILS_DEFAULT_LOGGER.info("  Message: putway, id=#{originalway}")
 
-    # -- Check for null IDs or short ways
+    # -- Check for null IDs, short ways or lats=90
 
     points.each do |a|
       if a[2]==0 or a[2].nil? then return -2,"Server error - node with id 0 found in way #{originalway}." end
 
     points.each do |a|
       if a[2]==0 or a[2].nil? then return -2,"Server error - node with id 0 found in way #{originalway}." end
+      if coord2lat(a[1],masterscale,basey)==90 then return -2,"Server error - node with lat -90 found in way #{originalway}." end
     end
     
     if points.length<2 then return -2,"Server error - way is only #{points.length} points long." end
     end
     
     if points.length<2 then return -2,"Server error - way is only #{points.length} points long." end