public static void defaultSmoothShapefile ( String shapePath , String outPath ) throws Exception { PrintStreamProgressMonitor pm = new PrintStreamProgressMonitor ( System . out , System . err ) ; SimpleFeatureCollection initialFC = OmsShapefileFeatureReader . readShapefile ( shapePath ) ; OmsLineSmootherMcMaster smoother = new OmsLineSmootherMcMaster ( ) ; smoother . pm = pm ; smoother . pLimit = 10 ; smoother . inVector = initialFC ; smoother . pLookahead = 13 ; // smoother.pSlide = 1; smoother . pDensify = 0.2 ; smoother . pSimplify = 0.01 ; smoother . process ( ) ; SimpleFeatureCollection smoothedFeatures = smoother . outVector ; OmsShapefileFeatureWriter . writeShapefile ( outPath , smoothedFeatures , pm ) ; }
An utility method to use the module with default values and shapefiles .