transform nodes to mercator before limiting in reader

master
Oliver Tonnhofer 2013-11-08 15:19:31 +01:00
parent 59a14b7c9d
commit d560755a15
1 changed files with 4 additions and 1 deletions

View File

@ -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
}
}