From 21400f0830bd782883fc6e0055476d60188f7cb1 Mon Sep 17 00:00:00 2001 From: Ricardo Ewert Date: Tue, 2 Jan 2024 15:29:42 +0100 Subject: [PATCH] add method for creating indexBuildings --- .../SmallScaleCommercialTrafficUtils.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contribs/application/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/SmallScaleCommercialTrafficUtils.java b/contribs/application/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/SmallScaleCommercialTrafficUtils.java index 7b9b8373941..1ea26e82ee3 100644 --- a/contribs/application/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/SmallScaleCommercialTrafficUtils.java +++ b/contribs/application/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/SmallScaleCommercialTrafficUtils.java @@ -96,6 +96,17 @@ static Index getIndexLanduse(Path shapeFileLandusePath, String shapeCRS) { return shpLanduse.createIndex(shapeCRS, "fclass"); } + /** + * Creates and return the Index of the building shape. + * + * @return indexBuildings + */ + static Index getIndexBuildings(Path shapeFileBuildingsPath, String shapeCRS) { + + ShpOptions shpLanduse = new ShpOptions(shapeFileBuildingsPath, shapeCRS, StandardCharsets.UTF_8); + return shpLanduse.createIndex(shapeCRS, "type"); + } + /** * Writes a csv file with the result of the distribution per zone of the input data. */