Lilac Help
Lilac displays a vector map of the world using user-selected projections and scale. The world map consists of segments for the coastlines, political boundaries, and rivers for each of the continents (Asia, includes Australia; Africa; Europe; South America, includes Anarctica; North America). The user selects the segments, the projection and the scale of the map to display. The maps can be saved in Scalable Vector Graphic (SVG) format, which can be displayed in any SVG-capable browser (tested in Adobe SVG Viewer 3.02, Batik Squiggle 1.6, Firefox 1.5, and Opera V9 beta). Lilac includes functions for converting latitude/longitude to X/Y coordinates that can be used by developers to manually add map-related markers to the SVG file.
Getting Started
- You need Java 5 to run Lilac. Java 5 is available from the Sun web site. Java 5 is simple to install on a Windows system. If it isn't installed on your system, install it now.
- Lilac consists of two files, a jar file (lilac-1.3.jar) and data file (WDB.zip), that must be downloaded and saved in the same directory.
- To run Lilac in various environments:
- To run the program from Windows Explorer, double click on the jar file. The jar file is normally associated with javaw.exe.
- To run the program from the Window command line, open a command window where the jar file is located and type:
javaw.exe -jar lilac-1.3.jar
- To run the program from the Unix command line, type:
java.exe -jar lilac-1.3.jar
- Once Lilac is running:
- To display a map segment, select Map->Segments from the menu, and select the map segments to display. Start with one map segment to keep things simple.
- Use the 'r' key to re-center the display to the current cursor position.
- Use the 'i' key to zoom in.
- Use the 'o' key to zoom out.
- Use the mouse wheel to zoom in/out.
- If you have trouble navigating to a map segment that you selected for display, select Display->Set Viewport from the menu, and select the continent. The display will recenter and set the scale for viewing the selected continent.
File Menu
- Save Preferences - Saves the user preferences (e.g., displayed segments, display center lat/long, display scale). When Lilac restarted, the display is initialized using saved user preferences. You can remove all the user preferences by deleting the "user.properties" file that is in the directory with the Lilac jar file.
- Export As SVG - Displays a file export dialog allowing the user to export the map display as an SVG file. Depending on how you intend to use the SVG-generated data, you may want to try various Lilac display scales to get the right level of detail in the SVG display. The SVG file contains information about the projection settings when the file was generated. This information can be used to set Lilac to the same projection-configuration, which is necessary if you intend to use the Calculate Screen Coordinates function at a later time.
- Exit - Exit the program. You will be prompted to save the current user preferences.
Display Menu
- Recenter - Changes the latitude/longitude of the display center and/or change the display scale.
- Options - Displays a dialog allowing the user to show, hide and change the color of the map graticule, the display center point, and the map legend.
- Set Viewport - Sets the display center and scale for viewing the selected continent. This function does not affect the segments selected for display, so it is possible to set the viewport and see no map data.
- Calculate Screen Coordinates - Calculates the screen coordinates for the input latitude and longitude, using the current projection. The screen coordinates can be used when manually adding display items to an SVG file generated by Lilac. To generate the correct screen coordinates, the Lilac projection, center latitude/longitude, scale, display width and display height must match the settings when the SVG file was originally generated. Lilac writes the projection, center latitude/longitude, scale, display width and display height values to the SVG file. Add markers by modifiying the lat/long, filling in the Marker Text field and clicking the Add Marker button. The markers are not saved.
- Change Look & Feel - Changes the user interface look and feel (LAF). The LAF's available depend on the LAF's that have been installed in the Java environment.
Map Menu
- Fill - Turns on/off the continent and lake color fill.
- Colors - Displays a dialog that allows the user to select colors for land, water, political boundaries, and display background.
- Segments - Displays a dialog that allows the user to select the map segments to display. The yellow background indicates that the segment still needs to be loaded from a file. A progress bar is displayed as the segments are loaded. The load-indicator color can be obscured in certain look and feel settings. Lilac performs vertex reduction based on the map scale. As you zoom in/out, you will notice that coastlines change shape. Also notice that islands/lakes disappear at high map scales and reappear at lower map scales. It is possible to load map segments and not see them displayed due to the current display scale, center point and projection. You may have to zoom out, re-center the display, and zoom in to get to your area of interest.
- Level of Detail - Displays a dialog that allows the user to select the level of detail to display. The levels of detail range from 1 to 15, with 15 being the most detail. All segments do not 15 levels of detail. More detail means more line segments, which means slower performance and bigger SVG files. To see an example of the level of detail filtering working, go to an area in the map where you know there are many islands or lakes. Increase the level of detail setting and click OK. More islands/lakes are displayed.
- Projections - Displays a menu that allows the user to select a map projection. There are presently just two projections (Mercator and Lambert Azimutal Equal-Area).
Help Menu
- Contents - Displays this help file.
- About - Displays information about Lilac.
Out Of Memory Error
If you try to load all the map segments without modifying the Java command line parameters, the Java heap runs out of space. You will notice that the progress bar updates get very slow, and eventually, an error dialog is displayed. You can increase the size of the heap by running Java with the "-Xmx192m" option. To modify in various environments:
- To run the program from the Window command line, open a command window where the jar file is located and type:
javaw.exe -Xmx192m -jar lilac-1.3.jar
- To run the program from the Unix command line, type:
java.exe -Xmx192m -jar lilac-1.3.jar
- Optionally in Windows, you can modify the jar file command association in Window Explorer by using the Tools->Folder Options menu item. Select the File Types tab and select the JAR file extension. Click on the Advanced button. Click on the Edit button. In the "Application used to perform action" field, add -Xmx192m after -jar. Click on OK, OK, and Close to close the windows that have been opened. Now when you double-click on the jar file, it will run with the needed amount of memory space.
The Map Data
The map data is in the WDB.zip file. The data files are a plain text version of the CIA World DataBank II, converted by Dave Pape. Quoting from the original README file, "the political boundaries are those of the time that the DataBank was originally created, sometime in the 1980s. Also, whoever created the DataBank considered North America to consist solely of the US and Canada." The original README file is included in the zip file.
Contact Information
Send questions, comments, and suggestions to peter at fastsvg.com.
Copyright 2006. Peter Thompson. All rights reserved.