本文目录一览:
- 1、有哪些 GIS+Python 的开发经验值得分享
- 2、arcgis 怎么用python做统计分析
- 3、arcgis中打开python后,如何编程?
- 4、关于arcgis的python脚本编程, shape文件出png图片问题
- 5、arcgis python怎么运行
有哪些 GIS+Python 的开发经验值得分享
GISer入门指南电子书第一季 分享版.pptx免费下载
链接:
提取码: wttn
ArcGIS入门级教程,详细介绍了ArcGIS产品族及成员产品 1、GIS 的概念和需求 2、什么是ArcGIS 3、Geodatabase中的GIS数据概念 4、桌面GIS产品:ArcView, ArcEditor和ArcInfo等
arcgis 怎么用python做统计分析
方法/步骤
1
打开arcmap软件,点击工具栏上的ArcToolbox工具箱,在工具箱里面选择要进行数据处理的工具(工具的选择视数据处理的内容而定),本文选择了“Define Projection”定义投影的工具进行说明。
双击此工具,在弹出的工具窗口点击右下角的“Show Help”按钮。
2
点击“Tool Help”按钮,此时就打开了软件的帮助文档并定位到了此工具(define projection)对应的页面,往下拉动滚动条,定位到此工具的python脚本的内容:
Syntax 介绍了此工具脚本的语法
Code Sample 介绍了脚本使用的例子
拷贝脚本使用例子里面的代码。
3
在软件的主界面点击“Geoprocessing”菜单--点击“Python”菜单项,即出现内嵌在arcigis中的python工具窗口。
python工具窗口的左边是代码编辑区域,右边是信息提示区域。
4
把第2步拷贝的代码语句粘贴到python工具窗口的左边区域,修改一下工具脚本的参数(视具体工具和数据而定),连续点击两下回车键。
5
等待脚本程序的执行完成,完成之后在桌面右下角会弹出提示信息,同时pythong工具窗口的右边区域也会有具体的工具脚本执行信息。
6
执行完成之后,在arcmap加载处理过的数据,右键查看属性,可以看到通过此工具脚本(define projection)进行投影定义的数据已经具有了投影参数。
arcgis中打开python后,如何编程?
此功能和Python的编辑模式是一样的:
1.
编写一行,运行一行;
2.
最大的的好处是,可以很方便的调用ArcGIS的接口,处理GIS数据;
3.
当然也可以使用ArcGIS
Toolboxes:
关于arcgis的python脚本编程, shape文件出png图片问题
1、点类型的转栅格:
PointToRaster example 1 (Python
window)
Converts point features to a raster dataset.
import arcpy
from arcpy import env
env.workspace = "c:/data"
arcpy.PointToRaster_conversion("ca_ozone_pts.shp", "ELEVATION",
"c:/output/ca_elev", "MAXIMUM", "", 2000)
PointToRaster example 2
(stand-alone script)
Converts point features to a raster dataset.
# Name: PointToRaster_Ex_02.py
# Description: Converts point features to a raster dataset.
# Requirements: ArcInfo
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inFeatures = "ca_ozone_pts.shp"
valField = "ELEVATION"
outRaster = "c:/output/ca_elev02"
assignmentType = "MAXIMUM"
priorityField = ""
cellSize = 2000
# Execute PointToRaster
arcpy.PointToRaster_conversion(inFeatures, valField, outRaster,
assignmentType, priorityField, cellSize)
2、面类型的转栅格:
PolygonToRaster example 1
(Python window)
Converts polygon features to a raster dataset.
import arcpy
from arcpy import env
env.workspace = "c:/data"
arcpy.PolygonToRaster_conversion("ca_counties.shp", "NAME",
"c:/output/ca_counties.img",
"MAXIMUM_AREA", "MALES", 0.25)
PolygonToRaster example 2
(stand-alone script)
Converts polygon features to a raster dataset.
# Name: PolygonToRaster_Ex_02.py
# Description: Converts polygon features to a raster dataset.
# Requirements: ArcInfo
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inFeatures = "ca_counties.shp"
valField = "NAME"
outRaster = "c:/output/ca_counties"
assignmentType = "MAXIMUM_AREA"
priorityField = "MALES"
cellSize = 0.5
# Execute PolygonToRaster
arcpy.PolygonToRaster_conversion(inFeatures, valField, outRaster,
assignmentType, priorityField, cellSize)
3、线类型转栅格
PolylineToRaster example 1
(Python window)
Converts polyline features to a raster dataset.
import arcpy
from arcpy import env
env.workspace = "c:/data"
arcpy.PolylineToRaster_conversion("roads.shp", "CLASS", "c:/output/roads.img",
"MAXIMUM_COMBINED_LENGTH", "LENGTH", 30)
PolylineToRaster example 2
(stand-alone script)
Converts polyline features to a raster dataset.
# Name: PolylineToRaster_Ex_02.py
# Description: Converts polyline features to a raster dataset.
# Requirements: ArcInfo
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inFeatures = "roads.shp"
valField = "CLASS"
outRaster = "c:/output/roads.tif"
assignmentType = "MAXIMUM_COMBINED_LENGTH"
priorityField = "LENGTH"
cellSize = 30
# Execute PolylineToRaster
arcpy.PolylineToRaster_conversion(inFeatures, valField, outRaster,
assignmentType, priorityField, cellSize)
arcgis python怎么运行
我只知道桌面端,在地理处理菜单栏里(geoprocessing)打开Python,将语句拷贝进去,回车就可以执行,左边栏里会有状态显示.