Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
GregorRyb committed Feb 22, 2024
2 parents 7ca533c + 0260465 commit 830162b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/org/matsim/analysis/Person2Home.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
name = "analyze-population",
description = "Extract the home location of the persons in the population file and write it into a csv"
)


public class Person2Home {

public static void main(String[] args) throws IOException {
Expand All @@ -37,6 +35,10 @@ public static void main(String[] args) throws IOException {
private static void analyzeHomeLocation(Population population, Collection<SimpleFeature> analyzedArea) throws IOException {
CSVPrinter csvWriter = new CSVPrinter(new FileWriter("persons-home-locations.csv"), CSVFormat.TDF);
csvWriter.printRecord("person", "home_x", "home_y", "home_location");

// TODO: a similar functionality is already implemented in ExtractHomeCoordinates
// this class will become obsolete, but a newer MATSim version is needed

for (SimpleFeature feature : analyzedArea) {
Geometry defaultGeometry = (Geometry) feature.getDefaultGeometry();

Expand Down

0 comments on commit 830162b

Please sign in to comment.