TransWikia.com

POSTGIS Join tables on ST_ClosestPoint

Geographic Information Systems Asked by Joost Döbken on January 8, 2021

In an attempt to join two rasters with a very small offset, the join on ST_ClosestPoint geometry column is logical to me:

SELECT s.geom, s.val, c.val
FROM s
JOIN c ON ST_ClosestPoint(s.geom , c.geom) = s.geom

But this does not return any results.

(PostGIS v2.2.1 and PostgreSQL v9.5)

One Answer

ST_ClosestPoint returns an actual point, not a boolean as would be needed for a JOIN.

See also PostGIS: ST_ClosestPoint join error

Answered by bugmenot123 on January 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP