NAME

ms2geofig -- working with geo-referenced fig files

SYNOPSIS

ms2geofig (-h|--help|--pod)

ms2geofig <action> (-h|--help)

ms2geofig <action> [<action arguments and options>]

GENERAL OPTIONS:

-h, --help

Show help message.

--pod

Show help message as POD template.

ACTIONS:

ms2geofig create -- create referenced fig file

ms2geofig add -- add geodata (tracks, waypoints, maps) to referenced fig file

ms2geofig del -- delete geodata to referenced fig file

ms2geofig get -- extract geodata from fig file

ms2geofig srtm -- add DEM data to referenced fig file

ms2geofig make_ref -- make fig reference using matching geodata

CREATE -- CREATE REFERENCED FIG FILE

SYNOPSIS

ms2vmap create [<options>] -o <output file>

Options for making reference:

--mkref <arg>

Choose map type (nom, google_tile, tms_tile, proj)

--name <arg>

Set map name. For --mkref="nom" it should contain a valid Soviet nomenclature name. For --mkref="file" it should contain map-file name.

--dpi <arg>

Map resolution, pixels per inch ("nom" and "proj" maps)

--mag <arg>

Map magnification ("nom" maps)

--north

Orient map to north ("nom" maps)

--margins <arg>

Map margins, pixels ("nom" and "proj" maps).

--top_margin <arg>

Override top margin value ("nom" and "proj" maps).

--left_margin <arg>

Override left margin value ("nom" and "proj" maps).

--right_margin <arg>

Override right margin value ("nom" and "proj" maps).

--bottom_margin <arg>

Override bottom margin value ("nom" and "proj" maps).

--zindex <arg>

Tile zindex ("*_tile" maps). Can be skipped if tile argument has the form [x,y,z]

--tiles <arg>

Tile or tile range ("*_tile" maps), [x,y], [x,y,z], or [x,y,w,h]

--coords <arg>

Figure in projection coordinates (rectangle or lines) to be covered by the map ("proj" maps). Figure can be a rectangle written as [x,y,w,h], or a line, [[x1,y1],[x2,y2], ...], or a multi-segment line, [<line>, <line>, ...].

--coords_wgs <arg>

Figure in wgs84 coordinates to be covered by the map ("*_tile" or "proj" maps), a rectangle, a line, or a multi-segment line.

--coords_file <arg>

Use tracks and points in the file to calculate map size ("*_tile" or "proj" maps).

--coords_nom <arg>

Use Soviet nomenclature name calculate map size ("*_tile" or "proj" maps).

--border <arg>

Map border in projection coordinates (For --mkref="proj" maps), a line or a multi-segment line.

--proj <arg>

Projection setting, "libproj" parameter string (e.g. "+datum=WGS84 +proj=lonlat") or mapsoft2 alias ("WGS", "WEB", "FI", "CH", "SU39", etc.).Default is WGS.

--scale <arg>

Map scale, projection units per map cm ("proj" maps). Default value is 0.01 degree/cm for degree projections, 1000m/cm for metric projections.

--border_wgs <arg>

Set map border in wgs84 coordinates (argument is a line or a multi-segment line).

--border_file <arg>

Set map border from track in a file.

Options for writing fig file:

-o, --out <arg>

Output file.

--fig_enc <arg>

Encoding for reading/writing fig files (default: KOI8-R). When reading utf8 files with a special comment (made by xfig>3.2.9) this option is ignored.

--ref_templ <arg>

Template for reference points (default: "2 1 0 4 4 7 1 -1 -1 0.000 0 1 -1 0 0").

--brd_templ <arg>

Template for border lines (default: "2 3 0 1 5 7 2 -1 -1 0.000 0 0 7 0 0").

EXAMPLES:

Create standard map n30-068 (1km at 1cm) as a FIG file: > ms2geofig create --mkref nom --name n30-068 -o n30-068.fig

ADD -- ADD GEODATA (TRACKS, WAYPOINTS, MAPS) TO REFERENCED FIG FILE

SYNOPSIS

ms2vmap add [<options>] <files> -o <output file>

Options for reading data:

--in_fmt <arg>

Geodata input format (json, gu, gpx, kml, kmz, ozi, zip).

--gu_enc <arg>

Garmin Utils format charset (default KOI8-R).

--ozi_enc <arg>

OziExplorer format charset (default Windows-1251).

Options for writing fig file:

-o, --out <arg>

Output file.

--fig_enc <arg>

Encoding for reading/writing fig files (default: KOI8-R). When reading utf8 files with a special comment (made by xfig>3.2.9) this option is ignored.

--raw

Convert tracks and points to fig as simple lines, without any additional information.

--trk_templ <arg>

Template for track lines (default: "2 1 0 1 1 7 7 0 -1 1 1 1 -1 0 0").

--wpt_templ <arg>

Template for waypoints (default: "2 1 0 2 0 7 6 0 -1 1 1 1 -1 0 0").

--txt_templ <arg>

Template for waypoint labels (default: "4 0 8 5 -1 18 6 0.0000 4").

--map_tsize <arg>

Tile size for raster maps (default 1024).

--map_depth <arg>

FIG depth for raster maps (default 500).

--map_marg <arg>

Margins for raster maps (pixels, default 50).

--map_dir <arg>

Directory for raster map tiles (default <filename>.img).

--map_smooth <arg>

Smooth map drawing, interpolation for small scales, averaging for large ones, (0|1, default - 0).

--map_clip_brd <arg>

Clip map to its border (default 1).

--map_draw_refs <arg>

Draw map reference points (ARGB color, default 0).

--map_draw_brd <arg>

Draw map border (ARGB color, default 0).

--map_fade <arg>

Color to fade the map (default is 0, no fading).

--map_min_sc <arg>

Min scale (<map pixels>/<image pixels>) (default is 0.1).

--map_max_sc <arg>

Max scale (<map pixels>/<image pixels>) (default is 10).

--map_def_col <arg>

Color to paint the map outside min_sc/max_sc (default is 0x80FF0000).

EXAMPLES:

Add track to the file: > ms2geofig add Current.gpx -o n30-068.fig

DEL -- DELETE GEODATA TO REFERENCED FIG FILE

SYNOPSIS

ms2vmap del [<options>] -o <output file>

Options for selecting data:

-W, --wpts

Delete waypoints.

-T, --trks

Delete tracks.

-M, --maps

Delete maps.

-A, --all

Delete waypoints, tracks, maps.

-R, --ref

Delete reference.

Options for writing fig file:

-o, --out <arg>

Output file.

--fig_enc <arg>

Encoding for reading/writing fig files (default: KOI8-R). When reading utf8 files with a special comment (made by xfig>3.2.9) this option is ignored.

GET -- EXTRACT GEODATA FROM FIG FILE

SYNOPSIS

ms2vmap get [<options>] <fig file> -o <output file>

Options for selecting data:

-W, --wpts

Get waypoints.

-T, --trks

Get tracks.

-M, --maps

Get maps.

-A, --all

Get waypoints, tracks, maps.

-R, --ref

Get fig reference.

Options for writing geodata file:

-o, --out <arg>

Output file.

--out_fmt <arg>

Geodata output format (json, gu, gpx, kml, kmz, ozi, zip).

--xml_compr <arg>

Compress XML output (GPX and KML formats), default 0.

--xml_indent <arg>

Use XML indentation (GPX and KML formats), default 1.

--xml_ind_str <arg>

XML indentation string (GPX and KML formats), default ' '.

--xml_qchar <arg>

XML quoting character (GPX and KML formats), default '''.

--gpx_write_rte <arg>

Write waypoint lists as routes (GPX format), default 0.

--json_sort_keys <arg>

Sort json objects by keys (GeoJSON format), default 1.

--json_compact <arg>

Write compact json (GeoJSON format), default 0.

--json_indent <arg>

Use json indentation (GeoJSON format), default 1.

--ozi_map_grid <arg>

Write map reference points in grid coordinates (OziExplorer format), default 0

--ozi_map_wgs <arg>

Always use wgs84 datum for map coordinates (OziExplorer format), default 0

--gu_enc <arg>

Garmin Utils format charset (default KOI8-R).

--ozi_enc <arg>

OziExplorer format charset (default Windows-1251).

SRTM -- ADD DEM DATA TO REFERENCED FIG FILE

SYNOPSIS

ms2vmap srtm [<options>] -o <output file>

Options for writing DEM data:

--srtm_dir <arg>

Set srtm data folder, default - $HOME/.srtm_data

--srtm_interp_holes <arg>

Interpolate holes (0|1, default 1).

--cnt <arg>

Make contours (default: 1)

--cnt_step <arg>

Contour step, m (default: 100)

--cnt_smult <arg>

Thick contour multiplier (default: 5, every 5th contour is thick)

--cnt_minpts <arg>

Min.number of points in a contour (default: 6)

--cnt_templ1 <arg>

FIG template for contours (default: 2 1 0 1 #D0B090 7 90 -1 -1 0.000 1 1 0 0 0)

--cnt_templ2 <arg>

FIG template for thick contours (default: 2 1 0 2 #D0B090 7 90 -1 -1 0.000 1 1 0 0 0)

--scnt <arg>

Make large slope contours (default: 1)

--scnt_minpts <arg>

Min.number of point in a slope contour (default: 5)

--scnt_val <arg>

Threshold value for slope contour (in degrees, default: 35)

--scnt_templ <arg>

FIG template for large slopes (default: 2 3 0 0 0 24 91 -1 20 0.000 0 0 -1 0 0)

--peaks <arg>

Make peaks points (default: 1)

--peaks_dh <arg>
DH parameter for peak finder [m], default - 20.
--peaks_ps <arg>
PS parameter fr peak finder [pts], default - 1000.
--peaks_templ <arg>

FIG template for peaks (default: 2 1 0 3 24 7 57 -1 -1 0.000 0 1 -1 0 0)

--replace

remove existing objects before adding new ones

Options for writing fig file:

-o, --out <arg>

Output file.

--fig_enc <arg>

Encoding for reading/writing fig files (default: KOI8-R). When reading utf8 files with a special comment (made by xfig>3.2.9) this option is ignored.

MAKE_REF -- MAKE FIG REFERENCE USING MATCHING GEODATA

SYNOPSIS

ms2vmap make_ref [<options>] <files> -o <output file>

Fig file should contain track or waypoint objects (lines or points with TRK <name> or WPT <name> comment) with same name as in the geodata. For each point of such data a reference point is added.

This can be used to make reference for a map: add raster image witn "MAP <name>" comment; optionally draw border with "BRD <name>" comment; draw a line through some points with "TRK <name1>" comment; somewhere else make a track through same points on a referenced map with <name1> name; do make_ref <track file> -o <fig file>; extract map reference from fig file using ms2geofig get -M <fig file> -o <map file>.

Options for reading data:

--in_fmt <arg>

Geodata input format (json, gu, gpx, kml, kmz, ozi, zip).

--gu_enc <arg>

Garmin Utils format charset (default KOI8-R).

--ozi_enc <arg>

OziExplorer format charset (default Windows-1251).

Options for writing fig file:

-o, --out <arg>

Output file.

--fig_enc <arg>

Encoding for reading/writing fig files (default: KOI8-R). When reading utf8 files with a special comment (made by xfig>3.2.9) this option is ignored.

AUTHOR

Vladislav Zavjalov <slazav@altlinux.org>

SEE ALSO