Skip to main content
Became Hot Network Question
edited title
Link
tinlyx
  • 11.2k
  • 18
  • 76
  • 127

How to get all the sub-rectangles (subgeohashes) of a given geohash

removed thanks
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

I am trying to use geohash to generate a grid of rectangles to cover an area. But I am not very familiar with the coding system of geohash. My question is:

If I have a specific geohash gh of 3 characters, how do I get a list of all 4,5,6-character geohashes that are contained in the ST_GeomFromGeohash of the original geohash gh?

I am using PostGIS (2.5, 3.0alpha; PostgreSQL 11), and can manage the basics of getting the geometries of a geohash etc. I am just not sure how to get all the "sub-geohashes", e.g. by string operations. If there is a built-in function in PostGIS/PostgreSQL, it is even better. Thanks.

Related:

What is the precision of Geohash?

I am trying to use geohash to generate a grid of rectangles to cover an area. But I am not very familiar with the coding system of geohash. My question is:

If I have a specific geohash gh of 3 characters, how do I get a list of all 4,5,6-character geohashes that are contained in the ST_GeomFromGeohash of the original geohash gh?

I am using PostGIS (2.5, 3.0alpha; PostgreSQL 11), and can manage the basics of getting the geometries of a geohash etc. I am just not sure how to get all the "sub-geohashes", e.g. by string operations. If there is a built-in function in PostGIS/PostgreSQL, it is even better. Thanks.

Related:

What is the precision of Geohash?

I am trying to use geohash to generate a grid of rectangles to cover an area. But I am not very familiar with the coding system of geohash. My question is:

If I have a specific geohash gh of 3 characters, how do I get a list of all 4,5,6-character geohashes that are contained in the ST_GeomFromGeohash of the original geohash gh?

I am using PostGIS (2.5, 3.0alpha; PostgreSQL 11), and can manage the basics of getting the geometries of a geohash etc. I am just not sure how to get all the "sub-geohashes", e.g. by string operations. If there is a built-in function in PostGIS/PostgreSQL, it is even better.

Related:

What is the precision of Geohash?

Source Link
tinlyx
  • 11.2k
  • 18
  • 76
  • 127

How to get all the sub-rectangles of a given geohash

I am trying to use geohash to generate a grid of rectangles to cover an area. But I am not very familiar with the coding system of geohash. My question is:

If I have a specific geohash gh of 3 characters, how do I get a list of all 4,5,6-character geohashes that are contained in the ST_GeomFromGeohash of the original geohash gh?

I am using PostGIS (2.5, 3.0alpha; PostgreSQL 11), and can manage the basics of getting the geometries of a geohash etc. I am just not sure how to get all the "sub-geohashes", e.g. by string operations. If there is a built-in function in PostGIS/PostgreSQL, it is even better. Thanks.

Related:

What is the precision of Geohash?