[geos-devel] Union problem

strk at refractions.net strk at refractions.net
Wed Jul 12 19:05:07 EDT 2006


Charlie, example.cpp, *and* unit tests, all keep using the C++ API.
SWIG is using the C API instead, so you shouldn't expect things
to work in the exactly same way.
I would indeed discourage you from porting unit testing and example.cpp
but rather find new tests which might be useful for CAPI in general.

The unhappy messages you're seing are in fact very happy ones :)
It's the new code handling robustness problems by trying different
reduction or simplification. Your logs seems to reveal that a topology
preserving simplification with a tolerance of 0.04 did it.
Seems nice (you should look at results to actually tell if we like it)...

--strk;

On Wed, Jul 12, 2006 at 12:36:39PM -0600, Charlie Savage wrote:
> To test the SWIG bindings, I've ported the example.cpp program to Ruby 
> and am checking that the output from both programs matches.
> 
> The relations (intersects, disjoint, etc.) all work.
> 
> I'm having issues with union though.
> 
> When I run the code via SWIG (ie, the c api), I get a lot of unhappy 
> messages from geos which I've attached below.  When I run the code from 
> example.cpp it works.  I think I've got all the geometries correct (all 
> the relation operations work).  I've also changed example.cpp to use the 
> default precision model like the c api does.
> 
> Is there something else I'm missing?
> 
> Thanks,
> 
> Charlie
> 
> ----------
> The code take 11 geometries and unions them together.  See 
> doc/example.cpp:858.
> 
> 
> -------- UNION COMBINATION  ------
> Original exception: TopologyException: side location conflict 0 250 1.7e-308
> Trying with Common bits remover.
> CBR: TopologyException: side location conflict 0 250 1.7e-308
> Trying with precision 25
> Reduced with precision (25): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 24
> Reduced with precision (24): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 23
> Reduced with precision (23): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 22
> Reduced with precision (22): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 21
> Reduced with precision (21): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 20
> Reduced with precision (20): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 19
> Reduced with precision (19): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 18
> Reduced with precision (18): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 17
> Reduced with precision (17): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 16
> Reduced with precision (16): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 15
> Reduced with precision (15): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 14
> Reduced with precision (14): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 13
> Reduced with precision (13): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 12
> Reduced with precision (12): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 11
> Reduced with precision (11): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 10
> Reduced with precision (10): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 9
> Reduced with precision (9): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 8
> Reduced with precision (8): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 7
> Reduced with precision (7): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 6
> Reduced with precision (6): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 5
> Reduced with precision (5): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 4
> Reduced with precision (4): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 3
> Reduced with precision (3): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 2
> Reduced with precision (2): TopologyException: side location conflict 0 
> 250 1.7e-308
> Trying with precision 1
> Reduced: TopologyException: side location conflict 0 250 1.7e-308
> Trying simplifying with tolerance 0.01
> Simplified with tolerance (0.01): TopologyException: side location 
> conflict 0 250 1.7e-308
> Trying simplifying with tolerance 0.02
> Simplified with tolerance (0.02): TopologyException: side location 
> conflict 0 250 1.7e-308
> Trying simplifying with tolerance 0.03
> Simplified with tolerance (0.03): TopologyException: side location 
> conflict 0 250 1.7e-308
> Trying simplifying with tolerance 0.04
> Simplified: TopologyException: side location conflict 0 250 1.7e-308



> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel


-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 




More information about the geos-devel mailing list