POST
|
Hey, Change the U: to 😧 (See below) I use PythonWIN to write my code and save it as a script. I open the script to edit. Not sure if this matters. with arcpy.da.InsertCursor ("GC_R20", ["SHAPE@"]) as U:
... View more
12-18-2014
11:33 AM
|
0
|
6
|
530
|
POST
|
Hey Alex, I have had the same problems too! Have you tried 'Mosaic to New Raster?' Sounds like you have tried every possible way! Check the order of the rasters in the mosaic tool. Also click on the Symbology tab in properties. Look for stretch and change type to standard deviations. This may work but not always. Thanks James
... View more
12-18-2014
11:07 AM
|
0
|
0
|
2510
|
POST
|
You have to create a point.shp (GC_R20). GC_R20.shp is what I used give me the starting point in terms of XY. Also, you have to have a polygon created too. I named it GC_R20_Polygon. I edited the original code to exclude unnecessary code. import arcpy, os
arcpy.env.workspace = "U:\Tax\Special Projects\JEFitzgerald\CUVA\2014\CUVA_PYTHON_06252014_Final\CUVA.mdb"
pointList=[]
try:
with arcpy. ["SHAPE@XY"]) as cursor:
for row in cursor:
xy = row[0]
pointList.append(XY)
with arcpy.0_Polygon", ["SHAPE@"]) as U:
for pnt in pointList:
lowX = pnt[0]
lowY = pnt[1]
# find the upper right
highX = lowX + 162.2539
highY = lowY + 123.2639
array = arcpy.Array([arcpy.Point
arcpy.Point(lowX, highY),
arcpy.Point(highX, highY),
arcpy.Point(highX, lowY),
arcpy.Point(lowX, lowY)])
polygon = arcpy.Polygon(array)
U.insertRow([polygon])
#Populates a field with DONE so the delete cursor will find and delete.
#This will enable a clean attribute table so dublicates will be eliminated.
arcpy.CalculateField_management("GC_R20_Polygon","File", "\"Done\"", "PYTHON", "")
print "Process for new polygons is complete"
except:
print
... View more
12-18-2014
10:27 AM
|
0
|
10
|
1468
|
POST
|
Okay, You have hooked me. Now, I cannot get it to work. I used your code. Do you post the code in the code block? What do you enter into the "Name=" block? Do you have to create another field to populate? Thanks
... View more
12-18-2014
08:56 AM
|
0
|
2
|
804
|
POST
|
M.Neer, Sorry, but replace INCH not blank. I going to use your code. Excellent Job!! James
... View more
12-18-2014
08:09 AM
|
0
|
0
|
804
|
POST
|
M.Neer, Another quick fix is to start an edit session, open up the attribute table, click on the table options and select the find and replace. Replace the (") with nothing (just leave blank). Save. I am still looking to do this through Python. James
... View more
12-18-2014
07:54 AM
|
0
|
1
|
804
|
POST
|
Hey, Replace 'St' or 'St.' starting a new word at the end of the string with the word 'Street'. Expression: update_street(!ADDRESS!)
Expression Type: PYTHON_9.3
Code Block:
import re
def update_street(street_name):
return re.sub(r"""\b(St|St.)\Z""",
'Street', street_name)
Check ArcGIS Desktop under Regular Expressions.
... View more
12-18-2014
07:13 AM
|
0
|
1
|
1844
|
POST
|
Hello M. Neer, As a quick fix, you could export the attribute table to a databasefile.dbf and work on it from a standalone table to remove the quotation ("). then you could bring it back into arcGIS and join it to your shapefile.shp. Not as quick as code but it works! Thanks, James
... View more
12-18-2014
07:06 AM
|
0
|
1
|
1844
|
POST
|
Hey Clinton, Could you mark this post as correct? Thanks
... View more
12-18-2014
03:51 AM
|
0
|
0
|
854
|
POST
|
Hello Stacy, Could you mark your post as helpful and correct? Thanks James
... View more
12-18-2014
03:49 AM
|
3
|
1
|
752
|
POST
|
Hey Scott, Could you mark this as Helpful and Correct? That is if I have answered your question. Thanks! James
... View more
12-18-2014
03:47 AM
|
0
|
0
|
869
|
POST
|
Hey Scott, You can do a Intersect using the polyline(roads) and the polygon(property). Be sure to change the output type to points. When the road intersects the property, it creates a point. Thanks James
... View more
12-17-2014
02:27 PM
|
0
|
0
|
869
|
POST
|
Hey Scott, Check out the Data Management Tools-Toolbox Features. There are a bunch of split lines by vertex, point, and etc. If you could figure a way to drop a point where the line intersects a polygon, then you could run these tools. Still looking for a solution! James
... View more
12-17-2014
01:56 PM
|
0
|
0
|
869
|
POST
|
Scott, Here is a link Split into equal length features | ArcPy Café This may help get an idea. James
... View more
12-17-2014
01:35 PM
|
0
|
0
|
869
|
POST
|
Hello, One method would be to select by location and select properties that roads.shp intersects. Export the highlighted parcels into a new shapefile. Then, zoom to each parcel and split where the road intersects the parcel boundary. Another method would be to use Python code to find where the line intersects the property, create a vertex, and split the line at the vertex. Method one can be done in an Edit Session by using the split tool. (Could be time consuming.) Method two is the road less traveled. You will learn a great deal about Python Scripting if traveled. I will continue to look for a solution. Thanks James
... View more
12-17-2014
01:30 PM
|
0
|
0
|
869
|
Title | Kudos | Posted |
---|---|---|
1 | 12-12-2014 06:44 AM | |
1 | 01-29-2015 07:27 AM | |
1 | 12-16-2014 10:39 AM | |
1 | 07-22-2015 12:25 PM | |
2 | 12-12-2014 02:13 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|