| | |
| | | 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; |
| | |
| | | /** |
| | | * 获取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) { |
| | |
| | | dataSource.delete(); |
| | | driver.delete(); |
| | | |
| | | return new ShpRecord(wkt, csid); |
| | | return new ShpRecordEntity(wkt, csid); |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | return null; |