ms2render(1)
| ms2render(1) | mapsoft2 | ms2render(1) |
NAME
ms2render -- render geodata, srtm, raster and vector maps
SYNOPSIS
ms2render <options> <input files> -o <output file>
DESCRIPTION
ms2render produce images with raster maps, tracks, waypoints, srtm data. Supported formats: jpeg, png, gif, tiff, ps, pdf, svg. Format is selected by output file extension or by --out_fmt option. Option --map can be used to save map reference for the image (OziExplorer or mapsoft2-specific geojson format.
Reference for the image should be specified. If --mkref option exists then it is created from options. If not, then reference of the first map is used, or it is set to some default value.
GENERAL OPTIONS
- -h, --help
- Show help message.
- -o, --out <arg>
- Output file.
- --pod
- Show help message as POD template.
- -v, --verbose
- Be verbose.
GEODATA INPUT/OUTPUT OPTIONS
- --in_fmt <arg>
- Geodata input format (json, gu, gpx, kml, kmz, ozi, zip, mbtiles).
- --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).
OPTIONS FOR MAKING MAP REFERENCE
- --mkref <arg>
- Choose map type (nom, nom_fi, google_tile, tms_tile, proj, file)
- --name <arg>
- Set map name. For nom and nom_fi maps it should contain a valid nomenclature name. For --mkref="file" it should contain map-file name.
- --dpi <arg>
- Map resolution, pixels per inch (nom, nom_fi and proj maps)
- --north
- Orient map to north (nom and nom_fi 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.
- --mag <arg>
- 1. Map magnification (with --mkref nom)2. When using existing map as a reference source, rescale it.
- --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 RENDERING TRACKS
- --trk_draw_mode <arg>
- Track drawing mode (normal, speed, height, default - normal).
- --trk_draw_transp <arg>
- Use transparent color (0..1, default - 0.5).
- --trk_draw_dots <arg>
- Draw dots (for normal drawing mode), default: 1.
- --trk_draw_width <arg>
- Track width factor, default: 3px.
- --trk_draw_smin <arg>
- Min value for speed mode [km/h].
- --trk_draw_smax <arg>
- Max value for speed mode [km/h].
- --trk_draw_hmin <arg>
- Min value for height mode [m].
- --trk_draw_hmax <arg>
- Max value for height mode [m].
- --trk_draw_grad <arg>
- Color gradient (for speed or height modes), default: BCGYRM.
OPTIONS FOR RENDERING WAYPOINTS
- --wpt_text_font <arg>
- Waypoint font (default: "serif").
- --wpt_text_size <arg>
- Waypoint font size, pixels (default: 10).
- --wpt_text_pad <arg>
- Waypoint text padding, pixels (default: 2).
- --wpt_draw_size <arg>
- Waypoint dot radius, pixels (default: 3).
- --wpt_line_width <arg>
- Waypoint line width, (default: 1).
- --wpt_stick_len <arg>
- Length of waypoint flag stick (default: 10).
- --wpt_color <arg>
- Waypoint color (default: 0xFF000000).
- --wpt_bgcolor <arg>
- Waypoint background color (default: 0xFFFFFFFF).
- --wpt_adj <arg>
- Adjust waypoint flag positions to prevent mutual collisions (default: 1).
- --wpt_adj_brd <arg>
- Adjust waypoint flag positions to prevent boundary collisions (default: 0).
- --wpt_skip_far <arg>
- Skip points if their labels can not be placed close enough (default: 10*wpt_stick_len).
OPTIONS FOR RENDERING RASTER MAPS
- --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).
- --htm <arg>
- Write html map for the image.
OPTIONS FOR READING AND RENDERING VECTOR MAPS
- -t, --types <arg>
- File with type information. Default: /usr/share/mapsoft2/types.cfg
- -q, --quite <arg>
- Be quiet, do not print types of skipped objects. Default: 0. This works when reading/writing MP, VMAP, writing FIG.
- --skip_unknown <arg>
- Skip objects which are not defined in typeinfo file. Default: 0. This works when reading/writing MP, VMAP.
- --min_depth <arg>
- minimum depth of map object (default 40)
- --max_depth <arg>
- minimum depth of map object (default 200)
- --trk_type <arg>
- select type for GPX waypoint import/export
- --wpt_type <arg>
- select type for GPX track import/export
- --wpt_pref <arg>
- prefix for waypoint names (names w/o prefix are skipped). Default: "="
- --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.
- --def_label_type <arg>
- When reading VMAP file, set type number for labels which are not defined in typeinfo file. Use -1 to skip unknown labels (default). If skip_unknown is set then labels are skipped with unknown objects.
- -c, --config <arg>
- Configuration file for vector map rendering. Default: /usr/share/mapsoft2/render.cfg
- --obj_scale <arg>
- Rescaling factor for all objects, default 1.0.
- --vmap_minsc <arg>
- Minimum map scale (calculated from the 'natural' reference). Below it the map is drawn by with color (see --vmap2_minsc_color option). Default is 0.01
- --fit_patt_size
- Adjust pattern size to fit image size. This option is useful for generating tiled images. Default: false.
- --vmap_minsc_color <arg>
- Color to draw maps below minimum scale (see --vmap2_minsc). Default is 0xFFDB5A00).
- -D, --define <arg>
- Define variables for type information and render configuration.
OPTIONS FOR DRAWING SRTM DATA
- --srtm_dir <arg>
- Set srtm data folder, default - $HOME/.srtm_data
- --srtm_use_overlay <arg>
- Use overlay (0|1, default 1).
- --srtm_interp <arg>
- Interpolation (nearest, linear, cubic. Default: linear).
- --srtm_draw_mode <arg>
- SRTM surface drawing mode (slopes, heights, shades, default - shades).
- --srtm_hmin <arg>
- Min height [m] for heights and shades modes (default - 0).
- --srtm_hmax <arg>
- Max height [m] for heights and shades modes (default - 5000).
- --srtm_smin <arg>
- Min slope [deg] for slopes mode (default - 35).
- --srtm_smax <arg>
- Max slope [deg] for slopes mode (default - 50).
- --srtm_bgcolor <arg>
- Color to draw no-data and out-of-scale areas (default 0x60FF0000).
- --srtm_surf <arg>
- draw SRTM color surface (default 1).
- --srtm_cnt <arg>
- Draw contours (0|1, default - 1).
- --srtm_cnt_step <arg>
-
Contour step [m], default 50. - --srtm_cnt_vtol <arg>
-
altitude tolerance for smoothing contours [m], default 5 - --srtm_cnt_smult <arg>
-
Step multiplier for thick contours, default - 5. - --srtm_cnt_col <arg>
-
Contour color, default - 0xFF000000. - --srtm_cnt_w <arg>
-
Contour line width, default - 0.25. - --srtm_cnt_wmult <arg>
-
Width multiplier for thick contours, default - 2. - --srtm_cnt_crv <arg>
-
Size of round corners on contours, in linewidth units, default - 20. - --srtm_holes <arg>
-
Draw contours around data holes (1|0, default - 0). - --srtm_holes_col <arg>
-
Color of hole contours, default - 0xFF000000. - --srtm_holes_w <arg>
-
Linewidth of hole contours, default - 1. - --srtm_peaks <arg>
-
Draw summits (0|1, default - 0). - --srtm_peaks_col <arg>
-
Summit's color, default - 0xFF000000. - --srtm_peaks_w <arg>
-
Summit point size, default - 3. - --srtm_peaks_dh <arg>
-
DH parameter for peak finder [m], default - 20. - --srtm_peaks_ps <arg>
-
PS parameter fr peak finder [pts], default - 1000. - --srtm_peaks_text <arg>
-
Draw peak text (0|1, default - 1). - --srtm_peaks_text_size <arg>
-
Peak text size, default - 10. - --srtm_peaks_text_font <arg>
-
Peak text font, default - serif. - --srtm
- Add SRTM layer
OPTIONS FOR SAVING IMAGES
- --tiff_format <arg>
- When writing TIFF, convert image to one of following forms: argb, rgb, argb64, rgb64, grey, pal (default depends on the image).
- --tiff_compression <arg>
- Set compression algorythm for writing TIFF files: none, ccit_rle, ccit_rlew, ccit_fax3, ccit_fax4, lzw (default), jpeg, packbits
- --tiff_minwhite <arg>
- When writing greyscale TIFF, use MINISWHITE colors (default: 0).
- --jpeg_quality <arg>
- Set JPEG quality for writing jpeg and tiff files (default 95).
- --png_format <arg>
- When writing PNG, convert image to one of following forms: argb, rgb, grey, agrey, pal (default depends on the image).
- --cmap_colors <arg>
- Colormap size for reducing image colors (0..256, default 255, if 0 - use all colors). Image colors are reduced when saving to GIF, to PNG with --png_format=pal, to TIFF with --tiff_format=pal.
- --cmap_alpha <arg>
- Alpha channel: none (default) -- remove it; full -- treat it equally with other channels; gif -- keep only fully-transparent color, if needed. When saving GIF file (which supports only fully transparent color) "full" works in the same way as "gif".
- --cmap_dim_method <arg>
- Analog of pnmcolormap options -spreadbrightness and -spreadluminosity. When a box in the color space is measured, color dimensions can be treated equally or with luminosity factors. Values: norm (default) or lumin.
- --cmap_rep_method <arg>
- Analog of pnmcolormap options -center, -meancolor, and -meanpixel. When a box in the color space is chosen, it can be represented by its geometrical center, or by averaging pixels or colors in it. Values: center, meanpix (default), meancol.
- --cmap_split_method <arg>
- Analog of pnmcolormap options -splitpix, -splitcol, -splitdim. How to choose a box in the color space for splitting: by its maximum dimension, maximum number of pixels or colors in it. Values: maxdim (default), maxpix, maxcol.
- --cmap_save <arg>
- Save colormap to PNG file.
- --cmap_load <arg>
- Load colormap from PNG file.
- --cmap_add <arg>
- Add a color to colormap (useful to add transparent color to non-transparent colormap) TODO: allow multiple colors.
- --out_fmt <arg>
- Explicitely set image output format: pdf, ps, svg, png, jpeg, tiff, gif. By default format is determined from the output file extension.
- --add
- If image file exists, read it and use as the background. The image should have same dimensions.
- --bgcolor <arg>
- Image background color (default 0xFFFFFFFF for normal maps, 0 for tiled maps).
- --fillcolor <arg>
- Color to be used at tiled map with z<zfill level (default 0xFFFF0000).
- -m, --map <arg>
- Write OziExplorer map file for the image.
- --skip_image
- Do not write image file (can be used if only the map file is needed). Option -o <file> should be provided anyway, the filename will be written to the map-file.
- --title <arg>
- write text in the top-left corner.
- --title_size <arg>
- Font size for the title.
- --tmap
- Write tiled map. In this case `fname` parameter should contain a template with {x}, {y}, {z} fields. Output of map file is not supported at the moment. `mkref` options are ignored. Sub-directories are created if needed.
- --zmin <arg>
- Min zoom for tiled maps.
- --zmax <arg>
- Max zoom for tiled maps.
- --zfill <arg>
- Starting from this zoom level tiled map will be filled with fillcolor
- --tmap_scale <arg>
- When creating tiles with multiple zoom levels scale larger tiles to create smaller ones (instead of rendering all tiles separately). Default: 0.
- --swapy
- Normally tiled maps are saved in Google row counting; This will switch to TMS
- --skip_empty
- Do not save image if nothing was drawn. Default: 0
OPTIONS FOR DOWNLOADING
- --downloader_log_level <arg>
- log level (0..3, default: 0)
- --insecure <arg>
- do not check TLS certificate (default: 0)
- --user_agent <arg>
- set user agent (default: "mapsoft2 downloader")
- --http_ref <arg>
- set http reference (default: "https://github.com/slazav/mapsoft2")
WARNING: options have not been printed: osm_conf (group: OSM)
WARNING: options have not been printed: osm_ids (group: OSM)
WARNING: options have not been printed: osm_tags (group: OSM)
AUTHOR
Vladislav Zavjalov <slazav@altlinux.org>
SEE ALSO
- Mapsoft2 documentation (ru, en) <http://slazav.github.io/mapsoft2>
- Mapsoft2 source code, bugtracker <http://github.com/slazav/mapsoft2>
- Old Mapsoft project <http://github.com/ushakov/mapsoft>
| 2025-05-04 | mapsoft2 |
