public static SimpleFeature tofeature ( LasRecord r , Integer featureId , CoordinateReferenceSystem crs ) { final Point point = toGeometry ( r ) ; double elev = r . z ; if ( ! Double . isNaN ( r . groundElevation ) ) { elev = r . groundElevation ; } if ( featureId == null ) { featureId = - 1 ; } final Object [ ] values = new Object [ ] { point , featureId , elev , r . intensity , r . classification , r . returnNumber , r . numberOfReturns } ; SimpleFeatureBuilder lasFeatureBuilder = getLasFeatureBuilder ( crs ) ; lasFeatureBuilder . addAll ( values ) ; final SimpleFeature feature = lasFeatureBuilder . buildFeature ( null ) ; return feature ; }
Convert a record to a feature .