Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to export the extents of DDP to KMZ using arcpy - Map to KML (Conversion)? Alternatively can we export each extent of a single DDP extent to a new mxd and then run arcpy.MapToKML_3d on each of these temporary mxds? - doesn't seem to allow one to use it with DDP.

For converting each ddp extent to an mxd I found -

import arcpy, os
mxdPath = r"C:\Project\DDPMap.mxd"
mxd = arcpy.mapping.MapDocument(mxdPath)
mxdDir = os.path.dirname(mxdPath)
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
    mxd.dataDrivenPages.currentPageID = pageNum
    mxdName = os.path.join(mxdDir, "DDPMap" + str(pageNum) + ".mxd")
del mxd

but have not tried it yet...I would prefer not to have the overhead of creating mxd's unnecessarily.

==== Scale bar size/text issues when using ddp

Ok scale textNot ok -should be 300 or 250 not 280 Not ok -should be 50 not 40

So the width needs to change so that the text is 100/50 value.

share|improve this question
I think what you need to do is use a script to store the scales for each DDP in the attribute table, then in the Map To Kml script you should specify that the scale for each KML is in that field. – Cindy Williams-Jayakumar Jul 26 '12 at 9:24
Thanks...I should clarify it is not the page scale that's the issue, it is the text on the scale bar. See updated Q. – GeorgeC Jul 27 '12 at 5:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.