Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a arc toolbox which converts JSON txt file to a shapefile but we have to define the projection.

How can I hard code the defined projection so that user don't have to input the projection ?

I need to define projection parameter to web mercator and to add a function to reproject the shapefile to NAD 83 UTM.

I am editing in Python.

share|improve this question
How do I put the code in here? – mridul May 22 '12 at 15:33

you can use Define Projection (Data Management) here...

This tool overwrites the coordinate system information (map projection and datum) stored with a dataset.


DefineProjection_management (in_dataset, coor_system)

Example Code:

# Name: 
# Description: Records the coordinate system information for the specified input
dataset or feature class
# Author: ESRI

# import system modules
import arcpy

# set workspace environment
arcpy.env.workspace = "C:/data"

# set local variables
inDataset = "forest.shp"
coordinateSystem = "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',

arcpy.DefineProjection_management(inDataset, coordinateSystem)

i hope it helps you...

share|improve this answer
Can I do it by defining Spatial reference, if so how? – mridul May 22 '12 at 16:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.