Skip to content

Containment with cap cells #13

@weiji14

Description

@weiji14

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.

import geopandas as gpd
import rhealpixdggs.conversion

gdf: gpd.GeoDataFrame = gpd.read_file(filename="lakeconway.geojson")
polygon: shapely.geometry.Polygon = gdf.loc[0].geometry

rhealpixdggs.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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions