Access data within POINT

Options
I'm using the Google Distance Matrix to find out the driving distance between two points in my database records.

To do that, I need to format the latitudes and longitudes in a particular way within the query.

But I can't seem to easy access the lat or lng within a property with the point data type. The property is called point, so I've tried point.data.lat (because that's how it's formatted when I enter it and look at it on a table), but it throws an error.

So how do I get just the lat or just the lng out of a point data type property?

The data in a table:
[image.png]
How I'm inputting it into the function:
[image.png]
How that data is presented if I have the function simply return the input:

[image.png]

Comments

  • rob
    rob Member
    Options
     did you ever find a solution? I'm wondering the same thing.
  • I need to round my points to  ≤ 7 decimal points. Referencing data from my front end, and haven't been able to find this either. commenting in hopes to bump this.
  • Erin Wagner
    Options
      Thanks for your patience. I'm way behind on messages and just now getting to this.

    I have had to put my project on hold temporarily and it has been about 5 months since I last looked at it, but if I remember correctly, I didn't get this particular feature resolved.

     Any thoughts on how to get access the lat & long as individual data points?
  • rob
    rob Member
    Options
     I ended up chatting with support about this issue. 

    Me> I'd like to be able to extract the latitude and longitude from a function/api input type of geo_point.

    Support> Hi that isn't currently supported straight from the geo_point because it's entered in as a string. You could add it the database first then extract the lat and lng with dot notation or consider a different input method.

    Certainly not an ideal answer. It seems like the geo point data type isn't really as fleshed out as I thought it would be.