全国高分辨率土地利用数据服务 土地利用数据服务 土地覆盖数据服务 坡度数据服务 土壤侵蚀数据服务 全国各省市DEM数据服务 耕地资源空间分布数据服务 草地资源空间分布数据服务 林地资源空间分布数据服务 水域资源空间分布数据服务 建设用地空间分布数据服务 地形、地貌、土壤数据服务 分坡度耕地数据服务 全国大宗农作物种植范围空间分布数据服务
多种卫星遥感数据反演植被覆盖度数据服务 地表反照率数据服务 比辐射率数据服务 地表温度数据服务 地表蒸腾与蒸散数据服务 归一化植被指数数据服务 叶面积指数数据服务 净初级生产力数据服务 净生态系统生产力数据服务 生态系统总初级生产力数据服务 生态系统类型分布数据服务 土壤类型质地养分数据服务 生态系统空间分布数据服务 增强型植被指数数据服务
多年平均气温空间分布数据服务 多年平均降水量空间分布数据服务 湿润指数数据服务 大于0℃积温空间分布数据服务 光合有效辐射分量数据服务 显热/潜热信息数据服务 波文比信息数据服务 地表净辐射通量数据服务 光合有效辐射数据服务 温度带分区数据服务 山区小气候因子精细数据服务
全国夜间灯光指数数据服务 全国GDP公里格网数据服务 全国建筑物总面积公里格网数据服务 全国人口密度数据服务 全国县级医院分布数据服务 人口调查空间分布数据服务 收入统计空间分布数据服务 矿山面积统计及分布数据服务 载畜量及空间分布数据服务 农作物种植面积统计数据服务 农田分类面积统计数据服务 农作物长势遥感监测数据服务 医疗资源统计数据服务 教育资源统计数据服务 行政辖区信息数据服务
Landsat 8 高分二号 高分一号 SPOT-6卫星影像 法国Pleiades高分卫星 资源三号卫星 风云3号 中巴资源卫星 NOAA/AVHRR MODIS Landsat TM 环境小卫星 Landsat MSS 天绘一号卫星影像
创建范围指示器并记录脚本所需信息之后,设置地图文档,避免每一页上都显示范围指示器或插图。
下面显示一个示例脚本,该脚本将导出在第 1 页和第 3 页上有插图的地图册。
下面的脚本将导出在第 1 页和第 3 页上有插图的地图册。
import arcpy, os
# Create an output directory variable
#
outDir = r"C:\Project\MapBook\final_output"
# Create a new, empty pdf document in the specified output directory
# This will be your final product
finalpdf_filename = outDir + r"\FinalMapBook.pdf"
if os.path.exists(finalpdf_filename): # Check to see if file already exists, delete if it does
os.remove(finalpdf_filename)
finalPdf = arcpy.mapping.PDFDocumentCreate(finalpdf_filename)
# Create a Data Driven Pages object from the mxd you wish to export
#
mxdPath = r"C:\Project\MapBook\zipCodePopulation.mxd"
tempMap = arcpy.mapping.MapDocument(mxdPath)
tempDDP = tempMap.dataDrivenPages
# Create objects for the layout elements that will be moving, e.g., inset data frame, scale text
dataFrame = arcpy.mapping.ListDataFrames(tempMap, "Inset Map")[0]
# Instead of exporting all pages at once, you will need to use a loop to export one at a time
# This allows you to check each index and execute code to add inset maps to the correct pages
#
for pgIndex in range(1, tempDDP.pageCount + 1, 1):
# Create a name for the pdf file you will create for each page
temp_filename = r"C:\Project\MapBook\temp_pdfs\MB_" + \
str(pgIndex) + ".pdf"
if os.path.exists(temp_filename):
os.remove(temp_filename)
# The following if statements check the current page index against given values
# If the current page index matches, it will execute code to set up that page
# If not, the page remains as is
# Note: If you created a text file containing this information, this is where
# you would paste in that code
# Code for setting up the inset map on the first page #
if (pgIndex == 1):
# Set position of inset map to place it on the page layout
dataFrame.elementPositionX = 0.5
dataFrame.elementPositionY = 0.6
# Set the desired size of the inset map for this page
dataFrame.elementHeight = 2.0
dataFrame.elementWidth = 2.0
# Set the desired extent for the inset map
insetExtent_1 = arcpy.Extent(-88.306778229417176, 41.590293951894907, -87.609922645465474, 42.300975912784295)
dataFrame.extent = insetExtent_1
# Code for setting up the inset map on the third page #
if (pgIndex == 3):
# Set up inset map
dataFrame.elementPositionX = 3.25
dataFrame.elementPositionY = 7
dataFrame.elementHeight = 2.45
dataFrame.elementWidth = 3.0
insetExtent_3 = arcpy.Extent(-83.889191535, 41.870516098, -82.875460656, 42.72572048)
dataFrame.extent = insetExtent_3
# Code to export current page and add it to mapbook
tempDDP.exportToPDF(temp_filename, "RANGE", pgIndex)
finalPdf.appendPages(temp_filename)
# Clean up your page layout by moving the data frame and resetting its extent after exporting the page
# This will reset the page to the basic layout before exporting the next page
#
dataFrame.elementPositionX = 10 # Move inset data frame off the page
dataFrame.scale = 350000000 # Change scale so extent indicator no longer visible in main data frame
arcpy.RefreshActiveView()
# Clean up
#
del tempMap
# Update the properties of the final pdf
#
finalPdf.updateDocProperties(pdf_open_view="USE_THUMBS",
pdf_layout="SINGLE_PAGE")
# Save your result
#
finalPdf.saveAndClose()
总之,按照此工作流程操作,您可以使用单个地图文档创建仅在某些页面上显示插图或其他特殊要素的地图册。