#1265 closed defect (fixed)
Invalid extent written to SHP file
Reported by: | Owned by: | sdlime | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapServer C Library | Version: | 4.1 |
Severity: | normal | Keywords: | |
Cc: |
Description
in mapshape.c there is an initialization of extent structure that in v 4.4.1 looks like this .... if( psSHP->nRecords == 1 ) { psSHP->adBoundsMin[0] = psSHP->adBoundsMax[0] = shape->line[0].point[0].x; psSHP->adBoundsMin[1] = psSHP->adBoundsMax[1] = shape->line[0].point[0].y; psSHP->adBoundsMin[2] = psSHP->adBoundsMax[1] = shape->line[0].point[0].z; psSHP->adBoundsMin[3] = psSHP->adBoundsMax[3] = shape->line[0].point[0].m; } ... Please, note a misprint - Z component initialization must be ... psSHP->adBoundsMin[2] = psSHP->adBoundsMax[2] = shape->line[0].point[0].z; ... Now it breaks Y component overwriting psSHP->adBoundsMax[1] (if the re are no z provided) and produces significantly invalid SHP files.
Change History (2)
Note:
See TracTickets
for help on using tickets.