hi there

I'm am trying to use the following algorthyim to test to see if two geometries 
match

Geometry A matches geometry B if
A is contained in buffer(B, d)
and B is contained in buffer(A, d)
and boundary(A) is contained in buffer(boundary(B), d)

and boundary(B) is contained in buffer(boundary(A), d)



polya = MultiPoint([(-1.0, -2.0), (1.0, -2.0), (-1.0, 2.0), (1.0, 
2.0)]).convex_hull
polyb = MultiPoint([(-1.0, -2.0), (1.0, -2.0), (-1.0, 2.0), (1.0, 
2.0)]).convex_hull


buffa = polya.buffer(1.0)
buffb = polya.buffer(1.0)

polya_bound = polya.boundary
polyb_bound = polyb.boundary


print buffa.contains(polyb)
print buffb.contains(polya)
print buffa.contains(polyb_bound)

print buffb.contains(polya_bound)        
  
I use a convex hull to ensure that the polygon created is only considering the 
outside points
and my points are not ordered so this ensures that I valid polygon is returned


How ever the last four print statments return

False
False
True
True

both geometries are identical so why would the buffer of one not contain the 
either one of the 
original geometires??


I am really studk here and would be greatfull for any help

cheers

dan


_________________________________________________________________
Looking for a place to manage all your online stuff? Explore the new Windows 
Live 
http://download.live.com
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to