Examples of NaPTAN


Examples of uk.org.naptan.NaPTAN

public class StationMappingMain {
  public static void main(String[] args) throws Exception {
    JAXBContext context = JAXBContext.newInstance("uk.org.naptan");
    Unmarshaller unmarshaller = context.createUnmarshaller();
    NaPTAN result = (NaPTAN) unmarshaller.unmarshal(new File(
        "/Users/bdferris/Documents/uk-rail/naptan/NaPTAN.xml"));

    PrintWriter writer = new PrintWriter(new File(
        "/Users/bdferris/Documents/uk-rail/naptan/stations.xml"));
    writer.println("tiploc,lat,lon");
    StopPointsStructure stopPoints = result.getStopPoints();
    int i = 0;
    for (StopPointStructure stopPoint : stopPoints.getStopPoint()) {
      String tiploc = getTiplocForStopPoint(stopPoint);
      Double lat = getLatForStopPoint(stopPoint);
      Double lon = getLonForStopPoint(stopPoint);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.