Python Forum
new to coding, need help on a HW problem almost got it
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
new to coding, need help on a HW problem almost got it
#1
i have a folder containing 5 shapefiles (.shp). the problem wants me to list the 5 files and the geometry type (point, line, or polygon)
EX: counties.shp is a polygon feature class
the output should be a total of 5 sentences.
______.shp is a ______ feature class
______.shp is a ______ feature class
______.shp is a ______ feature class
______.shp is a ______ feature class
______.shp is a ______ feature class

the code im using for the list is:
featureclasses = arcpy.ListFeatureClasses({all}, {all})
print featureclasses 
that code is good. the code i started to use as an example is:

desc = arcpy.Describe("cities.shp")
print desc.shapeType
this code works too. i just need a little advice on how to put this whole thing together. thanks.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020