Changes between Version 39 and Version 40 of Help/CommandLineOptions


Ignore:
Timestamp:
2020-09-07T08:58:14+02:00 (5 years ago)
Author:
simon04
Comment:

update, +PageOutline, +render, +project

Legend:

Unmodified
Added
Removed
Modified
  • Help/CommandLineOptions

    v39 v40  
    1 [[TranslatedPages(outdated=Page is incomplete. Help and Options for commands render and project are missing.)]]
     1[[TranslatedPages]]
     2[[PageOutline]]
    23
    34= Command Line Options =
     
    2223As usual in all four types the arguments are separated by space from each other.
    2324
    24 == Program arguments ==#Programarguments
     25== JOSM program arguments ==#Programarguments
    2526
    2627The first argument can be a **command** for JOSM to make it work autonomous.
     
    3334{{{
    3435usage:
    35   java <java options> -jar josm.jar [<command>] <options>
     36        java -jar josm.jar [<command>] <options>...
    3637
    3738commands:
    38   runjosm     launch JOSM (default, performed when no command is specified)
    39   render      render data and save the result to an image file
    40   project     convert coordinates from one coordinate reference system to another
     39        runjosm     launch JOSM (default, performed when no command is specified)
     40        render      render data and save the result to an image file
     41        project     convert coordinates from one coordinate reference system to another
    4142
    4243For details on the render and project commands, run them with the --help option.
     
    4445
    4546options:
    46   --help|-h                                                Show this help
    47   --geometry=widthxheight(+|-)x(+|-)y                      Standard unix geometry argument
    48   [--download=]minlat,minlon,maxlat,maxlon                 Download the bounding box
    49   [--download=]<URL>                                       Download the location URL which has
    50                                                            coordinates like lat=x&lon=y&zoom=z
    51   [--download=]<filename>                                  Open a file (same as Menu/File/Open)
    52   --downloadgps=minlat,minlon,maxlat,maxlon                Download the bounding box as raw GPS
    53   --downloadgps=<URL>                                      Download the location as raw GPS
    54   --selection=<searchstring>                               Select with the given search
    55   --[no-]maximize                                          Launch in maximized mode
    56   --reset-preferences                                      Reset the preferences to default
    57   --load-preferences=<url-to-xml>                          Import preferences from XML file
    58   --set=<key>=<value>                                      Set preference key to value
    59   --language=<language>                                    Set the language
    60   --version                                                Displays the JOSM version and exits
    61   --debug     or   --trace                                 Print debugging messages to console
    62   --skip-plugins                                           Skip loading plugins
    63   --offline=[osm_api,][josm_website,][certificates,][all]  Disable access to the listed resources
     47        --help|-h                                 Show this help
     48        --geometry=widthxheight(+|-)x(+|-)y       Standard unix geometry argument
     49        [--download=]minlat,minlon,maxlat,maxlon  Download the bounding box
     50        [--download=]<URL>                        Download the location at the URL (with lat=x&lon=y&zoom=z)
     51        [--download=]<filename>                   Open a file (any file type that can be opened with File/Open)
     52        --downloadgps=minlat,minlon,maxlat,maxlon Download the bounding box as raw GPS
     53        --downloadgps=<URL>                       Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS
     54        --selection=<searchstring>                Select with the given search
     55        --[no-]maximize                           Launch in maximised mode
     56        --reset-preferences                       Reset the preferences to default
     57
     58        --load-preferences=<url-to-xml>           Changes preferences according to the XML file
     59
     60        --set=<key>=<value>                       Set preference key to value
     61
     62        --language=<language>                     Set the language
     63
     64        --version                                 Displays the JOSM version and exits
     65
     66        --debug                                   Print debugging messages to console
     67
     68        --skip-plugins                            Skip loading plugins
     69
     70        --offline=<OSM_API|JOSM_WEBSITE|CACHE_UPDATES|CERTIFICATES|ALL>
     71                                                  Disable access to the given resource(s), separated by comma
     72                                                  <OSM API|JOSM website|Cache updates|Certificates|All>
    6473}}}
    6574
     
    121130
    122131
    123 == Run-options ==#run-options
     132== Java Web Start Run-options ==#run-options
    124133The run-options are used by the `javaws` command. They control the Web Start mechanism and can encapsulate Java options.
    125134{{{
     
    132141The [wikitr:/Help/jnlpOptions jnlp-File] used by [https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javaws.html Web Start] offers a second way to [https://docs.oracle.com/javase/8/docs/technotes/guides/javaws/developersguide/syntax.html  set options] for JRE and for the JOSM program directly.
    133142
    134 == Other options ==#Otheroptions
    135143The `javaws` command has some control options on all systems.
    136144On [wikitr:/Download#Mswindowswrapper MS Windows] only the Launcher `josm.exe` aka [http://launch4j.sourceforge.net/docs.html#Runtime_options  Launch4j] may give some debug info (needs 64-bit Java on 64-bit Windows). 
     
    153161The `-clearcache` option and clearing the cache via the Java Control Panel will both delete JNLP based icons from the Desktop. The JOSM icon will be gone if it was placed as result of a click in a web browser on a jnlp-file.
    154162
    155 === See also ===
     163== JOSM rendering command line interface ==
     164
     165{{{
     166Usage:
     167        java -jar josm.jar render <options>
     168
     169Description:
     170Renders data and saves the result to an image file.
     171
     172Options:
     173        --help|-h                 Show this help
     174        --input|-i <file>         Input data file name (.osm)
     175        --output|-o <file>        Output image file name (.png); defaults to 'out.png'
     176        --style|-s <file>         Style file to use for rendering (.mapcss or .zip)
     177                                  This option can be repeated to load multiple styles.
     178        --setting <key>:<value>   Style setting (in JOSM accessible in the style list dialogue right click menu)
     179                                  Applies to the last style loaded with the --style option.
     180        --zoom|-z <lvl>           Select zoom level to render. (integer value, 0=entire earth, 18=street level)
     181        --scale <scale>           Select the map scale
     182                                  A value of 10000 denotes a scale of 1:10000 (1 cm on the map equals 100 m on the ground; display resolution: 96 dpi)
     183                                  Options --zoom and --scale are mutually exclusive.
     184        --bounds|-b auto|<min_lon>,<min_lat>,<max_lon>,<max_lat>
     185                                  Area to render, default value is 'auto'
     186                                  With keyword 'auto', the downloaded area in the .osm input file will be used (if recorded).
     187        --anchor <lon>,<lat>      Specify bottom left corner of the rendering area
     188                                  Used in combination with width and height options to determine the area to render.
     189        --width-m <number>        Width of the rendered area, in meter
     190        --height-m <number>       Height of the rendered area, in metres
     191        --width-px <number>       Width of the target image, in pixels
     192        --height-px <number>      Height of the target image, in pixels
     193        --projection <code>       Projection to use, default value 'epsg:3857' (web-Mercator)
     194        --max-image-size <number> Maximum image width/height in pixel ('0' means no limit), default value: 20000
     195
     196To specify the rendered area and scale, the options can be combined in various ways:
     197  * --bounds (--zoom|--scale|--width-px|--height-px)
     198  * --anchor (--width-m|--width-px) (--height-m|--height-px) (--zoom|--scale)
     199  * --anchor --width-m --height-m (--width-px|--height-px)
     200  * --anchor --width-px --height-px (--width-m|--height-m)
     201If neither 'bounds' nor 'anchor' is given, the default value --bounds=auto takes effect and the bounds of the download area in the .osm input file are used.
     202
     203Examples:
     204  java -jar josm.jar render -i data.osm -s style.mapcss -z 16
     205  josm render -i data.osm -s style.mapcss --scale 5000
     206  josm render -i data.osm -s style.mapcss -z 16 -o image.png
     207  josm render -i data.osm -s elemstyles.mapcss --setting hide_icons:false -z 16
     208  josm render -i data.osm -s style.mapcss -s another_style.mapcss -z 16 -o image.png
     209  josm render -i data.osm -s style.mapcss --bounds 21.151,51.401,21.152,51.402 -z 16
     210  josm render -i data.osm -s style.mapcss --anchor 21.151,51.401 --width-m 500 --height-m 300 -z 16
     211  josm render -i data.osm -s style.mapcss --anchor 21.151,51.401 --width-m 500 --height-m 300 --width-px 1800
     212  josm render -i data.osm -s style.mapcss --scale 5000 --projection epsg:4326
     213}}}
     214
     215== JOSM projection command line interface ==
     216
     217{{{
     218Usage:
     219        java -jar josm.jar project <options> <crs> +to <crs> [file]
     220
     221Description:
     222Converts coordinates from one coordinate reference system to another.
     223
     224Options:
     225        --help|-h         Show this help
     226        -I                Switch input and output crs
     227        -r                Switch order of input coordinates (east/north, lon/lat)
     228        -s                Switch order of output coordinates (east/north, lon/lat)
     229
     230<crs>:
     231The format for input and output coordinate reference system is similar to that of the PROJ.4 software.
     232
     233[file]:
     234Reads input data from one or more files listed as positional arguments. When no files are given, or the filename is "-", data is read from standard input.
     235
     236Examples:
     237    java -jar josm.jar project +init=epsg:4326 +to +init=epsg:3857 <<<"11.232274 50.5685716"
     238       => 1250371.1334500168 6545331.055189664
     239
     240    java -jar josm.jar project +proj=lonlat +datum=WGS84 +to +proj=merc +a=6378137 +b=6378137 +nadgrids=@null <<EOF
     241    11d13'56.19"E 50d34'6.86"N
     242    118d39'30.42"W 37d20'18.76"N
     243    EOF
     244       => 1250371.1334500168 6545331.055189664
     245          -1.3208998232319113E7 4486401.160664663
     246}}}
     247
     248== See also ==
    156249* [wikitr:/Download#Troubleshooting Troubleshooting Java]
    157250* [wikitr:/InstallNotes Installation notes]