[geos-devel] BUFFER(0): JTS and GEOS difference

dblasby at openplans.org dblasby at openplans.org
Thu Aug 4 13:06:39 EDT 2005


I ran a buffer(0) on this polygon and got two different results.

NOTE: this polygon is invalid -- the outside ring touches itself at
-73.77333305098847, 40.860510652289854.  This should actually be hole
in the polygon.  (see picture)

When I run buffer(0) in JTS, I get the original polygon back but the
"hole" disappears. (see picture)

When I run buffer(0) in GEOS, ALL the holes disappear. (see picture)

The polygon is invalid, so I'm not sure if you want to call this a bug. 
I'm surprised that they give different results and maybe showing an
issue in GEOS.

I'm using the GEOS in: postgis-setup-1.0.0-1.exe.

dave




POLYGON ((-73.78343 40.873622999999995, -73.784576 40.877131, -73.784402
40.878178, -73.784803 40.878527999999996, -73.783222 40.880963,
-73.781202 40.880478, -73.760988 40.875178, -73.749483 40.872101,
-73.748077 40.871725, -73.74806 40.871721,
    -73.753732 40.856556, -73.77080099999999 40.860279, -73.773301
40.860479, -73.773601 40.861079, -73.773201 40.861379, -73.773001
40.860979, -73.773301 40.860479, -73.781005 40.861339, -73.785297
40.861373, -73.787268 40.860848,
    -73.787899 40.860493999999996, -73.791702 40.860979,
-73.79010199999999 40.867878999999995, -73.785502 40.869079, -73.783602
40.870279, -73.783002 40.872178, -73.783902 40.872778, -73.783002
40.873377999999995, -73.78343 40.873622999999995),
  (-73.781702 40.875478, -73.781402 40.875578, -73.781502 40.875778,
-73.781702 40.875678, -73.781702 40.875478),
  (-73.780402 40.876478, -73.780502 40.876778, -73.780802
40.876577999999995, -73.78070199999999 40.876377999999995, -73.780402
40.876478),
  (-73.76650099999999 40.867179, -73.766001 40.867579,
-73.76690099999999 40.867979, -73.767201 40.867278999999996,
-73.76650099999999 40.867179),
  (-73.769401 40.865379, -73.769201 40.865778999999996, -73.769701
40.865778999999996, -73.769801 40.865379, -73.769401 40.865379),
  (-73.769201 40.870979, -73.770101 40.871978999999996, -73.771501
40.872378999999995, -73.77210099999999 40.872079, -73.77040099999999
40.871078999999995, -73.769201 40.870979),
  (-73.774402 40.861579, -73.774502 40.862079, -73.775302 40.861979,
-73.775502 40.861379, -73.774402 40.861579),
  (-73.783802 40.862879, -73.78460199999999 40.863079, -73.784502
40.862679, -73.783802 40.862879),
  (-73.785202 40.863979, -73.785702 40.863979, -73.78540199999999
40.863378999999995, -73.785202 40.863979))





----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geos1.gif
Type: image/gif
Size: 16527 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20050804/4ed394a1/geos1.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geos2.gif
Type: image/gif
Size: 11108 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20050804/4ed394a1/geos2.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geos3.gif
Type: image/gif
Size: 24560 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20050804/4ed394a1/geos3.gif


More information about the geos-devel mailing list