NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi,

I am trying to write a small tool but I am more and more confused. What is the correct (or the best) way to present the result coordinates? LatLon or LonLat? Seems every application decides for itself.

OSM GPS Planet ->latlon

Polygon File (*.poly) ->lonlat

Garmin CSV ->lonlat

OGR (csv) ->LatLon

KML ->LonLat

ISO 6709 ->LatLon

Basic coordinate system (xy) ->lonlat

asked 30 Apr '12, 10:41

SunCobalt's gravatar image

SunCobalt
15112
accept rate: 0%


Stuff that deals with latitude and longitude exclusively tends to list latitude first, then longitude.

Stuff that deals with some abstract sort of coordinates, which might be latitude and longitude but could also be any kind of projected x/y, tends to list longitude first, then latitude.

For specifying bounding boxes, most programs use the sequence west-south-east-north, or minlon-minlat-maxlon-maxlat but even that is not always the same.

permanent link

answered 30 Apr '12, 10:54

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

The only thing worse then no standard is two standards that is indistinguishable. Just be sure that you document what way you use. I prefer latlon because it is an iso standard and the tools I use tend to use that format, but there are no real advantages to using one over the other.

If you are writing a tool that is taking input from or output to programs with unknown order make sure to add an option to swap the coordinates.

permanent link

answered 30 Apr '12, 10:58

Gnonthgol's gravatar image

Gnonthgol ♦
13.8k16103198
accept rate: 16%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×144
×6
×1

question asked: 30 Apr '12, 10:41

question was seen: 5,449 times

last updated: 30 Apr '12, 10:58

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum