dcb
2025-07-14 0e6106783b59c2c4e173ad4b709c1415686e7505
src/test/java/com/se/nsl/AppTest.java
@@ -39,9 +39,16 @@
    @Test
    public void test() {
        //procDepthFiles();
        System.out.println("> test ----------------------");
        readZarr();
        //procDepthFiles();
        //readZarr();
        //collectPngToList();
        SimpleDateFormat YYYYMMDDHHMM = new SimpleDateFormat("yyyy MM dd HH mm ");
        System.out.println(YYYYMMDDHHMM.format(new Date()));
        SimpleDateFormat YYYYMDHM = new SimpleDateFormat("yyyy M d H m ");
        System.out.println(YYYYMDHM.format(new Date()));
    }
    private void procDepthFiles() {
@@ -77,7 +84,7 @@
    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;
@@ -116,7 +123,7 @@
                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()));
                }
            }
        }
@@ -162,7 +169,7 @@
            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();
        }