2

I have a shapefile with hundreds of caribou movement corridors. using this data, I am trying to create a map displaying the frequency of use to determine important movement and migration pathways for different herds.

The original shapefile has several years of data of individual collared caribou movements derived using Brownian Bridge Movement Modelling. From this file, I have successfully created my desired outcome by: 1. Using the union tool 2. Multipart to singlepart 3. Spatial join to itself 4. Change shapefile symbology. Example of intended final product The problem I am now encountering is that I have extended my study dates and included several years into a single model. When I try to follow the above steps with the large dataset, I a thrown an error code 'insufficient memory' at the spatial join step (3.). Clearly, my computer does not have enough ram to run this calculation, so I have been trying to divide my shapefile into 4 equal parts, using a fishnet grid, which I plan to merge back together after I run the spatial join on each parcel. I have successfully created the grid and again using the Union tool, created 4 separate shapefiles of data. Now, when I try to 'split' the caribou polygons from the grid attribute, the operation fails. All polygons with fishnet grid prior to splitting of grids I understand that ArcGIS pro and perhaps a patch for arcmap could help my computer access more of its ram to run such operation, however, I do not currently have access to these, so am looking for some kind of alternative method of achieving my desired results.

I will try to add some images shortly.

  • What happens when the split operation fails? Do you get an error message? – csk Apr 5 at 17:52
  • Thanks for responding. No there is no error message, it just times out after about an hour of processing, and in the Results Status it simply says 'failed'. I should also add, that I was unable to use the Union tool in arcamp to divide the polygons into equal parts. Instead I used QGIS for this particular action. – user62765 Apr 5 at 18:01
  • Have a look at this question, for a possible solution in QGIS that doesn't require any geoprocessing at all. You just use blending modes to create a heatmap. – csk Apr 5 at 18:34
  • Try running this operation using ArcGIS Pro, which utilizes 64 bit architecture. Please let me know if you can successfully run it on that platform. – Aaron Apr 5 at 18:34
  • 1
    You can install [64 bit geoprocessing] ( desktop.arcgis.com/en/arcmap/10.3/analyze/executing-tools/…) for arcmap but when you do you run the tools in the background. – Hornbydd Apr 5 at 19:05
0

I think the simplest way to solve that is divide polygons into non-overlapping sets, converting individual sets into rasters and use cell statistics on these rasters.

So, run polygon neighbours tool on your corridors:

arcpy.PolygonNeighbors_analysis(in_features="SUBCATCHMENTS", out_table="C:/SCRATCH/SCRATCH.gdb/NEIGHBOURS", in_fields="", area_overlap="AREA_OVERLAP", both_sides="NO_BOTH_SIDES")

making sure that "Include area overlap" is checked and run script below from mxd. Script creates new field "PART_NO" and populates it. First parameter of the script is your polygons layer (shapefile!), second parameter is polygon neighbours output.

'''
creates non-adjacent groups of polygons
'''
import arcpy
import networkx as nx

infc = arcpy.GetParameterAsText(0)
table = arcpy.GetParameterAsText(1)
fromto=arcpy.da.TableToNumPyArray(table,("src_FID","nbr_FID"))
G=nx.Graph()
for f,t in fromto:
    G.add_edge(f,t,weight=1)
d = nx.coloring.greedy_color(G, strategy=nx.coloring.strategy_largest_first)
arcpy.AddField_management(infc, "PART_NO","Short")
with arcpy.da.UpdateCursor(infc,("FID","PART_NO")) as cursor:
    for row in cursor:
        row[1]=d[row[0]]+1
        cursor.updateRow(row)
arcpy.AddMessage("Done")

Output shows that original layer can be presented as 5 for non-adjusting sets. There are multiple overlaps in your data, so expect slightly more than 5 groups to deal with:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.