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

Method file_version does not return version #22

Closed
pajlpajl opened this Issue Feb 10, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@pajlpajl
Copy link

pajlpajl commented Feb 10, 2019

The method file_version in ShapeFile.pm calls _get_shp_shx_header_value('file_version'), but this value is never set. The correct call is _get_shp_shx_header_value('version') since it is shp_version and shx_version set from the file header and not shp_file_version and shx_file_version.

@shawnlaffan shawnlaffan added the bug label Feb 10, 2019

@shawnlaffan

This comment has been minimized.

Copy link
Owner

shawnlaffan commented Feb 10, 2019

Thanks for reporting this.

Are you able to provide a pull request with a test?

@pajlpajl

This comment has been minimized.

Copy link
Author

pajlpajl commented Feb 10, 2019

@shawnlaffan

This comment has been minimized.

Copy link
Owner

shawnlaffan commented Feb 10, 2019

An empty shapefile could be added to the t/testdata folder, and then used for testing. Is this something you're able to do?

(Also - it's a bit cleaner to respond to tickets using the github interface, as github does not hide the email trail).

@shawnlaffan

This comment has been minimized.

Copy link
Owner

shawnlaffan commented Feb 10, 2019

...although an empty shapefile was added in 7d9ad1d so it should only need the code part.

shawnlaffan added a commit that referenced this issue Feb 10, 2019

@shawnlaffan

This comment has been minimized.

Copy link
Owner

shawnlaffan commented Feb 11, 2019

Updated code is on CPAN under release 2.66.
https://metacpan.org/release/SLAFFAN/Geo-ShapeFile-2.66

Marking as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment