| | |
| | | @Value("${shujian.url}") |
| | | String sjUrl; |
| | | |
| | | @Value("${shujian.path}") |
| | | String sjPath; |
| | | |
| | | @Resource |
| | | PathHelper pathHelper; |
| | | |
| | |
| | | layer.setNodata(getNoData(pub, metas)); |
| | | |
| | | CreateLayerEntity.ImagePathList imagePathList = entity.new ImagePathList(); |
| | | imagePathList.setPath(pathHelper.getConfig().getUploadPath()); |
| | | imagePathList.setPath(sjPath); |
| | | entity.getImage_path_list().add(imagePathList); |
| | | |
| | | List<CreateLayerEntity.ImageList> imageLists = entity.getImage_list(); |
| | | for (MetaEntity meta : metas) { |
| | | CreateLayerEntity.ImageList imageList = entity.new ImageList(); |
| | | imageList.setPath(meta.getPath()); |
| | | imageList.setPath(meta.getPath().replace("\\", "/")); |
| | | imageLists.add(imageList); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 获取 nodata |
| | | */ |
| | | private List<String> getNoData(PubEntity pub, List<MetaEntity> metas) { |
| | | private List<Integer> getNoData(PubEntity pub, List<MetaEntity> metas) { |
| | | int bands = 1; |
| | | for (MetaEntity meta : metas) { |
| | | if (StringHelper.isEmpty(meta.getBands())) { |
| | |
| | | } |
| | | } |
| | | |
| | | List<String> list = new ArrayList<>(); |
| | | List<Integer> list = new ArrayList<>(); |
| | | for (int i = 0; i < bands; i++) { |
| | | list.add(String.valueOf(pub.getNodata())); |
| | | list.add(pub.getNodata()); |
| | | } |
| | | |
| | | return list; |