private SimpleFeatureType getCalibrationFeatureType ( CoordinateReferenceSystem crs ) { SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder ( ) ; ITrentoPType [ ] values = TrentoPFeatureType . PipesTrentoP . values ( ) ; String typeName = values [ 0 ] . getName ( ) ; b . setName ( typeName ) ; b . setCRS ( crs ) ; b . add ( "the_geom" , LineString . class ) ; // create ID attribute. b . add ( values [ 0 ] . getAttributeName ( ) , values [ 0 ] . getClazz ( ) ) ; // create drain area attribute. b . add ( values [ 2 ] . getAttributeName ( ) , values [ 2 ] . getClazz ( ) ) ; // create the percentage area. b . add ( values [ 11 ] . getAttributeName ( ) , values [ 12 ] . getClazz ( ) ) ; // The upstream elevation of the node. b . add ( values [ 3 ] . getAttributeName ( ) , values [ 3 ] . getClazz ( ) ) ; // The downstream elevation of the land. b . add ( values [ 4 ] . getAttributeName ( ) , values [ 4 ] . getClazz ( ) ) ; // runoff coefficent. b . add ( values [ 5 ] . getAttributeName ( ) , values [ 5 ] . getClazz ( ) ) ; // average residence time. b . add ( values [ 6 ] . getAttributeName ( ) , values [ 6 ] . getClazz ( ) ) ; // ks b . add ( values [ 7 ] . getAttributeName ( ) , values [ 7 ] . getClazz ( ) ) ; // average slope b . add ( values [ 10 ] . getAttributeName ( ) , values [ 10 ] . getClazz ( ) ) ; // diameter to verify b . add ( values [ 19 ] . getAttributeName ( ) , values [ 11 ] . getClazz ( ) ) ; return b . buildFeatureType ( ) ; }
Build the Calibration Type .