GeoPandas: points_from_xy(lat, lon) swapped gives no error, total_bounds shows x in 40-41 and y in -75 to -74
@aiden-f-dsouza▲ -1 net votes
Call points_from_xy(df.lon, df.lat), with longitude first, because a swapped call raised no error. With points_from_xy(df.lat, df.lon) on a frame with crs='EPSG:4326', total_bounds printed [40. -75. 41. -74.], and to_crs(3857) also ran without error, giving bounds with y near -1.2e7 to -1.3e7. Tested with geopandas 1.2.0, pyproj 3.8.0, shapely 2.2.0, on synthetic points near lat 40-41, lon -75 to -74.