|
DOC
|
that makes sense. Your the man! Thanks for the awesome work, love the widgets!
... View more
08-03-2016
10:37 AM
|
0
|
0
|
17290
|
|
DOC
|
Robert for give me, but i have download the identify.zip and copied the folder "Identify" that was in the zip file and replaced the "Identify" in clien/stemapp/widgets. When i try to check the version i am in to make sure the "Identify" folder got replaced, by clicking on "Learn More about his Widget" it takes me to the Identify Widget Version 1.3.0.1. So sorry for the dumb question but how to update the Identify widget correctly? Learn more about this widget
... View more
08-03-2016
10:11 AM
|
0
|
0
|
17290
|
|
POST
|
Ok making sense . Would you mind posting a copy of the script? I would like to see how you applied the buffer. Thanks.
... View more
07-29-2016
03:50 PM
|
0
|
0
|
3343
|
|
POST
|
Thanks for the explanation I would like to join the zones if there is more than one. I made the following changes at line 61 + """FZONE_CODE "FZONE_CODE" true false false 60 Text 0 0 ,Join,#,", ""+ FZon3 + """,ZONE_CODE,-1,-1;"""\ I re- ran the code and i got interesting results again that i don't understand. referring to the picture i have attached, (A)Parcel has attributes of Ind (blue) & Com (red) "FZONE IndCom", this iss correct because Com(red) & Ind(blue) both over lap this parcel. Now for the other two (C) Parcel has attributes of Ind (blue) & Res (yellow) FZONE_CODE IndRes BUT it should only have Ind (blue) and the same for (B). Now i think this is where the "INTERSECT" variable plays into it? what i am see is if the boundary line of any FZon3 touches any boundary line of the parcels it will get the attributes even thought it shouldn't. if this is the case what is the best way to spatial join the Fzon3 and taxparcels? The idea is that the spatial join will join like (A), if there is more than one zone overlays a parcel it will populate the FZONE_CODE "IndRes" and only populate the parcel with one zone if only one zone overlays the parcel. I have checked the geometry and topology x10 for both layers and all is good, so i don't think the issue is why overlaps. Thanks.
... View more
07-29-2016
01:40 PM
|
0
|
0
|
3343
|
|
POST
|
I figured that if i was to zoomed in the lines might look off but i wasn't sure but now i know thank for the info. Since i now know that snapping is not the issue i still have the problem with parcel taking various zoning attributes when clearly the zoning doesn't over lap on to that parcel. I have check geometry and ran topology on the zoning and parcels and there is some topology errors on the taxparcels but none on where the zoning is spatial joined to the parcels. I will try to post some data and see if anyone can take a look at it for me and help figure what's going on.
... View more
07-28-2016
02:42 PM
|
0
|
0
|
3256
|
|
POST
|
I have looked through the help docs and made sure i have the snapping correct, but what i don't understand is why it's truly not snapping to either end or vertex after zooming in super close. I think this is why i am getting weird results after the spatial join.
... View more
07-22-2016
08:53 AM
|
0
|
1
|
3256
|
|
POST
|
So i have two layers and a script that uses arcpy.SpatialJoin_analysis to do a spatial join. Basically it spacial joins a zoning layer to parcels but upon further review it seems as i get weird results after the spatial join. In the "FZONE_CODE" field i get some that have 3 different zones. Which in some case can be the case not always and i find it through out spatial joined layer. The 1st example(image1) i have is the parcel is joined with the zoning and it should just be Ind(blue) but if you look at it Yellow(Res) or Red(Com) doesn't go into the that parcel but the "FZONE_CODE" field states it's ComIndRes. Second example (image2) after the spatial join has a parcel with ResResRes but Res(yellow) doesn't go into that parcel either but some how it has ResResRes in the "FZONE_CODE" field. So i thought maybe i didn't snap to the end point or vertex correctly so i zoomed in as close as i can and i notice that vertex of the Zoning layer is not snapped to the vertex or end of the parcel so i try to move the zoning feature to the end/vertex of the parcel but it doesn't snap to it, it snaps off to the side(image3). So i am thinking this is why i get those weird results i am talking about. Ever time i try to move it just snaps the the side of the end or vertex, so my question is this normal?
... View more
07-22-2016
08:14 AM
|
0
|
5
|
5434
|
|
POST
|
Table to Table (Conversion) import arcpy fc = r'C:\path\to\your\fc' outtable = r'C:\temp' arcpy.TableToTable_conversion (fc, outtable, 'outtableFile.dbf')
... View more
07-21-2016
03:57 PM
|
0
|
1
|
2091
|
|
POST
|
I have a feature class with filed DXF_TEXT and FZONE_CODE i would like to search for certain attributes in the DXF_TEXT field and update the FZONE_CODE but i am not sure what the best was to do it. i have tried the following but i can only do one at a time. I would like to add more to the if row[0]== "R32558011","R32747010", "R32842", "R32839": How can i search for "R32558011","R32747010", "R32842", "R32839" and update those select FZONE_CODE to " " (blank)? Thanks. with arcpy.da.UpdateCursor("C:\TEMP\FZon2", ['DXF_TEXT', 'FZONE_CODE']) as cursor: for row in cursor: if row[0] == "R32558011": #"R32747010", "R32842", "R32839": row[1] = " " cursor.updateRow(row)
... View more
07-19-2016
08:54 AM
|
0
|
2
|
1804
|
|
POST
|
I am not sure what's is going on here but if use arcpy.SpatialJoin_analysis and with INTERSECT as the match_option with two layers i get something that doesn't look right. The layer Fzon3 has zoning COM, IND or RES i do the spatial join to Taxparcels but the Spatial Join with INTERSECT doesn't look right, see picture. After the script is ran and i add the layers to arcmap and i query the FZon2 layer for "COM"(COM is the red) you can see that the spatial join didn't spatial join correctly because there should be more parcels with "COM". Any help would be great thanks! #WORKING SCRIPT
# Import arcpy module
import sys, arcpy, traceback, os
from arcpy import env
import win32com.client
from os import path as p
from datetime import datetime as d
startTime = d.now()
# Local variables:
arcpy.env.overwriteOutput = True
arcpy.env.workspace = "C:\TEMP\Test.gdb"
arcpy.env.qualifiedFieldNames = False
if arcpy.Exists("C:\TEMP\Test.gdb\FZon2"):
arcpy.Delete_management("C:\TEMP\Test.gdb\FZon2")
Tax = r"C:\TEMP\Test|Taxparcels"
Tax1 = "C:\TEMP\Test.gdb"
arcpy.FeatureClassToGeodatabase_conversion(Tax, Tax1)
Padm1 = "C:\TEMP\Test.gdb"
Taxparcels = "C:\TEMP\Test.gdb\Taxparcels"
# Process: Make Feature Layer
arcpy.MakeFeatureLayer_management(Taxparcels, "In_memory\TaxPar")
TaxPar1 = "In_memory\TaxPar"
arcpy.MakeFeatureLayer_management("In_memory\TaxPar", TaxPar1)
FZon3 = "C:\TEMP\Test.gdb\FUTURE_LAND_USE_ZONING"
def Layers0(TaxPar1, FZon3):
FieldMapString = "" \
+ """DXF_TEXT "DXF_TEXT" true true false 18 Text 0 0 ,First,#,""" + TaxPar1 + """,DXF_TEXT,-1,-1;"""\
+ """ACCOUNT "ACCOUNT" true true false 11 Text 0 0 ,First,#,""" + TaxPar1 + """,ACCOUNT,-1,-1;"""\
+ """ACRES "ACRES" true true false 4 Double 10 3 ,First,#,""" + TaxPar1 + """,ACRES,-1,-1;"""\
+ """Instrument "Instrument" true true false 10 Text 0 0 ,First,#,""" + TaxPar1 + """,Instrument,-1,-1;"""\
+ """SiteAddress "SiteAddress" true true false 106 Text 0 0 ,First,#,""" + TaxPar1 + """,SiteAddress,-1,-1;"""\
+ """SiteCity "SiteCity" true true false 32 Text 0 0 ,First,#,""" + TaxPar1 + """,SiteCity,-1,-1;"""\
+ """SiteZip "SiteZip" true true false 10 Text 0 0 ,First,#,""" + TaxPar1 + """,SiteZip,-1,-1;"""\
+ """SubName "SubName" true true false 20 Text 0 0 ,First,#,""" + TaxPar1 + """,SubName,-1,-1;"""\
+ """OwnerName "OwnerName" true true false 100 Text 0 0 ,First,#,""" + TaxPar1 + """,OwnerName,-1,-1;"""\
+ """OwnerSec "OwnerSec" true true false 64 Text 0 0 ,First,#,""" + TaxPar1 + """,OwnerSec,-1,-1;"""\
+ """Address "Address" true true false 64 Text 0 0 ,First,#,""" + TaxPar1 + """,Address,-1,-1;"""\
+ """City "City" true true false 32 Text 0 0 ,First,#,""" + TaxPar1 + """,City,-1,-1;"""\
+ """State "State" true true false 4 Text 0 0 ,First,#,""" + TaxPar1 + """,State,-1,-1;"""\
+ """ZipCode "ZipCode" true true false 10 Text 0 0 ,First,#,""" + TaxPar1 + """,ZipCode,-1,-1;"""\
+ """Legal "Legal" true true false 254 Text 0 0 ,First,#,""" + TaxPar1 + """,Legal,-1,-1;"""\
+ """Sec "Sec" true true false 2 Text 0 0 ,First,#,""" + TaxPar1 + """,Sec,-1,-1;"""\
+ """Twp "Twp" true true false 2 Text 0 0 ,First,#,""" + TaxPar1 + """,Twp,-1,-1;"""\
+ """Rng "Rng" true true false 2 Text 0 0 ,First,#,""" + TaxPar1 + """,Rng,-1,-1;"""\
+ """Quarter "Quarter" true true false 2 Text 0 0 ,First,#,""" + TaxPar1 + """,Quarter,-1,-1;"""\
+ """TaxCode "TaxCode" true true false 7 Text 0 0 ,First,#,""" + TaxPar1 + """,TaxCode,-1,-1;"""\
+ """FireDist "FireDist" true false false 64 Text 0 0 ,First,#,""" + TaxPar1 + """,FireDist,-1,-1;"""\
+ """HighwayDist "HighwayDist" true false false 74 Text 0 0 ,First,#,""" + TaxPar1 + """,HighwayDist,-1,-1;"""\
+ """SchoolDist "SchoolDist" true false false 64 Text 0 0 ,First,#,""" + TaxPar1 + """,SchoolDist,-1,-1;"""\
+ """Acres1 "Acres1" true false false 4 Double 10 3 ,First,#,"""+ TaxPar1 + """,Acres1,-1,-1;"""\
+ """SITE_ADDR "SITE_ADDR" true false false 50 Text 0 0 ,First,#,""" + TaxPar1 + """,SITE_ADDR,-1,-1;"""\
+ """FZONE_CODE "FZONE_CODE" true false false 10 Text 0 0 ,First,#,"""+ FZon3 + """,ZONE_CODE,-1,-1;"""\
fieldmappings = arcpy.FieldMappings()
fieldmappings.loadFromString(FieldMapString)
return fieldmappings
arcpy.SpatialJoin_analysis(TaxPar1, FZon3, "C:\TEMP\Test.gdb\FZon2", "JOIN_ONE_TO_ONE", "KEEP_ALL",Layers0(TaxPar1, FZon3), "INTERSECT")
try:
print '(Elapsed time: ' + str(d.now() - startTime)[:-3] + ')'
except Exception, e:
# If an error occurred, print line number and error message
import traceback, sys
tb = sys.exc_info()[2]
print "Line %i" % tb.tb_lineno
print e.message
... View more
07-15-2016
02:55 PM
|
0
|
5
|
5641
|
|
POST
|
I forgot to mention that is field is a text field, so it's throw a 000539 error. Thanks.
... View more
06-28-2016
03:24 PM
|
0
|
3
|
5466
|
|
POST
|
Dan and Joshua i am not sure how to apply your suggestions. I tried the following in field calculator but no go. import re def strip_num(a): a = "24832 Trunnel Ct 8693" re.sub(r"(.*)\s\d+$", r"\1", a.strip()) '24832 Trunnel Ct' strip_num(!SiteAddress!)
... View more
06-28-2016
02:39 PM
|
0
|
5
|
5466
|
|
POST
|
I have a feature class and in that feature class i have a field "SiteAddress" and most attributes t looks good but there are some attributes that have numbers after the address and they are not suite, unit or apartment numbers. I am trying to figure out how to query to select them. Example of one is 24832 Trunnel Ct 8693, is there a way to select features with numbers after alphabet characters and delete the 8693 from ones that have the numbers after the alphabet characters. any help would be great. Thanks.
... View more
06-24-2016
02:25 PM
|
0
|
9
|
9301
|
|
POST
|
I did find that some one did try to use dictionary to store the ring buffer and create an insert cursor. Alough my inputlayer doens't have a distance field. import arcpy
import string
import os
from datetime import datetime as d
startTime = d.now()
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
lyr = arcpy.mapping.ListLayers(mxd, "SUBJECT_PROPERTY")[0]
arcpy.env.workspace = os.path.dirname(mxd.filePath)
wp = os.path.dirname(mxd.filePath)
inputLayer = "SUBJECT_PROPERTY"
outputLayer = "1_2"
def MultiRingBuffer(ringDistance, ringCount, inputLayer, outputLayer):
buffers = []
cursor = arcpy.SearchCursor(inputLayer)
for inputFeature in cursor:
sourceOid = inputFeature.getValue("FID")
currentBuffers = dict()
buffers.append(currentBuffers)
prevBuffer = inputFeature.Shape
for multiple in range(1, ringCount + 1):
distance = multiple * ringDistance
bufferedGeom = inputFeature.Shape.buffer(distance)
bufGeom = bufferedGeom.difference(prevBuffer)
prevBuffer = bufferedGeom
row = dict()
row["FID"] = sourceOid
row["distance"] = distance
row["SHAPE"] = bufGeom
currentBuffers[distance] = row
del cursor
cursor = arcpy.InsertCursor(outputLayer)
for ringBuffers in buffers:
for feature in ringBuffers.values():
row = cursor.newRow()
for k in feature.keys():
if k == "SHAPE":
row.Shape = feature
else:
row.setValue(k, feature )
cursor.insertRow(row)
del cursor
if __name__ == '__main__':
MultiRingBuffer(1, 2, "SUBJECT_PROPERTY" ,"1_2")
print("Complete")
... View more
05-19-2016
11:30 AM
|
0
|
1
|
1953
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-27-2022 11:37 AM | |
| 1 | 10-31-2023 10:16 AM | |
| 1 | 02-16-2023 01:50 PM | |
| 1 | 08-11-2021 11:13 AM | |
| 1 | 01-06-2021 10:45 AM |
| Online Status |
Offline
|
| Date Last Visited |
09-10-2024
10:42 AM
|