h2gis icon indicating copy to clipboard operation
h2gis copied to clipboard

ST_Transform does not find transformation

Open cdhermann opened this issue 3 years ago • 3 comments

Running the ST_Transform example from PostGIS

SELECT ST_AsText(ST_Transform(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
	743265 2967450,743265.625 2967416,743238 2967416))',2249),4326)) As wgs_geom;

on h2gis v2.0.0 returns:

 "ST_Transform(conn4: url=jdbc:default:connection user=, POLYGON ((743238 2967416, 743238 2967450, 743265 2967450, 743265.625 2967416, 743238 2967416)), 4326): No transformation found from epsg:2249 to epsg:4326"
Exception calling user-defined function: "ST_Transform(conn4: url=jdbc:default:connection user=, POLYGON ((743238 2967416, 743238 2967450, 743265 2967450, 743265.625 2967416, 743238 2967416)), 4326): No transformation found from epsg:2249 to epsg:4326"; SQL statement:
SELECT ST_AsText(ST_Transform(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
    743265 2967450,743265.625 2967416,743238 2967416))',2249),4326)) As wgs_geom [90105-197] 90105/90105

cdhermann avatar Jan 28 '22 17:01 cdhermann

Thanks for reporting.

To be checked on CTS side

ebocher avatar Feb 07 '22 10:02 ebocher

@ebocher this behavior is also found on v1 DB.

As outlined in https://groups.google.com/g/h2-database/c/kR10UNaGs00, doing the transformation from an Austrian EPSG reference system to EPSG 4326 is possible with CTS using just the CTS java imports of the H2GIS db. In the H2GIS DB itself, it is not possible.

cdhermann avatar Feb 07 '22 11:02 cdhermann

Thanks @cdhermann We will check where this bug appears.

ebocher avatar Apr 29 '22 12:04 ebocher