ElevationSource

Zusammenfassung

The ElevationSource object provides access to the properties of elevation source layers in an elevation surface.

Diskussion

An elevation source layer references the data that contributes height values to an elevation surface. Elevation source layers can reference local sources such as rasters or TINs or web elevation layers hosted in ArcGIS Online or ArcGIS Enterprise. You can access properties such as the name, visibility, and data source for each elevation source layer.

Eigenschaften

EigenschaftErläuterungDatentyp
dataSource
(Schreibgeschützt)

The complete path for the elevation source's data source. It includes the full workspace path and name of the dataset. For enterprise geodatabase layers, a string containing the layer's connection information is returned.

Tipp:

Enterprise geodatabase layers in an ArcGIS Pro project do not retain the path to the database connection file (.sde) that was used to create the layer.

String
name
(Lesen und schreiben)

Gets and sets the name for the elevation source.

String
visible
(Lesen und schreiben)

Specifies whether an elevation source is displayed.

Boolean

Codebeispiel

ElevationSource example 1

The following script will print the data source for each elevation source layer in an elevation surface

p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Scene')[0]
for surface in m.listElevationSurfaces():
    for source in surface.listElevationSources():
        print(source.dataSource)
ElevationSource example 2

The following script will turn the visibility off for all elevation source layers in the 3D scene.

p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Scene')[0]
for surface in m.listElevationSurfaces():
    for source in surface.listElevationSources():
        source.visible = False
p.save()