Skip to main content
Solved

3d intersection

  • October 8, 2014
  • 1 reply
  • 32 views

Hello,

 

 

I needto check visibilities between a set of 3d-points. Therefore I created 3d-lines from pairwise 3d-points and tried to check for 3d intersections between the generated 3d-lines and 3d-surfaces/a DEM (WallSurfaces of a CityGML model). I used the SpatialRelator and SpatialFilter, but it seems, as if those transformers just work in two dimensions, because there were intersections detected, altough there is none in 3d?!

 

All I need is the information, if the input-lines intersect one or more surface(s) or the DEM and not which part of the DEM/which surface is intersected.

 

 

Thanks

Best answer by gio

Yeah, thase give you "apparent intersection" in 3D.

 

 

If you have like "high School Math" and a lot of stamina u could go for matrixcalcuation.

 

 

U you can use the 3DAffiner.

 

 

I made 2D affiner for inetersections...and when u convert it to fme attribute syntax..it becomes almost unreadable..but works like a charm.

 

2D lineintersect..

 

 

 

AttributeCreator [AttributeCreator]

 

Ix = @Evaluate(((@Value(Sx)*@Value(Ey)-@Value(Sy)*@Value(Ex))*(@Value(Sx_t)-@Value(Ex_t))-(@Value(Sx)-@Value(Ex))*(@Value(Sx_t)*@Value(Ey_t)-@Value(Sy_t)*@Value(Ex_t)))/((@Value(Sx)-@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)-@Value(Ex_t))))

 

Iy = @Evaluate(((@Value(Sx)*@Value(Ey)-@Value(Sy)*@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)*@Value(Ey_t)-@Value(Sy_t)*@Value(Ex_t)))/((@Value(Sx)-@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)-@Value(Ex_t))))

 

 

 

lines trough (Sx,Sy )(Ex,Ey) adn (Sx_t,Sy_t)(Ex_t,Ey_t).

 

I used a texteditor to search and replace variables by fme "syntax"...

 

 

3D is even worse... lol.
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • Best Answer
  • October 8, 2014
Yeah, thase give you "apparent intersection" in 3D.

 

 

If you have like "high School Math" and a lot of stamina u could go for matrixcalcuation.

 

 

U you can use the 3DAffiner.

 

 

I made 2D affiner for inetersections...and when u convert it to fme attribute syntax..it becomes almost unreadable..but works like a charm.

 

2D lineintersect..

 

 

 

AttributeCreator [AttributeCreator]

 

Ix = @Evaluate(((@Value(Sx)*@Value(Ey)-@Value(Sy)*@Value(Ex))*(@Value(Sx_t)-@Value(Ex_t))-(@Value(Sx)-@Value(Ex))*(@Value(Sx_t)*@Value(Ey_t)-@Value(Sy_t)*@Value(Ex_t)))/((@Value(Sx)-@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)-@Value(Ex_t))))

 

Iy = @Evaluate(((@Value(Sx)*@Value(Ey)-@Value(Sy)*@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)*@Value(Ey_t)-@Value(Sy_t)*@Value(Ex_t)))/((@Value(Sx)-@Value(Ex))*(@Value(Sy_t)-@Value(Ey_t))-(@Value(Sy)-@Value(Ey))*(@Value(Sx_t)-@Value(Ex_t))))

 

 

 

lines trough (Sx,Sy )(Ex,Ey) adn (Sx_t,Sy_t)(Ex_t,Ey_t).

 

I used a texteditor to search and replace variables by fme "syntax"...

 

 

3D is even worse... lol.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings