GDAL优化
This commit is contained in:
@ -29,7 +29,7 @@ public class GdalController {
|
||||
public void importDataStreamGzip(@Parameter(description = "矢量文件路径", required = true) @RequestParam("path") String path, HttpServletResponse response) throws IOException {
|
||||
|
||||
// 解析矢量文件、得到JSON数据
|
||||
String jsonData = GdalUtil.readVectorToGeoJson(path);
|
||||
String jsonData = GdalUtil.readVectorToSpecifiedGeoJson(path);
|
||||
|
||||
// 设置响应头
|
||||
String filename = URLEncoder.encode("data.gz", StandardCharsets.UTF_8);
|
||||
|
||||
@ -77,7 +77,7 @@ public class IconLibraryController {
|
||||
// 校验图标库文件是否已存在
|
||||
if (iconFile.exists()) {
|
||||
if (iconFile.isDirectory()) {
|
||||
return ApiResponse.failure("同名目录已存在,无法创建文件:" + iconPath);
|
||||
return ApiResponse.failure("同名目录已存在、无法创建文件:" + iconPath);
|
||||
}
|
||||
return ApiResponse.failure("图标库文件已存在:" + iconPath);
|
||||
}
|
||||
@ -391,7 +391,7 @@ public class IconLibraryController {
|
||||
|
||||
private String getIconLibrary() {
|
||||
LambdaQueryWrapper<IconLibrary> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(IconLibrary::getIsEnable, 1); // 1=启用,0=未启用
|
||||
queryWrapper.eq(IconLibrary::getIsEnable, 1); // 1=启用、0=未启用
|
||||
IconLibrary library = iconLibraryService.getOne(queryWrapper);
|
||||
return library == null ? null : library.getPath();
|
||||
}
|
||||
@ -404,7 +404,7 @@ public class IconLibraryController {
|
||||
iconLibraryService.updateById(library);
|
||||
}
|
||||
|
||||
// 检查路径是否已存在(存在则启用,不存在则新增)
|
||||
// 检查路径是否已存在(存在则启用、不存在则新增)
|
||||
LambdaQueryWrapper<IconLibrary> pathWrapper = new LambdaQueryWrapper<>();
|
||||
pathWrapper.eq(IconLibrary::getPath, iconPath);
|
||||
IconLibrary existLibrary = iconLibraryService.getOne(pathWrapper);
|
||||
|
||||
@ -77,7 +77,7 @@ public class MilitaryLibraryController {
|
||||
// 校验军标库文件是否已存在
|
||||
if (militaryFile.exists()) {
|
||||
if (militaryFile.isDirectory()) {
|
||||
return ApiResponse.failure("同名目录已存在,无法创建文件:" + militaryPath);
|
||||
return ApiResponse.failure("同名目录已存在、无法创建文件:" + militaryPath);
|
||||
}
|
||||
return ApiResponse.failure("军标库文件已存在:" + militaryPath);
|
||||
}
|
||||
@ -390,7 +390,7 @@ public class MilitaryLibraryController {
|
||||
|
||||
private String getMilitaryLibrary() {
|
||||
LambdaQueryWrapper<MilitaryLibrary> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MilitaryLibrary::getIsEnable, 1); // 1=启用,0=未启用
|
||||
queryWrapper.eq(MilitaryLibrary::getIsEnable, 1); // 1=启用、0=未启用
|
||||
MilitaryLibrary library = militaryLibraryService.getOne(queryWrapper);
|
||||
return library == null ? null : library.getPath();
|
||||
}
|
||||
@ -403,7 +403,7 @@ public class MilitaryLibraryController {
|
||||
militaryLibraryService.updateById(library);
|
||||
}
|
||||
|
||||
// 检查路径是否已存在(存在则启用,不存在则新增)
|
||||
// 检查路径是否已存在(存在则启用、不存在则新增)
|
||||
LambdaQueryWrapper<MilitaryLibrary> pathWrapper = new LambdaQueryWrapper<>();
|
||||
pathWrapper.eq(MilitaryLibrary::getPath, militaryPath);
|
||||
MilitaryLibrary existLibrary = militaryLibraryService.getOne(pathWrapper);
|
||||
|
||||
Reference in New Issue
Block a user