Skip to main content
Hi,

 

I need to find a way that I can search for invalid z values (less than 10 or more than 150) on each vertex and assign them a new value. I just want to change the invalid vertices, not the valid ones and I dont want to interpolate the values, I want to set all invalid values to -1000000.

 

(For example if a lines vertices consists of these z values: 34, 36, 32, 999, 30, -1000, 31 I just want to assign a new value to the 4th and 6th coordinate).

 

The geometry of the features are points, lines and areas.

 

 

I use Coordinateconcatenator (with only the z value), Attributesplitter, Listexploder and a Tester (test for z values less than 10 or more than 150).

 

No problem so far. But how do I change just the invalid vertices?

 

Any ideas?

 

 

Thanks
Create an attribute which is -(1000000+the z value) for those values which are invalid, 0 otherwise. Use an offsetter and use this attribute to offset the z value.
But how do I apply the changes to each vertex?

 

The offsetter changes the z value of all the vertices the same amount.
Hi Hans,

 

 

There may be several ways.

 

Assuming that the input geometry is single-part Line or Polygon, I would use the Chopper to decompose it into individual vertices, change the elevation of vertices whose z-value is invalid with the 3DForcer, and restore the geometry with the PointConnector.

 

If there are 2 or more input features, set their unique ID attribute to the "Connection Break Attributes" parameter of the PointConnector.

 

 

 

Takashi
Hi Takashi,

 

That works with lines and points, but with donut polygons there will be problems when I connect the vertices. Is there a way to solve that? Aggregates are also a problem.
You can use the Deaggregator to decompose an aggregate feature to its individual parts, and use the DonutHoleExtractor to separate a donut to outer shell and hole(s).

 

After changing z-values and restoring individual parts with the PointConnector, you can reconstruct the donut with the DonutBuilder and reassemble the aggregate with the Aggregator.

 

In the procedure, you will have to use the "Group By" parameter skillfully to restore original shapes.
e.g. before the Chopper:

 

 

after the PointConnector:

 


Thanks Takashi! 🙂

Reply