Skip to main content
Became Hot Network Question
edited tags
Link
geozelot
  • 30.9k
  • 4
  • 34
  • 57
Source Link
analyst92
  • 879
  • 2
  • 8

converting geometry of SRID 0 to geography

My geometry columns have SRID of 0. Can I simply convert them to geography as such:

routes.geom::geography <-> pc.geom::geography as distance

in order to get "distance" in metres?

P.S - "routes.geom" is a linestring column, and "pc.geom" is a point column.

here is a snippet of how it is used, (extracted from my main query):

    FROM point_center as pc
    
    CROSS JOIN LATERAL (
      SELECT routes.id_num, routes.geom::geography <-> pc.geom::geography AS dist