{"id":159,"date":"2025-02-17T23:35:33","date_gmt":"2025-02-17T23:35:33","guid":{"rendered":"https:\/\/www.vineetdhanawat.com\/blog\/?p=159"},"modified":"2025-03-22T19:59:04","modified_gmt":"2025-03-22T19:59:04","slug":"location-based-apps-backend-using-geohash","status":"publish","type":"post","link":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/","title":{"rendered":"Location Based Apps &#8211; Backend using GeoHash"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In today\u2019s fast-paced world of on-demand services, efficiently querying spatial data is key to providing rapid responses and accurate matches between riders and drivers. One powerful tool that has gained traction in the industry is <strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/Geohash\">Geohash<\/a><\/strong>. In this post, we\u2019ll explore how a company like Uber can harness Geohash for fast spatial lookups, and we\u2019ll walk through a Java implementation that encodes latitude and longitude coordinates into Geohash strings.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324-1024x583.png\" alt=\"\" class=\"wp-image-160\" srcset=\"https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324-1024x583.png 1024w, https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324-300x171.png 300w, https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324-768x437.png 768w, https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324-1536x875.png 1536w, https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324.png 1788w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>TL;DR:<\/strong> Geohash is a compact, hierarchical representation of geographical coordinates that can be used to index spatial data. By encoding locations into strings, systems like Uber\u2019s can quickly narrow down search areas and perform efficient \u201cnearby\u201d queries.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">What Is Geohash?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Geohash is a geocoding method that encodes a pair of latitude and longitude values into a single alphanumeric string. The idea behind Geohash is simple:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Hierarchical Structure:<\/strong> Each additional character in the Geohash refines the location, dividing the area into smaller and smaller grids.<\/li>\n\n\n\n<li><strong>Spatial Proximity:<\/strong> Nearby places typically have similar prefixes in their Geohash. This property is extremely useful when performing spatial queries.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Imagine dividing the world into a grid and labeling each cell with a code. As you add more characters to the code, the grid cells become smaller, pinpointing the exact location with increasing accuracy.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">How Location Apps Leverages Geohash<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Location-based services, faces the challenge of quickly matching riders with nearby drivers. Here\u2019s how Geohash comes into play:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Indexing Driver Locations:<\/strong> Every driver&#8217;s location is encoded as a Geohash. This encoded value acts as an index in a spatial database.<\/li>\n\n\n\n<li><strong>Efficient Querying:<\/strong> When a rider requests a ride, the system can quickly compute the Geohash for the rider\u2019s current location and search for drivers whose Geohashes share the same prefix. Because Geohashes are hierarchical, even a short prefix corresponds to a specific area.<\/li>\n\n\n\n<li><strong>Reducing the Search Space:<\/strong> Instead of scanning through thousands of driver locations, the search is narrowed down to only those drivers within the relevant grid cell (or adjacent cells), drastically reducing computation time.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">This approach not only optimizes the search process but also scales very well as the number of drivers increases.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Geohash in Java: Code Example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Below is a simple Java implementation of a Geohash encoder. While there are many libraries available, understanding the underlying mechanics can be both enlightening and practical.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Java Geohash Encoder<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>public class GeoHash {\n    \/\/ Base32 map used in Geohash encoding\n    private static final String BASE32 = \"0123456789bcdefghjkmnpqrstuvwxyz\";\n\n    \/**\n     * Encodes the provided latitude and longitude into a Geohash string.\n     *\n     * @param latitude  The latitude of the location.\n     * @param longitude The longitude of the location.\n     * @param precision The desired length of the resulting Geohash string.\n     * @return The Geohash string.\n     *\/\n    public static String encode(double latitude, double longitude, int precision) {\n        boolean isEven = true;\n        int bit = 0, ch = 0;\n        StringBuilder geohash = new StringBuilder();\n        double&#91;] latRange = { -90.0, 90.0 };\n        double&#91;] lonRange = { -180.0, 180.0 };\n\n        while (geohash.length() &lt; precision) {\n            double mid;\n            if (isEven) {\n                mid = (lonRange&#91;0] + lonRange&#91;1]) \/ 2;\n                if (longitude > mid) {\n                    ch |= 1 &lt;&lt; (4 - bit);\n                    lonRange&#91;0] = mid;\n                } else {\n                    lonRange&#91;1] = mid;\n                }\n            } else {\n                mid = (latRange&#91;0] + latRange&#91;1]) \/ 2;\n                if (latitude > mid) {\n                    ch |= 1 &lt;&lt; (4 - bit);\n                    latRange&#91;0] = mid;\n                } else {\n                    latRange&#91;1] = mid;\n                }\n            }\n\n            isEven = !isEven;\n\n            if (bit &lt; 4) {\n                bit++;\n            } else {\n                geohash.append(BASE32.charAt(ch));\n                bit = 0;\n                ch = 0;\n            }\n        }\n        return geohash.toString();\n    }\n\n    \/\/ Example usage:\n    public static void main(String&#91;] args) {\n        double latitude = 37.775;  \/\/ Example latitude (San Francisco area)\n        double longitude = -122.4183; \/\/ Example longitude\n        int precision = 9;  \/\/ Adjust precision as needed\n\n        String geohash = GeoHash.encode(latitude, longitude, precision);\n        System.out.println(\"Geohash: \" + geohash);\n    }\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Geohash is more than just an interesting way to encode coordinates\u2014it\u2019s a practical tool that powers real-time location-based services by dramatically reducing the search space for spatial queries. With its hierarchical nature and ease of implementation (as shown in our Java example), Geohash plays a crucial role in enabling efficient, scalable systems like those used by Uber.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s also important to note that Geohash is just one of many spatial indexing techniques. Other methods, such as <a href=\"https:\/\/en.wikipedia.org\/wiki\/Quadtree\">Quadtrees<\/a>, offer different approaches to partitioning space and can be better suited for certain applications depending on the specific requirements of your system. Exploring these alternatives can provide a broader understanding of spatial data structures and help you choose the best tool for your project.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whether you\u2019re building a ride-hailing service, a delivery platform, or any application that relies on spatial data, understanding and leveraging these techniques can give you a significant performance boost. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In today\u2019s fast-paced world of on-demand services, efficiently querying spatial data is key to providing rapid responses and accurate matches between riders and drivers. One powerful tool that has gained traction in the industry is Geohash. In this post, we\u2019ll explore how a company like Uber can harness Geohash for fast spatial lookups, and we\u2019ll [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[59,60,43],"class_list":["post-159","post","type-post","status-publish","format-standard","hentry","category-article","tag-code","tag-geohash","tag-location"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Location Based Apps - Backend using GeoHash - BOTS World<\/title>\n<meta name=\"description\" content=\"Discover how Geohash enables fast spatial queries in ride-hailing applications. Learn its hierarchical encoding and efficient search benefits with a Java implementation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Location Based Apps - Backend using GeoHash - BOTS World\" \/>\n<meta property=\"og:description\" content=\"Discover how Geohash enables fast spatial queries in ride-hailing applications. Learn its hierarchical encoding and efficient search benefits with a Java implementation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/\" \/>\n<meta property=\"og:site_name\" content=\"BOTS World\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vineetdhanawat\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/vineetdhanawat\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-17T23:35:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-22T19:59:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324-1024x583.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"583\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vineet Dhanawat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vineetdhanawat\" \/>\n<meta name=\"twitter:site\" content=\"@vineetdhanawat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vineet Dhanawat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/\"},\"author\":{\"name\":\"Vineet Dhanawat\",\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/#\\\/schema\\\/person\\\/75b6c115d758829ba3009e88a7b0fe13\"},\"headline\":\"Location Based Apps &#8211; Backend using GeoHash\",\"datePublished\":\"2025-02-17T23:35:33+00:00\",\"dateModified\":\"2025-03-22T19:59:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/\"},\"wordCount\":553,\"publisher\":{\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/#\\\/schema\\\/person\\\/75b6c115d758829ba3009e88a7b0fe13\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/Screenshot-2025-02-17-151324-1024x583.png\",\"keywords\":[\"Code\",\"GeoHash\",\"Location\"],\"articleSection\":[\"Article\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/\",\"url\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/\",\"name\":\"Location Based Apps - Backend using GeoHash - BOTS World\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/Screenshot-2025-02-17-151324-1024x583.png\",\"datePublished\":\"2025-02-17T23:35:33+00:00\",\"dateModified\":\"2025-03-22T19:59:04+00:00\",\"description\":\"Discover how Geohash enables fast spatial queries in ride-hailing applications. Learn its hierarchical encoding and efficient search benefits with a Java implementation.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/Screenshot-2025-02-17-151324.png\",\"contentUrl\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/Screenshot-2025-02-17-151324.png\",\"width\":1788,\"height\":1018},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/2025\\\/02\\\/location-based-apps-backend-using-geohash\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Location Based Apps &#8211; Backend using GeoHash\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/\",\"name\":\"BOTS World\",\"description\":\"Because writing for humans is too mainstream\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/#\\\/schema\\\/person\\\/75b6c115d758829ba3009e88a7b0fe13\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/#\\\/schema\\\/person\\\/75b6c115d758829ba3009e88a7b0fe13\",\"name\":\"Vineet Dhanawat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/223097747d5be05970f383925f5b170348c9b93f1e2ad642b72ce61705c695bc?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/223097747d5be05970f383925f5b170348c9b93f1e2ad642b72ce61705c695bc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/223097747d5be05970f383925f5b170348c9b93f1e2ad642b72ce61705c695bc?s=96&d=mm&r=g\",\"caption\":\"Vineet Dhanawat\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/223097747d5be05970f383925f5b170348c9b93f1e2ad642b72ce61705c695bc?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/www.vineetdhanawat.com\\\/\",\"https:\\\/\\\/www.facebook.com\\\/vineetdhanawat\",\"https:\\\/\\\/www.instagram.com\\\/vineetdhanawat\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/vineetdhanawat\\\/\",\"https:\\\/\\\/x.com\\\/vineetdhanawat\"],\"url\":\"https:\\\/\\\/www.vineetdhanawat.com\\\/blog\\\/author\\\/vineetdhanawat\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Location Based Apps - Backend using GeoHash - BOTS World","description":"Discover how Geohash enables fast spatial queries in ride-hailing applications. Learn its hierarchical encoding and efficient search benefits with a Java implementation.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/","og_locale":"en_US","og_type":"article","og_title":"Location Based Apps - Backend using GeoHash - BOTS World","og_description":"Discover how Geohash enables fast spatial queries in ride-hailing applications. Learn its hierarchical encoding and efficient search benefits with a Java implementation.","og_url":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/","og_site_name":"BOTS World","article_publisher":"https:\/\/www.facebook.com\/vineetdhanawat","article_author":"https:\/\/www.facebook.com\/vineetdhanawat","article_published_time":"2025-02-17T23:35:33+00:00","article_modified_time":"2025-03-22T19:59:04+00:00","og_image":[{"width":1024,"height":583,"url":"https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324-1024x583.png","type":"image\/png"}],"author":"Vineet Dhanawat","twitter_card":"summary_large_image","twitter_creator":"@vineetdhanawat","twitter_site":"@vineetdhanawat","twitter_misc":{"Written by":"Vineet Dhanawat","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/#article","isPartOf":{"@id":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/"},"author":{"name":"Vineet Dhanawat","@id":"https:\/\/www.vineetdhanawat.com\/blog\/#\/schema\/person\/75b6c115d758829ba3009e88a7b0fe13"},"headline":"Location Based Apps &#8211; Backend using GeoHash","datePublished":"2025-02-17T23:35:33+00:00","dateModified":"2025-03-22T19:59:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/"},"wordCount":553,"publisher":{"@id":"https:\/\/www.vineetdhanawat.com\/blog\/#\/schema\/person\/75b6c115d758829ba3009e88a7b0fe13"},"image":{"@id":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324-1024x583.png","keywords":["Code","GeoHash","Location"],"articleSection":["Article"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/","url":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/","name":"Location Based Apps - Backend using GeoHash - BOTS World","isPartOf":{"@id":"https:\/\/www.vineetdhanawat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/#primaryimage"},"image":{"@id":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324-1024x583.png","datePublished":"2025-02-17T23:35:33+00:00","dateModified":"2025-03-22T19:59:04+00:00","description":"Discover how Geohash enables fast spatial queries in ride-hailing applications. Learn its hierarchical encoding and efficient search benefits with a Java implementation.","breadcrumb":{"@id":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/#primaryimage","url":"https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324.png","contentUrl":"https:\/\/www.vineetdhanawat.com\/blog\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-17-151324.png","width":1788,"height":1018},{"@type":"BreadcrumbList","@id":"https:\/\/www.vineetdhanawat.com\/blog\/2025\/02\/location-based-apps-backend-using-geohash\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vineetdhanawat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Location Based Apps &#8211; Backend using GeoHash"}]},{"@type":"WebSite","@id":"https:\/\/www.vineetdhanawat.com\/blog\/#website","url":"https:\/\/www.vineetdhanawat.com\/blog\/","name":"BOTS World","description":"Because writing for humans is too mainstream","publisher":{"@id":"https:\/\/www.vineetdhanawat.com\/blog\/#\/schema\/person\/75b6c115d758829ba3009e88a7b0fe13"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vineetdhanawat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.vineetdhanawat.com\/blog\/#\/schema\/person\/75b6c115d758829ba3009e88a7b0fe13","name":"Vineet Dhanawat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/223097747d5be05970f383925f5b170348c9b93f1e2ad642b72ce61705c695bc?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/223097747d5be05970f383925f5b170348c9b93f1e2ad642b72ce61705c695bc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/223097747d5be05970f383925f5b170348c9b93f1e2ad642b72ce61705c695bc?s=96&d=mm&r=g","caption":"Vineet Dhanawat"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/223097747d5be05970f383925f5b170348c9b93f1e2ad642b72ce61705c695bc?s=96&d=mm&r=g"},"sameAs":["https:\/\/www.vineetdhanawat.com\/","https:\/\/www.facebook.com\/vineetdhanawat","https:\/\/www.instagram.com\/vineetdhanawat","https:\/\/www.linkedin.com\/in\/vineetdhanawat\/","https:\/\/x.com\/vineetdhanawat"],"url":"https:\/\/www.vineetdhanawat.com\/blog\/author\/vineetdhanawat\/"}]}},"_links":{"self":[{"href":"https:\/\/www.vineetdhanawat.com\/blog\/wp-json\/wp\/v2\/posts\/159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vineetdhanawat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vineetdhanawat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vineetdhanawat.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vineetdhanawat.com\/blog\/wp-json\/wp\/v2\/comments?post=159"}],"version-history":[{"count":1,"href":"https:\/\/www.vineetdhanawat.com\/blog\/wp-json\/wp\/v2\/posts\/159\/revisions"}],"predecessor-version":[{"id":161,"href":"https:\/\/www.vineetdhanawat.com\/blog\/wp-json\/wp\/v2\/posts\/159\/revisions\/161"}],"wp:attachment":[{"href":"https:\/\/www.vineetdhanawat.com\/blog\/wp-json\/wp\/v2\/media?parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vineetdhanawat.com\/blog\/wp-json\/wp\/v2\/categories?post=159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vineetdhanawat.com\/blog\/wp-json\/wp\/v2\/tags?post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}