Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jts-dev] Question regarding 3D topology software

There is code in JTS to compute the Z value of a point on a 3D Triangle:

https://github.com/locationtech/jts/blob/master/modules/core/src/main/java/org/locationtech/jts/geom/Triangle.java#L383

I guess you need the inverse, however - compute the points on the edges (if any) with a given elevation.  Should not be hard to develop this.

On Fri, Feb 17, 2017 at 3:47 PM, Martin Davis <mtnclimb@xxxxxxxxx> wrote:
(cc'ing the list to share this)

Yes, intersection does not preserve Z values currently.

Actually I could wrong about JTS *including* Z interpolation in CDT.  I know I wrote code to do this, but I think it might have been in an external library written a while ago.  I'd have to hunt out the code.

That said, it should be relatively easy to write some code to intersect the DT triangles with a horizontal plane, and then assemble the result into a contour (although contouring is notoriously tricky to get *quality* results).  


On Fri, Feb 17, 2017 at 3:35 AM, Andrius Druzinis <andrius.druzinis@keybridgeglobal.com> wrote:
Hi Martin, 

Thanks for the reply! 

The problem we want to solve is getting a contour from a TIN (obtained via JTS's Delaunay Triangulator). I tried intersecting the resulting Geometry object with a plane but that did not seem to work for the z ordinates. 

You mentioned that interpolating Z values is supported for Contrained DT, could you elaborate on that? At the moment I use the following code:

 Collection<Coordinate> coordinates
final DelaunayTriangulationBuilder triangulator = new DelaunayTriangulationBuilder();
triangulator.setSites(coordinates);
final Geometry triangleCollection = triangulator.getTriangles(new GeometryFactory())

Best, 
Andrius Druzinis-Vitkus
Key Bridge LLC

On Wed, Feb 15, 2017 at 7:19 PM, Martin Davis <mtnclimb@xxxxxxxxx> wrote:
Andrius,

JTS has only very minimal support for 3D at the moment.  Actually, I would really say it provides some limited support for elevation (2D + Z value).  I don't see it ever including true 3D support, since this is substantially more complex than 2D+Z.  

That said, including algorithms for operating on elevation data is definitely in the mandate and of interest.  As you may know JTS already includes a Delaunay Triangulation algorithm.  There is some support there for maintaining Z values (e.g. interpolating Z when DT edges are split in the Constrained DT algorithm).  

A contouring algorithm would be a nice addition to the library.  This would of course be contigent on funding and/or contribution.

Are there any other 2D+Z algorithms which are of interest?

Martin

On Tue, Feb 14, 2017 at 3:07 PM, Andrius Druzinis <andrius.druzinis@keybridgeglobal.com> wrote:
Hi Thea, hi Jim, 

Thank you both for a prompt reply. 

We did have a look at Spatial4J but our impression was that it is 2D as it's based on JTS. I'd be very keen to hear whether that's actually the case and what the future plans are for both libraries. 

Best, 
Andrius Druzinis-Vitkus
Key Bridge LLC

On Tue, Feb 14, 2017 at 5:53 PM, Jim Hughes <jnh5y@xxxxxxxx> wrote:
Hi Andrius, all,

I believe there was some discussion about Geo3d moving into Spatial4J.  To my knowledge, JTS is limited in what it does with the 3d data.

Martin or David might have some more input.  (They are the project leads for JTS and Spatial4J, respectively.)

Cheers,

Jim


On 02/14/2017 10:58 AM, Thea Aldrich wrote:
Hello Andrius,
Thank you for reaching out. I have added the LocationTech mailing list, Jody Garnett from Boundless and Jim Hughes from CCRI to this thread. They are the most knowledgeable folks about JTS and the other projects under the LocationTech umbrella. 

Jim, Jody, et al.,
Please meet Andrius Druzinis-Vitkus. Andrius is a software engineer at Keybridge Global, a Radio Spectrum Administrator in the US. 

"We are currently looking for a Java library for 3D analysis and manipulation. I was wondering if JTS or any other libraries under LocationTech support geometric operations in 3D, and, for example, contouring from a triangulated irregular network (TIN). "
Do you all have any thoughts on this?
Best,
Thea
Developer Advocate, LocationTech
@TheaClay




------ Original Message ------
From: "Andrius Druzinis" <andrius.druzinis@keybridgeglobal.com>
Sent: 2/13/2017 6:54:55 PM
Subject: Question regarding 3D topology software

Dear LocationTech team, 

My name is Andrius Druzinis-Vitkus and I am a software engineer for Keybridge Global, a Radio Spectrum Administrator in the US. 

We are currently looking for a Java library for 3D analysis and manipulation. I was wondering if JTS or any other libraries under LocationTech support geometric operations in 3D, and, for example, contouring from a triangulated irregular network (TIN). 

Any pointers and suggestions would be greatly appreciated. 

Kind regards, 
Andrius Druzinis-Vitkus
Key Bridge LLC





--
Andrius Druzinis-Vitkus
Key Bridge LLC





--
Andrius Druzinis-Vitkus
Key Bridge LLC




Back to the top