3275
MySQLERRORNotableGIS / GeometryHIGH confidence

ST_Transform target CRS is not geographic

Production Risk

Medium — transformation fails; use correct geographic SRID.

How to reproduce
trigger — this will error
trigger — this will error
SELECT ST_Transform(ST_GeomFromText('POINT(139.7 35.7)', 4326), 0);

expected output

ERROR 3275 (HY000): ST_Transform target SRS is not geographic.

Fix

Use a geographic target SRID

Use a geographic target SRID
SELECT ST_AsText(ST_Transform(ST_GeomFromText('POINT(139.7 35.7)', 4326), 4269));

Why this works

SRID 4269 (NAD83) is another geographic SRS that can serve as a target.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3275 ER_TRANSFORM_TARGET_CRS_NOT_GEOGRAPHIC

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors