ENH: method to estimate UTM zone of a gdf
See original GitHub issuefollowing up on this conversation from awhile ago, I’m curious whether others would find it useful to have something like estimated_utm
as a property on a GeoDataFrame? (though i’m not picky about property/method/function/nomenclature)
For context, osmnx
has this nifty little function that guesses a gdf’s UTM zone using its geographic coordinates. Although it’s not perfect, it’s super handy when, say, iterating over several gdfs representing different parts of a large country (e.g. metro areas in the USA) and calculating something like the population density in each. It’s especially handy given that #1376 isnt available quite yet
i know a handful of packages that implement this function on their own, so seems like there would be a benefit to providing it in a central place like geopandas
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
👍
The next pyproj release depends on PROJ 7.2 https://github.com/pyproj4/pyproj/issues/689 which is due Nov 1 7.2 milestone. So, sometime after that.
@snowman2 Great! Any idea when the next release of pyproj with this PR will be out?
We can add a function estimating UTM zone CRS. So in the end you would do
df.to_crs(df.estimate_utm())
.One note implementation-wise - we should use
total_bounds
to get coordinates, that is way faster than unary_union.