geocode2lat, geocode2lon

geocode2lat(geocode)
  geocode2lon(geocode)

The geocode2lat and geocode2lon functions decode a geocode into a latitude or longitude coordinate, respectively. The returned coordinate is in the decimal degrees format. In version 5.01.1193955804 20071101 and later, an invalid geocode value (e.g. -1) will return NaN (Not a Number).

If you want DDDMMSS "degrees minutes seconds" (DMS) format, you can use dec2dms to convert it.


EXAMPLE

select city, geocode2lat(geocode), geocode2lon(geocode) from geotest;


CAVEATS
As with latlon2geocode, the geocode value is platform-dependent in accuracy and format, so it should not be copied across platforms, and the returned coordinates from geocode2lat and geocode2lon may differ up to about half a minute from the original coordinates (due to the finite resolution of a long). In version 5.01.1193955804 20071101 and later, an invalid geocode value (e.g. -1) will return NaN (Not a Number).


SEE ALSO
latlon2geocode


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.