TMG-L Archives
Archiver > TMG > 2011-02 > 1297735202
From: "John Cardinal" <>
Subject: Re: [TMG] Latitude and Longitude Conversion
Date: Mon, 14 Feb 2011 21:00:02 -0500
In-Reply-To: <4D59D184.2080708@gmail.com>
Rick Van Dusen wrote:
> As you understand it, what exactly will TMG v8 do with this field:
>
> 1. Accept decimal entries without rounding to integer seconds?
> 2. Display decimal values if they're entered that way?
> 3. Display values as DD MM SS, but with SS non-integer?
Rick,
Those questions don't make sense to me given the prior discussion. I'll tell
you what I know about the LatLong field in TMG and perhaps you can answer
your own questions from that information.
If you enter text in the TMG LatLong field and TMG recognizes it as a valid
lat/long value, TMG will convert the value to its LatLong format. I do not
know all the formats that TMG will recognize, but I know it accepts decimal
degrees ("42.346351,-71.097615") and converts to its format.
The TMG format is ddmmss[N|S]dddmmss[E|W] where all the values (dd, mm, ss,
etc.) are two-digit integers except for the longitude degrees, which is
three digits ("ddd"). [N|S] and [E|W] represent one direction character
each, N or S for latitude and E or W for longitude. An example of the TMG
lat/long format is "361609N0823629W".
Because the format requires integers, TMG cannot record fractional seconds.
That is the heart of the issue.
If TMG does not recognize the text you enter as a valid lat/long value, then
it will warn you that the text is "not a recognized latitude/longitude
value", but it will let you store the text in the LatLong field anyway. It
will not treat the text as a lat/long value, and so some functionality is
lost, at least for the time being.
During the development of the Second Site map feature in the fall of 2008, I
determined that the TMG format was not precise enough for all the locations
that SS users might want to add to maps. I discovered that I could alter the
decimal degrees format slightly and TMG would leave the value alone.
Specifically, I changed the comma between the values to a tilde, and after
doing so, TMG would store the text as entered. For example, I could not
enter "42.346351,-71.097615" (it would be converted to a less precise
value), but I could enter "42.346351~-71.097615".
I chose the tilde because some mapping services use that as a separator in
place of the comma, so there was some (slight) precendent for using it.
The tilde format provided an opening: SS could treat the field differently
than TMG in that it would recognize the text as a lat/long pair and convert
it to the format required by whichever mapping service (Google, Bing, etc.)
the user chose for their SS map(s).
The tilde format solved the problem for the moment, but it was a bit of a
hack and it relied on behavior in TMG that might change in the future. I was
reluctant to recommend it to SS users if there was a possibility that some
future version of TMG would alter the values. I told Wholly Genes what I was
planning, and asked that (at minimum) future versions of TMG would not
disturb the tilde-formatted values unless it was to convert the value to a
new internal format that would not lose precision. Wholly Genes responded
positively, and gave me permission to tell people. Many SS users now record
lat/long values using the tilde format.
John
This thread:
| Re: [TMG] Latitude and Longitude Conversion by "John Cardinal" <> |