-
Notifications
You must be signed in to change notification settings - Fork 0
/
perfil.py
37 lines (29 loc) · 1.11 KB
/
perfil.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: ruowu
#
# Created: 03/06/2019
# Copyright: (c) ruowu 2019
# Licence: <your licence>
#-------------------------------------------------------------------------------
import arcpy
inputdem = arcpy.GetParameterAsText(0)
inputlinea = arcpy.GetParameterAsText(1)
salidatabla = arcpy.GetParameterAsText(2)
salidagraf = arcpy.GetParameterAsText(3)
if inputdem == '#' or not inputdem:
inputdem = "DEM"
if inputlinea == '#' or not inputlinea:
inputlinea = "Linea"
if salidatabla == '#' or not salidatabla:
salidatabla = "C:\\Users\\Administrator\\Documents\\ArcGIS\\Default.gdb\\Tabla"
nombre_grafico = "Perfil"
if nombre_grafico == '#' or not nombre_grafico:
nombre_grafico = "Grafica"
if arcpy.CheckExtension('3D') == 'Available':
arcpy.CheckOutExtension('3D')
arcpy.StackProfile_3d(inputlinea, inputdem, salidatabla, nombre_grafico)
arcpy.management.SaveGraph(nombre_grafico, salidagraf)
arcpy.CheckInExtension('3D')