Opened 16 years ago

Closed 13 years ago

#2753 closed enhancement (fixed)

[GEOS] Add simplify function to php/mapscript

Reported by: jlacroix Owned by: jmckenna
Priority: normal Milestone: 5.6 release
Component: Documentation - MapServer Version: unspecified
Severity: normal Keywords:
Cc: sdlime, assefa, dmorissette, aboudreault, havatv

Description

There's a simplify function in GEOS and it would be cool to have access to it through mapscript. See the following exchange to see the interest around it.

http://www.nabble.com/vertex-simplification-td13442613.html

Attachments (1)

simplify.patch (7.7 KB ) - added by jlacroix 16 years ago.
patch to include the simplify functions in php/mapscript

Download all attachments as: .zip

Change History (12)

by jlacroix, 16 years ago

Attachment: simplify.patch added

patch to include the simplify functions in php/mapscript

comment:1 by dmorissette, 16 years ago

Cc: sdlime assefa added
Milestone: 5.4 release
Owner: changed from mapserverbugs to dmorissette
Status: newassigned

To summarize, the patch adds the following functions in mapgeos.c:

shapeObj *msGEOSSimplify(shapeObj *shape, double tolerance);
shapeObj *msGEOSTopologyPreservingSimplify(shapeObj *shape, double tolerance);

... and the following methods in MapScript:

shapeObj shapeObj.simplify(double tolerance)
shapeObj shapeObj.topologyPreservingSimplify(double tolerance)

Steve, if you agree with this addition then we'll commit the patch for PHP MapScript and you can then add the methods to SWIG MapScript.

comment:2 by sdlime, 16 years ago

Sounds ok to me. Just assign to me once you complete the PHP part and then I'll do SWIG and then assign to the documentation component.

Steve

comment:3 by dmorissette, 16 years ago

Owner: changed from dmorissette to jlacroix
Status: assignednew

Cool. I'll let Julien take care of it and he will reassign to you after.

comment:4 by sdlime, 14 years ago

Cc: dmorissette added

Do you guys want to get this into 5.6 yet? Only addition would be adding methods on the Swig side. I'd do that if you want to move forward.

Steve

comment:5 by dmorissette, 14 years ago

Cc: aboudreault added
Owner: changed from jlacroix to dmorissette

Too late for 5.6, but let's take care of this early in 6.0

comment:6 by dmorissette, 14 years ago

Milestone: 5.6 release6.0 release

comment:7 by sdlime, 14 years ago

Component: MapScript-PHPMapServer Documentation
Milestone: 6.0 release5.6 release

Patch won't apply clean against trunk, but it was just the ZEND_DEBUG hunk which looks not to be a problem. I also added methods to shape.i in the Swig stuff. I tested the compile there but not for PHP. Could someone verify the PHP build please?

Moving to documentation component...

Steve

comment:8 by dmorissette, 14 years ago

Owner: changed from dmorissette to jmckenna

Assigned to Jeff for docs. The new methods to document are:

shapeObj shapeObj.simplify(double tolerance)
shapeObj shapeObj.topologyPreservingSimplify(double tolerance)

comment:9 by dmorissette, 14 years ago

BTW, the changeset for comment:7 was r9558.

comment:10 by dmorissette, 14 years ago

I found out at the last minute while packaging 5.6.0-rc1 that this addition broke the buildbots which are using GEOS 2.2.3. It seems that GEOSSimplify and GEOSTopologyPreserveSimplify are only in GEOS 3.0+.

I committed a patch in r9569 that enables the new methods only for GEOS 3.0+. This is included in 5.6.0-rc1.

I also created ticket #3215 about possibly bumping up the GEOS requirement to 3.0+ in Mapserver 6.0.

comment:11 by havatv, 13 years ago

Cc: havatv added
Resolution: fixed
Status: newclosed

Fixed for 6.0 and trunk documentation in r12034 and r12035 (a geos version error had to be corrected...).

Note: See TracTickets for help on using tickets.