Python Script to Project Shapefiles in a folder

7301
10
Jump to solution
10-25-2015 02:05 PM
natashaGregory-Michelman
New Contributor III

I am very, very new to Python and I am trying to write a script that will allow me to Project shapefiles into a coordinate system that is assigned to one particular shapefile in a folder. So I have 4 files and one has that which I want to re-Project the others into. What I am struggling with is the output CS parameter required by the Project_management tool when called in the script. I get an error message saying that the output Coordinate System value and the outputFC parameter is not valid. I'm wondering where I'm going wrong.

Any help at all would be so greatly appreciated.

  Sincerely,

Natasha

SR6.jpg

Tags (1)
0 Kudos
10 Replies
RebeccaStrauch__GISP
MVP Emeritus

Happy I could help.  By the way, unless this is for a class (in which case you do need to work on figuring things out yourself), don't have an hesitation about using code that is posted.  I good programmer (in my opinion) is always trying to put themselves out of work....but there is no reason to reinvent the wheel.....unless you are trying to clean code up and/or make it faster, etc. 

There are many threads on geonet re: learning python.  Here are a few that you may want to check out.

Seeking advice on how to go about learning Python

Python: Getting Started

Think Python: How to Think Like a Computer Scientist

Re: Mastering Python

Introduction to Writing Geoprocessing Scripts with Python 10.2/10.3 Class Resources

And Dan has quite a few blog posts on many advanced topics....he has a list of the blogs

NumPy and Python... lists, link, samples and esoterica...

Python can be great fun.  Good luck!

0 Kudos