t.wilk

Get value of a specific location from TIN

Discussion created by t.wilk on Apr 5, 2013
Latest reply on Apr 5, 2013 by t.wilk
Hello,

I'm looking for something similar to arcpy.GetCellValue_management, but for TINs instead of rasters. The idea behind it is that I'd like to be able to read terrain Z coordinate from both rasters and TINs - whatever the user chooses. The relevant part of the code is as follows:
def readZ(dataset,x,y):
    desc = arcpy.Describe(dataset)
    if desc.datasetType == "RasterDataset":
        result = arcpy.GetCellValue_management(dataset,str(x) + " " + str(y))
        return result.getOutput(0)
    if desc.datasetType == "Tin":
        #return what is the Z value of tin dataset in location x,y
        #what goes here?
    return None #neither raster nor tin

I searched with google but apparently I ask the wrong questions. I have only Spatial Analyst from extensions, so no other extensions available (3D analyst in particular).

Cheers
t.wilk

Outcomes