import org.geotools.referencing.CRS;
public class Decode {
public static void main(String[] args) throws Exception {
System.out.println(CRS.decode("EPSG:4326"));
}
}
如果想让以上程序正常,那么必须加入两个包,依赖如下:
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-epsg-hsql</artifactId>
<version>20.0</version>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.3.2</version>
</dependency>