GDAL优化

This commit is contained in:
ZZX9599
2025-09-30 11:29:25 +08:00
parent 6b3509f1d9
commit 65048fbe89
5 changed files with 228 additions and 79 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);