| | |
| | | package com.lf.server.helper; |
| | | |
| | | import com.lf.server.entity.ctrl.LayerDto; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.gdal.gdal.Band; |
| | |
| | | } |
| | | } |
| | | |
| | | public static LayerDto getLayerDto(String filePath) { |
| | | public static void getLayerDto(String filePath) { |
| | | org.gdal.ogr.Driver driver = ogr.GetDriverByName("OpenFileGDB"); |
| | | if (driver == null) { |
| | | return null; |
| | | return; |
| | | } |
| | | |
| | | List<Map> list = new ArrayList<>(); |
| | | List<Map<String, String>> mapList = new ArrayList<>(); |
| | | LayerDto layerDto = new LayerDto(); |
| | | DataSource dataSource = null; |
| | | try { |
| | | dataSource = driver.Open(filePath, 0); |
| | |
| | | feature.delete(); |
| | | } while (true); |
| | | } |
| | | layerDto.setLayerName(strlayerName); |
| | | layerDto.setList(list); |
| | | layerDto.setCount(count); |
| | | layerDto.setMap(mapList); |
| | | //layerDto.setLayerName(strlayerName); |
| | | //layerDto.setList(list); |
| | | //layerDto.setCount(count); |
| | | //layerDto.setMap(mapList); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | dataSource.delete(); |
| | | } |
| | | } |
| | | return layerDto; |
| | | } |
| | | |
| | | /** |