remove go vet warnings

master
Oliver Tonnhofer 2013-11-13 15:41:34 +01:00
parent 9e0fd75fb3
commit 2d1c98022f
4 changed files with 6 additions and 7 deletions

View File

@ -156,7 +156,6 @@ func constructPolygons(obj *object) ([]polygon, error) {
default:
return nil, errors.New("unknown type: " + obj.Type)
}
return nil, nil
}
type GeoJson struct {

View File

@ -35,10 +35,10 @@ func tileBounds(bounds geos.Bounds, width float64) []geos.Bounds {
for x := 0; x < int(xSteps); x++ {
for y := 0; y < int(ySteps); y++ {
results = append(results, geos.Bounds{
minX + float64(x)*width,
minY + float64(y)*width,
minX + float64(x+1)*width,
minY + float64(y+1)*width,
MinX: minX + float64(x)*width,
MinY: minY + float64(y)*width,
MaxX: minX + float64(x+1)*width,
MaxY: minY + float64(y+1)*width,
})
}
}

View File

@ -117,7 +117,7 @@ NextRel:
for _, g := range parts {
rel := element.Relation(*r)
rel.Id = -r.Id
rel.Geom = &element.Geometry{g, geos.AsEwkbHex(g)}
rel.Geom = &element.Geometry{Geom: g, Wkb: geos.AsEwkbHex(g)}
rw.inserter.InsertPolygon(rel.OSMElem, matches)
}
} else {

View File

@ -116,7 +116,7 @@ func (ww *WayWriter) buildAndInsert(g *geos.Geos, w *element.Way, matches interf
}
for _, p := range parts {
way := element.Way(*w)
way.Geom = &element.Geometry{p, g.AsEwkbHex(p)}
way.Geom = &element.Geometry{Geom: p, Wkb: g.AsEwkbHex(p)}
if isPolygon {
ww.inserter.InsertPolygon(way.OSMElem, matches)
} else {