From d560755a1597b1ea5ae8e52920a54f1901e10a0b Mon Sep 17 00:00:00 2001 From: Oliver Tonnhofer Date: Fri, 8 Nov 2013 15:19:31 +0100 Subject: [PATCH] transform nodes to mercator before limiting in reader --- reader/reader.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reader/reader.go b/reader/reader.go index 619f01c..9d41bfa 100644 --- a/reader/reader.go +++ b/reader/reader.go @@ -8,6 +8,7 @@ import ( "imposm3/logging" "imposm3/mapping" "imposm3/parser/pbf" + "imposm3/proj" "imposm3/stats" "os" "runtime" @@ -135,7 +136,9 @@ func ReadPbf(cache *osmcache.OSMCache, progress *stats.Statistics, } if withLimiter { for i, _ := range nds { - if !limiter.IntersectsBuffer(g, nds[i].Long, nds[i].Lat) { + nd := element.Node{Long: nds[i].Long, Lat: nds[i].Lat} + proj.NodeToMerc(&nd) + if !limiter.IntersectsBuffer(g, nd.Long, nd.Lat) { nds[i].Id = osmcache.SKIP } }