Ko:GPX

From OpenStreetMap Wiki
Jump to navigation Jump to search

GPX, or GPS exchange format, is an XML file format for storing coordinate data. It can store waypoints, tracks, and routes in a way that is easy to process and convert to other forms. All GPS data used by OpenStreetMap is converted to GPX format before it can be uploaded.

GPX 또는 GPS 교환 포맷은 좌표 데이터를 저장하기 위한 XML 파일 형식이다. 그것은 다른 형태로 처리하고 변환하기 쉬운 방법으로 웨이 포인트, 경로 및 노선을 저장할 수 있습니다. OpenStreetMap에서 사용하는 모든 GPS 데이터는 업로드 하려면 GPX 형식으로 변환되어야 한다.

Example

The following file extract shows an example of how a single waypoint (called 'LAGORETICO') and a series of track points are represented in the GPX file.

아래의 파일 추출물은 GPX 파일에서 표현되는 웨이 포인트(이름이 'LAGORETICO'라고 함) 및 일련의 트랙 포인트를 표현하는 방법의 한 예를 보여준다.

<?xml version="1.0" encoding="UTF-8"?>
<gpx
 xmlns="http://www.topografix.com/GPX/1/0"
 version="1.0">
  <name>Example gpx</name>
  <wpt lat="46.57638889" lon="8.89263889">
    <ele>2372</ele>
    <name>LAGORETICO</name>
  </wpt>
  <trk>
    <name>Example gpx</name><number>1</number>
    <trkseg>
      <trkpt lat="46.57608333" lon="8.89241667"><ele>2376</ele><time>2007-10-14T10:09:57Z</time></trkpt>
      <trkpt lat="46.57619444" lon="8.89252778"><ele>2375</ele><time>2007-10-14T10:10:52Z</time></trkpt>
      <trkpt lat="46.57641667" lon="8.89266667"><ele>2372</ele><time>2007-10-14T10:12:39Z</time></trkpt>
      <trkpt lat="46.57650000" lon="8.89280556"><ele>2373</ele><time>2007-10-14T10:13:12Z</time></trkpt>
      <trkpt lat="46.57638889" lon="8.89302778"><ele>2374</ele><time>2007-10-14T10:13:20Z</time></trkpt>
      <trkpt lat="46.57652778" lon="8.89322222"><ele>2375</ele><time>2007-10-14T10:13:48Z</time></trkpt>
      <trkpt lat="46.57661111" lon="8.89344444"><ele>2376</ele><time>2007-10-14T10:14:08Z</time></trkpt>
    </trkseg>
  </trk>
</gpx>

Troubleshooting

Why didn't my GPX file upload properly?

Your GPX should consist of trackpoints with valid timestamps. The ele(vation) tag is optional and will default to 0. Note if using a Garmin GPS device: Many of these units have the facility to save the track that strips out the timestamps. Saved tracks will fail to be imported to OSM because of this. Instead make sure you upload GPX files created from the active track(s) from the device rather than any tracks you have saved.

GPX는 유효한 타임 스탬프와 함께 트랙 포인트로 구성되어야 한다. 고도(ELEvation) 태그는 선택 사항이며 0으로 기본 설정됩니다. 가민 GPS 장치를 사용하는 경우: 이러한 장치의 대부분은 타임 스탬프를 떼어 내고 트랙을 저장하는 기능을 가지고있다. 이러면 저장된 트랙는 OSM로 가져올 수 없게 됩니다. 대신 사용자가 저장한 트랙보다 장치에서 활성 트랙(들)에서 생성된 GPX 파일을 업로드해야 합니다.

If you write software that creates GPX files, use a validator (e.g. [1]) with Schema validation to find potential problems. If you include an encoding tag, the value "UTF-8" is accepted, while "utf8" (no dash) isn't.

GPX 파일을 생성하는 소프트웨어로 작성한다면, '발리데이터'를 사용하라(예 :[2]) 스키마 유효성 검사는 잠재적 인 문제를 찾을 수 있습니다. 인코딩 태그가 포함 된 경우 "UTF-8"값을 허용합니다. "UTF8"(대시가 없는 경우)은 허용되지 않습니다,

The format for the gpx files as below is acceptable:

<?xml version="1.0"?>
<gpx
 xmlns="http://www.topografix.com/GPX/1/0"
 version="1.0"
 creator="GPSBabel - http://www.gpsbabel.org"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
  <time>2005-11-07T14:00:09Z</time>
  <trk>
    <name>ACTIVE LOG</name>
    <trkseg>
      <trkpt lat="52.564001083" lon="-1.826841831">
        <ele>115.976196</ele>
        <time>2005-11-07T12:03:31Z</time>
      </trkpt>
    </trkseg>
  </trk>
</gpx>

GPX 1.1 will also work:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<gpx
 xmlns="http://www.topografix.com/GPX/1/1"
 version="1.1"
 creator="EMTAC BTGPS Trine II DataLog Dump 1.0 - http://www.ayeltd.biz"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
  <metadata>
    <name>GPS Receiver track log</name>
    <desc>Tallinn (car)</desc>
    <author>
      <name>Michael Collinson</name>
      <email id="mikes" domain="ayeltd.biz" />
      <link href="http://www.ayeltd.biz"><text>AYE Ltd.</text></link>
    </author>
    <time>2007-10-02T09:22:06Z</time>
    <keywords>Estonia, Tallinn, A. Weizbergi</keywords>
    <bounds minlat="59.4367664166667" maxlat="59.4440920666666" minlon="24.74394385" maxlon="24.7971432"/>
  </metadata>
  <trk>
    <src>Logged by Michael Collinson using EMTAC BTGPS Trine II</src>
    <link href="http://www.ayeltd.biz"><text>AYE Ltd.</text></link>
    <trkseg>
      <trkpt lat="59.4408327" lon="24.74516185">
        <ele>44</ele>
        <time>2007-10-02T07:54:30Z</time>
        <fix>3d</fix>
        <hdop>300</hdop><vdop>300</vdop><pdop>300</pdop>
      </trkpt>
    </trkseg>
  </trk>
</gpx>

There are two things the importer won't do. First, it won't take in GPS points without timestamps as they're to be used to work out speed and so on. The other is that it doesn't import waypoints and your file consists only of waypoints. Opening and saving with [[3]GPX Editor] will solve some problems. It can attach fake timestamps (anonymize time) if your file lacks them.

가져오기가 되지 않는 두 가지 경우가 있다. 첫째, 타임 스탬프 없는 GPS 포인트는 적용되지 않습니다. 둘째, 웨이 포인트로만 구성되어 있는 파일은 가져오지 않는다는 것입니다. http://sourceforge.net/projects/gpxeditor 의 GPX Editor는 일부 문제를 해결할 수 있습니다. 이 링크는 파일에 가짜 타임 스탬프를 첨부 할 수 있습니다.

If you can't get your GPX with timestamps, you can use JOSM's EditGPX plugin, open your GPX file, click on the edit GPX tracks icon, choose your GPX file in the popup and then right click on the new GPX layer and convert it to a "GPX layer with anonymised time". Save this new GPX layer as a file and upload it to OSM.

타임 스탬프와 함께 GPX 파일을 얻을 수 없는 경우에, JOSM을 사용할 수 있습니다. GPX 파일을 열고 GPX 트랙 아이콘 편집을 클릭합니다 , 팝업에서 GPX 파일을 선택하고, GPX 레이어를 클릭하고 마우스 오른쪽을 클릭하여 "익명의 시간 GPX 레이어"에 그것을 변환합니다. 이 새로운 GPX 계층을 파일로 저장하고 OSM에 업로드합니다.

Alternative option for command line users (e.g. for a Bash shell on a GNU/Linux system):

xmlstarlet ed -N x=http://www.topografix.com/GPX/1/0 -N y=http://www.topografix.com/GPX/1/1 \
    -s '//x:trkpt|//y:trkpt' -t elem -n time -v 1970-01-01T00:00:00Z track.gpx > track-nulltime.gpx

The reason for this is that if you reset many GPS units or download map data to them, then you often get copyrighted data put in the GPX. The most famous example is that if you reset a Garmin GPS unit then it will put the locations of the Garmin offices around the world as waypoints on the unit.

이렇게 하는 이유는 당신이 많은 GPS 장치를 재설정하거나, 지도 데이터를 다운로드하는 경우, 당신은 GPX에 넣을 저작권이 있는 데이터를 얻을 수 있다는 것입니다. 가장 유명한 예는 가민 GPS 장치를 재설정하면 다음에 전 세계 가민 사무실의 위치를​​ 웨이 포인트로 넣을 수 있습니다.

Tracks will fail to upload if data formats are not correct, for example my GPS setup occasionally throws in a NaN as an elevation value. Deleting those lines from the file fixes the upload.

트랙(경로)는 데이터 형식이 올바르지 않은 경우 업로드 할 수 없습니다. 예를 들어, 내 GPS 설정이 때때로 고도 값이 NaN로 발생할 때, 파일에서 그 라인을 삭제하면 업로드를 해결합니다.

Another cause of problems is ampersands "&" within waypoint names - e.g.

<wpt lat="-20.089861" lon="57.511535"> <name>The Grand Mauritian resort & spa</name>

Won't work, giving a "Generic XML parse error" but:

<wpt lat="-20.089861" lon="57.511535"> <name>The Grand Mauritian resort and spa</name>

Will work fine.

Another reason for import failure may be on the server-side. Please consult the platform status page to see whether a technical problem is known that prevents even correct gpx files from being imported.

가져오기 장애에 대한 또 다른 이유는 서버 측 이상에 있을 수 있다. 그러면 Platform_Status|platform status page 에 문의하시기 바랍니다. 기술적인 문제로 가져오기가 되는 경우에도 올바른 GPX 파일을 방지하는 것으로 알려져있다. 여부를 확인하기 위해.

Why are the points on my tracks spaced out?

왜 내 트랙 포인트가 밖으로 떨어져 있나요?

This is due to the GPS device (usually a Garmin) being set to record on 'Auto', which saves space by recording fewer points on straights. It's not usually a problem in rural areas, but isn't much use for city mapping. To make the GPS record more points, go to the track settings menu on your GPS, and change the recording method to either 'Time', or 'Distance'.

이는 직선으로 좀 더 적은 지점을 기록하여 스토리지 공간을 절약 (일반적으로 가민기기에서)하려고 '자동'으로 기록을 설정하는 GPS 장치로 인해 기인한다. 이는 일반적으로 농촌 지역의 문제뿐 아니라, 도시 매핑에 더 많이 사용하지 않습니다. GPS 기록에 더 많은 포인트를 만들기 위해, GPS의 트랙 설정 메뉴로 이동하여, '시간' 또는 '거리'로 기록 방법을 변경하세요.

  • Time: Time will record points every 'x' seconds/minutes/hours. This can be changed on some GPS devices. Having this setting will use up the memory fast, but will increase the points considerably. The disadvantage of this method of saving is that when moving slowly with the GPS device the points will become densely packed. For example, many Garmin GPS's have a maximum tracklog capacity of 10,000 points. (Note that some devices also allow a log to be stored on a memory card in addition to the regular tracklog.) Setting a time interval of 1 second normally gives close to 3 hours of mapping (always a few points are not written due to errors and satellite availability). For fast road driving a 1 second interval gives very good trace information. The 1 second interval also works well for cycling in urban areas. For walking the rate can be decreased without loss of track definition to 2 or 3 seconds. The interval can also be increased when the mapping time needs to be extended but try to avoid unnecessary time intervals. You can change the time interval on the fly, useful if you decide to stay out longer than planned. If your GPS-Unit doesn't impose you serious restrictions on storage capability experienced mappers generally use a setting of 1 point/s to get best results in all mapping conditions. Some advantages of the time setting are that relative speed can be judged by the spacing, There are more points when you slow down for curves or turns and less on straightaways where you need fewer points.
  • Distance: Distance will record points every 'x' meters/yards. This can be changed on some GPS devices. Having this setting will use up the memory fast, although relative to your speed. The disadvantage of this method of saving is that when traveling on straight roads fast, (motorways/highways), unnecessary points will be recorded. Also if you are to be tracking a small area, if the 'x' value is too high, your route will be unclear. In general distance recording can miss the subtleties of curves and direction changes, especially in urban areas.
  • Wrapping: If the option is available to turn on, or off the wrapping function, then having it off is also advised. Having wrapping on means that when full, the GPS device will make room to record the latest section of your route, by deleting the beginning of your route. It will delete the beginning, point by point, at the same rate as new points are created. The exception would be when you are logging track data to a data card in some Garmin models. The beginning data will be deleted from the device's built in memory, but not from the data card.

How can I show my GPX track on an OpenStreetMap?

See track drawing websites. Also you may use other software; there are many which offer GPX displaying. For showing a GPX track for the purpose of editing OSM, see editing.

See also