Ah right, it's only in trunk right now.
http://sourceforge.net/p/jts-topo-suite/code/HEAD/tree/trunk/jts/java/src/com/vividsolutions/jts/dissolve/LineDissolver.java
Will appear in JTS 1.14 RSN...
For the time being, just extract the line strings (boundaries) and do a
unary union on them.
On Thu, Dec 5, 2013 at 11:27 AM, Brian Sanjeewa Rupasinghe <
[email protected]> wrote:
> Hi Martin,
>
> Thanks. I do not find any LineDissolver class in the API. Is it LineMerger
> class you are
> referring to?. Also, i do not see that the JavaDoc is updated.
>
> Brian.
>
>
>
> On Thu, Dec 5, 2013 at 5:04 PM, Martin Davis <[email protected]> wrote:
>
>> Ok, mystery solved, I think. The constraints need to be segment-unique -
>> in other words, there cannot be any duplicate segments in the set of
>> constraint edges. So you will have to run a dissolve on your input
>> constraints. The LineDissolver class will do this.
>>
>> When I do this I can use a tolerance of 0 and it completes.
>>
>> I've updated the Javadoc to mention this requirement.
>>
>>
>>
>> On Wed, Dec 4, 2013 at 10:31 AM, Brian Sanjeewa Rupasinghe <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> I used the following method for the triangulation. I use polygons as
>>> constraints as well. Input Geometry is multipoint of all polygon vertices.
>>> Then polygons are used as constraints in a GeometryCollection. Was it
>>> because i used polygon geometry itself as constraints rather than its line
>>> segments?
>>>
>>> public static Geometry TriangulationBuilder (MultiPoint mp,
>>> ArrayList<Geometry> alg, double tolerance)
>>> {
>>> GeometryFactory gf = new GeometryFactory();
>>> ConformingDelaunayTriangulationBuilder cdtb = new
>>> ConformingDelaunayTriangulationBuilder();
>>> //constriant geometry
>>> Geometry consegs = gf.buildGeometry(alg);
>>> //GeometryCollection g_cp = (GeometryCollection)
>>> gf.createGeometryCollection(als);
>>> //set sites for triangulation
>>> cdtb.setSites(mp);
>>> //set constraints
>>> cdtb.setConstraints(consegs);
>>> //set tolerance -0.00001
>>> cdtb.setTolerance(tolerance);
>>> //Retrieving triangles
>>> Geometry Trigeom = cdtb.getTriangles(gf);
>>> return Trigeom;
>>> }
>>>
>>>
>
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user