Patent Document ID: 9886785
Application ID: 14747275
Patent Status: 1

Claim One:
1. A method, in a data processing system comprising a processor and a memory coupled to the processor, for spatial annotated graph queries, the method comprising: generating, by indexing logic executed by the processor, an indexed set of geometry objects in a graph database, each geometry object in the indexed set of geometry objects identified by a geohash representing a unique coordinate pair of the geometry object identifying a unique geographical location on the Earth, wherein the indexed set of geometry objects is generated by generating a hashmap index of the set of received geometry objects; receiving, by query logic executed by the processor, a geomap query to identify a number K-closest geometry objects from the indexed set of geometry objects in the graph database within a distance D to a geo-location L, the geo-location L identified by a unique coordinate pair of the geo-location L identifying a geographical location on Earth; computing, by geohash logic executed by the processor, a geohash for the geo-location L; identifying, by the query logic, a subset of geometry objects from the indexed set of geometry objects in the graph database having a number of prefix bits in the respective geohash in common with a number of bits NB in the prefix of the geohash of the geo-location L; identifying, by the query logic, K-closest geometry objects from the subset of geometry objects that are closest to the geo-location L, wherein the K-closest geometry objects are identified by: for each geometry object in the set of indexed geometry objects, computing, by the query logic, a distance between a location of the geometry object represented by the geohash associated with the geometry object and the geo-location L represented by the geohash associated with the geo-location L thereby forming a computed distance, wherein determining the computed distance using geohashes results in improved retrieval of spatial information; determining, by the query logic, whether the computed distance between the location of the geometry object and the geo-location L is less than or equal to the distance D; responsive to the computed distance between the location of the geometry object and the geo-location L being less than or equal to the distance D, adding, by the query logic, the geometry object to a set of final results (FR) along with the computed distance between the location of the geometry object and the geo-location L; and identifying, by the query logic, the K-closest geometry objects from the set of final results (FR) based on the computed distance between the location of the geometry object and the geo-location L; and returning, by the query logic, the K-closest geometry objects to a user who submitted the geomap query.