POST
|
As an alternative, for anyone who stumbles across this like I did, there is another easy way to detect polygon changes - do a Union between your before and after versions, and then anywhere where the ID before doesn't match the ID after has changed spatially. Once those are accounted for any other mismatches in attributes indicate an attribute change.
... View more
12-03-2019
09:30 AM
|
0
|
0
|
2780
|
IDEA
|
I agree with this 100%. This is the bane of my existence right now. Use Case: We have built an Operations Dashboard for our provincial Emergency Measures Office. During a disaster, the GIS team sends one member to the EMO office and they update the map, and all the Regional Emergency Management Coordinators can view the situation map in real time and know what is happening. But the data, map and dashboard are all owned by only one person on the GIS team. So team members can edit data in a layer, but they cannot add or remove layers in the map, they cannot change the map or widgets in the dashboard, that all has to be done by the one person who created it all, which may or may not be the person on active duty any given day. So that one person has to be available all the time in case map or dashboard changes are needed. And if that person leaves the organization, the whole thing would need to be rebuilt. I can see this being fixed with either Group Ownership, or Assigning edit permissions to Group members.
... View more
11-13-2019
07:10 AM
|
0
|
0
|
317
|
IDEA
|
I agree with this 100%. This is the bane of my existence right now. Use Case: We have built an Operations Dashboard for our provincial Emergency Measures Office. During a disaster, the GIS team sends one member to the EMO office and they update the map, and all the Regional Emergency Management Coordinators can view the situation map in real time and know what is happening. But the data, map and dashboard are all owned by only one person on the GIS team. So team members can edit data in a layer, but they cannot add or remove layers in the map, they cannot change the map or widgets in the dashboard, that all has to be done by the one person who created it all, which may or may not be the person on active duty any given day. So that one person has to be available all the time in case map or dashboard changes are needed. And if that person leaves the organization, the whole thing would need to be rebuilt. I can see this being fixed with either Group Ownership, or Assigning edit permissions to Group members.
... View more
11-13-2019
07:10 AM
|
0
|
0
|
303
|
POST
|
For those who may benefit from it, this is the code I'm going with as slow, but workable: ## f1 is temporary feature class with todays date, output by other processes. f1 = "RSE20190328" fields = ['L_StName','L_StDir','L_StTypP','L_StTypS','L_PlName'] ## street name, street direction, street type prefix, street type suffix and place name with arcpy.da.SearchCursor(f1,fields, sql_clause=('DISTINCT','ORDER BY L_PlName, L_StName, L_StTypS')) as cursor1: for row1 in cursor1: street_name = row1[0] street_direction = row1[1] street_prefix = row1[2] street_suffix = row1[3] street_place_name = row1[4] ## some street names have apostrophes in them - make the search replace that with a % because no combination I tried of escaping or backslashing the quote seemed to work correctly where2 = "L_StName = '" + street_name.replace("'","%") + "'" if street_direction is not None: where2 += " and L_StDir = '" + street_direction + "' " if street_prefix is not None: where2 += " and L_StTypP = '" + street_prefix + "'" if street_suffix is not None: where2 += " and L_StTypS = '" + street_suffix + "'" ## some place names have apostrophes in them - make the search replace that with a % because no combination I tried of escaping or backslashing the quote seemed to work correctly if street_place_name is not None: where2 += " and L_PlName = '" + street_place_name.replace("'","%") + "'" ## work with left and right sides separately as they may have 0,0 ranges in different spots. fields2 = ['L_LADD','L_HADD','ID'] ## left low address and left high address list2 = [] ## put results into list so we can easily compare each row to the previous row -- hard to do in a cursor with arcpy.da.SearchCursor(f1, fields2, where2, sql_clause=(None,'ORDER BY L_LADD, L_HADD')) as cursor2: for row2 in cursor2: if row2[0] == 0 and row2[1] == 0: ## ignore 0,0 ranges for my purposes continue list2.append([row2[0], row2[1], row2[2]]) for i in range (0, len(list2)-1): if list2[1] == list2[i+1][0] - 2: ## if there is a gap of exactly 2 there is no gap or overlap ##print "1: Good" continue elif list2[1] <= list2[i+1][0]: print "2:Gap" ## print results for now - eventually I will put the results into a separate list, and do an update cursor on them to print street_name + " " + street_suffix + " " + street_place_name + ": " + str(list2) continue elif list2[1] > list2[i+1][0] - 2 : print "3:Overlap" print street_name + " " + street_suffix + " " + street_place_name + ": " + str(list2) continue fields3 = ['R_LADD','R_HADD','ID'] ## right low address and right high address list3 = [] with arcpy.da.SearchCursor(f1, fields3, where2, sql_clause=(None,'ORDER BY R_LADD, R_HADD')) as cursor3: for row3 in cursor3: if row3[0] == 0 and row3[1] == 0: ## ignore 0,0 ranges for my purposes continue list3.append([row3[0], row3[1], row3[2]]) for i in range (0, len(list3)-1): if list3[1] == list3[i+1][0] - 2: ##print "1: Good" continue elif list3[1] <= list3[i+1][0]: print "2:Gap" print street_name + " " + street_suffix + " " + street_place_name + ": " + str(list3) continue elif list3[1] > list3[i+1][0] - 2 : print "3:Overlap" print street_name + " " + street_suffix + " " + street_place_name + ": " + str(list3) continue
... View more
04-01-2019
05:44 AM
|
1
|
1
|
1653
|
POST
|
It seems I was trying to make this much harder than it had to be. I've got a functional bit of logic now with a search cursor using a distinct sql clause to find all the unique combinations of street name and community name, and then inside that I loop through all the left side address attributes (with an order by sql clause on the cursor), and then I loop through all the right side address attributes. It's not extremely fast, but I can set this up as a scheduled task to run overnight, so I'm not too concerned if it takes 45 minutes to an hour to run. It gets me the result I need, so I can move forward.
... View more
04-01-2019
05:24 AM
|
0
|
0
|
1653
|
POST
|
I am trying to write a script that would detect overlaps and gaps in address range attributes on a line feature class for streets. An example would be one segment of "MAIN STREET" has a range of 100-190 on the left and 101 to 191 on the right, and then the segment for the next block would have 200-230, 201-231 (GAP Scenario) or 188-230, 189-231 (OVERLAP Scenario). I'm working with a province wide dataset with over 68,000 line segments, so any solution I come up with needs to work fairly efficiently. I am aware that there are tools in the Roads and Highways toolbox, but that is for ArcGIS 10.3 and greater and I am still stuck using 10.2.2 for a little while longer. My first thought was to do some processing to buffer and spatial join the segments, and then dissolve to find the all segments belonging to the same named road, and link them together in order, OR to use the linear referencing tools but we have some unusual scenarios like a T-intersection where all directions are part of the same named street, or sections where there is only a range on one side and the other side has 0-0 and I can't seem to consistently get the ranges to order correctly. We also have roads where the range may be 1-99 on a segment, then there is a bridge with a 0-0 range and then the range resumes after the bridge at 101-151 for example. I was wondering if anyone else had tried to solve the problem of detecting range gaps and overlaps and if they had, if they would be willing to provide the logical steps behind their code, or a code sample. I'm not going to include code in my question, as I'm not sure my approach so far is the most efficient way to do it, and I'm ready to scrap what I've done and try something new.
... View more
03-29-2019
09:24 AM
|
1
|
6
|
1972
|
IDEA
|
We are using Operations Dashboard in our Provincial Emergency Measures Organization. We have several layers related to the current emergency event that have date/time info. I want a widget that will look at the current event, and determine how many hours/minutes/seconds we are into the event. Time since <<Event> HH:MI:SS or Time since EOC Activation: HH : MI : SS Hours Minutes Seconds
... View more
11-06-2018
10:14 AM
|
5
|
2
|
1080
|
POST
|
I have just found the same behaviour in 10.2 I don't have 10.3 or higher to test with. One thing I did notice - If I select the tool in the ArcToolbox -> Data Management Tools -> Versions -> Change Version, and I enter all the information for the historical version, it changes correctly. Then I go into the Geoprocessing results, and I right click on the successful action, and Copy as Python Snippet, and I paste that into the python window, and run it again, I immediately get the incorrect behaviour of it changing to the current date and time rather than the specified date and time. So the Python version of the command fails, but the GUI version works. This is extremely frustrating when I am trying to write code to create a transmittal file that documents all the daily or monthly data changes and sends it to our data partners.
... View more
02-12-2018
07:05 AM
|
0
|
0
|
643
|
POST
|
Did you ever have any success with solving this? I am running into the same situation - I have a feature class with 67767 lines, and I'm comparing against a historical version of the same feature class, and I have about 15 records that show up in the results as a "D"elete and "N"ew feature instead of matching, despite having identical geometry and all attributes also identical. If I can't trust this tool to match all the records then I can't reliably use it at all.
... View more
02-06-2018
09:26 AM
|
1
|
0
|
1035
|
POST
|
We're using SDE. and I'm not comparing a string against a field, I'm comparing one field against another, so I couldn't escape the underscores - they're in the source data.
... View more
09-25-2017
06:05 AM
|
0
|
1
|
615
|
POST
|
They're definitely not equal. Like was my only hope. I have found the solution, and it's a head-scratcher.... this fails: where = 'UPPER("EmergencyServiceZones.POLICE") LIKE UPPER("msag_temp.Police")' this works: where = 'UPPER("msag_temp.Police") LIKE UPPER("EmergencyServiceZones.POLICE")' for some bizarre reason, a space is LIKE an underscore, but an underscore is not LIKE a space.
... View more
09-22-2017
11:11 AM
|
0
|
3
|
615
|
POST
|
I am trying to do a Select By Attributes where I have a field in one street file that has a column "POLICE" that lists the police department like this example: 'Sussex Police' and a file from another source that I am joining that has a column "Police" that lists the police department like this example: 'SUSSEX_POLICE'. For some names, there may be multiple underscore characters. I can obviously use UPPER() on the first field to make them almost match, and on the off chance that the data isn't consistent, I'm actually using UPPER on both sides. I was hoping I could use LIKE to get the underscore vs. the space, but it's just not matching. So this is my current expression: where = 'UPPER("EmergencyServiceZones.POLICE") LIKE UPPER("msag_temp.Police")' arcpy.SelectLayerByAttribute_management (road_layer, "NEW_SELECTION", where) It returns nothing as it is. Does anyone have any suggestions to adjust the query expression to find the matches?
... View more
09-22-2017
10:27 AM
|
0
|
5
|
875
|
POST
|
This is the tiny piece of information I've been searching for, for months. Screw the spatial join, Intersect produces a similar enough result, with a massive performance improvement. I just made a script that takes less than 2 minutes and replaces my previous effort that used spatial joins, that took 16 hours. Thanks!
... View more
09-15-2017
03:47 AM
|
2
|
0
|
1568
|
POST
|
In this example the black labels represent the ranges in the main dataset on the server, and the green labels represent what I'm trying to get to. How can I programatically determine that I want to apply the range to the segment on the right, rather than one of the two on the left?
... View more
08-25-2017
10:28 AM
|
0
|
0
|
625
|
Title | Kudos | Posted |
---|---|---|
1 | 04-01-2019 05:44 AM | |
1 | 02-06-2018 09:26 AM | |
1 | 03-29-2019 09:24 AM | |
5 | 11-06-2018 10:14 AM | |
2 | 09-15-2017 03:47 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|