DDP custom index layer

534
5
06-11-2014 07:42 PM
joshuathomson
New Contributor
I am trying to create a set of maps using Data Driven Pages. I have a feature class of polygons and wish to have maps that use each of these polygons to define the extent.

The polygons are of varying sizes. I don't know whether it is preferable to choose 1 size/scale of map and have some polygons covered ny 1 map and others needing many maps.

I think that there needs to be at least 2 different scales as there is a big difference between the largest and smallest polygons

Any ideas/ clarifications needed.
Thanks
Tags (2)
0 Kudos
5 Replies
JohnSobetzer
Frequent Contributor
It's your call whether or not a particular scale or scales works for you.  Try them out.  You can go around manually through the layout extents and decide what scales to use.  Then you can specify that scale in a field in the index layer and in the DDP setup box select that field.

Another approach would have you go to each "Map" and adjust the layout scale to what you like best, and then bookmark it.  Later you can convert the bookmarks to polygons for your index layer.  Alternately at each one layout extent you can use the following add in: http://www.arcgis.com/home/item.html?id=a9b032f739254ebeb6221c9294ebc886 to add a polygon to your index layer.  Another alternative is to use python to set the extents.  See http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000060000000.

Using any of the foregoing you may want to look at your reference scale setting for your data frame, so that you can get the symbology to display as you like.

Then run the DDP and see if you like it.  The great thing about using it to export to pdf, is it runs without you and you can go back and make some changes, and redo it.
0 Kudos
joshuathomson
New Contributor
Thanks, I'll try out the different methods you have listed.
0 Kudos
joshuathomson
New Contributor
I think that using python to create polygons from extents will work great... but Im having some issues with creating those polygons.

All the python script runs without error, but the resultant Bookmarks feature class is empty.

Is there a certain form that the 'Bookmarks' and 'Template' feature classes need to be in??/

Thanks
0 Kudos
joshuathomson
New Contributor
I have been trying to use python to create a custom polygon layer that represents the extents of all the maps I wish to create...

I have about 60 extents, and when I run the script, it comes up with this error:

for bkmk in arcpy.mapping.ListBookmarks(mxd):
    array.add(arcpy.Point(bkmk.extent.XMin, bkmk.extent.YMin))
    array.add(arcpy.Point(bkmk.extent.XMin, bkmk.extent.YMax))
    array.add(arcpy.Point(bkmk.extent.XMax, bkmk.extent.YMax))
    array.add(arcpy.Point(bkmk.extent.XMax, bkmk.extent.YMin))
    # To close the polygon, add the first point again
    array.add(arcpy.Point(bkmk.extent.XMin, bkmk.extent.YMin))
    cur.insertRow([arcpy.Polygon(array), bkmk.name]) #this is line 33
    array.removeAll()
Runtime error
Traceback (most recent call last):
  File "<string>", line 33, in <module>
RuntimeError: The row contains a bad value. [Name]

It does create a layer called Bookmarks and does produce 24 of the 60 polygons, but no more.
Any ideas?
Thanks
0 Kudos
joshuathomson
New Contributor
Alright, I found my mistake...

Just a Bookmark name that was too long. I changed the name and it runs fine now.
0 Kudos