Class PlanitLinkOsmUtils


  • public class PlanitLinkOsmUtils
    extends Object
    Utilities regarding PLANit links useful when parsing OSM entities
    Author:
    markr
    • Constructor Detail

      • PlanitLinkOsmUtils

        public PlanitLinkOsmUtils()
    • Method Detail

      • getClosestLinkWithOsmWayIdToGeometry

        public static MacroscopicLink getClosestLinkWithOsmWayIdToGeometry​(long osmWayId,
                                                                           org.locationtech.jts.geom.Geometry geometry,
                                                                           MacroscopicNetworkLayer networkLayer,
                                                                           PlanitJtsCrsUtils geoUtils)
        Collect the closest by link (with the given OSM way id on the layer) to the provided geometry. This is a very slow method as we lookup the link via the un-indexed external id. Use cautiously.
        Parameters:
        osmWayId - to filter links on
        geometry - to check closeness against
        networkLayer - the link must reside on
        geoUtils - to use for closeness computations
        Returns:
        found link (null if none)