==============
gpx2shp README
==============
Toshihiro Hiraoka 
1/5/2005

What's This
===========
  gpx2shp is a converter from GPX file to ESRI/shape file.
  gps2shp is also a converter from GPS device to shape file but it's not
stable yet.
  This is a output of Metro Manila Transit Map Project by JOCV (Japan
Overseas Cooperation Volunteers) program of JICA (Japan International
Cooperation Agency in 2004. It is provided you on GPL2.

Why I Made
==========
  It's easy. The software converts GPS data to shape file is too much
expensive! The cost is same as the one year salary of my co-worker here
in the Philippine. GIS is not for only rich countries.

How to Use
==========
- Basic
  There are three types of data on GPX that are waypoint, trkpoint and
route. gpx2shp converts the three data to separated files like below.
Please try to convert a sample file "pinatest2.gpx" in this archive.

    prompt> gpx2shp pinatest2.gpx
    prompt> ls
    pinatest2.gpx       (source gpx)     
    pinatest2_meta.txt  (meta data)
    pinatest2_rte.dbf   (route)	
    pinatest2_rte.shp   (route)
    pinatest2_rte.shx	(route)
    pinatest2_trk.dbf	(trackpoint)
    pinatest2_trk.shp	(trackpoint)
    pinatest2_trk.shx	(trackpoint)
    pinatest2_wpt.dbf	(waypoint)
    pinatest2_wpt.shp	(waypoint)
    pinatest2_wpt.shx	(waypoint)

  You can see 10 files after convertion. The shape format need 3 files
for discribing a map and gpx format has 3 types of data and metadata so
gpx2shp makes 10 of them. Route and track point data is converted as a
arc(path) data, waypoint data is converted into point data like the
table below.

    data type   | file name           | format
   -------------+---------------------+--------
    waypoint    | [basename]_wpt.*    | point
    track point | [basename]_trk.*    | arc
    route       | [basename]_rte.*    | arc
    meta data   | [basename]_meta.txt | text


- Convert only certain data
  You can convert only a certain type of data like only waypoint or
track point using option '-w' (waypoint), '-t' (trackpoint) or '-r'
(route).

    prompt> gpx2shp -r pinatest2.gpx
    prompt> ls
    pinatest2.gpx       (source gpx)     
    pinatest2_meta.txt  (meta data)
    pinatest2_rte.dbf   (route)	
    pinatest2_rte.shp   (route)
    pinatest2_rte.shx   (route)

- Convert path data to points and etc
  As default, track point and route data is converted as a arc data but
you can convert it other ways using option '-p'(convert as point) and
'-e' (as edge). The edge file has '_edg' in the filename and the point
file has '_pnt' in the filename.
 
    prompt> gpx2shp -p -e pinatest2.gpx
    prompt> ls
    pinatest2_meta.txt
    pinatest2_rte.dbf       (route path data)
    pinatest2_rte.shp
    pinatest2_rte.shx
    pinatest2_rte_edg.dbf   (route each edge)
    pinatest2_rte_edg.shp
    pinatest2_rte_edg.shx
    pinatest2_rte_pnt.dbf   (route each point)
    pinatest2_rte_pnt.shp
    pinatest2_rte_pnt.shx
    pinatest2_trk.dbf       (track path data)
    pinatest2_trk.shp
    pinatest2_trk.shx
    pinatest2_trk_edg.dbf   (track each each)
    pinatest2_trk_edg.shp
    pinatest2_trk_edg.shx
    pinatest2_trk_pnt.dbf   (track each point)
    pinatest2_trk_pnt.shp
    pinatest2_trk_pnt.shx
    pinatest2_wpt.dbf       (waypoint is always as point)
    pinatest2_wpt.shp
    pinatest2_wpt.shx

- Statistics
  If you add '-s' option you can see a conversion summery.

    prompt> gpx2shp -s pinatest2.gpx
    Track Points:
            track count:    4
            point count:    658
            total length:   156565.627989
            unconverted:    0( 0.00%)
    Routes:
            route count:    1
            point count:    323
            total length:   9258.618971
            unconverted:    0( 0.00%)
    Waypoints:
            point count:    118

- Noise reduction
  gpx2shp has several thresholds to reduct the noise path data. The
value can set as '--min-points', '--min-length' and '--min-time'. Please
try a example below.

    prompt> gpx2shp --min-points 6 -s pinatest2.gpx
    gpx2shp:../pinatest3.gpx:3962 track was not converted because of
    less then 6 points. (<- this path is not converted because the path
    has only 5 points)
    Track Points:
            track count:    3
            point count:    653
            total length:   156439.490642
            unconverted:    1(25.00%)
    Routes:
            route count:    1
            point count:    323
            total length:   9258.618971
            unconverted:    0( 0.00%)
    Waypoints:
            point count:    118


- Length and time units
  You can choose any length related units that are supported by proj4
for attribute table using 
    '--length-unit'		(for length column, default: m), 
    '--time-unit'		(for time column, default: sec), 
    '--speed-length-unit'	(for speed column, default: km),
    '--speed-time-unit'		(for speed column, default: hour) and
    '--length-ellipsoid'	(for length calculation, default: UGS84).
  You can see the supported units by 'geod -lu' and 'geod -le' command. 
  Supported time unit are 'sec', 'min', 'hour' and 'day'.  

- Other futures
  There are other futures in gpx2shp. Please check the option list using

    gpx2shp --help

Problem or Suggestion
=====================
Please let me know about your opinion in English or Japanese by e-mail.
    washitoshi at yahoo.co.jp
    http://gpx2shp.sourceforge.jp/

Acknowledgments
===============
NEDA (National Economic and Development Authority) Region IV-B office
	My generous counter part
Yoshio Tanaka
	My project leader
Petter Reinholdtsen
	Many support to develop this
Frank Warmerdam and the team
	shapelib and proj4

