| | |
| | | //procDepthFiles(); |
| | | System.out.println("> test ----------------------"); |
| | | readZarr(); |
| | | //collectPngToList(); |
| | | } |
| | | |
| | | private void procDepthFiles() { |
| | |
| | | public void collectPngToList() { |
| | | System.out.println("------------------------------------------- start"); |
| | | int size = 1024; |
| | | String outputPath = "D:\\other\\simu\\out\\20250412\\waters"; |
| | | String outputPath = "D:\\other\\simu\\out\\chicago96\\waters"; // ""D:\\other\\simu\\out\\20250412\\waters"; |
| | | List<String> list = new ArrayList<>(); |
| | | for (File file : new File(outputPath).listFiles()) { |
| | | if (!file.exists() || file.isFile()) continue; |
| | |
| | | Feature f = layer.GetFeature(j); |
| | | Geometry g = f.GetGeometryRef(); |
| | | if (null != g) { // && (g.GetGeometryType() == ogr.wkbPolygon || g.GetGeometryType() == ogr.wkbMultiPolygon) |
| | | list.add(new Region(f.GetFieldAsString(""), (short) 3, g.ExportToWkt())); |
| | | list.add(new Region(f.GetFieldAsString(""), 3, g.ExportToWkt())); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | System.out.println("Successfully opened..."); |
| | | System.out.println("Driver: " + ds.GetDriver().getShortName() + "/" + ds.GetDriver().getLongName()); |
| | | System.out.println("Size: " + ds.getRasterXSize() + "x" + ds.getRasterYSize() + "x" + ds.getRasterCount()); |
| | | System.out.println("Size: " + ds.getRasterXSize() + " - " + ds.getRasterYSize() + " - " + ds.getRasterCount()); |
| | | } finally { |
| | | if (null != ds) ds.delete(); |
| | | } |