1

I currently use outdated versions of JTS and GeoTools in my Java application. GeoTools is used for parsing GML structures into JTS Geometry objects. However, I do not know how to update the libraries so that the versions are on par with each other.

Is it still possible to do this with newer versions of the libraries, and is the version correspondence between GeoTools and JTS documented somewhere?

1 Answer 1

2

GeoTools uses maven to manage its dependencies as should you when using it. Thus you should never need to know what version of JTS is being used as you only need to import the relevant GeoTools module (probably) gt-xsd-gml3 (and an EPSG module for projections) and all of the dependencies will be pulled in automatically. If you ever have to check a dependency you can then use mvn dependency:tree to check:

[INFO] org.geotools.xsd:gt-xsd-gml3:jar:23-SNAPSHOT
[INFO] +- org.geotools:gt-referencing:jar:23-SNAPSHOT:compile
[INFO] |  +- org.ejml:ejml-ddense:jar:0.34:compile
[INFO] |  |  \- org.ejml:ejml-core:jar:0.34:compile
[INFO] |  +- commons-pool:commons-pool:jar:1.5.4:compile
[INFO] |  +- org.geotools:gt-metadata:jar:23-SNAPSHOT:compile
[INFO] |  |  +- org.geotools:gt-opengis:jar:23-SNAPSHOT:compile
[INFO] |  |  |  \- systems.uom:systems-common-java8:jar:0.7.2:compile
[INFO] |  |  |     +- tec.uom:uom-se:jar:1.0.8:compile
[INFO] |  |  |     |  +- javax.measure:unit-api:jar:1.0:compile
[INFO] |  |  |     |  \- tec.uom.lib:uom-lib-common:jar:1.0.2:compile
[INFO] |  |  |     +- si.uom:si-quantity:jar:0.7.1:compile
[INFO] |  |  |     \- si.uom:si-units-java8:jar:0.7.1:compile
[INFO] |  |  +- org.apache.commons:commons-lang3:jar:3.8.1:compile
[INFO] |  |  \- org.geotools.ogc:net.opengis.ows:jar:23-SNAPSHOT:compile
[INFO] |  |     \- org.geotools.ogc:org.w3.xlink:jar:23-SNAPSHOT:compile
[INFO] |  +- jgridshift:jgridshift-core:jar:1.2:compile
[INFO] |  |  \- javax:javaee-api:jar:7.0:compile
[INFO] |  |     \- com.sun.mail:javax.mail:jar:1.5.0:compile
[INFO] |  |        \- javax.activation:activation:jar:1.1:compile
[INFO] |  \- net.sf.geographiclib:GeographicLib-Java:jar:1.49:compile
[INFO] +- org.geotools:gt-main:jar:23-SNAPSHOT:compile
[INFO] |  +- org.locationtech.jts:jts-core:jar:1.17.0:compile
[INFO] |  +- org.apache.commons:commons-text:jar:1.6:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-core:jar:2.10.1:compile
[INFO] +- org.geotools.xsd:gt-xsd-core:jar:23-SNAPSHOT:compile
[INFO] |  +- org.geotools:gt-xml:jar:23-SNAPSHOT:compile
[INFO] |  |  \- org.apache.xml:xml-commons-resolver:jar:1.2:compile
[INFO] |  +- picocontainer:picocontainer:jar:1.2:compile
[INFO] |  +- commons-jxpath:commons-jxpath:jar:1.3:compile
[INFO] |  +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] |  +- org.eclipse.emf:org.eclipse.emf.common:jar:2.15.0:compile
[INFO] |  +- org.eclipse.emf:org.eclipse.emf.ecore:jar:2.15.0:compile
[INFO] |  +- org.eclipse.xsd:org.eclipse.xsd:jar:2.12.0:compile
[INFO] |  \- org.eclipse.emf:org.eclipse.emf.ecore.xmi:jar:2.15.0:compile
[INFO] +- org.geotools.xsd:gt-xsd-gml2:jar:23-SNAPSHOT:compile
[INFO] +- org.geotools:gt-epsg-hsql:jar:23-SNAPSHOT:test
[INFO] |  \- org.hsqldb:hsqldb:jar:2.4.1:test
[INFO] +- commons-io:commons-io:jar:2.6:test
[INFO] +- org.geotools.xsd:gt-xsd-core:jar:tests:23-SNAPSHOT:test
[INFO] +- junit:junit:jar:4.12:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- xmlunit:xmlunit:jar:1.6:test
[INFO] \- javax.media:jai_core:jar:1.1.3:compile

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.