jps services
  • Home Page
  • GIS Training Courses
    • QGIS Training Courses
    • ArcGIS Training Courses
    • MapInfo Pro Training Courses >
      • MapBasic Training Course
  • About
  • Blog

Background to the Atlas Program and overview of the code

24/7/2018

0 Comments

 
The PrintLayout program was developed by Egge-Jan Pollé as a template for creating a series of maps by iterating through a series of polygons in a single map layer. This mabasic program was menu based.
The Atlas program, which utilises the new ribbon interface, was developed from this PrintLayout program and consists of a number of modules controlled via the AtlasRibbonInterface module.
The AtlasRibbonInterface module contains the Main program from which four ribbon tabs are accessed.
The first ribbon tab is called Atlas Example and calls the module Atlas_Dialog.
The second ribbon tab is called Mask Settings and calls the module RibbonMaskSettings.
The third ribbon tab is called Data Settings and calls the module InputAtlasDefaultSettings.
The fourth ribbon tab is called About Atlas Example and calls the module  AtlasAbout.
The Atlas_Dialog checks that tables are open then it calls CartoLegend. 
CartoLegend checks that the map is in focus. Then it cycles through the available layers for map layers and then checks to see if there is a thematic layer.
​CartoLegend then calls ThematicName.
ThematicName checks that a least one window is open.
Then there is a check again to ensure the map window is in focus.
Next the module iterates through the layers to check for a thematic layer. If there is a thematic layer then the cartographic boolean variable is set to False.
Then control returns to Atlas_Dialog.
Next this module checks to see if the ShadeInfo1 module has been called previously. If it has the variable sShadeText is reset.
Next the ShadeInfo1 module is called.
ShadeInfo1 first checks whether sShadeText contains text. Next the Windows information concerning the thematic layer is read into the variable sText.
The module parses the text so that it can be used to create a thematic output at the layout stage.
Then control returns to Atlas_Dialog and the layers are iterated through to enable the user to choose a specific layer and column to create maps of individual polygons from.
Next MLB module is called.
This module starts by checking to see if the default settings are needed.
Then a check is made to see if the regions array needs resetting.
A call is then made to PopulateRegionsArray which populates the array based on the regions chosen. In the MLB module the dialogue box is shown to enable the user to choose one or more regions to print. A4 and A3 options are made available.
The MLB module then calls CreateMaskMaps
The CreateMaskMaps module first checks to see which paper size has been chosen.
Then a SQL query is run to select the region to be printed. ​
Next the module checks to see if the output should be portrait or landscape.
Then, if appropriate, the variables from the attribute table for the variable text output is initialised. You would update this section of code with your own map data variable information.
Next a map is made of the selected region.
A check is made to see if a mask is required. If so the CreateRibbonMask module is called.
Next the AddMaps module is called.
This module iterates through the map layers and adds them to the selected region layer.
If there is a thematic layer then the command sShadeText is run. CreateMaskMaps ends by closing the various tables used in the map creation.
The process is repeated until all the selected regions have been printed.
You can obtain the Atlas program from the  Pitney Bowes community download page with this link
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Author

    Joe Short BSc has been involved with various mapping solutions for over twenty years.  If you are considering implementing a GIS  or have ArcGIS Pro, MapInfo Pro or QGIS training requirements, jps services would be happy to be of assistance to your organisation. 

    Archives

    April 2020
    March 2020
    October 2019
    September 2019
    August 2019
    July 2019
    March 2019
    November 2018
    October 2018
    August 2018
    July 2018
    November 2017
    October 2017
    September 2017
    July 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    May 2016
    February 2016
    September 2015
    August 2015
    April 2015
    February 2015
    November 2014
    October 2014
    July 2014
    June 2014
    May 2014
    March 2014
    February 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    June 2013
    May 2013
    April 2013
    February 2013
    December 2012
    October 2012
    September 2012
    August 2012
    July 2012

    Categories

    All
    Arc Gis
    Arcview
    Autodesk
    Cad
    Gis Training
    Local Government
    Mapbasic
    Mapinfo
    Quantum Gis
    Relational Databases
    Saga Gis

    RSS Feed