Example PIN File Definition

The following example is a simple Map Report definition in a PIN file that creates the above chart.

  * Map report for Seral Stage
     table4 = GeoRelationalStore.openOrReuseGeo("Block attributes");
     theme5 = new DitherTheme(table4,"feature.Seral.");
     theme5.setCaption("Dithered Seral Stage");
     theme5.addElement("Regen", new Color(250, 230, 0), "feature.Seral.regen");
     theme5.addElement("Young", new Color(200, 250, 200), "feature.Seral.young");
     theme5.addElement("Mature", new Color(100, 190, 100), "feature.Seral.mature");
     theme5.addElement("Old", new Color(128, 64, 64), "feature.Seral.old");
     layerList2_3 = new GeoRelLayer(table4,theme5);
     layerList2_3.setTitle("Seral Stage Development");
     layerList2 = new LayerList();
      reportWriter.addReport(new MapReport("maps/seral/period02.png", 
                             "Seral stage pattern for year 10", 

In this particular example, which can be found in the sample dataset, a Map report was added to the subfolder "seral" with the filename "period02.png". A filename extension of .PNG was added as that is the only file output from this report. The title of the report, "Seral stage pattern for year 10" will appear at the top of the map, as well as in the Index Report, and the directory tree. "layerList2", which was defined above will dictate the colours and legend used for the map. Many lines of text defines the layer list. You can also right click on a legend of a map you wish to make a map report of in the Patchworks window and click on "show constructor". You can copy the syntax that defines that layer and paste it into your PIN file. The "2" denotes the period for the which the map will be drawn (with 5 year periods for this scenario, this will also equal year 10). The width and height of the report are 600 and 720 respectively. The position of the legend is at 10 units over (x) and 20 units up (y) and the legend will be shown (true).

The information for this report was derived from the Block Table using the column "feature.Seral.*".

The map report class also creates an "html" report. This report supports zooming in to a specified zone, using the 'mapextent' parameter. The mapexent is specified in map coordinates, using the bottom left corner of the extent and the width and height. For example http://localhost/current/map.html?mapextent=400000,300000,10000,15000 will specify that the report should zoom in to an that has a lower left corner of 400000 east and 300000 north with a width of 10000 and a height of 15000. The units are typically in metres. The mapextent parameter can also be assigned to the report using the Report.setDefaultParams(java.lang.String[][]) method. For example, MapReport me = new MapReport(...); mr.setDefaultParams(new String[][] {{"mapextent","400000,300000,10000,15000"}});