Ticket #3119 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

msComputeBounds produces incorrect results when first shape has zero lines

Reported by: mchapman87501 Owned by: sdlime
Priority: normal Milestone: 5.6.6 release
Component: MapServer C Library Version: 5.4
Severity: normal Keywords:
Cc:

Description

When rendering vector layers, msClipPolygonRect may yield shapes containing lines which have zero points. When a zero-point line occurs as the first line in a shape, msComputeBounds does not correctly compute the bounds of the shape.

This problem may manifest as a partially-filled map region when using e.g. the AGG/PNG driver.

I'll try to attach a test script which demonstrates the problem using shp2img, and also a patch for mapprimitive.c.

Attachments

test.tgz Download (100.6 KB) - added by mchapman87501 4 years ago.
Test script, mapfile and data to demonstrate the problem using shp2img
mapprimitive.c.patch Download (0.9 KB) - added by mchapman87501 4 years ago.
Patch for mapprimitive.c, showing one way to fix the problem.

Change History

Changed 4 years ago by mchapman87501

Test script, mapfile and data to demonstrate the problem using shp2img

Changed 4 years ago by mchapman87501

Patch for mapprimitive.c, showing one way to fix the problem.

Changed 3 years ago by tbonfort

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 5.6.6 release

Thanks mchapmann for reporting, sorry this bug slipped passed me, I fell onto it while looking for duplicates in resolving #3383

fixed in r10378, r10379, r10380 for 5.4, 5.6 and trunk

resolves #3383

Note: See TracTickets for help on using tickets.