管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-27 a5525cba9bfea2bc95f542fdd7519b8f94344555
src/main/java/com/lf/server/helper/GdalHelper.java
@@ -1,6 +1,6 @@
package com.lf.server.helper;
import com.lf.server.entity.ctrl.ShpRecord;
import com.lf.server.entity.ctrl.ShpRecordEntity;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.gdal.gdal.Band;
@@ -47,7 +47,7 @@
    /**
     * 获取Shp第一条记录的WKT
     */
    public static ShpRecord readShpFirstRecord(String filePath) {
    public static ShpRecordEntity readShpFirstRecord(String filePath) {
        try {
            org.gdal.ogr.Driver driver = ogr.GetDriverByName("ESRI shapefile");
            if (driver == null) {
@@ -70,7 +70,7 @@
            dataSource.delete();
            driver.delete();
            return new ShpRecord(wkt, csid);
            return new ShpRecordEntity(wkt, csid);
        } catch (Exception ex) {
            ex.printStackTrace();
            return null;
@@ -309,7 +309,7 @@
            return propertyGetter.get(feature, index);
        } catch (Exception ex) {
            // ex.printStackTrace()
            log.error(ex.getStackTrace());
            log.error(ex.getMessage(), ex);
            return null;
        }