Last modified: 2013-02-13 12:21:33 UTC
On dewiki we use the coordinate template also for globe=mars (for example) and want using the parser function #coordinates also for this. The german template allows decimal numbers as parameter, but #coordinates gives a error for that. For [[Eberswalde (crater)]] the coordinates are 24°S 33°W Using coordinates with the abbr works: {{#coordinates:24|S|33|W|globe=mars}} But not with decimal numbers: {{#coordinates:-24|-33|globe=mars}} Message: {{#coordinates:}}: invalid longitude In my opinion the problem is not respecting wrap = true in this statement: if ( !is_numeric( $part ) || $part < $min || $part > $max ) { return false; } in GeoData.body.php::parseOneCoord. $part is -33, and $min is 0, that will give true and the longitude is "wrong"
Per IAU conventions (<http://planetarynames.wr.usgs.gov/TargetCoordinates>), the coordinates on Mars should be in the range of 0-360. While wrapping is easy, I decided to trigger errors in such situations because we ultimately do this for humans and humans are much less good at wrapping coordinates on the fly than machines. This way, we help detect and fix these issues. As of East/West on Mars, it's really tricky: even the aforementioned page lists two standards with contradictory E/W signs. I guess it's still a bug as West should be negative.
(In reply to comment #1) > Per IAU conventions (<http://planetarynames.wr.usgs.gov/TargetCoordinates>), > the coordinates on Mars should be in the range of 0-360. While wrapping is > easy, I decided to trigger errors in such situations because we ultimately > do this for humans and humans are much less good at wrapping coordinates on > the fly than machines. This way, we help detect and fix these issues. But why the english wikipedia article shows the coordinates as 24°S 33°W, when it should be 24°S 327°E? The user added that to the infobox choosed this format explict, sounds not like a error for me. I have only seen that this gives a problem, so I have no idea and no opinion on the "right" thing here.