Skip to content

task/WG-703: fix shapefile import failing on NaN values in shapefile properties - #295

Merged
nathanfranklin merged 1 commit into
mainfrom
task/WG-702-fix-shapefile-import
Jul 20, 2026
Merged

task/WG-703: fix shapefile import failing on NaN values in shapefile properties #295
nathanfranklin merged 1 commit into
mainfrom
task/WG-702-fix-shapefile-import

Conversation

@nathanfranklin

@nathanfranklin nathanfranklin commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Overview:

Fixes shapefile import failures caused by NaN values in DBF fields being serialized as invalid JSON.

Related Jira tickets:

Summary of Changes:

  • In VectorService.process_shapefile, convert NaN/NaT/None values (via pd.isna) to None when building feature properties, so they serialize as valid JSON null instead of invalid NaN.

Testing Steps:

  1. Import a shapefile with missing/null numeric fields (e.g. austin_watersheds in https://www.designsafe-ci.org/data/browser/projects/PRJ-4185/workdir/%2Fshapefile_good%2Faustin_watersheds) and confirm it imports.

Notes:

This fixes current work which will be replaced shorting by the work-in-progress #294

@nathanfranklin
nathanfranklin merged commit 6fb16c5 into main Jul 20, 2026
3 checks passed
@nathanfranklin
nathanfranklin deleted the task/WG-702-fix-shapefile-import branch July 20, 2026 20:33
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.

2 participants