Hi Alex,

If you look at the Javadoc for the Polygon class:

.../javadoc/index.html?com/vividsolutions/jts/geom/Polygon.html

A polygon is made up of an outer "shell" linearring and an array of "interior" 
linearrings for any holes.
So to drop the holes from a polygon, all you need to do is get the shell and 
use that.

You can do this by calling the getExteriorRing() method on your Polygon object.

Hope this helps.
Cheers
Nick

From: Alessandro Giuliani [mailto:[email protected]]
Sent: 07 May 2014 19:36
To: [email protected]
Subject: [Jts-topo-suite-user] polygon to linesring

Hello,
I'm new to jts.
To reduce the number of polygons generated I use the cascade union feature of 
jts. The problem is that the resulting polygons have holes inside so I cannot 
pass these coordinates to 2D redender library,cause it does not support holes 
in polygons.
I have tried to "triangolize" but the resulting triangles resets the benefit of 
cascade union (increase the number of polygons).
How can I convert cascade union result to a list of linesring to pass to 2D 
render routines?

Thanks in advance for your support.

Regards,

Alex
Registered Office: 7 Abbey Court, Eagle Way, Sowton, Exeter, Devon, EX2 7HY. 
Registered Number 2892803 Registered in England and Wales. The information 
contained in this e-mail is confidential and may be subject to legal privilege. 
If you are not the intended recipient, you must not use, copy, distribute or 
disclose the e-mail or any part of its contents or take any action in reliance 
on it. If you have received this e-mail in error, please e-mail the sender by 
replying to this message. All reasonable precautions have been taken to ensure 
no viruses are present in this e-mail. Landmark Information Group Limited 
cannot accept responsibility for loss or damage arising from the use of this 
e-mail or attachments and recommend that you subject these to your virus 
checking procedures prior to use.
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user

Reply via email to