Add coordinate system to shp-file

934
5
06-23-2011 04:39 AM
HartmutJunge
New Contributor
Hello,
Some days ago I took over a "GIS"-project, created in Arcview 3.2. Unfortunatly my former colleagues edited the project without a coordinatesystem, also "local"-system.
The project contains approximately 2000 shp-files. Has anybody an idea, how i can add the local coordinate-system (UTM-WGS84, 39N) in one step for all shp-files? I can use an Arcview 9.3 of a partner organisation to do this job.

Otherwise, in Arcpad, I get bloody fingers:(

Thanks in advance
Tags (2)
0 Kudos
5 Replies
JoeFlannery
Occasional Contributor III
0 Kudos
michaelcollins1
Occasional Contributor III
I used model builder to generate this Python code. I can't see dragging 2000 shape files into Model Builder at once (if you can, please let me know how). I used the tool "Define Projection" under Data Management Tools\Projections and Transformations.

My programming skills are not great, perhaps someone can come up with a loop.

# ---------------------------------------------------------------------------
# Projections.py
# Created on: 2011-06-23 09:23:57.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy


# Local variables:
Rivers = "C:\\Folder\\Rivers.shp"


# Process: Define Projection
arcpy.DefineProjection_management(Rivers, "PROJCS['WGS_1984_UTM_Zone_39N',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',51.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
0 Kudos
JoeFlannery
Occasional Contributor III
Doesn't seem like much of a burden to double-click the Batch Projection script tool in ArcToolbox, hit the find data Folder button, highlight as many featureclasses as you wish, answer a few more parameter questions and hit the OK button.  It works great and you don't need to write any code.
0 Kudos
HartmutJunge
New Contributor
Hi Joe,
thanks for the fast answer and this nice idea, but....
unfortunately is there no input coordinate system and I got the message:
execution failure, parameter not valid
ERROR 000517: The coordinate system is not defined for the input dataset.

and: the tool expect a existing output database (.mdb). I created a empty acess mdb-file(because in the hole project isnt one)

Sorry for stupid questions, Iam not GIS expert, only user....in the meantime i will try with the other tools, but if you have another good idea.....

thanks
Hartmut
0 Kudos
HartmutJunge
New Contributor
OK, I got it!!

Toolbox-Samples-DataMangement-Projections-BatchDefineCoordinateSystems-and finish!

Thanks again
0 Kudos