protected List < Feature > convertFeatures ( FeatureCollection < SimpleFeatureType , SimpleFeature > features , int maxCoordinates , double startDistance ) throws IOException , GeomajasException { FeatureIterator < SimpleFeature > iterator = features . features ( ) ; List < Feature > dtoFeatures = new ArrayList < Feature > ( ) ; FeatureConverter converter = new FeatureConverter ( ) ; while ( iterator . hasNext ( ) ) { try { SimpleFeature feature = iterator . next ( ) ; dtoFeatures . add ( converter . toDto ( feature , maxCoordinates ) ) ; } catch ( Exception e ) { continue ; } } iterator . close ( ) ; return dtoFeatures ; }
Convert a feature collection to its dto equivalent .