Ticket #2753 (closed enhancement: fixed)

Opened 5 years ago

Last modified 23 months ago

[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

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

Change History

Changed 5 years ago by jlacroix

patch to include the simplify functions in php/mapscript

Changed 5 years ago by dmorissette

  • cc sdlime, assefa added
  • owner changed from mapserverbugs to dmorissette
  • status changed from new to assigned
  • milestone set to 5.4 release

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?.

Changed 5 years ago by sdlime

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

Changed 5 years ago by dmorissette

  • owner changed from dmorissette to jlacroix
  • status changed from assigned to new

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

Changed 4 years ago by sdlime

  • 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

Changed 4 years ago by dmorissette

  • 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

Changed 4 years ago by dmorissette

  • milestone changed from 5.6 release to 6.0 release

Changed 4 years ago by sdlime

  • component changed from MapScript-PHP to MapServer Documentation
  • milestone changed from 6.0 release to 5.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

Changed 4 years ago by dmorissette

  • 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)

Changed 4 years ago by dmorissette

BTW, the changeset for comment:7 was r9558.

Changed 4 years ago by dmorissette

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.

Changed 23 months ago by havatv

  • cc havatv added
  • status changed from new to closed
  • resolution set to fixed

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.