Class OsmReaderSettings

    • Constructor Detail

      • OsmReaderSettings

        public OsmReaderSettings()
        Default constructor with default locale (Global)
      • OsmReaderSettings

        public OsmReaderSettings​(String countryName)
        Constructor
        Parameters:
        countryName - to use
      • OsmReaderSettings

        public OsmReaderSettings​(String inputSource,
                                 String countryName)
        Constructor
        Parameters:
        inputSource - to use
        countryName - to use
      • OsmReaderSettings

        public OsmReaderSettings​(URL inputSource,
                                 String countryName)
        Constructor
        Parameters:
        inputSource - to use
        countryName - to use
    • Method Detail

      • getInputSource

        public final URL getInputSource()
        The input source used
        Returns:
        input source used
      • setInputSource

        public void setInputSource​(URL inputSource)
        Set the input source to use
        Parameters:
        inputSource - to use
      • setInputSource

        public void setInputSource​(String inputSource)
        Set the input source to use, we attempt to extract a URL from the String directly here
        Parameters:
        inputSource - to use
      • setInputFile

        public void setInputFile​(String inputFile)
                          throws PlanItException
        Set the input file to use, which is internally converted into a URL
        Parameters:
        inputFile - to use
        Throws:
        PlanItException - thrown if error
      • getCountryName

        public final String getCountryName()
        The country name used to initialise OSM defaults for
        Returns:
        country name
      • setBoundingBox

        public final void setBoundingBox​(Number x1,
                                         Number x2,
                                         Number y1,
                                         Number y2)
                                  throws PlanItException
        Set an additional (more restricting) square bounding box based on provided envelope
        Parameters:
        x1 - , first x coordinate
        y1 - , first y coordinate
        x2 - , second x coordinate
        y2 - , second y coordinate
        Throws:
        PlanItException - thrown if error
      • setBoundingBox

        public final void setBoundingBox​(org.locationtech.jts.geom.Envelope boundingBox)
        Set a square bounding box based on provided envelope (which internally is converted to the bounding polygon that happens to be square)
        Parameters:
        boundingBox - to use
      • setBoundingPolygon

        public final void setBoundingPolygon​(org.locationtech.jts.geom.Polygon boundingPolygon)
        Set a polygon based bounding box to restrict parsing to
        Parameters:
        boundingPolygon - to use
      • getBoundingPolygon

        public final org.locationtech.jts.geom.Polygon getBoundingPolygon()
        Set a polygon based bounding box to restrict parsing to
        Returns:
        boundingPolygon used, can be null
      • hasBoundingPolygon

        public final boolean hasBoundingPolygon()
        Set a polygon based bounding box to restrict parsing to
        Returns:
        boundingPolygon used, can be null