Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error loading polygon geometries using shape file data store with geotools 24.0

I have recently upgraded my geotools dependencies from 23.2 to 24.0 i have the following error when i try to load a FeatureCollection from a shape file data store with a polygon geometry,seems this problem was introduced in 24.0 geotools release ,anyone now how to solve this problem please

java.lang.NoSuchMethodError: org.locationtech.jts.geom.Polygon.getExteriorRing()Lorg/locationtech/jts/geom/LineString;
like image 506
Achrouf Abdenour Avatar asked Sep 17 '25 13:09

Achrouf Abdenour


1 Answers

GeoTools upgraded to version 1.17.0 of JTS with version 24.0 - this changed the return type of the getExteriorRing to LinearRing from LineString. This is supposed to be only a binary change so you should be able to handle it by just recompiling the code that uses that method.

like image 195
Ian Turton Avatar answered Sep 19 '25 08:09

Ian Turton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!