Import GeoJSON


If GPS reception is lost, such as in an underground railway, a GPX track may show an unrealistic straight-line jump. Turbo GPX can hide that jump using Track Gap splitting, or correct the route by inserting additional GPX points.

You can add points individually using Map Edit, or import a GeoJSON file to supply the missing route geometry.

How to Use

  1. Open the Map window in Edit mode.
  2. Select Edit > File > Import GeoJSON.
  3. Choose a GeoJSON file.
  4. Review and edit the imported result in the map and edit list as needed.
  5. To apply the points to the Main window list, use Apply to GPX List.

Importing alone does not modify the Main window list.

Supported Files and Limitations

Turbo GPX imports GeoJSON files created or distributed by other tools. It supports Point features representing locations and LineString features representing roads, railways and other routes.

File Format

Supported Geometry

These geometry types are not imported:

GeoJSON that is not in FeatureCollection format cannot be imported.

Coordinates

Point and LineString coordinates are read in [longitude, latitude] or [longitude, latitude, elevation] order. When present, the third value becomes the GPX point elevation.

Longitude, latitude and elevation must be numeric values. LineString requires at least two points. Features with invalid coordinates are skipped.

properties

GeoJSON may be imported even if properties is missing or null. When Set Name is enabled, point or station names can be assigned to the GPX Label or Description.

GeoJSON represents geographical points, lines and shapes in a machine-readable JSON format.

File Size

Import Mode

Depending on the GeoJSON content, import uses Default or Railway mode. The chosen mode is shown in the import result.

Default

Used when the content is not recognized as railway data. Supported Point and LineString features are imported in feature order. The coordinate order within each LineString is preserved.

Railway

Used when the file contains both railway LineStrings and station Points.

Multiple railway LineStrings are connected into one route. Station Points are matched to this route within the configured Tolerance Distance.

Adjusting the Import

In Railway mode, station points and railway lines may be slightly offset. Matching uses Tolerance Distance, and the following options control processing:

In Default mode, Set Name can assign Point names to Label or Description.

Import Results

After importing, the result summary displays:

If Import Fails

Unsupported or invalid features are skipped. If valid Point or LineString features remain, they are imported.

Import stops with an error if:

Options

Configure these options on the Option tab of the Map window.

Item Description
Tolerance Distance Maximum distance used to match stations or other points to lines
Trim to Stations Restrict the route to a necessary section
Set Start/End Pins Place pins at the beginning and end
Set Name Choose where feature names are stored

For example, imported station locations may not lie exactly on the railway LineStrings. Tolerance Distance allows a small deviation. Trim to Stations removes sections outside the start and end stations when available. Set Start/End Pins marks the resulting endpoints.

Notes

GeoJSON and GPX Compared

Aspect GeoJSON GPX
Purpose General geographic data (points, lines, shapes) GPS logs and tracks
Data format JSON (FeatureCollection / Feature) XML (gpx / trk / trkpt)
Geometry Point, LineString, Polygon, etc. Track, Route and Waypoint
Attributes Flexible properties name, desc, extensions, etc.
Time Optional trkpt/time is commonly used
Elevation Optional third coordinate Standard ele element
Typical Uses GIS, cartography, roads, railways and boundaries Running, hiking and cycling logs

Creating GeoJSON

Visit overpass-turbo.eu and run this query:

[out:json][timeout:60];

area["name"="Roma"]["boundary"="administrative"]->.a;

(
  node(area.a)["railway"="station"]["name"="Ottaviano"];
  node(area.a)["railway"="station"]["name"="Manzoni"];

)->.stations;

rel(area.a)["route"="subway"]["ref"="A"]->.r;
way(r.r)->.tracks;

(.stations; .tracks;);
out geom;

Choose Export and select GeoJSON.

inserted by FC2 system