Class QueryUtil



  • public class QueryUtil
    extends Object
    • Constructor Detail

      • QueryUtil

        public QueryUtil()
    • Method Detail

      • putNodes

        public static int putNodes(OsmWay way,
                                   TLongObjectMap<OsmNode> nodes,
                                   OsmEntityProvider entityProvider)
        Retrieve all nodes of the specified way from the entityProvider and insert them into the map.
        Parameters:
        way - the way to retrieve nodes for.
        nodes - the map to put found nodes into.
        entityProvider - the store to query for nodes.
        Returns:
        the number of nodes that could not be found.
      • putNodes

        public static void putNodes(OsmWay way,
                                    TLongObjectMap<OsmNode> nodes,
                                    OsmEntityProvider entityProvider,
                                    TLongSet nodeIds)
                             throws EntityNotFoundException
        Retrieve all nodes of the specified way from the entityProvider and insert them into the map if they are not already present in the specified set of identifiers. The identifiers of added nodes will also be added to the set.
        Parameters:
        way - the way to retrieve nodes for.
        nodes - the map to put found nodes into.
        entityProvider - the store to query for nodes.
        nodeIds - the set of identifiers to check for existing nodes.
        Throws:
        EntityNotFoundException -
      • putNodes

        public static void putNodes(OsmRelation relation,
                                    TLongObjectMap<OsmNode> nodes,
                                    OsmEntityProvider entityProvider,
                                    TLongSet nodeIds,
                                    MissingEntityCounter counter)
        Retrieve all nodes directly referenced by the specified relation from the entityProvider and insert them into the map if they are not already present in the specified set of identifiers.
        Parameters:
        relation - the relation to retrieve nodes for.
        nodes - the map to put found nodes into.
        entityProvider - the store to query for nodes.
        nodeIds - the set of identifiers to check for existing nodes.
        counter -
      • putWays

        public static void putWays(OsmRelation relation,
                                   TLongObjectMap<OsmWay> ways,
                                   OsmEntityProvider entityProvider,
                                   TLongSet wayIds)
                            throws EntityNotFoundException
        Retrieve all ways directly referenced by the specified relation from the entityProvider and insert them into the map if they are not already present in the specified set of identifiers. The identifiers of added ways will also be added to the set.
        Parameters:
        relation - the relation to retrieve ways for.
        ways - the map to put found ways into.
        entityProvider - the store to query for ways.
        wayIds - the set of identifiers to check for existing ways.
        Throws:
        EntityNotFoundException -
      • putWaysAndWayNodes

        public static void putWaysAndWayNodes(OsmRelation relation,
                                              TLongObjectMap<OsmNode> nodes,
                                              TLongObjectMap<OsmWay> ways,
                                              OsmEntityProvider entityProvider)
                                       throws EntityNotFoundException
        Retrieve all ways directly referenced by the specified relation and the nodes referenced by those ways from the entityProvider and insert them into the maps.
        Parameters:
        relation - the relation to retrieve ways and way-nodes for.
        nodes - the map to put found way-nodes into.
        ways - the map to put found ways into.
        entityProvider - the store to query for ways and nodes.
        Throws:
        EntityNotFoundException -
      • putWaysAndWayNodes

        public static void putWaysAndWayNodes(OsmRelation relation,
                                              TLongObjectMap<OsmNode> nodes,
                                              TLongObjectMap<OsmWay> ways,
                                              OsmEntityProvider entityProvider,
                                              TLongSet wayIds,
                                              MissingEntityCounter counter)
        Retrieve all ways directly referenced by the specified relation and the nodes referenced by those ways from the entityProvider and insert them into the maps if they are not already present in the specified sets of identifiers.
        Parameters:
        relation - the relation to retrieve ways and way-nodes for.
        nodes - the map to put found way-nodes into.
        ways - the map to put found ways into.
        entityProvider - the store to query for ways and nodes.
        wayIds - the set of identifiers to check for existing ways.
        counter -
      • anyNodeContainedIn

        public static boolean anyNodeContainedIn(OsmWay way,
                                                 TLongSet nodeIds)