private static MultiLineString linearZInterpolation ( MultiLineString multiLineString ) { int nbGeom = multiLineString . getNumGeometries ( ) ; LineString [ ] lines = new LineString [ nbGeom ] ; for ( int i = 0 ; i < nbGeom ; i ++ ) { LineString subGeom = ( LineString ) multiLineString . getGeometryN ( i ) ; double startz = subGeom . getStartPoint ( ) . getCoordinates ( ) [ 0 ] . z ; double endz = subGeom . getEndPoint ( ) . getCoordinates ( ) [ 0 ] . z ; double length = subGeom . getLength ( ) ; subGeom . apply ( new LinearZInterpolationFilter ( startz , endz , length ) ) ; lines [ i ] = subGeom ; } return FACTORY . createMultiLineString ( lines ) ; }
Interpolate each linestring of the multilinestring .