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: adding a mechanism to check for presence of m-values during parsing #15

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

vojtatom
Copy link
Owner

@vojtatom vojtatom commented Jan 8, 2025

Fixing an issue when geometry with type XYZM didn't have the M values provided, in the shp file, since in those cases the M values are optional per spec file.

Resolving #13.

The solution checks for a record length during parsing because I’ve found no other reliable way to determine the presence of the M-values. There’s no other reliable indication of the presence of optional M-values on the file level.

Other solutions considered parsing ranges from the file header, but that proved unreliable. The added example testing file doesn’t contain M-values, the shape type is XYZM, but the header still doesn’t contain the expected NaN values at the M-value range (header bytes 84, 92), it contains values (0, 0). That could denote a presence of the M-value, just with 0 zero values.

@vojtatom
Copy link
Owner Author

vojtatom commented Jan 8, 2025

@wewindy, please could you check whether this works for you?

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