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
This issue came up in Rasters where Proj segfaults when attempting to create a CRS transformation: rafaqz/Rasters.jl#895
MWE:
using Proj, GeoFormatTypes
crs_string ="LOCAL_CS[\"unnamed\",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]"
crs =WellKnownText(GeoFormatTypes.CRS(), crs_string)
transform = Proj.Transformation(crs, EPSG(4326)) # works, but show errors
transform.pj ===C_NULL# true
Proj.Transformation(crs, EPSG(4326); always_xy =true) # segfaults!!
This is a CRS that is valid but cannot be transformed (according to @evetion), Proj.Transformation returns a null pointer, and if always_xy is set to true, normalize_axis_order! is called on it, which causes the segfault.
Probably Proj should just error instead of returning a null string, similar to ArchGDAL:
using ArchGDAL
gdalcrs = ArchGDAL.importCRS(crs)
target = ArchGDAL.importEPSG(4326)
ArchGDAL.createcoordtrans(gdalcrs, target) do transform end
This issue came up in Rasters where Proj segfaults when attempting to create a CRS transformation: rafaqz/Rasters.jl#895
MWE:
This is a CRS that is valid but cannot be transformed (according to @evetion),
Proj.Transformation
returns a null pointer, and if always_xy is set to true,normalize_axis_order!
is called on it, which causes the segfault.Probably Proj should just error instead of returning a null string, similar to ArchGDAL:
The text was updated successfully, but these errors were encountered: