[GEOS] #741: GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

[GEOS] #741: GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
#741: GEOSSimplify() returns empty polygon if inner ring dimension < simplify
distance
------------------------+--------------------------
 Reporter:  rouault     |      Owner:  geos-devel@…
     Type:  defect      |     Status:  new
 Priority:  major       |  Milestone:  3.4.3
Component:  Default     |    Version:  svn-trunk
 Severity:  Unassigned  |   Keywords:
------------------------+--------------------------
 Demonstrated with OGR scripting, but the issue is in GEOS

 {{{
 from osgeo import ogr
 ogr_geom = ogr.CreateGeometryFromWkt('POLYGON ((-180 90,180 90,180 -90,180
 -90,-180 -90,-180 90),(0 0,0 0.0001,0.0001 0.0001,0 0))')
 simple_geom = ogr_geom.Simplify(0.005)
 print simple_geom # prints POLYGON EMPTY --> unexpected

 ogr_geom = ogr.CreateGeometryFromWkt('POLYGON ((-180 90,180 90,180 -90,180
 -90,-180 -90,-180 90),(0 0,0 0.0001,0.0001 0.0001,0 0))')
 simple_geom = ogr_geom.Simplify(0.00005) # prints POLYGON ((-180 90,180
 90,180 -90,-180 -90,-180 90),(0 0,0.0001 0.0001,0.0 0.0001,0 0)) --> OK
 }}}

 The above is an artificial example reproducing a real world situation

 It seems to be an issue failed simplification of the inner ring.

 Reproduced with latest GEOS trunk r4082

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
#741: GEOSSimplify() returns empty polygon if inner ring dimension < simplify
distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  new
 Priority:  major       |   Milestone:  3.4.3
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:
 Keywords:              |
------------------------+---------------------------

Comment (by rouault):

 When stepping through GEOS, the "Geometry::AutoPtr
 roughGeom(GeometryTransformer::transformMultiPolygon(geom, parent));" at
 line 149 of DouglasPeuckerSimplifier.cpp returns a collection of a
 linearring (OK) and a linestring (OK ???). Then createValidArea() and the
 underlying buffer(0) returns an empty polygon (line 395 of
 BufferBuilder.cpp)

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:1>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: GEOSSimplify() returns empty polygon if inner ring dimension < simplify
distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  new
 Priority:  major       |   Milestone:  3.4.3
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:
 Keywords:              |
------------------------+---------------------------

Comment (by strk):

 Martin, can you check if this also happens in JTS?

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:2>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: GEOSSimplify() returns empty polygon if inner ring dimension < simplify
distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  new
 Priority:  major       |   Milestone:  3.4.3
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:
 Keywords:              |
------------------------+---------------------------
Changes (by rouault):

 * Attachment "geossimplify_small_innerring_741.patch" added.

 Proposed patch

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance (was: GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance)

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  new
 Priority:  major       |   Milestone:  3.4.3
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:
 Keywords:              |
------------------------+---------------------------

Comment (by rouault):

 Attached a patch + new test step that fixes the issue

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:3>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  new
 Priority:  major       |   Milestone:  3.4.3
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:
 Keywords:              |
------------------------+---------------------------

Comment (by strk):

 Martin can you take a look at this, sounds sensible to me.

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:4>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  new
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:
 Keywords:              |
------------------------+---------------------------

Comment (by rouault):

 Any chance this gets applied ?

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:6>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  new
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:
 Keywords:              |
------------------------+---------------------------

Comment (by strk):

 In [changeset:"4311" 4311]:
 {{{
 #!CommitTicketReference repository="" revision="4311"
 Fix empty GEOSSimplify return on inner ring collapse

 Patch by Even Rouault
 See #741
 }}}

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:7>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------
Changes (by strk):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"4313" 4313]:
 {{{
 #!CommitTicketReference repository="" revision="4313"
 Fix empty GEOSSimplify return on inner ring collapse

 Patch by Even Rouault
 Closes #741
 }}}

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:8>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------

Comment (by strk):

 Done in trunk and 3.6 branch (for 3.6.1) - thanks

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:9>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------

Comment (by Sandro Santilli <strk@…>):

 In [changeset:"4f943df80cc80fbad6c990f19c8cc6cf12446e0d/git" 4f943df/git]:
 {{{
 #!CommitTicketReference repository="git"
 revision="4f943df80cc80fbad6c990f19c8cc6cf12446e0d"
 Fix empty GEOSSimplify return on inner ring collapse

 Patch by Even Rouault
 See #741

 git-svn-id: http://svn.osgeo.org/geos/trunk@4311 5242fede-
 7e19-0410-aef8-94bd7d2200fb
 }}}

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:10>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------

Comment (by Sandro Santilli <strk@…>):

 In [changeset:"4f943df80cc80fbad6c990f19c8cc6cf12446e0d/git" 4f943df/git]:
 {{{
 #!CommitTicketReference repository="git"
 revision="4f943df80cc80fbad6c990f19c8cc6cf12446e0d"
 Fix empty GEOSSimplify return on inner ring collapse

 Patch by Even Rouault
 See #741

 git-svn-id: http://svn.osgeo.org/geos/trunk@4311 5242fede-
 7e19-0410-aef8-94bd7d2200fb
 }}}

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:11>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  svn-trunk
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------

Comment (by Sandro Santilli <strk@…>):

 In [changeset:"4f943df80cc80fbad6c990f19c8cc6cf12446e0d/git" 4f943df/git]:
 {{{
 #!CommitTicketReference repository="git"
 revision="4f943df80cc80fbad6c990f19c8cc6cf12446e0d"
 Fix empty GEOSSimplify return on inner ring collapse

 Patch by Even Rouault
 See #741

 git-svn-id: http://svn.osgeo.org/geos/trunk@4311 5242fede-
 7e19-0410-aef8-94bd7d2200fb
 }}}

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:12>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  master
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------

Comment (by Bas Couwenberg):

 Replying to [comment:9 strk]:
 > Done in trunk and 3.6 branch (for 3.6.1) - thanks

 Can the change also be included in the 3.5 branch?

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:13>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  master
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------
Changes (by Bas Couwenberg):

 * cc: sebastic@… (added)


--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:14>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  master
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------

Comment (by strk):

 Could you prepare a patch for that ?
 Can be a pull request for the git
 repository (official hoster or any mirror).

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:15>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  master
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------

Comment (by Bas Couwenberg <sebastic@…>):

 In [changeset:"710ddbe48177c215f98dd5e90fb64460b35401a7/git" 710ddbe/git]:
 {{{
 #!CommitTicketReference repository="git"
 revision="710ddbe48177c215f98dd5e90fb64460b35401a7"
 Fix empty GEOSSimplify return on inner ring collapse

 Patch by Even Rouault
 See #741

 git-svn-id: http://svn.osgeo.org/geos/trunk@4311 5242fede-
 7e19-0410-aef8-94bd7d2200fb
 }}}

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:16>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance

geos-2
In reply to this post by geos-2
#741: [PATCH] GEOSSimplify() returns empty polygon if inner ring dimension <
simplify distance
------------------------+---------------------------
 Reporter:  rouault     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.6.1
Component:  Default     |     Version:  master
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------

Comment (by Bas Couwenberg <sebastic@…>):

 In [changeset:"710ddbe48177c215f98dd5e90fb64460b35401a7/git" 710ddbe/git]:
 {{{
 #!CommitTicketReference repository="git"
 revision="710ddbe48177c215f98dd5e90fb64460b35401a7"
 Fix empty GEOSSimplify return on inner ring collapse

 Patch by Even Rouault
 See #741

 git-svn-id: http://svn.osgeo.org/geos/trunk@4311 5242fede-
 7e19-0410-aef8-94bd7d2200fb
 }}}

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741#comment:17>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

_______________________________________________
geos-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel