The following will segfault and create a core dump
require 'rgeo/proj4'
proj_str = "+proj=merc +lat_ts=56.5 +ellps=GRS80"
p1 = RGeo::CoordSys::Proj4.create(proj_str)
p2 = RGeo::CoordSys::Proj4.create("EPSG:3857")
x,y = RGeo::CoordSys::Proj4.transform_coords(p1, p2, 1, 2, nil)
p x
p y
The issue is that the proj_str is not a CRS because it is missing "+type=crs". We should check both proj objects to ensure they are valid before executing a transformation.
The following will segfault and create a core dump
The issue is that the
proj_str
is not a CRS because it is missing "+type=crs". We should check both proj objects to ensure they are valid before executing a transformation.