Two possibilities:

1. bug in Polygonizer
2. your input is not fully noded.

I would suspect #2. Can you post sample data? (to the list or to me directly). I'd like to see the concave hull paper you mention as well - I'm quite interested in an implementation of this. Although as pointed out there is no single interpretation of how concave hull should be defined - so there could be several ways to compute something reasonable)

As for a user guide to JTS, I realize this would be very nice to have. I'd very much like to provide something for this. Unfortunately it's quite time-consuming to create, and it's been hard for me to find the time to put to it. For the time being I try and keep enhancing the Javadoc whenever it looks like it could be improved.

Martin


Dragan Blagojevic wrote:
Hi,

I have question regarding proper use of Polygonizer class (I'm using NTS, but 
it shouldn't matter I hope)

I'm working on utility to create convex hull of a point set.

Result of first step of that utility is whole bunch of line strings 
representing convex hull or point set.

Then I'm using Polygonizer to transform list of line strings to polygon.

Problem is that sometime result of polygonizer is not one 'Big' outlining 
polygon (having potentially some holes in it), but instead lot of small 
polygons.

I suspect that problem is when some line segments lie on the boundary and as 
well form smaller hole in polygon that somehow create probelm.

It's a bit difficult to describe, but I'll try to simplify it as much as 
possible.

Imagine chess board (8x8 square) having line segments of lenght 1 all arround. If it happens that there are line segments arroung some of little squares arround the edges (e.g. field C1) then instead or returning big polygon (8x8) polygonizer return only small one (1x1 C1 square).

My guess is that line segment on the edge get assigned to that small polygon, 
and then rest of the line segments do not form closed ring.

That is of course totaly different of what I need, as I want to get back 
largest possible polygon, potentially discarding all those smaller but it seem 
that they take precedence and mess up desired output.

Is there any way to control how polygonizer work so that i get my big polygon 
back.


Thanks
Dragan Blagojevic



--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to