Skip to content

Commit

Permalink
Merge branch 'master' of github.com:DOI-USGS/gems-tools-pro
Browse files Browse the repository at this point in the history
  • Loading branch information
ethoms-usgs committed Feb 22, 2024
2 parents fd922e6 + c282dc7 commit e11deb5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Scripts/GeMS_ProjectCrossSectionData.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def locateEventTable(

if not desc.hasZ:
addMsgAndPrint(" adding Z values")
arcpy.AddSurfaceInformation_3d(pts, dem, zType, "LINEAR")
arcpy.da.AddSurfaceInformation(pts, dem, zType, "LINEAR")

## working around bug in LocateFeaturesAlongRoutes
# add special field for duplicate detection
Expand Down Expand Up @@ -303,9 +303,9 @@ def locateEventTable(
arcpy.env.overwriteOutput = True

try:
arcpy.CheckOutExtension("3D")
arcpy.CheckOutExtension("Spatial")
except:
addMsgAndPrint("\nCannot check out 3D-analyst extension.")
addMsgAndPrint("\nCannot check out Spatial Analyst extension.")
sys.exit()

## Checking section line
Expand Down Expand Up @@ -367,7 +367,7 @@ def locateEventTable(
# Add Z values
addMsgAndPrint(" getting elevation values for " + shortName(tempXsLine))
Zline = arcpy.CreateScratchName("xx", outFdsTag + "_Z", "FeatureClass", scratch)
arcpy.InterpolateShape_3d(dem, tempXsLine, Zline)
arcpy.da.InterpolateShape(dem, tempXsLine, Zline)
# Add M values
addMsgAndPrint(" measuring " + shortName(Zline))
ZMline = arcpy.CreateScratchName("xx", outFdsTag + "_ZM", "FeatureClass", scratch)
Expand Down Expand Up @@ -679,7 +679,7 @@ def locateEventTable(
testAndDelete(f)
del inRows, outRows

arcpy.CheckInExtension("3D")
arcpy.CheckInExtension("Spatial")
if not saveIntermediate:
addMsgAndPrint("\n Deleting intermediate data sets")
for fc in tempXsLine, ZMline, Zline, tempBuffer:
Expand Down

0 comments on commit e11deb5

Please sign in to comment.