0

I have almost 100 shapefiles (all having polyline features only) in a single folder with each filename "0","1"..."99" . I need to recalculate the length and another field "slope" which I previously calculated in field calculator:

slope =

math.degrees(math.atan(100/ !Length! ))". 

Now I want to recalculate both fields in each shapefile. PS: These 100 shapefiles were previously one shapefile whose length and slope has been calculated. But there after I clipped it using features of another shapefile resulting into 100 shapefiles. But the length and slope value was not get upated and it is showing the old values of the single shape file. Now I want to calculate slope and length again for each shapefile which is time consuming so I hope something can be done in a Model Builder or a Python script which could ease my computation.

7
  • 3
    Which software are you working with? You seem to know how to calculate your desired output, since you already did it - so what is your question? – Erik Mar 22 at 8:39
  • Welcome to GIS SE! As a new user be sure to take the Tour to learn about our focussed Q&A format. As it stands I think your question would benefit from being revised to try and make what you are asking clearer. I recommend reviewing meta.gis.stackexchange.com/a/3353/115 for tips on how to structure a good question. – PolyGeo Mar 22 at 10:10
  • @Erik. I did this in Arc GIS 10.1 and these 100 shapefiles were previously one shape file whose length and slope has been calculated. But there after I clipped it using features of another shapefile resulting into 100 shapefiles. But the length and slope value was not get updated and it is showing the old values of the single shape file – Vishnu Mar 22 at 12:29
  • ArcGIS 10.1 is so old it has to be considered a different product from the 10.7.1/10.8.x on modern desktops. The Python implementation was virtually non-existent compared to the current state. You're not going to be able to get much assistance with long-retired software, even if you invest in the time tp write an initial attempt at code. – Vince Mar 22 at 16:35
  • @Vince Okay will consider the new version, but new version has any built in tool to perform my requirement? – Vishnu Mar 23 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.