POST
|
import arcpy from arcpy import env env.workspace = "C:/Data" fc = "roads.shp" cursor = arcpy.da.SearchCursor(fc, ["OID@", "SHAPE@"]) for row in cursor: print ("Feature {0}: ".format(row[0])) → ------------------------------------------------------------------------------------------------------ ← print ("{0}, {1}".format(point.X, point.Y))
... View more
03-28-2020
01:37 PM
|
0
|
1
|
167
|
POST
|
thank you i think from this i can handle it. i appreciate it.
... View more
03-21-2020
05:24 PM
|
1
|
0
|
108
|
POST
|
class Tree: def __init__(self, block, plot, species, dbh): self.block = block self.plot=plot self.species=species self.dbh=dbh def dib(self): dib = self.dbh * 1/1.09 return dib
... View more
03-21-2020
02:32 PM
|
0
|
2
|
108
|
POST
|
parcelclass.py class Parcel: def _init_(self, landuse, value): self.landuse = landuse self.value = value def assessment(self): if self.landuse == "SFR": rate = 0.05 elif self.landuse == "MFR": rate = 0.04 else: rate = 0.02 assessment = self.value * rate return assessment parceltax.py import parcelclass myparcel = parcelclass.Parcel("SFR", 125000) print 'Land use: ", myparcel.landuse mytax = myparcel.assessment() print "Tax assessment: ", mytax
... View more
03-21-2020
08:26 AM
|
0
|
1
|
242
|
POST
|
i have found some errors but im sure not everything. what errors can you see in these? import arcpy from arcpy import env env.workspace = "C:/EsriPress/Python/Data/Exercise07" FC = "airports.shp" rows = arcpy.SearchCursor(fc) fields = arcpy.ListFields(fc) for field in fields: if fields.name == "NAME" for row in rows: print "Name = {0}".format(row.getValue(field.name)) import arcpy from arcpy import env env.workspace = "C:/EsriPress/Python/Data\Exercise09" raster = "landcover.tiff" desc = arcpy.describe(raster) x = desc.MeanCellHeight y = desc.MeanCellWidth spatialref = desc.spatialReference units = spatialref.linearUnitName print "Cells are" + str(x) + " by " + str(y) + " " + units + "."
... View more
03-21-2020
08:00 AM
|
0
|
4
|
262
|
POST
|
start with the text file trees.txt with w different fields called Block, Plot, Species and DBH, separated by spaces.
... View more
03-21-2020
07:49 AM
|
0
|
1
|
108
|
POST
|
its the challenge 2 frompython scriptinh for arcgis book. is anybody could solve this? thank you You are given a feature class called parcels.shp located in the Exercise12 folder that contains the following fields: FID, Shape, Landuse, and Value. Modify the parceltax.py script so that it determines the property tax for each parcel and stores these values in a list. You should use the class created in the parcelclass.py script—the class can remain unchanged. Print the values of the final list as follows: FID:
... View more
03-20-2020
03:15 PM
|
0
|
7
|
477
|