[postgis-users] Calculate the distance between a point and a line

Paul Ramsey pramsey at cleverelephant.ca
Wed Jan 6 08:54:09 PST 2021


Oh, perhaps your ways are already in mercator?

ST_Distance('SRID=4326;POINT(14.0007583 50.8379138)'::geography, st_transform(way,4326)::geography) as dist

> On Jan 6, 2021, at 8:38 AM, Luca Bertoncello <lucabert at lucabert.de> wrote:
> 
> Am 06.01.2021 um 16:50 schrieb Paul Ramsey:
>> ST_Distance('SRID=4326;POINT(14.0007583 50.8379138)'::geography, way::geography) as dist
> It does not work:
> 
> ERROR:  Only lon/lat coordinate systems are supported in geography.
> 
> What is it wrong?
> 
> Thanks
> Luca Bertoncello
> (lucabert at lucabert.de)
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users



More information about the postgis-users mailing list