Page 2 of 2   << first < 1 2
Bookmark this page: Add Latitude Longitude entry to Yahoo MyWeb Add Latitude Longitude entry to Google Bookmarks Add Latitude Longitude entry to Windows Live Add Latitude Longitude entry to Del.icio.us Digg Latitude Longitude entry! Add Latitude Longitude entry to Netscape
  •  
  • Subject
  • Author
  • Date
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Jacquelin Hardy on September 4, 2006, 7:27 pm
Chris W a écrit :

> I didn't think about checking out of range data but it is done now.
> Thanks for all the input. I will end up having probably 3 examples of
> how to enter the data but, I still want it to be as robust as reasonably
> possible. The way it is now as long as there is something other than a
> decimal point between the degrees, minutes and seconds, it should work.
> You can even have it like this 35Degrees 22Minutes 56.35Seconds North.
> The code looks for North or South, If it finds one of them, it sets the
> direction to either negative or positive, replaces all letters with
> spaces and then makes sure all double spaces are replaced with a single
> space. In the case above if you tried to abbreviate north and south as
> N or S, it would fail because there both an N and an S in the other
> text, so what it would do is not predictable. Anyway I think it is
> working pretty good now, unless someone comes up with something that
> isn't too odd ball, that I haven't thought of, I think it is done.
>
>
>
>
Did you thing of this one Chris ?

N53 ° 22 ' 17 '' W4 ° 15' 20''

Jacquelin H

Posted by Paul Cooper on September 5, 2006, 12:48 pm
On Mon, 04 Sep 2006 09:47:12 -0400, Jacquelin Hardy

>Chris W a écrit :
>> I am working on a web site that will require the entry of latitude
>> longitude coordinates. As you probably know there area lot of
>> different ways to format latitude and longitude. I have done my best to
>> make my code work no mater what format you use. If you have some time
>> and would like to try it, I want to know if anyone can break it. If you
>> do, please send me the data you used to break it, so I can figure out
>> why it broke and fix it. Below is the URL for the test. The web site
>> it is currently on is not the web site it is for, that is just where I
>> am doing the testing until I get a server set up for the new site.
>>
>> http://www.thewishzone.com/LatLonTest.php
>>
>> P.S. If anyone wants a copy of the code I wrote to do this, let me know
>> and I will email it to you.
>>
>>
>Hi Chris,
>Instead of trying to predict all user's possibilities to enter Lat &
>Long, why don't you choose yourself the most common possibilities and
>let the user choose one of these.
>Paul came up with ISO 6709:1983. There is also S-57 ENC notation where
>lat & long are multiplied by a million.
>And you have some GPS where you have DDDMM.mmm. There is no end to this.
>So be the one that decides !
>Like : DD.dddddd, DD MM.mmmmm, DD MM SS.ssss
>Then you just have to check the limit ranges, ie. +-90 for lat, +- 180
>for Long.
>HTH
>Jacquelin Hardy


I am afraid that the valid range for longitude isn't +/- 180. A lot of
people use 0-360 - especially prevalent in the Pacific nations, as it
moves the discontinuity to the other side of the world!

Paul

Posted by Jacquelin Hardy on September 8, 2006, 9:26 pm
Paul Cooper a écrit :
> On Mon, 04 Sep 2006 09:47:12 -0400, Jacquelin Hardy
>
>> Chris W a écrit :
>>> I am working on a web site that will require the entry of latitude
>>> longitude coordinates. As you probably know there area lot of
>>> different ways to format latitude and longitude. I have done my best to
>>> make my code work no mater what format you use. If you have some time
>>> and would like to try it, I want to know if anyone can break it. If you
>>> do, please send me the data you used to break it, so I can figure out
>>> why it broke and fix it. Below is the URL for the test. The web site
>>> it is currently on is not the web site it is for, that is just where I
>>> am doing the testing until I get a server set up for the new site.
>>> http://www.thewishzone.com/LatLonTest.php
>>> P.S. If anyone wants a copy of the code I wrote to do this, let me know
>>> and I will email it to you.
>> Hi Chris,
>> Instead of trying to predict all user's possibilities to enter Lat &
>> Long, why don't you choose yourself the most common possibilities and
>> let the user choose one of these.
>> Paul came up with ISO 6709:1983. There is also S-57 ENC notation where
>> lat & long are multiplied by a million.
>> And you have some GPS where you have DDDMM.mmm. There is no end to this.
>> So be the one that decides !
>> Like : DD.dddddd, DD MM.mmmmm, DD MM SS.ssss
>> Then you just have to check the limit ranges, ie. +-90 for lat, +- 180
>> for Long.
>> HTH
>> Jacquelin Hardy
>
>
> I am afraid that the valid range for longitude isn't +/- 180. A lot of
> people use 0-360 - especially prevalent in the Pacific nations, as it
> moves the discontinuity to the other side of the world!
>
> Paul
I don't want to start a debate Paul, but people that use a value greater
than 180 degrees for longitude are wrong. All books agree on longitude
definition, astronaviagtion, geography, GIS. These people mgiht not
believe that crossing the 180 meridian means changing of date.

Jacquelin H.

Posted by Paul Cooper on September 9, 2006, 4:14 pm

>>
>> I am afraid that the valid range for longitude isn't +/- 180. A lot of
>> people use 0-360 - especially prevalent in the Pacific nations, as it
>> moves the discontinuity to the other side of the world!
>>
>> Paul
>I don't want to start a debate Paul, but people that use a value greater
>than 180 degrees for longitude are wrong. All books agree on longitude
>definition, astronaviagtion, geography, GIS. These people mgiht not
>believe that crossing the 180 meridian means changing of date.
>Jacquelin H.

The use of 0-360 is perfectly standard and allowed for in the ISO
TC211 standards for GIS and in the EPSG CRS database - the standard
for GIS coordinate referencing. I was on the committee for ISO 19136
(GML) and was interested enough to check that it was an allowed range!
Indeed, NO constraint on the valid range of longitudes is specified in
general, though a particular CRS may specify a valid range. I work in
Antarctica with a wide range of colleagues and often come across the
use of 0-360 in many disciplines, such as meteorology. The use of
coordinates greater than +180 and less than -180 also has a use in
specifying bounding boxes for objects crossing the 180 line - I
remember long and arduous discussions on that one - I can't recall our
conclusion (look at the ISI 19136 or the corresponding OGC document
(GML 3.1 AFAIR) but it's around 750 pages), but there were several
possible solutions. And before you say "What objects crossing 180?"
I'll point out a continent about twice the size of Australia! Because
longitude is continuous (unlike the hard limits for latitude), the
actual range is relatively unimportant, and may be chosen for
convenience. The books on Geography and GIS you refer to are plain
wrong! Of course, the fact of the date line is important for
astronavigation. However, for Europe and North America, -180 - +180 is
convenient and this is probably the most widespread convention - but
other conventions are in widespread use and are allowed for in the
standards applied to GIS.

Paul

Posted by Paul Hirose on September 9, 2006, 4:14 pm

> I don't want to start a debate Paul, but people that use a value
> greater than 180 degrees for longitude are wrong. All books agree on
> longitude definition, astronaviagtion, geography, GIS. These people
> mgiht not believe that crossing the 180 meridian means changing of
> date.

Reply from a different "Paul" --

Geodetic longitudes measured eastward from 0 to 360 are used in
astronomy. See the list of observatories and their coordinates in the
back of the current Astronomical Almanac.

The Jet Propulsion Laboratory's HORIZONS online ephemeris
documentation says this about specifying site coordinates:

"Exceptions are the Earth, Moon and Sun where longitude has
historically been measured both east and west of the prime meridian 0
to 180 degrees. Though these bodies are direct rotators, longitude is
nonetheless measured positively to the east on this system, 0 to 360
degrees, due to historical precedence. If the positive west longitude
of a site on these 3 bodies is given, it should be input here as
positive east longitude, which would be (360 - West Longitude). If the
negative east longitude is given instead, for these exceptions only,
one can input the negative east longitude. It will be converted to a
positive east longitude on output, however."

http://ssd.jpl.nasa.gov/?horizons_doc#sitecoord

Right or wrong, the usage exists, and an app which rejects east
longitudes because they exceed 180 can be a pain in the butt to some
users. Felt that myself a few times.

--
To reply by email remove INVALID


Page 2 of 2   << first < 1 2