Generating map books

Just wondering if there is a way to utilise GM scripting tools to generate map books. I have a dataset with around 100 polygons and want to generate a PDF map for each polygon in the dataset. Obviously doing this by hand is very tedious and was looking for some hints on whether / how this could be achieved in GM.
Cheers
James
Cheers
James
Comments
I'm trying something rudimentary like the following code to achieve an outcome..to load a GM workspace...get a shapefile to use as the polygon crop layer...export a PDF map for each polygon in the dataset. At the moment the script is doing nothing at all as far as I can see?? Also, I can't work out the export file naming business?? How do you use POLYGON_CROP_NAME_ATTR along with FILENAME??
GLOBAL_MAPPER_SCRIPT VERSION=1.00
REQUIRE_WORKSPACE="C:\Map_Data\Test_Bookplot_workspace.gmw"
EXPORT_PDF POLYGON_CROP_FILE="C:\Map_Data\test_bookplot_shapes.shp" POLYGON_CROP_USE_EACH POLYGON_CROP_BBOX_ONLY=YES POLYGON_CROP_NAME_ATTR="Ident" DPI=300 PDF_PAGE_SIZE=A4 PDF_PAGE_ORIENTATION=LANDSCAPE PDF_FILL_PAGE=YES FILENAME="c:\Map_Data\Map_Book.pdf"
Other than that this appears to be the bones of a script to generate 'map books' in GM. Knowing the huge range of export functionality in GM already it would be quite nice to see a seperate comprehensive dialogue for map_book / atlas generation...taking the best bits from other (quite flakey) plug-ins for other software to create a robust solution.
GLOBAL_MAPPER_SCRIPT VERSION=1.00
EXPORT_PDF POLYGON_CROP_FILE="C:\Map_Data\test_bookplot_shapes.gmp" POLYGON_CROP_USE_EACH POLYGON_CROP_BBOX_ONLY=YES POLYGON_CROP_NAME_ATTR="Ident" DPI=300 PDF_PAGE_SIZE=A4 PDF_MARGINS="0.5,0.5,0.5,0.5" PDF_PAGE_ORIENTATION=LANDSCAPE PDF_FILL_PAGE=YES FILENAME=.pdf
Also note if you want to do this in the user interface, just select all of the polygons to crop to prior to export, then do the Export PDF command and on the Gridding tab select to Grid to the selected areas. This will do a separate export for each selected area and you can select which attribute to use for naming the individual PDF files that are exported.
In the future we also likely add a specific Map Book export option for PDF to create a multi-page PDF file.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com
Useful to find out how powerful the scripting is though! Also re Map Book export dialogue...very good idea and would fit with the existing large range of GM export options. Would be useful to get a spec together. Personally I'd like to see the following:
-option to pad single polygons by say a 50m buffer to supply some mapping context around the perimiter of the polygon
-option to amalgamate all the single pdf docs produced into one big pdf file
-option to add text overlays on to each pdf sheet which is populated with polygon attribute data - in the same way the file naming can use polygon attribute information
-option to produce an index sheet, creating polygons for each sheet of paper produced with a page number attribute used for labelling purposes
-option to get a map book created at a continuous scale, but making sure there is at least one sheet covering all data on a specific layer...we recently needed a map book showing the grass cutting on highway verges for everywhere in the borough and this mode of operation is handy (as opposed to gridding by individual polygons the map layer is scanned first and sheets created for everywhere that there is some data all at the same scale)
Many thanks for the help on this.
James
Thanks for the additional list of requests for map books, that's basically what we have in mind for our map book PDF functionality. Our internal task list number for this is 9967.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com