“Buat Arcpy File Layer” Kode Jawaban

Buat Arcpy File Layer

arcpy.management.SaveToLayerFile(in_layer, out_layer, {is_relative_path}, {version})
Bohemian Unicorn

Buat Arcpy File Layer

# Name: SaveToLayerFile_Example2.py
# Description: Saves an inMemory layer to a file on disk

# Import system modules
import arcpy

# Set workspace
arcpy.env.workspace = "C:/data"

# Set local variables
in_features = "study_quads.shp"
where_clause = '"NAME" = \'LA MESA\''
in_layer = "studyquadsLyr"
out_layer_file = "studyquadsLyr.lyr"

# Execute MakeFeatureLayer
arcpy.MakeFeatureLayer_management(in_features, "study_quads_lyr", where_clause)

# Execute SaveToLayerFile
arcpy.SaveToLayerFile_management("study_quads_lyr", out_layer_file, "ABSOLUTE")
Bohemian Unicorn

Buat Arcpy File Layer

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.SaveToLayerFile_management("studyquads.shp", "C:/output/studyquadsLyr.lyr", "ABSOLUTE")
Bohemian Unicorn

Jawaban yang mirip dengan “Buat Arcpy File Layer”

Pertanyaan yang mirip dengan “Buat Arcpy File Layer”

Lebih banyak jawaban terkait untuk “Buat Arcpy File Layer” di Python

Jelajahi jawaban kode populer menurut bahasa