Exporting a Shape File as a Style Intelligence Map

To prepare and export a shape file for use with the Style Intelligence, follow the steps below.

1. Copy the shapefile (.shp) and any associated files (.dbf, .shx, etc.) to a location that is accessible to the OpenJUMP application.

2. Launch the OpenJUMP application.

3. Choose 'Open File' from the OpenJUMP 'File' menu. Select the shapefile that you wish to export, and press 'Finish'. (In this example, world.shp is a shapefile containing the political boundaries of all countries in the world.)

 

Consolidation merges all shapes for a atomic entity (e.g., a single country) into a single feature.

4. Consolidate the logical map features. To do this, follow the steps below:

a. Select 'Consolidate Features' from the 'InetSoft' menu. This opens the 'Consolidate Features' dialog box.

 

b. In the 'Layer' menu, select the desired geographical layer.

c. In 'ID attribute' menu, select the attribute that uniquely identifies the logical map features. (In this example, this is the country name.)

d. Press 'OK'. This creates the consolidated map, which is listed under the 'Result' node in the OpenJUMP project tree.

 

e. (Optional) To conserve memory, delete the original 'world' layer from the 'Working' node of the OpenJUMP project tree. To do this, right click on the 'world' entry, and choose 'Remove Selected Layers'.

5. (Optional) If you are creating a map of the United States, select 'Create U.S. inset' from the 'InetSoft' menu to inset the regions for Alaska and Hawaii. (This yields a transformed view of Alaska and Hawaii commonly used in published U.S. maps.)

6. To reduce the memory required by the map, remove polygons that have areas smaller than a specified size. To do this, follow the steps below:

a. Select 'Area histogram' from the 'InetSoft' menu. This opens the 'Area Histogram' dialog box.

b. Select the desired 'Layer', and set the 'Minimum', 'Maximum', and 'Interval' properties of the histogram.

 

For example, a minimum of 10%, maximum of 100%, and interval of 10% generates histogram values for the following percentages: 10, 20, 30, 40, 50, 60, 70, 80, 90, 100.

c. Click 'OK' to generate the histogram.

d. To view the histogram, press the 'Output Window' button in the OpenJUMP toolbar.

 

The histogram indicates the percentage of the polygons in the map which would be removed for a given area threshold. Use the histogram to identify the proper area threshold for removing polygons. For example, the histogram below indicates that by removing all polygons smaller than an area threshold of 0.046081, you could effectively remove 90% of polygons in the map.

 

In this example, areas in the range of 0.04 units are probably not visually significant compared to other areas, the largest of which is approximately 6000 units. Therefore, by using a polygon removal threshold of 0.04 you can eliminate the majority of polygons without detectably altering the displayed map.

e. Select 'Remove small polygons' from the 'InetSoft' menu. This opens the 'Remove Small Polygons' dialog box.

 

Note: The most significant (largest) polygon of a map feature (e.g., country) is always retained regardless of the threshold.

f. Select the desired 'Layer', and enter a 'Threshold'. Polygons with areas smaller than the threshold will be removed from the map. In this case, a value of 0.04 will result in the removal of approximately 90% of the map's polygons.

g. Press 'OK' to initiate the polygon removal. This creates a new map layer (“world consolidated areas removed” in the example).

 

h. (Optional) To remove the original layer (“world consolidated”), right-click the “world consolidated” node, and choose 'Remove Selected Layers' from the context menu.

You may need to experiment with dif­ferent area thresholds to determine which yields the best results.

i. To view the report for the polygon removal operation, press the 'Output Window' button in the OpenJUMP toolbar.

 

7. To help reduce the memory required for the map, determine the maximum precision to be used. Follow the steps below:

a. Select 'Find Precision' from the 'InetSoft' menu. This opens the 'Find Precision' dialog box.

 

b. Select the desired layer, and press 'OK'.

c. Press the 'Output Window' button in the OpenJUMP toolbar to view current precision. (The precision is expressed as the number of decimal places used to represent the map coordinates.)

 

If the precision is unnecessarily high, you can reduce it in the next step. (A precision of six decimal places is more than adequate for most cases.)

8. Prepare the map for simplification. Follow the steps below:

a. Select 'Node lines and polygons' from the 'InetSoft' menu. This opens the 'Noding' dialog box.

b. Select the desired layer, and enter a value for 'Precision'. (A precision of six decimal places is more than adequate for most cases.)

 

c. Press 'OK'. This snaps all coordinates to the specified precision and corrects some common topological errors.

d. (Optional) To remove the original layer (“world consolidated areas removed”), right-click the “world consolidated areas removed” node, and choose 'Remove Selected Layers' from the context menu.

9. Simplify lines and polygon boundaries by removing insignificant points. Follow the steps below:

a. Select 'Point threshold histogram' from the 'InetSoft' menu. This opens the 'Point Threshold Histogram' dialog box.

b. Select the desired 'Layer', and set the 'Minimum', 'Maximum', and 'Interval' properties of the threshold histogram.

For example, a minimum of 99%, maximum of 100%, and interval of 0.1% generates histogram values for the following percentages: 99.0, 99.1, 99.2, 99.3, 99.4, 99.5, 99.6, 99.7, 99.8, 99.9, 100.

 

c. Select the desired simplification method in the 'Algorithm' menu. In most cases the 'Visvalingam-Whyatt' algorithm produces superior results. However, the 'Douglass-Peucker' algorithm may be faster.

d. Press 'OK'. This generates a histogram of boundary point significance.

e. To view the histogram, press the 'Output Window' button in the OpenJUMP toolbar.

 

The values in the his­togram represent the point “significance,” as determined by the simplification algo­rithm.

The histogram indicates the percentage of boundary points which would be removed for a given point “significance” threshold. Use the histogram to identify the proper point significance threshold for border simplification. For example, the histogram above indicates that by removing all points with significance smaller than 1.094881, you would effectively remove 99.4% of the boundary points.

In this example, points with significance in the range of 1.0 are probably not visually important compared to other points, the most significant of which have a value of approximately 665. Therefore, by using a point removal threshold of 1.0 you could eliminate the majority of points without detectably altering the displayed map.

10. Run the simplification algorithm. Follow the steps below:

a. Select 'Simplify lines' from the 'InetSoft' menu. This opens the 'Simplify' dialog box.

 

b. Select the desired 'Layer', and choose the same 'Algorithm' that you used in the previous step.

c. Enter a 'Threshold' value. Boundary points with significance smaller than the threshold will be removed from the map. (In this case, a value of 1.0 will result in the removal of approximately 99% of the map's points.)

d. Press 'OK' to start the simplification.

e. (Optional) To remove the original layer (“world consolidated areas removed noded”), right-click the “world consolidated areas removed noded” node, and choose 'Remove Selected Layers' from the context menu.

You may need to experiment with dif­ferent point thresholds to determine which yields the best results.

f. To view the report for the point removal operation, press the 'Output Window' button in the OpenJUMP toolbar.

 

11. Export the map to Style Intelligence. Follow the steps below:

a. Select the desired layer in the OpenJUMP project tree. Then select 'Export layer' from the 'InetSoft' menu. This opens the 'Export Layer' dialog box.

 

b. Specify the 'Map file' location. The map file must be named “mapdata.xml” and must be located in the server repository directory (by default, sree/WEB_INF/classes). If the file does not exist, browse to the repository directory and enter “mapdata.xml” in the 'File Name' field.

c. Specify the 'Map type'. This is the top-level category for the map. For example, a map of type “New Jersey” might have layers (specified below) such as “New Jersey Counties” and “New Jersey Zip Codes”.

Select an existing layer to overwrite that layer.

d. Specify the 'Layer name'. This is the name for the particular map you are exporting.

Note: The defined map type and any defined layers will appear in the menus of the Chart Editor's geographical panel when you edit a geographical field in Style Intelligence. See Creating a Map Chart for more details on using the Chart Editor.

 

e. Select the 'Feature ID'. This is the attribute that uniquely identifies the map features. (In some cases this may be the FIPS or ISO code for a feature.)

f. Select the 'Display name'. This is the attribute that contains the default, human-readable, names of the map features. (This may be the same as the Feature ID.)

g. (Optional) Select any desired 'Alternate names'. These are attributes that contain alternate display names for the map features. (These might be state abbreviations, ISO codes, etc.)

h. Enable the 'Calculate' option to automatically calculate the label coordinates as the centroids of the feature geometry. (If you do this, skip the following two steps). If you wish instead to use attribute values to control label positioning, disable this option.

i. If you have disabled the 'Calculate' option, specify for 'Label x-coordinate' the attribute that contains the x-coordinates (longitude) for feature label placement.

j. If you have disabled the 'Calculate' option, specify for 'Label y-coordinate' the attribute that contains the y-coordinates (latitude) for feature label placement.

k. Enable the 'Exclude' option if you do not want secondary label coordinates to be included in the exported data. (If you do this, skip the following two steps). If you wish to specify secondary coordinates, disable this option.

Note: Secondary coordinates are not currently used when rendering a chart.

l. If you have disabled the 'Exclude' option, specify for 'Label secondary x-coordinate' the attribute that contains the secondary x-coordinates (longitude) for feature label placement.

m. If you have disabled the 'Exclude' option, specify for 'Label secondary y-coordinate' the attribute that contains the secondary y-coordinates (latitude) for feature label placement.

n. Press 'OK' to export the map data to the Style Intelligence repository directory.

12. Restart the Style Intelligence server. Your custom map will now be available in the 'Map' menu of the Chart Editor, along with the predefined maps.

<< Installing OpenJUMP and the InetSoft Extension © 1996-2013 InetSoft Technology Corporation (v11.4) Editing a Custom Map >>