Extract lat/lon from geography (point)

Answered

Is there a way to extract lat/lon from a geography (point, in this case)? I'm getting a geo point as an input into an endpoint and want to use the lat/lng in a distance calculation, but the distance calculation only accepts decimal values, and thus I must extract lat/lng from the input.

In this case using GET data GET lat yields nothing, and storing the input as a variable in the debugger appears to return a PostGIS data type (POINT(lat lng)), where nothing can be extracted.

Converting to text and doing a substring isn't ideal.

Is there any ST_X/ST_Y PostGIS equivalent given it looks like the geography point data type is being used here?

5 replies