[openstreetmap/openstreetmap-website] GPX import: stacktrace (#3007)

mmd notifications at github.com
Wed Dec 16 18:48:48 UTC 2020


Identical min/max_lax/mon in gpx.rb, line 70:

      proj = OSM::Mercator.new(min_lat, min_lon, max_lat, max_lon, width, height)

followed by lines 96+97

            px = proj.x(p.longitude)
            py = proj.y(p.latitude)

triggers a division by zero in osm.rb lines 382-388:

```
    def y(lat)
      @height - ((ysheet(lat) - @ty) / (@by - @ty) * @height)
    end

    def x(lon)
      ((xsheet(lon) - @tx) / (@bx - @tx) * @width)
    end
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3007#issuecomment-746814559
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20201216/ab6f4442/attachment.htm>


More information about the rails-dev mailing list