POST
|
I am looking to check for missing field descriptions but the metadata check does not generate an error for the descriptions. Attached image has the short names I have checked. Any help or insight is greatly appreciated.
... View more
03-28-2017
05:52 PM
|
0
|
0
|
453
|
POST
|
I am trying to generate a report using data reviewer after running a batch metadata check job. I have all the errors written to the reviewer table within a session but when I try to create a report, it comes back with no data available in the excel file. This happens for all the types of reports in data reviewer. Any ideas why? am I missing a step? thanks! excel and image below.
... View more
03-24-2017
06:35 AM
|
0
|
1
|
979
|
POST
|
Hey Darren, This is exactly what I was looking for. Thanks
... View more
11-18-2016
11:12 AM
|
0
|
0
|
2252
|
POST
|
Hi, I am having trouble trying to figure out a way to make the extent indicator larger (change size) when my main data frame is zoomed into about the city block level. Thanks in advanced!
... View more
11-18-2016
06:32 AM
|
0
|
5
|
3838
|
POST
|
When I am adding an immersive section to the cascade builder, and add a webmap, none of the layers load, it's just a blank map just the basemap, no scale dependencies. Tried sharing both the story and webmap publicly and that did not work either. Any help would be great! Thanks
... View more
07-20-2016
10:54 AM
|
0
|
1
|
1113
|
POST
|
Have you tried using a dictionary? Perhaps something along these lines:
def main():
workspace = arcpy.GetParameterAsText(0)
arcpy.env.workspace = workspace
field = "newId"
newidfield = arcpy.AddField_management(workspace,'newId','TEXT','','','','','NULLABLE')
id_tracking = {}
cursor = arcpy.UpdateCursor(workspace)
for row in cursor:
current_id = row.getValue(field)
if current_id in id_tracking:
count = id_tracking[current_id]
count += 1
row.setValue(field,str(count).zfill(2))
id_tracking[current_id] = count
else:
count = 1
row.setValue(field,str(count).zfill(2))
id_tracking[current_id] = count
cursor.updateRow(row)
new_field = arcpy.CalculateField_management(workspace,"newId","!oldId!"+"!newId!",'PYTHON')
As an added bonus, you don't need the autoIncrement function anymore. Awesome this worked!, just added oldid_field = "oldId" and changed current_id = row.getValue(field) to => current_id = row.getValue(oldId_field) to get those duplicates to increment. Thanks
... View more
10-08-2013
09:12 AM
|
0
|
0
|
370
|
POST
|
I'm trying to tweak this script to find duplicates in a field and give it a sequential value to it. As of now the script just auto increments by concatenating the "oldId" field and the "newId" field into the "newId' field. current output: 123 => 12301 123 => 12302 123 => 12303 234 => 23404 237 => 23705 I would want the desired output to be: 123 => 12301 123 => 12302 123 => 12303 234 => 23401 237 => 23701 so, different id's all get 01 at the end and duplicates get sequential values starting with 01 (using .zfill(2)) to keep the leading zero. the two fields are also TEXT fields. any suggestions would be great, Thanks! [HTML] import arcpy import os def main(): workspace = arcpy.GetParameterAsText(0) arcpy.env.workspace = workspace field = "newId" newidfield = arcpy.AddField_management(workspace,'newId','TEXT','','','','','NULLABLE') cursor = arcpy.UpdateCursor(workspace) for row in cursor: row.setValue(field,str(autoIncrement()).zfill(2)) cursor.updateRow(row) new_field = arcpy.CalculateField_management(workspace,"newId","!oldId!"+"!newId!",'PYTHON') rec = 0 def autoIncrement(): global rec pStart = 1 pInterval = 1 if (rec == 0): rec = pStart return rec else: rec = rec + pInterval return rec if __name__ == '__main__': print "Adding IDs..." main() [/HTML]
... View more
10-08-2013
08:09 AM
|
0
|
3
|
815
|
POST
|
Hi Jake, this worked great, thanks! I also wanted to see if the just "ns" portion could also search featureclasses that are written in capital letters such as "NS"? Is there a way to make this case- insensitive? thanks again! Disregard this question. I got it to work! just added another newName line thanks!
... View more
04-01-2013
06:02 AM
|
0
|
2
|
2758
|
POST
|
Hi Jake, this worked great, thanks! I also wanted to see if the just "ns" portion could also search featureclasses that are written in capital letters such as "NS"? Is there a way to make this case- insensitive? thanks again!
... View more
04-01-2013
05:42 AM
|
0
|
0
|
2758
|
POST
|
Hello, I need to create a python script that would rename all the feature classes within multiple featuredatasets in a gdb (the gdb is in ArcSDE if that makes any difference). The feature classes are in a set format and I need to change the prefix and part of the suffix. For example: from "road_1234567ns" to "RD_1234567_NS12_13" where 1234567 is the string that I need to keep (and is unique to each feature class) and prefix of "Road" is a constant that I need to replace with "RD_". Suffix is constant as well, "ns" replaced with "_NS12_13" The renamed classes will be separated by an underscore I am just starting out with python and eager to learn more, if anyone has any helpful insights, that would be greatly appreciated. I am using ArcGIS 10.1 Thank you!
... View more
03-29-2013
10:42 AM
|
0
|
9
|
6584
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|