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

Fix reading bools from shapefiles #715

Merged
merged 1 commit into from
May 8, 2024
Merged

Fix reading bools from shapefiles #715

merged 1 commit into from
May 8, 2024

Conversation

systemed
Copy link
Owner

@systemed systemed commented May 7, 2024

I don't think we've ever handled shapefile bools correctly, and even what we did do slipped a little in 3.0. This should fix it such that bools are carried through correctly to the vector tile attributes.

DBF file format calls bools "logical values". Shapelib returns them as value 3 (==FTLogical). According to https://www.dbase.com/help/Design_Tables/IDH_TABLEDES_FIELD_TYPES.htm, truthy values can be T/t/Y/y, while falsey is F/f/N/n (sheesh). I have never seen anything other than "T" in the wild so that's all I'm handling here, but if that proves not to be the case, this PR is an aide-memoire for why!

@systemed systemed merged commit 1c0638f into master May 8, 2024
6 of 8 checks passed
@systemed systemed deleted the fix_bools branch May 8, 2024 16:55
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 this pull request may close these issues.

1 participant