| | |
| | | public class GdalHelper { |
| | | private final static Log log = LogFactory.getLog(GdalHelper.class); |
| | | |
| | | public static void init() { |
| | | public static void init(String driverPath) { |
| | | // 注册所有的驱动 |
| | | gdal.AllRegister(); |
| | | |
| | |
| | | // 配置GDAL_DATA路径(gdal根目录下的bin\gdal-data) |
| | | // gdal.SetConfigOption("GDAL_DATA", "E:\\terrait\\TianJin\\Zip\\release-1928-x64-dev\\release-1928-x64\\bin\\gdal-data"); |
| | | // gdal.SetConfigOption("PROJ_LIB", "E:\\terrait\\TianJin\\Zip\\release-1928-x64-dev\\release-1928-x64\\bin\\proj7\\share"); |
| | | if (null != driverPath) { |
| | | gdal.SetConfigOption("GDAL_DRIVER_PATH", driverPath); |
| | | } |
| | | |
| | | // 为了使属性表字段支持中文,请添加下面这句:CP936 |
| | | gdal.SetConfigOption("SHAPE_ENCODING", ""); |