Package org.opentripplanner.openstreetmap.impl

Examples of org.opentripplanner.openstreetmap.impl.AnyFileBasedOpenStreetMapProviderImpl


            return null;
        }
        if ( hasOSM ) {
            List<OpenStreetMapProvider> osmProviders = Lists.newArrayList();
            for (File osmFile : osmFiles) {
                OpenStreetMapProvider osmProvider = new AnyFileBasedOpenStreetMapProviderImpl(osmFile);
                osmProviders.add(osmProvider);
            }
            OpenStreetMapGraphBuilderImpl osmBuilder = new OpenStreetMapGraphBuilderImpl(osmProviders);
            DefaultStreetEdgeFactory streetEdgeFactory = new DefaultStreetEdgeFactory();
            streetEdgeFactory.useElevationData = params.elevation;
View Full Code Here


    private GenericAStar aStar = new GenericAStar();

    public void setUp() throws Exception {
        OpenStreetMapGraphBuilderImpl osmBuilder = new OpenStreetMapGraphBuilderImpl();
        osmBuilder.setDefaultWayPropertySetSource(new DefaultWayPropertySetSource());
        AnyFileBasedOpenStreetMapProviderImpl provider = new AnyFileBasedOpenStreetMapProviderImpl();
        URL osmDataUrl = getClass().getResource("bridge_construction.osm.pbf");
        File osmDataFile = new File(URLDecoder.decode(osmDataUrl.getFile(), "UTF-8"));
        provider.setPath(osmDataFile);
        osmBuilder.setProvider(provider);
        HashMap<Class<?>, Object> extra = Maps.newHashMap();
        osmBuilder.buildGraph(graph, extra); // TODO get rid of this "extra" thing
     }
View Full Code Here

import org.opentripplanner.openstreetmap.impl.StreamedFileBasedOpenStreetMapProviderImpl;

public class OpenStreetMapParserTest {
    @Test
    public void testAFBinaryParser() throws Exception {
        AnyFileBasedOpenStreetMapProviderImpl pr = new AnyFileBasedOpenStreetMapProviderImpl();
        OSMMap map = new OSMMap();
        pr.setPath(new File(URLDecoder.decode(getClass().getResource("map.osm.pbf").getPath(), "UTF-8")));
        pr.readOSM(map);
        testParser(map);
    }
View Full Code Here

        testParser(map);
    }

    @Test
    public void testAFXMLParser() throws Exception {
        AnyFileBasedOpenStreetMapProviderImpl pr = new AnyFileBasedOpenStreetMapProviderImpl();
        OSMMap map = new OSMMap();
        pr.setPath(new File(URLDecoder.decode(getClass().getResource("map.osm.gz").getPath(), "UTF-8")));
        pr.readOSM(map);
        testParser(map);
    }
View Full Code Here

TOP

Related Classes of org.opentripplanner.openstreetmap.impl.AnyFileBasedOpenStreetMapProviderImpl

Copyright © 2018 www.massapicom. 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.