在Java后台解析前台上传的shp文件,因为shp文件一般不会是单独出现包括了索引文件等,所以一般都是以压缩包的形式出现,因此如果要获取其中的坐标集,则必须先解压压缩包
解压压缩包的链接
解压压缩包
解析shp需要下载jar包,无法使用依赖直接下载
解析shp所需的jar包
<!--解析shp文件-->
<dependency>
<groupId>gt.api</groupId>
<artifactId>gt-api</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${
project.basedir}/lib/gt-api-18.4.jar</systemPath>
</dependency>
<dependency>
<groupId>gt.geojson</groupId>
<artifactId>gt-geojson</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${
project.basedir}/lib/gt-geojson-18.4.jar</systemPath>
</dependency>
<dependency>
<groupId>gt.opengis</groupId>
<artifactId>gt-opengis</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${
project.basedir}/lib/gt-opengis-18.4.jar</systemPath>
</dependency>
<dependency>
<groupId>gt.shapefile</groupId>
<artifactId>gt-shapefile</artifactId>
<version>1.0</version>
<scope>system<