Database Comparison and
ArcMap Data Driven Pages
Henrik Thorén, Ramboll Water
Henrik Thorén
Ramboll
Water
MIKE URBAN
FOR DYNAMIC HYDROLOGICAL
AND HYDRAULIC SIMULATIONS WE USE
Place your screenshot here
MIKE URBAN
Developed by DHI in
Denmark
MIKE Urban is built on
top of the ArcMap
environment
The model is saved in
a Access database
(.mdb)
PROBLEM
• The models continuous
gets updated to mimic
different scenarios
• Automated way to
document updates to
MIKE Urban model
SOLUTION
• Utilize the built in
database comparison
tools in FME
• Write statistics to Excel
• Automatically create
maps with over the
areas that are updated
(Data Driven Pages)
Place your screenshot here
FME SOLUTION
Original	Attr.
Updated Attr.
Comparison
Excel
MDB
Data	Driven	Pages
Bounding Box
Maps
PROBLEM
“I not only want to compare the
updates, I want to know the before
and after value of the attributes”
World Class Workspace
Tables
Attributes
ATTRIBUTE COMPARISON
Output Access database
Place your screenshot here
ArcMap template
Data Driven Pages -
Python Code
import fme, fmeobjects, time, arcpy
def FeatureProcessor(feature):
map = FME_MacroValues['MAP']
output_folder = FME_MacroValues['OUTPUT_FOLDER']
mxd = arcpy.mapping.MapDocument(map)
mxd.dataDrivenPages.refresh() # Previous to the python script a shape file is written with bounding boxes. This shape file is already added to the mxd
logger = fmeobjects.FMELogFile()
logger.logMessageString("Generating maps based on the difference between the databases:")
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
mxd.dataDrivenPages.currentPageID = pageNum
logger.logMessageString("MAP_"+str(pageNum)+" is now beeing generated.")
arcpy.mapping.ExportToPNG(mxd, output_folder + "MAP_" + str(pageNum) + ".png", resolution=200, color_mode="24-BIT_TRUE_COLOR")
time.sleep(2) # It is important to sleep the script, so that larger maps has time to load completely before the next image is generated
del mxd
pass
OUTPUT FILES
TO REMEMBER
Stay curious about available
transformers – both new and
old – there is often transformers
that can simplify your work
Remember that Python can be
integrated with other software –
especially ArcGIS
HEADER
Body text. Lorem ipsum
dolor sit amet, eum dico
deseruisse ad. Mel te
illum dicam.
Body text. Lorem ipsum
dolor sit amet, eum dico
deseruisse ad. Mel te
illum dicam.
THANK YOU!
Henrik Thorén
ramboll.com | hent@ramboll.dk

Database Comparison and ArcMap Data Driven Pages

  • 1.
    Database Comparison and ArcMapData Driven Pages Henrik Thorén, Ramboll Water
  • 2.
  • 3.
    MIKE URBAN FOR DYNAMICHYDROLOGICAL AND HYDRAULIC SIMULATIONS WE USE
  • 4.
    Place your screenshothere MIKE URBAN Developed by DHI in Denmark MIKE Urban is built on top of the ArcMap environment The model is saved in a Access database (.mdb)
  • 5.
    PROBLEM • The modelscontinuous gets updated to mimic different scenarios • Automated way to document updates to MIKE Urban model
  • 6.
    SOLUTION • Utilize thebuilt in database comparison tools in FME • Write statistics to Excel • Automatically create maps with over the areas that are updated (Data Driven Pages)
  • 7.
    Place your screenshothere FME SOLUTION Original Attr. Updated Attr. Comparison Excel MDB Data Driven Pages Bounding Box Maps
  • 8.
    PROBLEM “I not onlywant to compare the updates, I want to know the before and after value of the attributes”
  • 9.
  • 10.
  • 11.
  • 12.
    Place your screenshothere ArcMap template
  • 13.
    Data Driven Pages- Python Code import fme, fmeobjects, time, arcpy def FeatureProcessor(feature): map = FME_MacroValues['MAP'] output_folder = FME_MacroValues['OUTPUT_FOLDER'] mxd = arcpy.mapping.MapDocument(map) mxd.dataDrivenPages.refresh() # Previous to the python script a shape file is written with bounding boxes. This shape file is already added to the mxd logger = fmeobjects.FMELogFile() logger.logMessageString("Generating maps based on the difference between the databases:") for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1): mxd.dataDrivenPages.currentPageID = pageNum logger.logMessageString("MAP_"+str(pageNum)+" is now beeing generated.") arcpy.mapping.ExportToPNG(mxd, output_folder + "MAP_" + str(pageNum) + ".png", resolution=200, color_mode="24-BIT_TRUE_COLOR") time.sleep(2) # It is important to sleep the script, so that larger maps has time to load completely before the next image is generated del mxd pass
  • 14.
  • 15.
    TO REMEMBER Stay curiousabout available transformers – both new and old – there is often transformers that can simplify your work Remember that Python can be integrated with other software – especially ArcGIS
  • 16.
    HEADER Body text. Loremipsum dolor sit amet, eum dico deseruisse ad. Mel te illum dicam. Body text. Lorem ipsum dolor sit amet, eum dico deseruisse ad. Mel te illum dicam.
  • 17.