2018-04-03 09:53:18 +10:00
{
"name": "flip_coordinates",
"type": "function",
2020-07-02 01:46:48 +01:00
"groups": ["GeometryGroup"],
2018-04-03 09:53:18 +10:00
"description": "Returns a copy of the geometry with the x and y coordinates swapped. Useful for repairing geometries which have had their latitude and longitude values reversed.",
2022-01-07 08:33:29 -05:00
"arguments": [{
"arg": "geometry",
"description": "a geometry"
}],
"examples": [{
"expression": "geom_to_wkt(flip_coordinates(make_point(1, 2)))",
"returns": "'Point (2 1)'"
2023-04-03 17:33:33 +02:00
},{
2023-04-11 11:12:50 +10:00
"expression": "geom_to_wkt(flip_coordinates(geom_from_wkt('LineString(0 2, 1 0, 1 6)')))",
2023-04-03 17:33:33 +02:00
"returns": "'LineString (2 0, 0 1, 6 1)'"
2022-01-07 08:33:29 -05:00
}],
2022-01-11 11:17:49 -05:00
"tags": ["latitude", "longitude", "reversed", "swapped", "coordinates", "repairing", "copy"]
2018-04-03 09:53:18 +10:00
}