[Proj] Lambert Azimuthal Equal Area scale

Charles Karney charles.karney at sri.com
Wed Jun 10 17:27:28 EST 2015

I will record here the conventions for specifying latitude and longitude
used by GeographicLib.

When reading a geographic position, two strings are read together.  The
presence of a hemisphere designator (EWNS) on either string is enough to
determine which is latitude and which is longitude.  If designators
appear in both strings, then one must denote longitude and the other
latitude.  If designators appear in neither string, the first string is
treated as latitude.  One utility (and, with the next release, all the
utilities) accepts a -w flag to switch this last convention.  And this
same flag is used to specify the order of coordinates on output.

(proj and cs2cs have -r and -s flags.  These separately control the
input and output conventions.  Unlike GeographicLib, these conventions
also apply to projected, x-y, coordinates.)

Other things to note with GeographicLib (this is all implemented in the
DMS class):

* The hemisphere designators can appear at the beginning or end.
   (proj.4 allows them only at the end.)

* They can be combined with a sign; thus -10S and 10N are the same.
   (With cs2cs, -10S and 10S are the same.)

* Colons can be used as DMS separators, thus 10:20:5 is the same as
   10d20'5".  (This avoids dealing this the special behavior of ' and "
   in scripts.)

* Various unicode characters are accepted for degrees, minutes, and

On 06/10/15 15:01, Lourens Veen wrote:
> On 10/06/15 17:41, Lourens Veen wrote:
>> I'll check everything again tomorrow, this time with lon and lat in the
>> right order for invgeod to understand it correctly. I agree that geod
>> should be fixed, both geod and proj are libproj utilities, they should
>> correctly interpret each other's default output format.
> And on that note, would the proj maintainers accept a patch that adds a
> third parameter to dmstor(), an int* that when set to a non-NULL value
> will be an out parameter that is set to 0, 1 or 2 if the value read has
> no axis hint, is a longitude (eEwW postfix sign), or is a latitude (nNsS
> postfix sign) respectively?
> What would be your preferred behaviour for the geod tool? I don't think
> changing the default order to match proj's output would be good, because
> it would break existing software that puts latitude before longitude. So
> I would only add a check to see if the postfix sign indicators suggest
> that the first argument is a longitude, and just silently swap them so
> that you get the correct result.
> Alternatively, an error or warning could be generated instead of
> silently giving the correct answer, but I don't see the added value in that.
> Finally, do I send a patch to the mailing list or do you prefer a git
> pull request?
> Thanks,
> Lourens
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj

More information about the Proj mailing list