Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Close
From: Brian Sanjeewa Rupasinghe <jinkabs@gm...>  20130427 10:49:37
Attachments:
Message as HTML

Hi, I have following two polygons(1&2): I applied buffer operation on the union of these two with same + distance and get the aggregated polygon geometry (3). Now what i want is to get the polygon in between the two source polygons and union it again with the two source polygons. Because, resulting polygon has some geometry discrepancies due to precision problems. When i applied the difference operator (polygon3  union of polygons 1&2), the polygon i get is not correct due to precision errors (4). I tried GeoemtrySnapper on the polygon 4 to snap back to union of 1&2, but it does not give correct result. Any solution for this? 1. Geometry src = reader.read("POLYGON ((0 0.00789, 10 0, 10 10.006543, 0 10, 0 0.00789))"); 2. Geometry srcb = reader.read("POLYGON ((5 5.00321, 5.5432 10, 15 10, 15 5, 5 5.00321))"); 3. POLYGON ((0.0000000000000009 0.0078899999999982, 0.0000000000000009 10.000000000000002, 10 10.006543, 10 5.001604999999999, 14.999999999999998 4.999999999999999, 14.999999999999998 9.999999999999998, 5.543199999999999 9.999999999999998, 4.455626530994031 0.0043745106670444, 0.0000000000000009 0.0078899999999982)) 4. POLYGON ((0.0000000000000009 0.0078899999999982, 0.0000000000000009 10.000000000000002, 10 10.006543, 0 10, 0 0.00789, 10 0, 10 5.001604999999999, 14.999999999999998 4.999999999999999, 14.999999999999998 5, 5 5.00321, 5.5432 9.999999999999998, 5.543199999999999 9.999999999999998, 4.455626530994031 0.0043745106670444, 0.0000000000000009 0.0078899999999982)) 
From: Martin Davis <mtnclimb@te...>  20130427 16:07:58
Attachments:
Message as HTML

The only idea I can suggest is to try rounding the geometries back to a lowerprecision grid. On 4/27/2013 3:49 AM, Brian Sanjeewa Rupasinghe wrote: > Hi, > > I have following two polygons(1&2): I applied buffer operation on the > union of these two with same + distance and get the aggregated > polygon geometry (3). Now what i want is to get the polygon in between > the two source polygons and union it again with the two source > polygons. Because, resulting polygon has some > geometry discrepancies due to precision problems. When i applied the > difference operator (polygon3  union of polygons 1&2), the polygon i > get is not correct due to precision errors (4). I tried > GeoemtrySnapper on the polygon 4 to snap back to union of 1&2, but it > does not give correct result. Any solution for this? > 1. > Geometry src = reader.read("POLYGON ((0 0.00789, 10 0, 10 10.006543, 0 > 10, 0 0.00789))"); > > 2. > Geometry srcb = reader.read("POLYGON ((5 5.00321, 5.5432 10, > 15 10, 15 5, 5 5.00321))"); > > 3. > > POLYGON ((0.0000000000000009 0.0078899999999982, 0.0000000000000009 > 10.000000000000002, 10 10.006543, 10 5.001604999999999, > 14.999999999999998 4.999999999999999, 14.999999999999998 > 9.999999999999998, 5.543199999999999 9.999999999999998, > 4.455626530994031 0.0043745106670444, 0.0000000000000009 > 0.0078899999999982)) > > 4. > > POLYGON ((0.0000000000000009 0.0078899999999982, 0.0000000000000009 > 10.000000000000002, 10 10.006543, 0 10, 0 0.00789, 10 0, 10 > 5.001604999999999, 14.999999999999998 4.999999999999999, > 14.999999999999998 5, 5 5.00321, 5.5432 9.999999999999998, > 5.543199999999999 9.999999999999998, 4.455626530994031 > 0.0043745106670444, 0.0000000000000009 0.0078899999999982)) > > >  > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaSbased application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr > > > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser 