[Tutor] Project

2011-10-18 Thread Narguess Dadfar
I have to project all shapefiles to NAD_1983_UTM_Zone_10N

I use Python 2.6

what codes I have used is as follow:


import arcpy
inFolder = arcpy.GetParameterAsText(0)
outC = arcpy.GetParameterAsText(1)
arcpy.env.workspace = inFolder
fcList = arcpy.ListFeatureClasses()
try:
desc = arcpy.Describe(outC)
spatialRef = desc.SpatialReference
for featureClass in fcList:
arcpy.Project_management (inFolder, outC)
rootName = " "
if  fc.endswith[".shp]:
rootName + fc[:4]
arcpy.AddMessage("\n" + "The files " + projectedFeatureClasses[:2] + "have
successfully been reprojected" + "\n")
except:
arcpy.AddMessage ("This project is incomplete")
arcpy.AddMessage(arcpy.Getmessage())

Thank you
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Problem in running script

2011-11-01 Thread Narguess Dadfar
I want to prepare a script in python that updates the attributes of the
crime incidents falling within the patrol zone. I have  a point feature
class of crime incidents and a polygon feature class of patrol zone.

I used the getcount. method to take a count of the incidents in the current
layer as the script goes the each loop, returns an integer value, and adds
1. The update cursor then updates the “INCIDENT” field. The calculations to
be performed in order to determine the incidents per square mile are:
taking the Shape_area in meters and converting it to miles by dividing it
by the constant provided and then dividing the number of incident by the
converted shape area(in miles). The incidents per square mile will then be
used to rank the priority of graffiti incidents in each zone. This was done
with an” if/elif/else” statement where the first “if” is the “Top Priority”
and the rest of the ranks follow as they meet the conditions in the
consecutive statement. An update cursor is written into each of the
“if/elif/else” parts of the statement to update the “PRIORITY “ field while
the script is running through the current zone each time it loops.But I ran
to problem. Please let me know what I should change.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] writing a program

2012-12-03 Thread Narguess Dadfar
Hi everyone,

I need help to write a program to change the label size when change zoom
level of my map in ArcGIS.



Thank you,

Narguess
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor