All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.kit.ifv.mobitopp.visum.reader.VisumPointReader Maven / Gradle / Ivy

Go to download

mobiTopp (http://mobitopp.ifv.kit.edu/) is an agent-based travel demand model developed at the Institute for transport studies at the Karlsruhe Institute of Technology (http://www.ifv.kit.edu/english/index.php). Publications about mobiTopp can be found on the project site (http://mobitopp.ifv.kit.edu/28.php).

The newest version!
package edu.kit.ifv.mobitopp.visum.reader;

import static java.util.stream.Collectors.toMap;

import java.util.Map;
import java.util.stream.Stream;

import edu.kit.ifv.mobitopp.util.dataimport.Row;
import edu.kit.ifv.mobitopp.visum.NetfileLanguage;
import edu.kit.ifv.mobitopp.visum.VisumPoint;

public class VisumPointReader extends VisumBaseReader {

  public VisumPointReader(NetfileLanguage language) {
    super(language);
  }

  public Map readPoints(Stream content) {
    return content.collect(toMap(this::idOf, this::createPoint));
  }

  private VisumPoint createPoint(Row row) {
    float x = xCoordOf(row);
    float y = yCoordOf(row);
    return new VisumPoint(x, y);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy