diff --git a/original_data/shp/switzerland/switzerland.cpg b/original_data/shp/switzerland/switzerland.cpg new file mode 100644 index 0000000..3ad133c --- /dev/null +++ b/original_data/shp/switzerland/switzerland.cpg @@ -0,0 +1 @@ +UTF-8 \ No newline at end of file diff --git a/original_data/shp/switzerland/switzerland.ctf b/original_data/shp/switzerland/switzerland.ctf new file mode 100644 index 0000000..014cb42 --- /dev/null +++ b/original_data/shp/switzerland/switzerland.ctf @@ -0,0 +1,65 @@ +Name;Alias +NO;NO +NAME;NAME +AGGLO_ID;AGGLO_ID +AMR_ID;AMR_ID +MUN_ID;MUN_ID +KT_ID;KT_ID +MSR_ID;MSR_ID +SL3_ID;SL3_ID +AGGLO_NAME;AGGLO_NAME +AMR_NAME;AMR_NAME +MUN_NAME;MUN_NAME +KT_NAME;KT_NAME +MSR_NAME;MSR_NAME +SL3_NAME;SL3_NAME +AMGR_ID;AMGR_ID +AMGR_NAME;AMGR_NAME +AREA_LAND;AREA_LAND +MOTORISATION_LEVEL;MOTORISA~1 +ZONE_INDEX;ZONE_INDEX +VISIT_L;VISIT_L +VISIT_S;VISIT_S +VISIT_S_ST;VISIT_S_ST +VISIT_S_LT;VISIT_S_LT +SCHL_ENR_1;SCHL_ENR_1 +SCHL_ENR_2;SCHL_ENR_2 +SCHL_APPR;SCHL_APPR +SCHL_ENR_3;SCHL_ENR_3 +AREA_LAND;AREA_LAND +DENSITY;DENSITY +POP_TOTAL;POP_TOTAL +POP_EMPL;POP_EMPL +POP_PUP_1;POP_PUP_1 +POP_PUP_2;POP_PUP_2 +POP_APPR;POP_APPR +POP_STUD_3;POP_STUD_3 +POP_0017;POP_0017 +POP_1824;POP_1824 +POP_2544;POP_2544 +POP_4564;POP_4564 +POP_6574;POP_6574 +POP_75XX;POP_75XX +POP_DL;POP_DL +POP_CARS;POP_CARS +POP_CARAVL;POP_CARAVL +POP_HT;POP_HT +POP_GA;POP_GA +POP_VA;POP_VA +POP_VA_HT;POP_VA_HT +JOBS_TOTAL;JOBS_TOTAL +JOBS_ENDO;JOBS_ENDO +FTE_TOTAL;FTE_TOTAL +FTE_ENDO;FTE_ENDO +AT_CAR;AT_CAR +AT_RIDE;AT_RIDE +PC_CAR;PC_CAR +PC_RIDE;PC_RIDE +ACCSIB_MUL;ACCSIB_MUL +ACCSIB_CAR;ACCSIB_CAR +ACCSIB_PT;ACCSIB_PT +ACCSIB_JOB_45MIN_PT;ACCSIB_J~2 +CAR_TTIMES;CAR_TTIMES +PT_TTIMES;PT_TTIMES +PT_TRSFERS;PT_TRSFERS +PT_FREQNCY;PT_FREQNCY diff --git a/original_data/shp/switzerland/switzerland.dbf b/original_data/shp/switzerland/switzerland.dbf new file mode 100644 index 0000000..44627d4 Binary files /dev/null and b/original_data/shp/switzerland/switzerland.dbf differ diff --git a/original_data/shp/switzerland/switzerland.prj b/original_data/shp/switzerland/switzerland.prj new file mode 100644 index 0000000..a63c61d --- /dev/null +++ b/original_data/shp/switzerland/switzerland.prj @@ -0,0 +1 @@ +PROJCS["CH1903+_LV95_TOWGS",GEOGCS["GCS_CH1903+_LV95_TOWGS",DATUM["D_CH1903+",SPHEROID["Bessel_1841",6377397.155,299.1528128],TOWGS84[674.4,15.1,405.3,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199432955]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",2600000],PARAMETER["False_Northing",1200000],PARAMETER["Scale_Factor",1],PARAMETER["Azimuth",90],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1]] \ No newline at end of file diff --git a/original_data/shp/switzerland/switzerland.shp b/original_data/shp/switzerland/switzerland.shp new file mode 100644 index 0000000..f98074a Binary files /dev/null and b/original_data/shp/switzerland/switzerland.shp differ diff --git a/original_data/shp/switzerland/switzerland.shx b/original_data/shp/switzerland/switzerland.shx new file mode 100644 index 0000000..a4efed7 Binary files /dev/null and b/original_data/shp/switzerland/switzerland.shx differ diff --git a/src/main/java/ch/sbb/prepare/GenerateRailsimInput.java b/src/main/java/ch/sbb/prepare/GenerateRailsimInput.java index f8d9896..2961308 100644 --- a/src/main/java/ch/sbb/prepare/GenerateRailsimInput.java +++ b/src/main/java/ch/sbb/prepare/GenerateRailsimInput.java @@ -46,21 +46,29 @@ public final class GenerateRailsimInput { - // input files + // input osm and gtfs file private static final String INPUT_OSM_FILE = "original_data/osm/switzerland_railways.osm"; private static final String INPUT_GTFS_FILE = "original_data/gtfs/gtfs_fp2024_2024-03-20_04-15.zip"; - private static final String areaShpFileForTrimming = null; + + // optional: trim the schedule + // private static final String areaShpFileForTrimming = null; // private static final String areaShpFileForTrimming = "original_data/shp/olten/olten.shp"; - private static final Set transitLineNamePrefixesToKeep = CollectionUtils.stringToSet("IC,IR,RE"); + private static final String areaShpFileForTrimming = "original_data/shp/switzerland/switzerland.shp"; + + // optional: filter by line name prefix + // private static final Set transitLineNamePrefixesToKeep = CollectionUtils.stringToSet("IC,IR,RE,S"); + private static final Set transitLineNamePrefixesToKeep = null; + private static final String EPSG2056 = "EPSG:2056"; - // final matsim input files + // matsim input files to write private static final String MATSIM_INPUT = "matsim_input/"; private static final String VEHICLES_GTFS = MATSIM_INPUT + "transitVehicles.xml.gz"; private static final String NETWORK_FINAL = MATSIM_INPUT + "transitNetwork.xml.gz"; private static final String SCHEDULE_FINAL = MATSIM_INPUT + "transitSchedule.xml.gz"; // intermediate files + private static final String MATSIM_INPUT_TMP = "matsim_input/tmp/"; private static final String PT2MATSIM_OSM_CONVERTER_CONFIG_DEFAULT = MATSIM_INPUT_TMP + "pt2matsim_osm_converter_config_default.xml";