Class OsmNetworkReaderFactory


  • public class OsmNetworkReaderFactory
    extends Object
    Factory for creating PLANitOSMReaders
    Author:
    markr
    • Constructor Detail

      • OsmNetworkReaderFactory

        public OsmNetworkReaderFactory()
    • Method Detail

      • create

        public static OsmNetworkReader create()
        Create a PLANitOSMReader which will create its own macroscopic network and non-locale specific defaults for any right hand driving country
        Returns:
        created osm reader
      • create

        public static OsmNetworkReader create​(String countryName)
        Create a PLANitOSMReader which will create its own macroscopic network and non-locale specific defaults for any right hand driving country
        Parameters:
        countryName - to use for the defaults to apply
        Returns:
        created osm reader
      • create

        public static OsmNetworkReader create​(String inputFile,
                                              String countryName)
                                       throws PlanItException
        Create a PLANitOSMReader which will create its own macroscopic network
        Parameters:
        inputFile - local file to use
        countryName - country which the input file represents, used to determine defaults in case not specifically specified in OSM data, when left blank global defaults will be used based on a right hand driving approach
        Returns:
        created osm reader
        Throws:
        PlanItException - thrown if error
      • create

        public static OsmNetworkReader create​(String inputFile,
                                              String countryName,
                                              PlanitOsmNetwork osmNetworkToPopulate)
                                       throws PlanItException
        Create a PLANitOSMReader while providing an OSM network to populate
        Parameters:
        inputFile - local file to use
        countryName - country which the input file represents, used to determine defaults in case not specifically specified in OSM data, when left blank global defaults will be used based on a right hand driving approach
        osmNetworkToPopulate - the network to populate
        Returns:
        created osm reader
        Throws:
        PlanItException - thrown if error
      • create

        public static OsmNetworkReader create​(URL inputQuery,
                                              String countryName)
        Create a PLANitOSMReader which will create its own macroscopic network by drawing from a cloud based map source
        Parameters:
        inputQuery - Url location to retrieve OSM XML data from, e.g. new URL("https://api.openstreetmap.org/api/0.6/map?bbox=13.465661,52.504055,13.469817,52.506204");
        countryName - country which the input file represents, used to determine defaults in case not specifically specified in OSM data, when left blank global defaults will be used based on a right hand driving approach
        Returns:
        created osm reader
      • create

        public static OsmNetworkReader create​(URL inputQuery,
                                              String countryName,
                                              PlanitOsmNetwork osmNetworkToPopulate)
        Create a PLANitOSMReader while providing an OSM network to populate
        Parameters:
        inputQuery - Url location to retrieve OSM XML data from, e.g. new URL("https://api.openstreetmap.org/api/0.6/map?bbox=13.465661,52.504055,13.469817,52.506204");
        countryName - country which the input file represents, used to determine defaults in case not specifically specified in OSM data, when left blank global defaults will be used based on a right hand driving approach
        osmNetworkToPopulate - the network to populate
        Returns:
        created osm reader
      • create

        public static OsmNetworkReader create​(OsmNetworkReaderSettings settings)
        Create a PLANitOSMReader while providing an OSM network to populate
        Parameters:
        settings - to use, make sure they are consistent with the network and country provided here otherwise an exception will be thrown
        Returns:
        created osm reader