Changes between Initial Version and Version 1 of El:Help/CommandLineOptions


Ignore:
Timestamp:
2025-07-02T14:32:00+02:00 (2 weeks ago)
Author:
makmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • El:Help/CommandLineOptions

    v1 v1  
     1[[TranslatedPages(revision=47)]]
     2
     3[[PageOutline(2)]]
     4
     5= Επιλογές Γραμμής Εντολών =
     6
     7Τέσσερις τύποι επιλογών γραμμής εντολών επηρεάζουν το JOSM:
     8 * Τα [https://josm.openstreetmap.de/wiki/El%3AHelp/CommandLineOptions#Programarguments επιχειρήματα Προγράμματος⤓] (Program arguments) ελέγχουν άμεσα το JOSM. Ονομάζονται ''args'' από την Java.
     9 * Οι [https://josm.openstreetmap.de/wiki/El%3AHelp/CommandLineOptions#Javaoptions επιλογές Java⤓] επηρεάζουν το περιβάλλον του (JVM) και μερικές φορές ονομάζονται ''VM arguments''.
     10 * Οι [https://josm.openstreetmap.de/wiki/El%3AHelp/CommandLineOptions#run-options επιλογές Run⤓] εμπλέκονται στο  WebStart. Μερικές είναι για διάγνωση και εισαγωγή.
     11 * Μερικές [https://josm.openstreetmap.de/wiki/El%3AHelp/CommandLineOptions#Otheroptions Άλλες επιλογές⤓] για βοηθητικά προγράμματα.
     12
     13{{{
     14#!sh
     15# Running a jar
     16java [Java options] -jar josm.jar [Program arguments]
     17
     18# Launch a Web Start
     19javaws [Run-options] -J[Java option] josm.jnlp
     20}}}
     21
     22Η [wikitr:/Help/Action/ShowStatusReport Αναφορά Κατάστασης] από το μενού Βοήθεια  εμφανίζει τα τρέχοντα επιχειρήματα προγράμματος  και τις επιλογές Java.
     23Μερικά [https://josm.openstreetmap.de/wiki/El%3AHelp/CommandLineOptions#Examples παραδείγματα⤓] και για τα δύο αυτά εμφανίζονται παρακάτω.
     24
     25**Σημείωση:** Ο όρος {{{josm.jar}}} είναι μια κοινή συντομογραφία για τα ονόματα αρχείων ''josm-tested.jar'' και ''josm-latest.jar''.
     26Ο όρος ''josm.jnlp'' αναφέρεται επίσης στο ''josm-latest.jnlp''.
     27Όπως συνήθως, τα επιχειρήματα στη γραμμή εντολών διαχωρίζονται μεταξύ τους με κενά.
     28
     29
     30== Επιχειρήματα προγράμματος για το JOSM ==#Programarguments
     31
     32Το πρώτο επιχείρημα μπορεί να είναι μια **εντολή** για το JOSM ώστε να λειτουργεί αυτόνομα.
     33Οι εντολές που χρησιμοποιούνται συνήθως ως προεπιλογή είναι: `render`, `project` ή `runjosm`.
     34
     35Τα υπόλοιπα επιχειρήματα είναι **επιλογές** για το JOSM.
     36Μπορεί να είναι URLs, ονόματα αρχείων, συντεταγμένες, απλές επιλογές ή ζεύγη επιλογή=τιμή.
     37
     38Οι επιλογές για την εντολή runjosm παρατίθενται παρακάτω.
     39Στο τέλος βρίσκονται οι επιλογές για τις εντολές [https://josm.openstreetmap.de/wiki/El%3AHelp/CommandLineOptions#Programargumentsrendering render⤓] και [https://josm.openstreetmap.de/wiki/El%3AHelp/CommandLineOptions#Programargumentsprojection project⤓].
     40
     41{{{
     42usage:
     43        java -jar josm.jar [<command>] <options>...
     44
     45commands:
     46        runjosm     launch JOSM (default, performed when no command is specified)
     47        render      render data and save the result to an image file
     48        project     convert coordinates from one coordinate reference system to another
     49        validate    validate data
     50
     51For details on the render and project commands, run them with the --help option.
     52The remainder of this help page documents the runjosm command.
     53
     54options:
     55        --help|-h                                 Show this help
     56        --geometry=widthxheight(+|-)x(+|-)y       Standard unix geometry argument
     57        [--download=]minlat,minlon,maxlat,maxlon  Download the bounding box
     58        [--download=]<URL>                        Download the location at the URL (with lat=x&lon=y&zoom=z)
     59        [--download=]<filename>                   Open a file (any file type that can be opened with File/Open)
     60        --downloadgps=minlat,minlon,maxlat,maxlon Download the bounding box as raw GPS
     61        --downloadgps=<URL>                       Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS
     62        --selection=<searchstring>                Select with the given search
     63        --[no-]maximize                           Launch in maximized mode
     64        --reset-preferences                       Reset the preferences to default
     65
     66        --load-preferences=<url-to-xml>           Changes preferences according to the XML file
     67
     68        --set=<key>=<value>                       Set preference key to value
     69
     70        --language=<language>                     Set the language
     71
     72        --version                                 Displays the JOSM version and exits
     73
     74        --status-report                           Show status report with useful information that can be attached to bugs
     75
     76        --debug                                   Print debugging messages to console
     77
     78        --skip-plugins                            Skip loading plugins
     79
     80        --offline=<OSM_API|JOSM_WEBSITE|CACHE_UPDATES|CERTIFICATES|ALL>
     81                                                  Disable access to the given resource(s), separated by comma
     82                                                  <OSM API|JOSM website|Cache updates|Certificates|All>
     83}}}
     84
     85Το μέρος `--download=` ης επιλογής λήψης είναι προαιρετικό.
     86Τα επιχειρήματα `--download`, `--downloadgps` και `--selection` επεξεργάζονται με αυτήν τη σειρά.
     87Η τιμή `<url-to-xml>` μπορεί να δείχνει σε τοπικό αρχείο με μορφή `file:relative/path/name.xml`.
     88Τα στοιχεία στην τιμή της επιλογής `--offline` διαχωρίζονται με κόμμα.
     89
     90
     91== Επιλογές Java ==#Javaoptions
     92
     93Ελέγχουν τη Java Virtual Machine [https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html (JVM)] και μπορούν να ορίσουν [https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html ιδιότητες ] εντός αυτής. Το JOSM διαβάζει κάποιες από αυτές απευθείας, όπως το `josm.home`. Άλλες, όπως η`user.language` και `user.country` επηρεάζουν τις προεπιλεγμένες ρυθμίσεις της JVM, οι οποίες με τη σειρά τους επηρεάζουν και το JOSM.
     94
     95{{{
     96Java system properties options:
     97    -Djosm.dir.name=JOSM                      Change the JOSM directory name
     98    -Djosm.pref=/PATH/TO/JOSM/PREF            Set the preferences directory
     99                                              Default (Linux XDG): /home/name/.config/JOSM
     100                                              Default (Windows): C:\Users\name\AppData\Roaming\JOSM
     101    -Djosm.userdata=/PATH/TO/JOSM/USERDATA    Set the user data directory
     102                                              Default (Linux XDG): /home/name/.local/share/JOSM
     103                                              Default (Windows): C:\Users\name\AppData\Roaming\JOSM
     104    -Djosm.cache=/PATH/TO/JOSM/CACHE          Set the cache directory
     105                                              Default (Linux XDG): /home/name/.cache/JOSM
     106                                              Default (Windows): C:\Users\name\AppData\Local\JOSM\cache
     107    -Djosm.home=/PATH/TO/JOSM/HOMEDIR         Set the common directory for preferences,
     108                                              user data and ./cache/. Lower precedence.
     109                                              Will get overridden from specific setting.
     110    -Xmx...m                                  Set maximum Java heap size in megabytes.
     111                                              May avoid Out-of-Memory errors.
     112}}}
     113
     114Η επιλογή `-Xmx...m` μπορεί να είναι χρήσιμη όταν προκύπτουν σφάλματα [wikitr:/Download#Outofmemory Εκτός Μνήμης (Out of Memory)].
     115Αν ορίσετε έναν κοινό φάκελο με την ιδιότητα `Djosm.home` τότε το JOSM θα δημιουργήσει τους υποφακέλους ./autosave, ./cache και ./validator.
     116Αν μια τιμή περιέχει κενά, πρέπει να την περικλείσετε σε εισαγωγικά, π.χ.  `"josm dev"`.
     117
     118Όταν οι χαρακτήρες μη ASCII στη γραμμή εντολών εμφανίζονται λανθασμένα (μπερδεμένοι), χρησιμοποιήστε την επιλογή `-Dfile.encoding=Cp850` για να λαμβάνετε κείμενο από την Java σε άλλη [https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html σελίδα κώδικα].
     119Η [https://msdn.microsoft.com/de-de/library/windows/desktop/dd317756%28v=vs.85%29.aspx σελίδα κώδικα] που χρησιμοποιείται εμφανίζεται με την εντολή `chcp⏎` στο τερματικό.
     120Για χρήση UTF-8 στα Windows, εκτελέστε πρώτα την εντολή `chcp 65001` στο παράθυρο του τερματικού των Windows πριν ξεκινήσετε το JOSM χρησιμοποιώντας το `java -Dfile.encoding=UTF-8 -jar josm.jar`
     121
     122Το πακέτο Debian του JOSM, `josm-latest` χρησιμοποιεί την επιλογή `-Djosm.dir.name=JOSM-latest` για να προσφέρει παράλληλες εγκαταστάσεις στους καταλόγους βάσης XDG.
     123
     124[=#Examples **Παραδείγματα για επιλογές JOSM runjosm και επιλογές Java**]
     125{{{
     126#!sh
     127# Load three files
     128  java -jar josm.jar track1.gpx BigBen.jpg "london data.osm"
     129# Download from OSM according to an URL with zoom and coordinates
     130  java -jar josm.jar https://www.openstreetmap.org/#map=18/51.501/-0.124
     131# Download a bounding box and select every element matching a string
     132  java -jar josm.jar 51.500,-0.126,51.502,-0.122 --selection="Big Ben"
     133#
     134# Set directory for JOSM according to a property from the operating system
     135  java -Djosm.pref=$XDG_CONFIG_HOME -jar josm.jar
     136# Quotations for a value with space and show JOSMs GUI in English
     137  java -Djosm.dir.name="josm dev" -jar josm.jar --language=en
     138# Set the common directory in a sub-subdirectory below the active command prompt
     139  java -Djosm.home=biketour2017/london -jar josm.jar
     140# More memory and without phoning home
     141  java -Xmx1024m --set=message.notifier.enabled=false  -jar josm.jar
     142#
     143# Start in an English environment and log debug info plus messages from stderr
     144  java -Duser.language=en -jar josm.jar --debug 1>logfile.txt 2>&1
     145}}}
     146
     147
     148== Επιλογές εκτέλεσης για το Java Web Start ==#run-options
     149
     150Οι επιλογές εκτέλεσης διαβάζονται από την εντολή `javaws`. Ελέγχουν τον μηχανισμό Web Start, μπορούν να περικλείουν επιλογές Java και να κάνουν διάγνωση της Java.
     151{{{
     152#!sh
     153# Control
     154  -offline                  Allows to Web Start JOSM without internet access
     155
     156# Encapsulate
     157  -J<java option>           Supplies the <java option> to the JVM
     158  -J-Xmx1024m               Here: Set maximum Java heap size to 1024 megabyte
     159
     160# Diagnosis
     161javaws -viewer            Shows the Cache Viewer in the Java Control Panel
     162# Allows to opens the Java Control Panel from the command line.
     163
     164javaws -clearcache        Removes all non-installed applications from the cache
     165# Equal to 'Delete Files and Applications' from the 'Temporary File Settings' invoked
     166# by the 'Settings' button in the 'General' tab of the Java Control Panel.
     167# javaws -Xclearcache on OpenJDK
     168}}}
     169
     170Η επιλογή εκτέλεσης `-J` βρίσκεται πίσω από το γράμμα J και το παρέχει ως επιλογή Java. Το αρχείο [wikitr:/Help/jnlpOptions jnlp-File] που χρησιμοποιείται από το [https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javaws.html Web Start] προσφέρει έναν δεύτερο τρόπο να [https://docs.oracle.com/javase/8/docs/technotes/guides/javaws/developersguide/syntax.html ορίσετε επιλογές] για την JRE και για το πρόγραμμα JOSM απευθείας.
     171
     172Η εντολή `javaws` διαθέτει μερικές επιλογές ελέγχου σε όλα τα συστήματα.
     173
     174Η επιλογή `-clearcache` και η εκκαθάριση της προσωρινής μνήμης μέσω του Πίνακα Ελέγχου Java θα διαγράψουν τα εικονίδια που βασίζονται στο JNLP από την επιφάνεια εργασίας. Το εικονίδιο του JOSM θα αφαιρεθεί εάν είχε τοποθετηθεί ως αποτέλεσμα κλικ σε αρχείο jnlp μέσω προγράμματος περιήγησης.
     175
     176== Άλλες επιλογές ==#Otheroptions
     177
     178Ο Εκκινητής `josm.exe` γνωστός και ως [http://launch4j.sourceforge.net/docs.html#Runtime_options Launch4j] (μόνο σε [wikitr:/Download#Mswindowswrapper MS Windows]) μπορεί να παρέχει κάποιες πληροφορίες αποσφαλμάτωσης.
     179{{{
     180#!sh
     181josm.exe --j4l-debug      Tries to write a launch4j.log to current directory
     182josm.exe --j4l-dont-wait  Ends the wrapper after invoking JOSM.
     183}}}
     184
     185== Γραμμή εντολών για το Render και Project ==
     186
     187=== Επιχειρήματα προγράμματος για το rendering του JOSM ===#Programargumentsrendering
     188
     189{{{
     190Usage:
     191        java -jar josm.jar render <options>
     192
     193Description:
     194Renders data and saves the result to an image file.
     195
     196Options:
     197        --help|-h                 Show this help
     198        --input|-i <file>         Input data file name (.osm)
     199        --output|-o <file>        Output image file name (.png); defaults to 'out.png'
     200        --style|-s <file>         Style file to use for rendering (.mapcss or .zip)
     201                                  This option can be repeated to load multiple styles.
     202        --setting <key>:<value>   Style setting (in JOSM accessible in the style list dialogue right click menu)
     203                                  Applies to the last style loaded with the --style option.
     204        --zoom|-z <lvl>           Select zoom level to render. (integer value, 0=entire earth, 18=street level)
     205        --scale <scale>           Select the map scale
     206                                  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)
     207                                  Options --zoom and --scale are mutually exclusive.
     208        --bounds|-b auto|<min_lon>,<min_lat>,<max_lon>,<max_lat>
     209                                  Area to render, default value is 'auto'
     210                                  With keyword 'auto', the downloaded area in the .osm input file will be used (if recorded).
     211        --anchor <lon>,<lat>      Specify bottom left corner of the rendering area
     212                                  Used in combination with width and height options to determine the area to render.
     213        --width-m <number>        Width of the rendered area, in meter
     214        --height-m <number>       Height of the rendered area, in metres
     215        --width-px <number>       Width of the target image, in pixels
     216        --height-px <number>      Height of the target image, in pixels
     217        --projection <code>       Projection to use, default value 'epsg:3857' (web-Mercator)
     218        --max-image-size <number> Maximum image width/height in pixel ('0' means no limit), default value: 20000
     219
     220To specify the rendered area and scale, the options can be combined in various ways:
     221  * --bounds (--zoom|--scale|--width-px|--height-px)
     222  * --anchor (--width-m|--width-px) (--height-m|--height-px) (--zoom|--scale)
     223  * --anchor --width-m --height-m (--width-px|--height-px)
     224  * --anchor --width-px --height-px (--width-m|--height-m)
     225If 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.
     226
     227Examples:
     228  java -jar josm.jar render -i data.osm -s style.mapcss -z 16
     229  josm render -i data.osm -s style.mapcss --scale 5000
     230  josm render -i data.osm -s style.mapcss -z 16 -o image.png
     231  josm render -i data.osm -s elemstyles.mapcss --setting hide_icons:false -z 16
     232  josm render -i data.osm -s style.mapcss -s another_style.mapcss -z 16 -o image.png
     233  josm render -i data.osm -s style.mapcss --bounds 21.151,51.401,21.152,51.402 -z 16
     234  josm render -i data.osm -s style.mapcss --anchor 21.151,51.401 --width-m 500 --height-m 300 -z 16
     235  josm render -i data.osm -s style.mapcss --anchor 21.151,51.401 --width-m 500 --height-m 300 --width-px 1800
     236  josm render -i data.osm -s style.mapcss --scale 5000 --projection epsg:4326
     237}}}
     238
     239=== Επιχειρήματα προγράμματος για την προβολή του JOSM ===#Programargumentsprojection
     240
     241{{{
     242Usage:
     243        java -jar josm.jar project <options> <crs> +to <crs> [file]
     244
     245Description:
     246Converts coordinates from one coordinate reference system to another.
     247
     248Options:
     249        --help|-h         Show this help
     250        -I                Switch input and output crs
     251        -r                Switch order of input coordinates (east/north, lon/lat)
     252        -s                Switch order of output coordinates (east/north, lon/lat)
     253
     254<crs>:
     255The format for input and output coordinate reference system is similar to that of the PROJ.4 software.
     256
     257[file]:
     258Reads 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.
     259
     260Examples:
     261    java -jar josm.jar project +init=epsg:4326 +to +init=epsg:3857 <<<"11.232274 50.5685716"
     262       => 1250371.1334500168 6545331.055189664
     263
     264    java -jar josm.jar project +proj=lonlat +datum=WGS84 +to +proj=merc +a=6378137 +b=6378137 +nadgrids=@null <<EOF
     265    11d13'56.19"E 50d34'6.86"N
     266    118d39'30.42"W 37d20'18.76"N
     267    EOF
     268       => 1250371.1334500168 6545331.055189664
     269          -1.3208998232319113E7 4486401.160664663
     270}}}
     271
     272
     273== Δείτε επίσης ==
     274* [wikitr:/Download#Troubleshooting Αντιμετώπιση Προβλημάτων Java]
     275* [wikitr:/InstallNotes Σημειώσεις Εγκατάστασης]
     276* [wikitr:/Help/Preferences Προτιμήσεις] - Επισκόπηση Προτιμήσεων
     277
     278----
     279Πίσω στη [wikitr:/Help Βασική Βοήθεια]