| 1 | Supplemental information for JOSM -- the Java OpenStreetMap Editor | 
|---|
| 2 |  | 
|---|
| 3 | ============================================================================= | 
|---|
| 4 | I. Install & Launch | 
|---|
| 5 | ============================================================================= | 
|---|
| 6 |  | 
|---|
| 7 | Installation notes | 
|---|
| 8 | ------------------ | 
|---|
| 9 | To run JOSM, you need: | 
|---|
| 10 |  | 
|---|
| 11 | * The JOSM .jar file, e.g., josm-tested.jar or josm-latest.jar | 
|---|
| 12 | * Java Runtime Environment (JRE) 8, or later. | 
|---|
| 13 |  | 
|---|
| 14 |  | 
|---|
| 15 | How to get Java Runtime Environment | 
|---|
| 16 | ----------------------------------- | 
|---|
| 17 | You need JRE Version 8, or later. | 
|---|
| 18 |  | 
|---|
| 19 | Microsoft Windows and Apple Mac OS X users should visit https://www.java.com | 
|---|
| 20 | and download the latest Java executable for their system. | 
|---|
| 21 |  | 
|---|
| 22 | Linux users should visit http://www.oracle.com/technetwork/java/index.html | 
|---|
| 23 | There is a Linux binary installer, which you must execute from a console, or | 
|---|
| 24 | use the mechanism of your distribution's packaging system. | 
|---|
| 25 |  | 
|---|
| 26 |  | 
|---|
| 27 | How to launch | 
|---|
| 28 | ------------- | 
|---|
| 29 | Microsoft Windows users launch by double-clicking on the .jar file. | 
|---|
| 30 | If this does not work, open a command shell and type | 
|---|
| 31 | "java -jar josm-latest.jar"  in the directory that holds the file. (Please | 
|---|
| 32 | replace josm-latest.jar with the name of your .jar file, if you aren't using | 
|---|
| 33 | the latest version.) | 
|---|
| 34 |  | 
|---|
| 35 | Under Linux, open a shell, go to the file directory and type | 
|---|
| 36 | "java -jar josm-latest.jar" to launch. If this does not work, try to set | 
|---|
| 37 | your JAVA_HOME variable to the java executable location (the root location, | 
|---|
| 38 | not the bin). | 
|---|
| 39 |  | 
|---|
| 40 | macOS users just click on the .jar file icon. | 
|---|
| 41 |  | 
|---|
| 42 | ============================================================================= | 
|---|
| 43 | II. Development | 
|---|
| 44 | ============================================================================= | 
|---|
| 45 |  | 
|---|
| 46 | How to get the source code | 
|---|
| 47 | -------------------------- | 
|---|
| 48 | Download it directly from the subversion at | 
|---|
| 49 | https://josm.openstreetmap.de/svn/trunk. To use the command line subversion | 
|---|
| 50 | client, type | 
|---|
| 51 |  | 
|---|
| 52 | svn co https://josm.openstreetmap.de/svn/trunk josm | 
|---|
| 53 |  | 
|---|
| 54 |  | 
|---|
| 55 | Files & directories | 
|---|
| 56 | ------------------- | 
|---|
| 57 | This is an overview of the files and directories in the JOSM code repository: | 
|---|
| 58 | - build.xml                 ant build file (standard way to create a JOSM binary) | 
|---|
| 59 | - CONTRIBUTION              list of major code contributors | 
|---|
| 60 | - gpl-2.0.txt, gpl-3.0.txt  full text of the GNU General Public License | 
|---|
| 61 | - ide                       IDE-specific files | 
|---|
| 62 | - eclipse/                preconfigured Eclipse configuration files | 
|---|
| 63 | - netbeans/               preconfigured Netbeans project | 
|---|
| 64 | - josm.jnlp                 Java Web Start launcher file (used on the website for the tested version) | 
|---|
| 65 | - josm-latest.jnlp          Java Web Start launcher file (used on the website for the latest version) | 
|---|
| 66 | - LICENSE                   the JOSM license terms | 
|---|
| 67 | - native/                   OS-specific files | 
|---|
| 68 | - linux/                  files useful for Linux distributions, including Appdata files, .desktop | 
|---|
| 69 | files, Debian/Ubuntu scripts, man pages, icons, etc. | 
|---|
| 70 | - macosx/                 files needed to create the MacOS X package | 
|---|
| 71 | - windows/                files needed to create the Windows installer | 
|---|
| 72 | - nodist/                   files not included in JOSM binary | 
|---|
| 73 | - data/                   data files that are useful for development, but not distributed | 
|---|
| 74 | - exif-direction-example.jpg | 
|---|
| 75 | sample image, that contains direction information in the EXIF header | 
|---|
| 76 | (keys: Exif.GPSInfo.GPSImgDirectionRef, Exif.GPSInfo.GPSImgDirection) | 
|---|
| 77 | - filterTests.osm       used for unit testing of the filter feature | 
|---|
| 78 | (see test/unit/org/openstreetmap/josm/data/osm/FilterTest.java) | 
|---|
| 79 | - Join_Areas_Tests.osm  some examples to test the 'join areas' feature | 
|---|
| 80 | - *.*                   various other data files used for unit testing and as reference file | 
|---|
| 81 | - projection/           projection files | 
|---|
| 82 | - *.gsb               NTv2 grid files for projection support, downloaded by the | 
|---|
| 83 | client on demand (see CONTRIBUTION) | 
|---|
| 84 | - CHENyx06-Distribution.pdf | 
|---|
| 85 | archive of terms of use for the CHENyx06.gsb file | 
|---|
| 86 | - epsg                EPSG data file, taken from the proj.4 project | 
|---|
| 87 | (see https://github.com/OSGeo/proj.4/blob/master/nad/epsg) | 
|---|
| 88 | - esri                ESRI data file, taken from the proj.4 project | 
|---|
| 89 | (see https://github.com/OSGeo/proj.4/blob/master/nad/esri) | 
|---|
| 90 | - josm-epsg           customizations to the epsg file, used together with the epsg file | 
|---|
| 91 | to generate data/projection/custom-epsg | 
|---|
| 92 |  | 
|---|
| 93 | - projection-reference-data.csv | 
|---|
| 94 | reference data for projection tests | 
|---|
| 95 | (see test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java) | 
|---|
| 96 | - projection-regression-test-data.csv | 
|---|
| 97 | regression data for projection tests | 
|---|
| 98 | (see test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java) | 
|---|
| 99 | - trans/*.lang          translation data for files that are not distributed, but used | 
|---|
| 100 | by the server for localization of the services; | 
|---|
| 101 | currently contains plugin descriptions in order to include translations | 
|---|
| 102 | in the downloaded plugin list | 
|---|
| 103 | - images/                 images, which are not for distribution, but may be useful later (e.g. high | 
|---|
| 104 | resolution and vector versions) | 
|---|
| 105 | - styles/                 files needed for map style maintenance | 
|---|
| 106 | - potlatch2/README      infos on how to update the Potlatch 2 style from upstream sources | 
|---|
| 107 | - patches/                  patches for external libraries used in JOSM (see below) | 
|---|
| 108 | - README                    this file | 
|---|
| 109 | - resources/                resource files that will be included in the JOSM jar file | 
|---|
| 110 | - data/                   data files that will be included in the JOSM jar file | 
|---|
| 111 | - fonts/                font files used for map rendering | 
|---|
| 112 | - gpx/                  different color gradients for gpx drawing | 
|---|
| 113 | - projection/           projection files | 
|---|
| 114 | - custom-epsg         list of projection definitions, auto-generated file created by ant task 'epsg' | 
|---|
| 115 | - security/*.pem        certificates that we like to accept for TLS connections, but are missing in the | 
|---|
| 116 | default Java certificate store | 
|---|
| 117 | - validator/            data files used by the JOSM validator | 
|---|
| 118 | - *.cfg               files designed for the old tagchecker, still in use | 
|---|
| 119 | - *.mapcss            default validation rules for the MapCSS-based tagchecker | 
|---|
| 120 | - boundaries.osm        OSM file containing boundary data for the states of the earth, including | 
|---|
| 121 | data for right and left-hand traffic | 
|---|
| 122 | - defaultpresets.xml    data file for the core tagging presets | 
|---|
| 123 | - help-browser.css      CSS file for the help sites (HTML content is downloaded from the website | 
|---|
| 124 | on demand, but displayed inside the programm in a Java web browser component.) | 
|---|
| 125 | - *.lang                translation data | 
|---|
| 126 | - *.xsd                 xml schema files for validation of configuration files | 
|---|
| 127 | - images/                 images distributed with the JOSM binary | 
|---|
| 128 | - icons                 images for the Potlatch 2 style | 
|---|
| 129 | - presets               images for the main mappaint style and the internal presets | 
|---|
| 130 | - styles/                 map styles included in JOSM | 
|---|
| 131 | - scripts/                  various scripts used by JOSM developers | 
|---|
| 132 | - BuildProjectionDefinitions.java | 
|---|
| 133 | called from the ant build file to combine the files epsg and josm-epsg | 
|---|
| 134 | to create the custom-epsg file for distribution | 
|---|
| 135 | - geticons.pl             tool to find all used icons and allows deleting unused icons | 
|---|
| 136 | searches also for images with incompatible svg code | 
|---|
| 137 | - optimize-images         short script to decrease size of PNG images | 
|---|
| 138 | - since_xxx.py            developer tool to replace "@since xxx" in Javadoc by the upcoming revision number | 
|---|
| 139 | - SyncEditorLayerIndex.java | 
|---|
| 140 | script to compare and analyse the differences of the editor layer index and the | 
|---|
| 141 | JOSM imagery list (see https://josm.openstreetmap.de/wiki/ImageryCompare) | 
|---|
| 142 | - TagInfoExtract.java     extracts tag information for the taginfo project | 
|---|
| 143 | - src/                      the source code of the application | 
|---|
| 144 | - start.html                HTML page to run the applet version of JOSM | 
|---|
| 145 | - test/                     automated software tests | 
|---|
| 146 | - data/                 resources used for some tests | 
|---|
| 147 | - functional/           functional tests (source code) | 
|---|
| 148 | - lib/                  libraries needed for (some of) the tests, including JUnit | 
|---|
| 149 | - performance/          performance tests (source code) | 
|---|
| 150 | - unit/                 unit tests (source code) | 
|---|
| 151 | - tools/                    libraries and tools that help in the development process | 
|---|
| 152 | - animal-sniffer-ant-tasks.jar | 
|---|
| 153 | used to build and check code signatures to ensure plugins binary compatibility | 
|---|
| 154 | - appbundler-1.0ea.jar  used to build Mac OS X package | 
|---|
| 155 | - checkstyle/           libs and config files for checkstyle (automatically detects code style | 
|---|
| 156 | problems in source code); can be launched as an ant target in build.xml | 
|---|
| 157 | - ivy/                  Apache Ivy binary, configuration file, and downloaded dependencies | 
|---|
| 158 | - jacocoant.jar         used to include coverage data into JUnit test reports | 
|---|
| 159 | - japicc/               used to generate a compatibility report between optimized jar and normal one | 
|---|
| 160 | - spotbugs/             libs and config files for spotbugs (automatically detects common bugs and potential | 
|---|
| 161 | problems in source code); can be launched as an ant target in build.xml | 
|---|
| 162 | - xmltask.jar           used to edit XML files from Ant for the OSX package | 
|---|
| 163 |  | 
|---|
| 164 | The 'patches' directory | 
|---|
| 165 | ----------------------- | 
|---|
| 166 | Some libraries that JOSM depends on, are patched for various reasons. The | 
|---|
| 167 | files in the patches directory can be used to roll back these customizations. | 
|---|
| 168 | This is useful in order to | 
|---|
| 169 | * inspect the changes | 
|---|
| 170 | * update to a newer version of the library but keep the modifications | 
|---|
| 171 |  | 
|---|
| 172 | You can use 'quilt' to manage the patches. E.g. the following command applies all of them: | 
|---|
| 173 |  | 
|---|
| 174 | $ quilt push -a | 
|---|
| 175 |  | 
|---|
| 176 | Of course, it is also possible to apply the patch files manually one by one. | 
|---|
| 177 |  | 
|---|
| 178 | Third party libraries | 
|---|
| 179 | --------------------- | 
|---|
| 180 | There are some third party libraries which are directly included in the source code tree, in particular: | 
|---|
| 181 |  | 
|---|
| 182 | * jmapviewer: Java component to browse a TMS map | 
|---|
| 183 | src/org/openstreetmap/gui (svn external) | 
|---|
| 184 | -> http://svn.openstreetmap.org/applications/viewer/jmapviewer/ | 
|---|
| 185 | * Apache commons compress: Support for bzip2 compression when opening files | 
|---|
| 186 | -> https://github.com/apache/commons-compress | 
|---|
| 187 | * Apache commons validator: Improved validator routines | 
|---|
| 188 | src/org/openstreetmap/josm/data/validation/routines | 
|---|
| 189 | -> http://commons.apache.org/proper/commons-validator | 
|---|
| 190 | * SVG Salamander: Support for SVG image format | 
|---|
| 191 | src/com/kitfox/svg | 
|---|
| 192 | -> https://github.com/blackears/svgSalamander | 
|---|
| 193 | * Metadata Extractor: Read EXIF Metadata of photos | 
|---|
| 194 | -> https://github.com/drewnoakes/metadata-extractor | 
|---|
| 195 | * Signpost: OAuth library | 
|---|
| 196 | -> https://github.com/mttkay/signpost | 
|---|
| 197 | * MultiSplitPane: Small lib for GUI layout management | 
|---|
| 198 | src/org/openstreetmap/josm/gui/MultiSplitLayout.java, MultiSplitPane.java | 
|---|
| 199 | -> https://github.com/floscher/multi-split | 
|---|
| 200 | -> https://community.oracle.com/docs/DOC-983539 | 
|---|
| 201 | * swinghelper: Class CheckThreadViolationRepaintManager to find EDT violations | 
|---|
| 202 | src/org/openstreetmap/josm/gui/util/CheckThreadViolationRepaintManager.java | 
|---|
| 203 | -> https://github.com/floscher/swinghelper | 
|---|
| 204 | * xz extractor | 
|---|
| 205 | -> https://tukaani.org/xz/java.html | 
|---|
| 206 | * OpeningHoursParser (MIT license) | 
|---|
| 207 | -> https://github.com/simonpoole/OpeningHoursParser | 
|---|