-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Describe the Problem
I am attempting to convert a shapefile to a mask. I am able to create the masks successfully with gen_vx_mask, but the metadata reading programs error while trying to read the file. This is not a bug that is impacting any functionality to produce the masks, only the metadata for the masks.
gen_vx_mask produces a mask file if given the proper metadata
gen_vx_mask CONUS_MASK.nc bytemap_marine_poly_NAD83.shp lwx_w.nc -type shape -shapeno 0 -name KLWX
gis_dump_shx returns the expected result
gis_dump_dbf returns a memory error
bytemap_marine_poly_lambert.dbf
*** Error in `gis_dump_dbf': free(): invalid next size (fast): 0x0000000001bfc300 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x816b9)[0x2af6940ce6b9]
gis_dump_dbf(_ZN9DbfHeader14set_subrecordsEi+0x101)[0x409111]
gis_dump_dbf(main+0x1fc)[0x407eec]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x2af69406f545]
gis_dump_dbf[0x407c29]
gis_dump_shp returns correct results until the last record. It appears to try to access a record beyond what is in the file, and fails to read the header for that non-existent record.
...
ERROR :
ERROR :
ERROR : operator>>(ShpFile &, ShpPolyRecord &) -> trouble reading record header from shp file "bytemap_marine_poly_lambert.shp"
ERROR :
Expected Behavior
gis_dump_dbf should return the metadata of the shapefile that can be used in conjunction with gen_vx_mask to produce a mask from a shape file
Correct behavior can be seen by running this command in the same directory provided below (runs on the AWIPS WFO shapefile)
gis_dump_dbf w_10nv20.dbf
Environment
Describe your runtime environment:
*1. WCOSS
*2. RedHat 7
*3. module load met/9.1.3 (occurs with other versions too)
To Reproduce
Describe the steps to reproduce the behavior:
*1. Log onto WCOSS
*2. module load met/9.1.3
*3. cd /gpfs/dell3/mdl/mdlverif/noscrub/usr/Dana.Strom/WFO_Marine_Shapefiles/
*4. gis_dump_dbf bytemap_marine_poly_NAD83.dbf
*5. See error
Relevant Deadlines
NONE
Funding Source
NONE
Define the Metadata
Assignee
- Select engineer(s) or no engineer required
- Select scientist(s) or no scientist required
Labels
- Select component(s)
- Select priority
- Select requestor(s)
Projects and Milestone
- Review projects and select relevant Repository and Organization ones or add "alert:NEED PROJECT ASSIGNMENT" label
- Select milestone to relevant bugfix version
Define Related Issue(s)
Consider the impact to the other METplus components.
Bugfix Checklist
See the METplus Workflow for details.
- Complete the issue definition above, including the Time Estimate and Funding Source.
- Fork this repository or create a branch of main_<Version>.
Branch name:bugfix_<Issue Number>_main_<Version>_<Description>
- Fix the bug and test your changes.
- Add/update log messages for easier debugging.
- Add/update unit tests.
- Add/update documentation.
- Push local changes to GitHub.
- Submit a pull request to merge into main_<Version>.
Pull request:bugfix <Issue Number> main_<Version> <Description>
- Define the pull request metadata, as permissions allow.
Select: Reviewer(s), Project(s), Milestone, and Linked issues - Iterate until the reviewer(s) accept and merge your changes.
- Delete your fork or branch.
- Complete the steps above to fix the bug on the develop branch.
Branch name:bugfix_<Issue Number>_develop_<Description>
Pull request:bugfix <Issue Number> develop <Description>
- Close this issue.