Introduction. What is gvSIG Map Sheets?

gvSIG Map Sheets is an extension which allows the easy creation and printing of series of maps based on a special vector layer (a grid of sheet frames):

image/en/com_40p.png

Create a grid and adjust its frames if necessary

image/en/com_big_1.png
image/en/com_grid.png
image/en/com_40p.png

Tune the map layout while browsing how each final sheet looks like

image/en/com_big_2.png
image/en/com_map.png
image/en/com_40p.png

Save all sheets as PDF files in your hard drive or send them all to a printer (automatically in both cases)

image/en/com_big_3.png
image/en/com_print.png
image/en/com_40p.png

Installation

On-line installation

From the addons manager, choose the "Install from URL" option and use this URL: http://downloads.gvsig.org/download/gvsig-desktop/

IMPORTANT: You must install the "Layout document plugin" (build number 26 or higher) and the Map Sheets plugin:

image/en/mapsheets-layout26.jpg

***

Manually download the installer

Alternatively, you can download the installer using your web browser from this public folder (*.gvspkg):

http://devel.gvsig.org/download/projects/gvsig-mapsheets/pool/org.gvsig.mapsheets.app.mainplugin/

Then in the addons manager, choose the "Installation from file" option and choose the *.gvspkg file you have downloaded. Again, You must install the "Layout document plugin" (build number 26 or higher) as well.

Instructions

Table of contents

Map Sheet Grids

In this context, a grid of sheet frames (or simply, a grid) is a set of one or more rectangles with some associated attributres. The rectangle represents in world coordinates the area that is going to be printed in a gvSIG map (layout). These are the main attributes which are automatically created:

../image/en/um_overlap.jpg

Meaning of the OVERLAP attribute.

In this illustration, OVERLAP = 14 because a / d = 14 / 100. In the second example, b / d = 50 / 100 so the value of the OVERLAP field is 50.

The fields SCALE, DIMX_CM, DIMY_CM and OVERLAP are currently expected to be the same for all frames in a grid. More flexibility might be added in future versions by allowing different values in each frame.

Since the grid can be edited and also exported/imported as a shapefile, it is possible to add custom fields that can be used as active fields when creating the layout template (see following sections).

Creating a new grid

You can add a grid to the current view in two different ways.

From a view or a vector layer

Once you have a working gvSIG view, choose the 'View > Map Sheets > Create grid' menu item to access the grid creation dialog:

../image/en/um_create_grid.jpg

Grid creation dialog

Choose the desired method to create the new grid. The 'Based on features' option will not be available if there is no vector layer in the current view. The map area size in the map sheet can be expressed in cm or mm only. Do not use any thousands separator for the scale denominator.

../image/en/um_grid_created.jpg

New grid is added to the view.

If your settings cause a very high number of grid frames, an error message will show. You can change the maximum number of sheets allowed (see The mapsheets properties file section at the end of this page):

../image/en/um_too_many_msg.jpg

Error message if settings imply too many frames.

From an existing shapefile

You can create a new grid from an existing shapefile if it has the attributes mentioned before. They must be of numeric type except the CODE attribute which must be of string type. The shapefile may also have other attributes which you will be able to use while defining the map layout template. The geometries of the shapefile should be rectangles of the same size and consistent with the SCALE, DIMX_CM and DIMY_CM attributes. If a geometry which is not a rectangle is found, its bounding box will be used.

Manipulating the shapefiles geometries and mandatory attributes is not trivial. You are encouraged to create these shapefiles by exporting an existing grid (see below). The only risk-free operation is adding attributes.

Storing a grid

A grid can be stored for later use in two ways.

As a layer in the project

A grid is also a vector layer and is stored in the gvSIG project as usual.

As an external shapefile

You can export an existing grid as a shapefile by selecting the grid in the TOC and using the 'View > Map Sheets > Export grid as shapefile' menu item:

../image/en/um_enabled_menu.jpg

The 'View > Map Sheets' menu item allows you to export the grid as a SHP, among other things.

Having a grid in the shapefile format lets you manipulate it using other applications. For example you can do these basic operations:

  • add a new frame of the same size as the existing ones.
  • remove or move one or more frames.
  • add custom attributes which you'll be able to use while creating the map layout template.
  • changing the attribute values in a consistent way. For example:
    • multiply the SCALE attribute in all records by k and divide the DIMX_CM and DIMY_CM attributes by k
    • enlarge all geometries by a factor k and multiply the DIMX_CM and DIMY_CM attributes by k
    • enlarge all geometries by a factor k and multiply the SCALE attributes by k
Adjusting the sheet frames in a grid

The grid adjustment tool is activated by clicking on the 'View > Map Sheets > Adjust sheets...' menu option, which is enabled if the layer selected in the TOC is a Map Sheets grid. You will notice that grid frames adopt a reddish, semi-transparent fill color and are labeled with their CODE attribute. The adjusting tool is automatically deactivated if you select a different layer in the TOC. If the newly selected layer is also a grid, the previous grid will exit the adjustment mode and the newly selected grid will enter the adjustment mode. If the newly selected layer is not a grid, the new active tool will be the one that was active when the adjustment tool was chosen.

How the adjusting tool works

The varying effects of clicking, double-clicking and dragging are described in this table. The CTRL key is used to deal with frame selection/deselection:

Mouse location Action Effect Effect if CTRL key down Effect if SHIFT key down

On unselected

frame

Clicking   Frame is selected.  
Double-clicking Frame is deleted. [Not recommended] First click selects frame; second click prompts user to confirm deletion of selected frames.
Dragging Frame is dragged. Frame is selected, not dragged.
On selected frame Clicking   Frame is unselected.
Double-clicking Selected frame(s) are deleted. User is prompted for confirmation if there are two or more frames selected. [Not recommended] First click unselects frame; second click deletes.
Dragging Frame is dragged. Frame is unselected, not dragged.
Out of any frame Clicking    
Double-clicking New frame is added. User is prompted for valid CODE.
Dragging   If there are any frames selected, they are dragged so that relative location of mouse is preserved. If there are any frames selected, they are rotated following the mouse (move the mouse in the area located to the right of the sheet(s) to be rotated.
New feature: Rotating frames

You can rotate one or more frames at the same time. Select the sheet(s) you wish to rotate, then place the mouse a bit to the right of the selected sheet(s), then hold down the SHIFT key and drag the mouse to rotate the sheet(s). Rotation is limited to [-90, +90] degrees. This allows the North arrow to point at any direction between the right and the left margin (through the upper half of the sheet of paper):

../image/en/rotate-sheet.jpg

User is rotating selected sheet(s).

Adding frames

You can add a new frame by double-clicking on a place where there are no frames. You will have to enter a valid new CODE for the new frame:

../image/en/um_new_code.jpg

User is prompted for a new valid CODE.

A valid CODE is one that does not currently exist in the grid. You can then adjust the position of the frame if the presence of other frames did not allow you to create it in the right place.

../image/en/um_new_sheet.jpg

A new frame has been added.

Deleting frames

You can delete a frame by double-clicking on it. If the frame was selected and it was the only one selected, it will be deleted without confirmation. If it's not the only one selected, you will be prompted with a confirmation dialog before deleting all selected frames:

../image/en/um_delete_confirm.jpg

User is asked to confirm deletion of various frames.

Moving frames

You can move one frame (selected or not) by dragging it with the mouse (mouse down + mouse move + mouse up).

../image/en/um_adjust_sheets.jpg

Adjustment tool in action.

You can also move all the currently selected frames at the same time by dragging the mouse in a place where there are no frames and keeping the CTRL key down:

../image/en/um_move_several_2.jpg

CTRL + dragging outside the frames lets you consistently move selected frames.

Selecting/unselecting frames

The CTRL key is used to select/unselect frames. Click on a frame while keeping the CTRL key pressed to switch its status (from selected to unselected and viceversa). Other selection-related operations (such as clearing selection) can be performed normally (not with the adjustment tool) because the grid is also a standard vector layer.

Overlapping frames

If you click or start a dragging operation on a pixel where two or more frames overlap, only one of them (unpredictably chosen) is affected by the operation, so in some cases you will have to temporarily set aside an overlapping frame to access the frame of interest.

The Undo option

The u key will undo the latest operation performed on the grid frames. This applies to adjustment operations (adding, deleting and moving frames); it does not apply to selection/deselection operations. A heap of operations is used to achieve this, so you can undo every operation until the initial state is reached. The heap of recorded operations is cleared every time the grid exits the adjustment mode.

Map Sheets layout template

Introduction

The Map Sheets extension provides a new type of document: the dynamic layout template. It's a special type of layout. The differences with the traditional layout are:

  • it is intended to be used in association with a grid
  • it includes a special type of active (we can call them dynamic too) frames which will automatically refresh when you select the different frames in the print dialog frame list (see below)
../image/en/um_project_manager.jpg

A new type of document is added.

Creating a dynamic layout template from a grid

The goal of having a grid is using it as an index to generate many printable map sheets.

Layout template settings dialog

Before opening the layout template settings dialog, check that the view's TOC is properly set: order and visibility of layers, symbology, transparency. If you are going to use a background layer, you can set it as not visible in the TOC to work more confortably. A background layer is not necessarily visible in the view or in the layout template but will be printed under all other layers in the final sheet.

../image/en/um_create_layout.jpg

User chooses layout template initial settings

In the lower part of this dialog you can choose the active fields that will be added to the layout template. You will typically use CODE to uniquely identify each final sheet and SCALE. The text field lets you input a pattern to be used. The wildcard character is *. This is where you can use the optional attributes (for example, if you edited the shapefile specifically to have some additional information for each grid frame.)

Tuning the layout template

After clicking the 'Accept' button in the previous dialog, the initial version of the dynamic layout template will be presented.

../image/en/um_layout_first.jpg

Draft version of the layout template. Tuning now starts.

The view frame and the active fields will be updated with the values of the first grid frame. At this point you will probably need to tune the layout to make it look better. These actions are performed in the same way as if you were dealing with a conventional gvSIG layout:

  • Drag the main view frame to place it exactly where you want. Notice that -for consistency- you can move it but you cannot resize it.
  • Change the size and texts of the title and active fields and their positions.
  • Add other conventional frames (texts, north, etc.)

Printing the map sheets

Once you have tuned the layout template according to your taste and needs, it's a good idea to check the view for these possible adjustments:

You can now access the main print dialog from the layout template by using the 'Map > Map Sheets > Print map sheets' menu item:

../image/en/um_print.jpg

Print dialog lets user browse sheets and choose various print options.

On the left side of the dialog there is a list with all the grid frames, identified by their CODE attribute. If you click on one of them, the template layout will be updated, i.e. the main view frame will move to the rectangle defined by the frame geometry and the active fields (associated with the CODE, SCALE attributes and others you might have defined) will be refreshed as well.

On the right side of the dialog you can choose:

As PDF files

If you choose to export the map sheets as PDF files, they will be created in a subfolder in the user's folder (typically C:\Documents and settings\user\mapsheets in Windows systems and /home/user/mapsheets). A little dialog will show the progress:

../image/en/um_print_progress.jpg

Print progress dialog.

Another message dialog will tell you when the PDF files are available:

../image/en/um_pdf_list.jpg

New PDF files successfully created.

To a printer

If you are using a Windows system, you will se a checkbox by the 'Print' (to printer) button. If you check it, the printer-specific settings dialog will show after you have chosen the target printer. In the first place, the template layout needs to be close to speed the printing process:

../image/en/um_layout_closed.jpg

(1) Layout template needs to be closed in order to speed up the print process.

../image/en/um_choose_printer.jpg

(2) User chooses printer among available ones as usual.

../image/en/um_printer_specific_settings.jpg

(3) Windows systems only: User can choose printer-specific preferences.

Caution!

Note about printer-specific settings dialogs

When you terminate the gvSIG session, the application tries to restore the printer-specific settings (for example, color preferences, number of sheets per page, etc). Unfortunately, on some Windows systems this is not possible, and a little error message appears:

../image/en/um_operation_not_completed.jpg

gvSIG Map Sheets was unable to restore printer-specific settings to previous values.

In this case, the printer settings selected for the last series of map sheets will be used from that moment every time you use the printer from any application in that computer. One way to avoid this issue is doing a last printing from the Map Sheets extension to manually restore the printer settings to their default settings. Of course, you can always change the printer settings from any other application which allows you to do so.

The mapsheets properties file

In properties/mapsheets.properties you will find a self-explanatory properties file which allows you to set the value of a few important variables:

grid.sheet.max=200
# argb
grid.sheet.symbol.border.color=255,0,0,0
grid.sheet.symbol.fill.color=80,0,0,0
# argb
grid.sheet.symbol.selection.border.color=255,50,50,0
grid.sheet.symbol.selection.fill.color=80,255,255,0
# argb
grid.sheet.symbol.editing.border.color=255,192,0,0
grid.sheet.symbol.editing.fill.color=80,255,0,0
grid.sheet.id.separator=_

Credits

image/en/logo-gvsig-asoc.jpg

Map Sheets for gvSIG 2.0

The gvSIG Association has ported the Map Sheet plugin to be used in gvSIG 2.0.

The Deputación de Pontevedra in association with Dirección Xeral de Sostibilidade e Paisaxe de la Consellería de Medio Ambiente, Transporte e Infraestruturas de la Xunta de Galicia funded the first version of this plugin, a gvSIG Desktop extension that provides a new functionality consisting in the automatic creation of series of maps covering a certain area of interest.

More details in the gvSIG Map Sheets website.

Development & technical coordination

Prodevelop development team:

  • Juan Lucas Domínguez

Requirements

gvSIG prerequisites

General gvSIG hardware/software prerequisites can be checked here: http://www.gvsig.org

Software prerequisites

This version of the Map Sheets plugin is intended for gvSIG 2.0.

Hardware prerequisites

No special hardware prerequisites need to be met. A reasonable amount of RAM will be needed if the user tries to print or create PDF files with a large amount of graphical data. This usually happens when raster layers are printed on large paper formats. DPI also affects the amount of memory needed.

Platforms supported

The gvSIG Map Sheets extension is 100% pure Java so no platform limitations exist. You can use it on Windows, Linux or MacOS-based computers.