Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect documentation of bool type #157

Open
jirik opened this issue Jan 17, 2018 · 0 comments · May be fixed by #285
Open

Incorrect documentation of bool type #157

jirik opened this issue Jan 17, 2018 · 0 comments · May be fixed by #285

Comments

@jirik
Copy link

jirik commented Jan 17, 2018

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.

francois2metz added a commit to francois2metz/imposm3 that referenced this issue Aug 25, 2022
francois2metz added a commit to francois2metz/imposm3 that referenced this issue Aug 25, 2022
francois2metz added a commit to francois2metz/imposm3 that referenced this issue Aug 25, 2022
@francois2metz francois2metz linked a pull request Aug 25, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant