PLEASE HELP URGENT - Is there anyone at all who can help with this? I wrote a script based on the Extract Value To Points tool but it doesn't work properly.
# script to extract raster values to point shapefile # adapted by Scott MacDonald Kingston University k0848626 GSM655Programming Asssignment C # import system modules import arcpy from arcpy import env from arcpy.sa import * # get user supplied path, layers and fields path = arcpy.GetParameterAsText(0) arcpy.env.workspace = path # in Feature Layer is Confluence_Pts in_point_features = arcpy.GetParameterAsText(1) # in Raster Layer is DEM in_raster = arcpy.GetParameterAsText(2) # out Feature Class out_point_features = arcpy.GetParameterAsText(3) # error trapping measures try: # check out spatial analyst extension arcpy.CheckOutExtension("Spatial") # run the ExractValuesToPoints tool arcpy.ExtractValuesToPoints_sa(in_point_features, in_raster, out_point_features) # because of your "from arcpy.sa import *" above you could perhaps do this too: # ExtractValuesToPoints(in_point_features, in_raster, out_point_features) # check in spatial analyst extension arcpy.CheckInExtension("Spatial") except Exception, msg: print arcpy.GetMessages() # ArcGIS tool messages print "Python errors:\n",str(msg) # python errors
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.