omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
730 stars 157 forks source link

Incorrect documentation of bool type #157

Open jirik opened 6 years ago

jirik commented 6 years ago

Imposm3 doc says:

bool Convert true, yes and 1 values to true, otherwise use false.

However source code is doing something else:

func Bool(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{} {
    if val == "" || val == "0" || val == "false" || val == "no" {
        return false
    }
    return true
}

From the documentation, I thought that using this setup

...
    fields:
    - key: tunnel
      name: is_tunnel
      type: bool

imposm3 will convert tunnel=culvert to false, but it was converted to true.