Review/Discuss: MapGuide RFC 153 (Geometry Simplification APIs)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Review/Discuss: MapGuide RFC 153 (Geometry Simplification APIs)

Jackie Ng
Hi All,

I've put up a new RFC for review:

http://trac.osgeo.org/mapguide/wiki/MapGuideRfc153

Comments/feedbacks appreciated.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Review/Discuss: MapGuide RFC 153 (Geometry Simplification APIs)

weltonw
I like what you've proposed.

Is it possible for the simplification - as performed by GEOS - to fail for some geometries?  If so, is there a need to return that information with the Simplify API?  In other words, is there a difference between simplification returning an empty geometry vs. it failing?  The former might be a valid result, while the latter is not.

Walt

-----Original Message-----
From: mapguide-internals [mailto:[hidden email]] On Behalf Of Jackie Ng
Sent: Thursday, November 19, 2015 1:15 AM
To: [hidden email]
Subject: [mapguide-internals] Review/Discuss: MapGuide RFC 153 (Geometry Simplification APIs)

Hi All,

I've put up a new RFC for review:

http://trac.osgeo.org/mapguide/wiki/MapGuideRfc153

Comments/feedbacks appreciated.

- Jackie



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Review-Discuss-MapGuide-RFC-153-Geometry-Simplification-APIs-tp5237324.html
Sent from the MapGuide Internals mailing list archive at Nabble.com.
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
Reply | Threaded
Open this post in threaded view
|

Re: Review/Discuss: MapGuide RFC 153 (Geometry Simplification APIs)

Jackie Ng
In GEOS, failure to simplify is denoted by an empty geometry instance being returned, which in WKT (since that's what is used to move between MgGeometry <-> GEOS geometry forms) is being rendered out as

"<GEOMTYPE> EMPTY"

The MapGuide WKT parser doesn't recognize the EMPTY part so NULL is returned on empty GEOS geometries. There's existing code in MgGeosUtil that follows similar logic (return NULL MgGeometry on "<GEOMTYPE> EMPTY" WKT text.

If a simplification operation is a "no-op", GEOS actually returns the same geometry (same in the sense that its output WKT would be the same as its input WKT)

So returning NULL should be an acceptable indication of simplification failure.

- Jackie