source: subversion/applications/rendering/OSMLabelOptimizer/INSTALL @ 29147

Last change on this file since 29147 was 17182, checked in by esscue, 10 years ago
File size: 3.0 KB
Line 
1REQUIREMENTS
2------------
3
41. Java Runtime Enviroment 1.5 or higher (http://java.sun.com/)
52. Apache Ant (http://ant.apache.org/)
63. Subversion (http://subversion.tigris.org/)
74. A patched version of Apache Batik (see below)
8
9CREATE A PATCHED VERSION OF APACHE BATIK
10----------------------------------------
11
12Current versions of Apache Batik (as of 2009/08/19) are not able to
13dynamically change the startOffset of a textPath Element. For details
14read my messages to the batik mailing list:
15http://www.nabble.com/Unable-to-change-startOffset-in-textPath-dynamically-td22113063.html
16
17Therefore it is neccassary to create a patched version of Batik:
18
191. Get the latest version of Apache Batik from the Batik subversion repository:
20
21     svn export http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk batik-svn
22
23   This will create a directory batik-svn containing the Batik sources.
24
252. Get the latest version of my patch from the Openstreetmap repository and export
26   it directly to the batik directory:
27 
28     svn export http://svn.openstreetmap.org/applications/rendering/OSMLabelOptimizer/misc/batik-patch-r805929.patch batik-svn/batik-patch-r805929.patch
29
303. Now cd into the batik directory
31 
32     cd batik-svn
33
34   and apply the patch
35
36     patch -p0 < batik-patch-r805929.patch
37
384. Now build the batik libraries using the build.sh script. For details on that see
39   the documentation of batik. If everything worked fine there should be a directory
40   batik-1.8pre/lib containing the batik library (i.e. a lot of jar files).
41
42BUILDING OSMLabelOptimizer
43--------------------------
44
451. Get a current version from the Openstreetmap repository:
46
47     svn co http://svn.openstreetmap.org/applications/rendering/OSMLabelOptimizer OSMLabelOptimizer
48
492. Copy the patched batik library (see above) to OSMLabelOptimizer/libs.
50
513. Change to the OSMLabelOptimzer directory and run ant:
52
53     ant dist
54
55RUNNING OSMLabelOptimizer
56-------------------------
57
58You can run OSMLabelOptimizer on any SVG file created with Osmarender
59(http://wiki.openstreetmap.org/wiki/Osmarender) and zoom leven 17. Examples can be found
60in the test directory (e.g. test/test17.svg and test/stachus.svg).
61For creating an optimized output "out.svg" from "test/test17.svg" use the
62following command in base directory of the repository:
63
64java -Xmx1000000000 -jar dist/OSMLabelOptimizer.jar test/test17.svg out.svg
65
66Another possibility is to use the experimental GUI for converting maps:
67
68java -Xmx1000000000 -cp dist/OSMLabelOptimizer.jar SVGApplication
69
70Here you can first open a svg file, then preprocess the file and afterwards start
71the optimization. After each step you can save the so far generated svg file. The
72GUI is at moment not very user friendly. You always have to wait until a step finished
73before you do the next step (especially you have to wait until the file is loaded and
74rendered).
75
76PROBLEMS & BUGS
77---------------
78
79If you encounter problems and bugs (so far there may be many of them) please inform me
80(User:Esscue) via the send email function of the openstreetmap wiki (http://wiki.openstreetmap.org).
81
Note: See TracBrowser for help on using the repository browser.