From 93cd13b4bd8bd19b6c6c6e78bb39b1f0fafc7896 Mon Sep 17 00:00:00 2001 From: Eric Duminil Date: Wed, 4 Sep 2024 15:00:21 +0200 Subject: [PATCH] Script for Philip --- .../scripts/PrepareDataForMarieke.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/enrich-citygml-with-greenarea/src/main/java/de/hft/stuttgart/scripts/PrepareDataForMarieke.java b/enrich-citygml-with-greenarea/src/main/java/de/hft/stuttgart/scripts/PrepareDataForMarieke.java index ebbfc47..ec30287 100644 --- a/enrich-citygml-with-greenarea/src/main/java/de/hft/stuttgart/scripts/PrepareDataForMarieke.java +++ b/enrich-citygml-with-greenarea/src/main/java/de/hft/stuttgart/scripts/PrepareDataForMarieke.java @@ -14,8 +14,9 @@ public class PrepareDataForMarieke { // Add Trees to GML files inside data/Marieke/... public static void main(String[] whatever) throws Exception { + processGrombühl(); // processGrafenbühl(); - processGrafenbühl3(); + // processGrafenbühl3(); // processWholeRegion(); // processSmallBlocks(); // processStatusQuo(); @@ -53,6 +54,22 @@ public class PrepareDataForMarieke } } + private static void processGrombühl() throws IOException, CityGMLContextException, CityGMLReadException, + InterruptedException, CityGMLWriteException, JAXBException, ParseException { + File folder = new File("data/Philip/Test"); + String gml = "Polygon 1.gml"; + File[] shapefiles = folder.listFiles((dir, name) -> name.endsWith(".shp")); + for (File shapefile : shapefiles) { + System.err.println(">>> " + shapefile); + String extension = shapefile.getName().replaceAll("\\.shp", ""); + String[] args = new String[] { folder.toPath().resolve(gml).toString(), // Input GML + shapefile.toString(), // Added trees, in Baumkatasterformat, + extension, // Output GML suffix + }; + GreenEnricher.main(args); + } + } + private static void processGrafenbühl2() throws IOException, CityGMLContextException, CityGMLReadException, InterruptedException, CityGMLWriteException, JAXBException, ParseException { File folder = new File("data/Marieke/Grafenbühl/nur_mit_oben"); -- GitLab