Question

2D spatial filter

  • 7 March 2016
  • 3 replies
  • 15 views

Hello,

¿Is there any way to perform a spatial filter of a large group of 3D lines but counting only with their 2D coordinates? I mean, without forcing them to 2D


3 replies

Badge +3

You can merge all the lines unconditionaly.

Then calculate the intersections by math and using only the x and y components.

(i posted the math (like 2nd grade math not that difficult) bit somewhere on this forum a while ago.)

Anyway, forcing to 2D is not a bad thing.

You could for instance store the 3th component in a attribute, or store the entire geometry using a geometryextractor for the duration of the spatial test. Then reinstate the geometry when you are done.

Userlevel 4
Badge +25

As far as I know the SpatialFilter only works in 2D (X/Y) anyway, and would ignore Z values.

Userlevel 2
Badge +16

What is your source data format?

And could you use some other form of spatial filtering mechanism (FeatureReader)?

That could enhance performance and have the source do the filtering (databases and other spatially indexed formats are good at that).

Reply