arcpy.mapping 类列表

本文详细介绍了arcpy.mapping类,包括DataDrivenPages、DataFrame、Layer、MapDocument等关键类的方法和属性,如exportToPDF、getPageIDFromName、extent、dataSource等,展示了这些类在地图处理和数据操作中的作用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 arcpy.mapping 类可使用地图文档 ( .mxd) 或图层文件 ( .lyr) 中的不同对象类型的各种方法和属性。此文档可专门用作快速参考。有关详细信息,请使用链接跳转至各帮助页面。

arcpy.mapping 类

DataDrivenPages

  • 方法
    • exportToPDF(out_pdf, {page_range_type}, {page_range_string}, {multiple_files}, {resolution}, {image_quality}, {colorspace}, {compress_vectors}, {image_compression}, {picture_symbol}, {convert_markers}, {embed_fonts}, {layers_attributes}, {georef_info}, {jpeg_compression_quality})
    • getPageIDFromName(page_name)
    • printPages({printer_name}, {page_range_type}, {page_range_string}, {out_print_file})
    • refresh()
  • 属性
    • currentPageID - 读/写;长整型
    • pageCount - 只读;长整型
    • pageRow - 只读;GP 行对象

DataFrame

  • 方法
    • panToExtent(extent)
    • zoomToSelectedFeatures()
  • 属性
    • credits - 读/写;字符串型
    • description - 读/写;字符串型
    • displayUnits - 读/写;字符串型
    • elementHeight - 读/写;双精度型
    • elementPositionX - 读/写;双精度型
    • elementPositionY - 读/写;双精度型
    • elementWidth - 读/写;字符串型
    • extent - 读/写;GP Extent 对象
    • geographicTransformations - 读/写;字符串的 Python 列表
    • mapUnits - 只读;字符串型
    • name - 读/写;字符串型
    • referenceScale - 读/写;双精度型
    • rotation - 读/写;双精度型
    • scale - 读/写;双精度型
    • spatialReference - 读/写;GP 空间参考对象
    • time - 只读;DataFrameTime 对象
    • type - 只读;字符串型

DataFrameTime

  • 方法
    • resetTimeExtent()
  • 属性
    • currentTime - 读/写;Python datetime 对象
    • endTime - 读/写;Python datetime 对象
    • startTime - 读/写;Python datetime 对象
    • timeStepInterval - 只读;Python timedelta 对象
    • timeWindow - 读/写;双精度型
    • timeWindowUnits - 读/写;字符串型

GraphicElement

  • 属性
    • elementHeight - 读/写;双精度型
    • elementPositionX - 读/写;双精度型
    • elementPositionY - 读/写;双精度型
    • elementWidth - 读/写;字符串型
    • name - 读/写;字符串型
    • type - 只读;字符串型

LabelClass

  • 属性
    • className - 读/写;字符串型
    • expression - 读/写;字符串型
    • showClassLabels - 读/写;布尔型
    • SQLQuery - 读/写;字符串型

Layer

  • 方法
    • findAndReplaceWorkspacePath(find_workspace_path, replace_workspace_path, {validate})
    • getExtent({symbolized_extent})
    • getSelectedExtent({symbolized_extent})
    • replaceDataSource(workspace_path, workspace_type, dataset_name, {validate})
    • save()
    • saveACopy(file_name, {version})
    • supports(layer_property)
  • 属性
    • brightness - 读/写;长整型
    • contrast - 读/写;长整型
    • credits - 读/写;字符串型
    • datasetName - 只读;字符串型
    • dataSource - 只读;字符串型
    • definitionQuery - 读/写;字符串型
    • description - 读/写;字符串型
    • isFeatureLayer - 只读;布尔型
    • isGroupLayer - 只读;布尔型
    • isRasterizingLayer - 只读;布尔型
    • isRasterLayer - 只读;布尔型
    • labelClasses - 读/写;LabelClass 对象列表
    • longName - 只读;字符串型
    • name - 读/写;字符串型
    • serviceProperties - 只读;属性集字典
    • showLabels - 读/写;布尔型
    • transparency - 读/写;长整型
    • visible - 读/写;布尔型
    • workspacePath - 只读;字符串型

LegendElement

  • 方法
    • adjustColumnCount(column_count)
  • 属性
    • autoAdd - 读/写;布尔型
    • elementHeight - 读/写;双精度型
    • elementPositionX - 读/写;双精度型
    • elementPositionY - 读/写;双精度型
    • elementWidth - 读/写;字符串型
    • items - 只读;Python 字符串列表
    • name - 读/写;字符串型
    • parentDataFrameName - 只读;字符串型
    • title - 读/写;字符串型
    • type - 只读;字符串型

MapDocument

  • 方法
    • deleteThumbnail()
    • findAndReplaceWorkspacePaths(find_workspace_path, replace_workspace_path, {validate})
    • makeThumbnail()
    • replaceWorkspaces(old_workspace_path, old_workspace_type, new_workspace_path, new_workspace_type, {validate})
    • save()
    • saveACopy(file_name, {version})
  • 属性
    • activeView - 读/写;字符串型
    • author - 读/写;字符串型
    • credits - 只读;字符串型
    • dataDrivenPages - 只读;DataDrivenPages 对象
    • dateExported - 只读;Python datetime 对象
    • datePrinted - 只读;Python datetime 对象
    • dateSaved - 只读;Python datetime 对象
    • description - 读/写;字符串型
    • filePath - 只读;字符串型
    • hyperlinkBase - 读/写;字符串型
    • relativePaths - 只读;布尔型
    • summary - 读/写;字符串型
    • tags - 读/写;字符串型
    • title - 读/写;字符串型

MapsurroundElement

  • 属性
    • elementHeight - 读/写;双精度型
    • elementPositionX - 读/写;双精度型
    • elementPositionY - 读/写;双精度型
    • elementWidth - 读/写;字符串型
    • name - 读/写;字符串型
    • parentDataFrameName - 只读;字符串型
    • type - 只读;字符串型

PDFDocument

  • 方法
    • appendPages(pdf_path, {input_pdf_password})
    • attachFile(file_path, {description})
    • insertPages(pdf_path, {before_page_number}, {input_pdf_password})
    • saveAndClose()
    • updateDocProperties({pdf_title}, {pdf_author}, {pdf_subject}, {pdf_keywords}, {pdf_open_view}, {pdf_layout})
    • updateDocSecurity({new_master_password}, {new_user_password}, {encryption}, {permissions})
  • 属性:
    • pageCount - 只读;长整型

PictureElement

  • 属性
    • elementHeight - 读/写;双精度型
    • elementPositionX - 读/写;双精度型
    • elementPositionY - 读/写;双精度型
    • elementWidth - 读/写;字符串型
    • name - 读/写;字符串型
    • sourceImage - 读/写;字符串型
    • type - 只读;字符串型

TableView

  • 方法
    • findAndReplaceWorkspacePath(find_workspace_path, replace_workspace_path, {validate})
    • replaceDataSource(workspace_path, workspace_type, dataset_name, {validate})
  • 属性
    • datasetName - 只读;字符串型
    • dataSource - 只读;字符串型
    • definitionQuery - 读/写;字符串型
    • name - 读/写;字符串型
    • workspacePath - 只读;字符串型

TextElement

  • 属性
    • elementHeight - 读/写;双精度型
    • elementPositionX - 读/写;双精度型
    • elementPositionY - 读/写;双精度型
    • elementWidth - 读/写;字符串型
    • name - 读/写;字符串型
    • text - 读/写;字符串型
    • type - 只读;字符串型

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值