I am experimenting with Geotools java library, and specificaly with the smooth method. In the Geotools documentation there is this example:
WKTReader reader = new WKTReader();
Geometry tShape = reader.read(
"POLYGON((10 0, 10 20, 0 20, 0 30, 30 30, 30 20, 20 20, 20 0, 10 0))");
Geometry tLoose = JTS.smooth(tShape, 0.0);
Geometry tTighter = JTS.smooth(tShape, 0.75);
when I execute this I keep getting this error:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/opengis/geometry/MismatchedDimensionException
in line Geometry tLoose = JTS.smooth(tShape, 0.0);
(same happens with next line)
Why am I getting this error?