+ Start a Discussion
asadim2asadim2 

Geolocation decimals

I don't understand how we can store Geolocation values that are not in degrees (i.e. different spatial reference) in SF. Seems like the 2 available sub-types for Geolocation fields are the same. I thought choosing Decimal would allow for non-degree values, but it doesn't work.

To make the problem less technical, how can I enter 665679.879932 as latitude in SF?

Thanks.
Ashish_SFDCAshish_SFDC
Hi , 


See the links below, 

http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_geolocate.htm

https://developer.salesforce.com/blogs/developer-relations/2012/10/winter-13-using-apex-and-soql-with-geolocation.html


Regards,
Ashish
AshwaniAshwani
asadim2,

Geolocation is a compound field to store these decimal type values you need to reference geolocation filed like:

Suppose Location__c is a geolocation type field
then you can store/gety longitude and latitude as location__longitude__s and location__latitude__s
asadim2asadim2
I know all this -and that was not my question. Thanks anyway!
AshwaniAshwani
I understood the issue. Yes, you are correct decimal meant for degree only.  However, can't you convert these value in degree from that type. If you let me know which format you have in decimal form then I could help in converting them.