Here is a query:
SELECT ST_DistanceSpheroid(geometry(a.location), ST_GeomFromText('POINT(28.828042, 47.023565)', 4326), 'SPHEROID["WGS 84",6378137,298.257223563]')
FROM users a
WHERE a.id=1
I got this error:
ERROR: ОШИБКА: parse error - invalid geometry
HINT: "POINT(28.828042, 4" <-- parse error at position 18 within geometry
SQL state: XX000
Where did I make mistake??
CodePudding user response:
Well-known Text representations of points don't need a comma. Try this:
POINT(28.828042 47.023565)