[34] GPX は、GPS 測位で得た座標データの交換のための XML ベースのマーク付け言語です。この分野でのデファクト標準となっています。
[33] 近代的な意味の仕様書は存在しないようです。 XML Schema スキーマが提供されています。
[97] UTF-8 を使うのが普通なようです。それ以外の文字コードの利用例があるのかは不明で、 実装が対応しているのかも不明です。
[95] XML宣言は XML でも GPX でも必須ではありませんが、
実利用例を見ると含まれることが極めて多いです。
version
が 1.0
に、
encoding
が UTF-8 に指定される場合が多いです。
[96] standalone
が yes
や no
に指定されることもままあります。しかし DOCTYPE
が指定される例は見られず、 standalone
を no
に指定するのはおかしい。
[40] GPX の標準の語彙は、名前空間URL
http://www.topografix.com/GPX/1/1
で定義されています。拡張は他の名前空間を使うことがあります。
[62] GPX 1.0 時代の名前空間URL
http://www.topografix.com/GPX/1/0
が使われることもあります。
たまに見かけますが、どの程度流通しているのかは不明です。
[39] 文書要素として gpx
要素を使います >>37。
gpx
要素#✎[49] version
属性は必須です。値は 1.1
でなければなりません。 >>37
[99] この属性を見ている実装があるのかどうか不明です。
そもそも名前空間属性と意味がかぶっており、
何のために存在しているのかも不明です。
GPX を生成するソフトウェアは、念の為常に値 1.1
を設定するべきでしょう。 GPX を読み込むソフトウェアは、
常に無視するべきです。
[48] xsi:schemaLocation
属性が指定されることがよくあります。
[100] XML Schema での処理を想定したものですが、実際にはほとんど役に立ちません。 GPX を生成するソフトウェアは、無駄なだけなので、 この属性を設定するべきではありません。 GPX を読み込むソフトウェアは、 常に無視するべきです。
[42] 次のものを内容として含めることができます >>37。
[32] 公式な規定は無いみたいです。
[93] application/gpx+xml
を使うのが最も好ましそうです。
[90] GPX Parsing が処理方法を規定しています。
[101]
GPSロガーなどで記録した GPS による座標の時系列データと、
それに付随する各種情報 (心拍数、加速度など)
を交換するために用いられることが多いです。
これには trk
要素が用いられます。
[8] http://www.yamareco.com/modules/yamainfo/download-gpx.php?route_id=332
[10] http://latlonglab.yahoo.co.jp/route/get?id=8ef4df3bfb5dfa5870dca1867ce2833f&format=gpx
application/gpx; charset=UTF-8
[11] http://labs.coruscantconsulting.co.uk/garmin/gpxgmap/load.php?d=default&lang=en&elev=off&trk=off&o=gpx&cmt=off&desc=off&w=on&gdata=goo.gl%2Fmaps%2FTFxlI
application/gpx+xml; charset=utf8
[26] http://www.yamakei-online.com/cl_record/output_gps.php?id=55413&fid=1
[51] Google Maps dynamic GPX example ( 版) http://www.gpsvisualizer.com/examples/google_gpx.html
[52] stefanocudini/googletrace: Create and store online gpx traces over on Google Maps and OpenStreetMap Sat ( 版) https://github.com/stefanocudini/googletrace
[53] ultigpx/example1.gpx at master · Knio/ultigpx ( 版) https://github.com/Knio/ultigpx/blob/master/example1.gpx
[54] ultigpx/example2.gpx at master · Knio/ultigpx ( 版) https://github.com/Knio/ultigpx/blob/master/example2.gpx
[55] share-tracks/sentiero.catalupo.gpx at master · stefanocudini/share-tracks ( 版) https://github.com/stefanocudini/share-tracks/blob/master/gpxs/sentiero.catalupo.gpx
[56] share-tracks/chia.fosso.gpx at master · stefanocudini/share-tracks ( 版) https://github.com/stefanocudini/share-tracks/blob/master/gpxs/chia.fosso.gpx
[58] geotools-2.7.x/sample_gpx_file_01.gpx at master · boundlessgeo/geotools-2.7.x ( 版) https://github.com/boundlessgeo/geotools-2.7.x/blob/master/modules/unsupported/gpx2/test/org/geotools/gpx2/resources/sample_gpx_file_01.gpx
[59] geotools-2.7.x/sample_gpx_file_02.gpx at master · boundlessgeo/geotools-2.7.x ( 版) https://github.com/boundlessgeo/geotools-2.7.x/blob/master/modules/unsupported/gpx2/test/org/geotools/gpx2/resources/sample_gpx_file_02.gpx
[61] ( 版) http://www.ic.daito.ac.jp/~mizutani/gps/data/2013_aug26_toyara.gpx
MIME型なし
[66] http://www.routeyou.com/product/file/2062078.en
[67] ppl/ybaf.gpx at master · tonymorris/ppl ( 版) https://github.com/tonymorris/ppl/blob/master/ybaf.gpx
[68] geocache/GCXXXX.gpx at master · LinusU/geocache ( 版) https://github.com/LinusU/geocache/blob/master/GCXXXX.gpx
GPX 1.0 + 独自拡張
[70] django-gpxpy/test_track.gpx at master · PetrDlouhy/django-gpxpy ( 版) https://github.com/PetrDlouhy/django-gpxpy/blob/master/tests/test_data/test_track.gpx
[71] kalenji-gps-watch-reader/test/integrated at master · lincomatic/kalenji-gps-watch-reader ( 版) https://github.com/lincomatic/kalenji-gps-watch-reader/tree/master/test/integrated
[72] GPS/GPS/GPX at master · ratchasak/GPS ( 版) https://github.com/ratchasak/GPS/tree/master/GPS/GPX
xmlns
なし
[73] osmawalk/text/experiments at master · xtompok/osmawalk ( 版) https://github.com/xtompok/osmawalk/tree/master/text/experiments
[74] masterarbeit/1115401-0008.gpx at master · martinusdipobagio/masterarbeit ( 版) https://github.com/martinusdipobagio/masterarbeit/blob/master/agg2graph_martinus/test/raw-data/autobahn/1115401-0008.gpx
[75] masterarbeit/agg2graph_martinus/test/raw-data at master · martinusdipobagio/masterarbeit ( 版) https://github.com/martinusdipobagio/masterarbeit/tree/master/agg2graph_martinus/test/raw-data
[76] Farm-bbd/[unused] nesudeti at master · macke4ever/Farm-bbd ( 版) https://github.com/macke4ever/Farm-bbd/tree/master/%5Bunused%5D%20nesudeti
[77] TrainCollServer/TrainCollSimulator/src/main/resources/gpx/lodz-waw-lodz[2015-07-04] at master · jbentyn/TrainCollServer ( 版) https://github.com/jbentyn/TrainCollServer/tree/master/TrainCollSimulator/src/main/resources/gpx/lodz-waw-lodz%5B2015-07-04%5D
[78] monongalia-preston-wv-trail-maps/coopers-rock-state-forest/gpx at master · masneyb/monongalia-preston-wv-trail-maps ( 版) https://github.com/masneyb/monongalia-preston-wv-trail-maps/tree/master/coopers-rock-state-forest/gpx
[79] mapedit/GeopisteetVS.gpx at master · ekohalsti/mapedit ( 版) https://github.com/ekohalsti/mapedit/blob/master/editor/static/editor/jquery/GeopisteetVS.gpx
[80] TrackMap/app/src/main/assets at master · Flepsik/TrackMap ( 版) https://github.com/Flepsik/TrackMap/tree/master/app/src/main/assets
[81] iOSMapWorks/C.gpx at master · CoffeeRoom/iOSMapWorks ( 版) https://github.com/CoffeeRoom/iOSMapWorks/blob/master/src/TrailsAlpha%202/TrailsAlpha/C.gpx
[98]
http://api.openstreetmap.org/api/0.6/trackpoints?bbox=0,51.5,0.25,51.75&page=0
application/xml; charset=utf-8
<gpx version="1.0" creator="OpenStreetMap.org" xmlns="http://www.topografix.com/GPX/1/0">
[108] https://res.cloudinary.com/utmb-world/raw/upload/v1681323452/snowdonia/GPX%20Files/UTS_100_M_V5_6_41eb280377.gpx
日時が行ったり来たり。標高があったりなかったり。
[22] GPX の入出力に対応したネイティブアプリは多数あるようです。
[23] Webアプリケーションはそれほど多くないようです。
application/x-unknown; charset=utf-8
[15] http://www.ecoris.co.jp/contents/maptool.html
[64] GPX Aviation Waypoint Generation ( 版) http://navaid.com/GPX/
なお、カシミール3DではGPXファイルをXMLとしてパースして読み込んでいるわけではないようで、 空要素(
<trkpt lat="***" lon="***" />
)の形を認識できないため、<trkpt lat="***" lon="***"></trkpt>
の形に修正したものを出力しています。
GPXファイルでtrkpt要素が空の場合、
<trkpt lat=*** lon=*** />
と記述されているとカシミールで読み込んでもらえません。
<trkpt lat=*** lon=***></trkpt>
と置換すると正常に読み込めるのですが、
[82] 似たデータ形式として KML があります。 GPX の方が普及しているようですが、 Google Maps のように KML のみ対応している実装もあるので、 両方に対応している実装もいくつもあります。
NPGPX - the GPX plugin
NPGPX is a plugin that loads and displays GPX files directly in your browser window. It supports zooming and panning, as well as simple graphical settings. It should work with Mozilla and Mozilla-like browsers such as Firefox or Netscape.
GPX, or the GPS eXchange format, is an XML-based file format that is designed to store GPS data - waypoints, routes, and tracks. It is used by many GPS programs, for example Quantum GIS and GPSBabel. The specification of the GPX format, and other useful documentation, can be found here.
<EMBED TYPE="text/gpx" SRC="arjeplog04.gpx" WIDTH=350 HEIGHT=350
ALT="You don't have the NPGPX plugin!">
[3] GPX - Wikipedia ( 版) https://ja.wikipedia.org/wiki/GPX
The base version of GPX does not allow for the inclusion of heartrate, cadence, distance or temperature data. As a result, extensions to GPX were created and Strava supports the two most popular plus a general format. The extensions extend the <trkpt> tag to include extra attributes with each datapoint.
Garmin’s Track Point Extension v1
From the extensions available, Strava extracts:
atemp as temperature
hr as heartrate.
Cluetrust GPX extension
From the extensions available, Strava extracts:
cadence as cadence
distance as distance
hr as heartrate
temp as temperature.
Strava also detects general tags placed in the <extensions> tag of each <trkpt> tag. Strava extracts:
cadence as cadence
distance as distance
heartrate as heartrate
power as power.
[6] ( 版) http://www8.garmin.com/xmlschemas/TrackPointExtensionv1.xsd
[7] http://www.cluetrust.com/Schemas/gpxdata10.xsd
[12] Google Maps to GPX Converter (Sverrir Sigmundarson 著, 版) http://labs.coruscantconsulting.co.uk/garmin/gpxgmap/convert.php
無料・有料を含めて、GPXファイル(GPSロガーが保存するファイルタイプ)を表示するアプリを探してみたのですが、なんと、地図上に軌跡のみを表示するアプリは沢山有っても、任意の軌跡上の点の時刻を表示するものと、軌跡を始点から終点まで再生して辿ってくれるアプリが、殆ど無いこと!
結局、20以上のアプリをダウンロードし、数十ドルのお金を有料アプリに費やしました。
そして、もう諦めて、「これこそ、自分で自分の目的に合ったGPXビュアー・アプリを開発しなければならないか!?」と思っていたときに、やっと、それなりに自分の目的に叶うアプリを探し当てることが出来ました!
■ GPS Tracks/GPS Tracks HD (開発元:DMomeault)
それが、
● GPS Tracks、iPhone対応(iPad/iPad Miniでも使える) $0.99
● GPS Tracks HD、iPad/iPad Mini専用 $3.99
です。
ezTourはITM形式以外のデータを読み込めないのです。
しかし、山旅ロガーはITM形式でログを出力できないわけです。GPX形式とKML形式なら出力できるので、GPXとかKMLで出力してみたわけです。
山旅ロガーとezTourで生成したGPXファイルの中では見たことが無かったのですが、他のソフトで、一つの<trk></trk>タグの中に<trkseg></trkseg>タグが複数存在する場合が、有るよう
GPXファイルのspeedエレメントは「メートル/秒」で有ることが判明したので、時速に変換してから登録するようにした。
speedエレメントがない場合、座標と時刻から自力で速度を算出するように改良した。
[19] GPX2ITM コンバータ - GPXファイルをITMファイルに変換 ( 版) http://gpx2itm.kmake.net/
[20] Why not GPX? - OpenStreetMap Wiki ( 版) http://wiki.openstreetmap.org/wiki/Why_not_GPX%3F
[21] GPX - OpenStreetMap Wiki ( 版) http://wiki.openstreetmap.org/wiki/GPX
[25] JavaScript版 あしあとデータ to GPX コンバーター ( 版) http://cs88.awardspace.info/ashiato2gpx/
[27] GPX-POI file generator ( 版) http://gpx-poi.com/
I can see that results from pocket queries have Content-Type: application/gpx; - so we would probably need to register for both:
Content-Type: application/gpx;
Content-Type: application/gpx+xml;
It would be convenient if the Content-Type of GPX downloads was "application/gpx+xml" instead of "text/xml". This would match the media type defined for GPX on Wikipedia (http://en.wikipedia.org/wiki/GPS_eXchange_Format), and would allow better support for GPX-enabled applications to be selected automatically by the browser/operating-system when users click on download links.
For example on iPhone Safari will render text/xml documents itself rather than passing them off to an appropriate application. If the Content-Type was application/gpx+xml then Safari would search for an installed application that knew how to handle GPX files and allow the user to open the download in that app.
At first glance it looks like maybe Locus needs to register for the application/gpx+xml mime type (in addition to application/gpx)?
[31] add application/x-gpx+xml, application/x-osm+xml, application/x-esri-shape to the mime-type database | Review Request | Review Board ( 版) https://git.reviewboard.kde.org/r/106977/
[57] RouteConverter/gpx/src/main/doc at master · cpesch/RouteConverter ( 版) https://github.com/cpesch/RouteConverter/tree/master/gpx/src/main/doc
<gpx version="v1.1.5"
creator="iTravel Tech Inc. - http://www.itravel-tech.com"
Expat library supports reading the following built-in encodings :
US-ASCII
UTF-8
UTF-16
ISO-8859-1
OGR 1.8.0 adds supports for Windows-1252 encoding (for previous versions, altering the encoding mentioned in the XML header to ISO-8859-1 might work in some cases).
The content returned by OGR will be encoded in UTF-8, after the conversion from the encoding mentioned in the file header is.
A GPXM-file is a digital representation of the route you can create and see on RouteYou. GPXM is the format, based and compatible with GPX (GPS eXchange Format), but extended with a set of features to make full use of the content provided and created on RouteYou.
[69] GeoCache GPX Example.gpx ( 版) https://gist.github.com/ssx/619665
速さの値としてDESC要素とSPEED要素との関係であるが、DESC要素で表示されているm/hの表示は間違いでkm/hが正しい。SPEED要素の単位はm/sである。
文字コード
Shift_JIS
改行コード
LF
1行目
<?xml version="1.0"?>
自転車ツーリング中は事前にGoogle MapsとGMapToGPXで作っておいた走行ルートをGPXファイルにし、
AndroidのRMapsや地図ロイドに読み込ませて走行ルートを確認しているのだが、
GPXファイルに余分な要素があると、処理に時間がかかってしまう(あまりに重いと処理できないこともある)。
そこでtrkpt要素の子要素(eleやcmt、timeなど)を根こそぎ削除し、lat属性とlon属性のみを残すスクリプトを作成した。
また、[Mathematica] 折れ線を間引くのアルゴリズム(Douglas-Peucker)を用いて、GPSログ中のポイントを間引く機能も実装してみた。
[87] 轍 ONLINE - GPSログを写真付きで地図上に表示・共有するサービス ( ()) http://map.cyclekikou.net/
[88] Uploading GPS files without time information – Strava Support ( ()) https://support.strava.com/hc/en-us/articles/216917947-Uploading-GPS-files-without-time-information
[89] NeoRun 山行計画(GPX)編集マニュアル () https://go-wellness.epson.com/neo-run/contents/pdf/trek_gpx_manual.pdf
[91] Spatial Data on the Web IG F2F - Day 2/2 – 06 June 2018 () https://www.w3.org/2018/06/06-sdw-minutes.html#x14
[92] GPX Developers Forum - Yahoo Groups () https://groups.yahoo.com/neo/groups/gpsxml/conversations/messages/2386
[102] external/leaflet.elevation/spec/test.gpx · c97681e0a0df62d4b929a7bd5f3eb8c046fd8f47 · Diego Andrés Ramírez Aragón / BikeTracks · GitLab () https://repo.lowfill.com/dramirez/BikeTracks/blob/c97681e0a0df62d4b929a7bd5f3eb8c046fd8f47/external/leaflet.elevation/spec/test.gpx
[103] () https://howtotrailrun.salomon.com/medias/trail/330-trail-gpxdatas-iicss18_poland_krakw_10km.gpx
[104] Epson SF-810の心拍数をSportTracks3.1に読み込むためにGPXを編集した () https://thik.jp/jog/archives/epson-to-sporttracks-3
[105] トラックログ/GPXファイルの便利な活用方法。ナビゲーション、ネット活用、登山の振り返りが思いのままに! YAMAYA - ヤマケイオンライン / 山と渓谷社 () https://www.yamakei-online.com/yama-ya/detail.php?id=397