You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kia ora! I realize this library is still young but just had a question on using rHEALPix as a sortable polygon "geohash". I've been looking for a way to consistently index/name some polygon features (whose outlines can change slightly over time), and tried using the rhealpixdggs.conversion.get_finest_containing_cell added in #12, but it doesn't seem to work for some of the polygons I've tried.
importgeopandasasgpdimportrhealpixdggs.conversiongdf: gpd.GeoDataFrame=gpd.read_file(filename="lakeconway.geojson")
polygon: shapely.geometry.Polygon=gdf.loc[0].geometryrhealpixdggs.conversion.get_finest_containing_cell(polygon=polygon)
# returns None instead of string like S1234567
Sample polygon is lakeconway.geojson.zip (using EPSG:4326). This is a location rather close to the South Pole (about Lat: 84.°S, Lon: 150°W). My question is whether rHEALPix-py is able to handle polar projections with some tweaking, or if there are some inherent limitations with the system.
The text was updated successfully, but these errors were encountered:
Hello, we can collaborate with the "binary Geohash", as described for example in this article https://mmcloughlin.com/posts/geohash-assembly PS: is possible to adapt to binary, the neighbours operations are also fast and non-geometrical operations, as demonstrated here.
Ideally, we would also like to use PostgreSQL/PostGIS instead of Python. With PostGIS we can use PROJ's rHEALPix by registered SRID for inverse.
Binary Geohash and human representations
Other bases, in addition to the classic Geohash base32, can be used to express the cell identifier as a geocode, see for example base32nvu or base16h at this interactive illustration:
So, we can use a system of square grids with ~23 hierarchical levels, very useful for multifunctional applications.
For a complete, bit by bit cell representation... We can duplicate the number of hierarchical levels (~45) using the "degenerated grid" (rectangular), to express base32 and to quadtree applications:
Any "integer level", with indexes i, can be transformed into a "half level" with indexes j:
PS: the transformation is valid also for Hilbert curves, so is possible to express a "Hilbert Geohash", when application need continuous intervals — and the application is not concerned with aperiodicity in the degenerated grid.
Practical example of the use of the binary Geohash encode, with PostgreSQL in bigint (64 bits integer) or varbit type, and translating it to humans with base16h, for a postal address point in Brasil, national grid:
Kia ora! I realize this library is still young but just had a question on using rHEALPix as a sortable polygon "geohash". I've been looking for a way to consistently index/name some polygon features (whose outlines can change slightly over time), and tried using the
rhealpixdggs.conversion.get_finest_containing_cell
added in #12, but it doesn't seem to work for some of the polygons I've tried.Sample polygon is lakeconway.geojson.zip (using EPSG:4326). This is a location rather close to the South Pole (about Lat: 84.°S, Lon: 150°W). My question is whether rHEALPix-py is able to handle polar projections with some tweaking, or if there are some inherent limitations with the system.
The text was updated successfully, but these errors were encountered: