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
frompyprojimportCRS, Transformerfrompyproj.aoiimportAreaOfInterestfrompyproj.databaseimportquery_utm_crs_infodefbroken(lat, lon):
aoi=AreaOfInterest(
west_lon_degree=lon,
south_lat_degree=lat,
east_lon_degree=lon,
north_lat_degree=lat,
)
utm_crs_list=query_utm_crs_info(
datum_name="WGS 84",
area_of_interest=aoi,
)
utm_crs=CRS.from_epsg(utm_crs_list[0].code)
returnTransformer.from_crs(CRS("WGS 84"), utm_crs, area_of_interest=aoi)
defworking(lat, lon):
aoi=AreaOfInterest(
west_lon_degree=lon,
south_lat_degree=lat,
east_lon_degree=lon+1e-8,
north_lat_degree=lat+1e-8,
)
utm_crs_list=query_utm_crs_info(
datum_name="WGS 84",
area_of_interest=aoi,
)
utm_crs=CRS.from_epsg(utm_crs_list[0].code)
returnTransformer.from_crs(CRS("WGS 84"), utm_crs, area_of_interest=aoi)
lat, lon=42.032974, -93.581543working(lat, lon)
# worked in 3.4.1, broken in 3.5.0 and 3.6.0# throws pyproj.exceptions.ProjError: Error creating Transformer from CRS.broken(lat, lon)
Problem description
An area of interest with 0 area (i.e. east/west and/or north/south coordinates the same) causes some internal exception when passed to Transformer.from_crs. Enlarging the area even negligibly results in the operation working properly.
A zero-size area should still technically be valid. Both variants do work without crashing in v3.4.1.
Expected Output
A 0 area of interest should work and produce a Transformer object.
Code Sample, a copy-pastable example if possible
Problem description
An area of interest with 0 area (i.e. east/west and/or north/south coordinates the same) causes some internal exception when passed to
Transformer.from_crs
. Enlarging the area even negligibly results in the operation working properly.A zero-size area should still technically be valid. Both variants do work without crashing in v3.4.1.
Expected Output
A 0 area of interest should work and produce a Transformer object.
Environment Information
Installation method
nixpkgs built from source
The text was updated successfully, but these errors were encountered: