求取SHP文件的最小外接矩形并裁剪图像

本文介绍了如何利用ARCGIS10.4和Python2.7来求取SHP文件中每个形状的最小外接矩形,并基于这些矩形裁剪对应的图像。首先通过Data Management Tools的Minimum Bounding Geometry工具计算最小外接矩形,然后使用ARCGIS自带的Python环境和pyshape库进行图像裁剪,处理过程中需要注意中文路径可能导致的问题。
摘要由CSDN通过智能技术生成

目的:

  1. 求取shp文件中每一个形状的最小外接矩形。
  2. 根据每一个形状的最小外接矩形裁剪图像。

已知数据:

  1. 一个shp文件,包含若干个形状。

2.shp文件对应的影像。

工具

ARCGIS10.4

python2.7(ARCGIS自带)

步骤

一、求取shp文件中各个形状的最小外接矩形

首先打开ArcMAP的工具箱,依次点击Data Management tools——Features——Minimum Bounding Geometry。该工具使用方法和参数含义详见https://pro.arcgis.com/zh-cn/pro-app/tool-reference/data-management/minimum-bounding-geometry.htm

使用该工具之后即可求得各个形状的最小外接矩形

将求得的最小外接矩形按照下面的步骤保存为shp文件。

  • 4
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
List of ArcGIS API for Flex 1.2 packages. See the Adobe Flex 3 Language Reference at http://livedocs.adobe.com/flex/3/langref/ for Adobe Flex 3 packages. Package Description com.esri.ags This package contains the main mapping classes: Map, Graphic, SpatialReference and Units. com.esri.ags.controls This package contains the InfoWindow, Navigation and ScaleBar control classes. com.esri.ags.controls.infoClasses This package contains the InfoWindow and InfoSymbol supporting classes. com.esri.ags.controls.navigationClasses This package contains the classes for styling the navigation control. com.esri.ags.events Event classes for map navigation, loading layers, geoprocessing tasks and toolbars. com.esri.ags.geometry MapPoint, Multipoint, Polyline, and Polygon are the main geometry classes. com.esri.ags.layers Supported map layers include ArcGIS (dynamic or tiled), ArcIMS, and Graphics. com.esri.ags.renderers Renderers help symbolize graphics according to their attributes. Useful for thematic mapping. [Added in version 1.2] com.esri.ags.symbol Symbols are used to represent "geometries" on the map. Marker symbols are available for point and multipoint geometries. Line symbols are available for polyline geometries. Fill symbols are available for polygon geometries. com.esri.ags.tasks This package contains classes related to ArcGIS Server tasks: find, geometry, geoprocessor, identify, locator, query and route services. com.esri.ags.toolbars This package contains non-UI toolbar classes. Use them to create your own toolbar implementations. com.esri.ags.utils This package contains utility classes for the ArcGIS API for Flex, such as getting the extent of several graphics, or converting data between geographic and web mercator projections. [Added in version 1.2] com.esri.ags.virtualearth This package contains classes related to Virtual Earth mapping and geocoding. [Added in version 1.2]
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值