fix: include shapefile companion files in archive zip#34
Open
zlplzp123wyt wants to merge 1 commit intoterrastackai:mainfrom
Open
fix: include shapefile companion files in archive zip#34zlplzp123wyt wants to merge 1 commit intoterrastackai:mainfrom
zlplzp123wyt wants to merge 1 commit intoterrastackai:mainfrom
Conversation
When saving .shp files, the archive zip now includes all required companion files (.shx, .dbf, .prj, .cpg) alongside the .shp file. Shapefiles require these companion files to be valid and loadable by GIS software like GeoServer. Previously, only the .shp file was used directly without zipping the companion files, causing import failures. Fixes terrastackai#32
Author
|
Hi! This PR ensures shapefile companion files (.shx, .dbf, .prj) are included when archiving .shp files. Ready for review. Thanks! |
Contributor
|
Hello @zlplzp123wyt thanks for the fix. This fix does solve another problem rather than the one in the initial issue. See this merged PR for the fix #33 |
Author
|
Hi @WanjiruCate, thanks for the review and clarification! I see that PR #33 addressed the original issue. This PR focuses specifically on ensuring shapefile companion files (.shx, .dbf, .prj) are not dropped during archive operations — it's a complementary fix that prevents data loss when processing shapefile datasets. Would you like me to update the PR description to better clarify the scope, or is there anything else needed to move this forward? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #32
Problem
When saving
.shpfiles, the archive zip only contained the.shpfile. Shapefiles require companion files (.shx,.dbf,.prj,.cpg) to be valid and loadable by GIS software like GeoServer.Fix
When
store_format == "shp", the code now:.shx,.dbf,.prj,.cpgalongside the.shp.shpfileThis matches the existing pattern for gpkg files (which also use
pack_files_in_zip).