I have two large feature classes (3.5 mil point and 3.8 mil poly) that I would like spatially join.
Is there a faster way to do this instead of just using the classic spatial join tool?
I'm guessing this is a repeat question just can't find it.
When joining feature classes of this size I usually just let it run for a few hours to complete.
In the future, I would like to find a way to turn these types of processes from hours to minutes.
I only pull over one unique ID field to create a foreign key and then relate the two tables.
Just looking for advice or ideas.
One to One Join
Intersect
Arcpy friendly
Arcgis 10.1
Processor: Intel(R) Xeon(R) CPU E5-1607 0 @ 3.00 GHz
RAM: 16 GB
System type: 64-bit Operating System
Best Answer
Possible solution using rasters:
I tested the script below using 2.4 million points and the same number of polygons. I used fishnet equal 5*5 tiles. It means that about 100 thousands points were processed at a time. This is a snapshot of result window:
I tried spatial join on the same datasets and when it get to 5%, I cancelled it. By this time tool was running for 8 minutes. This means that with truly massive datasets (few millions), raster approach could greatly reduce processing time.
Note that I used raster to create my points and polygons, i.e. tested polygons were the most basic squares. I expect the advantage of raster approach can be even greater with more complex shapes. I could of reduce processing time further, by using fishnet with less tiles, but didn't want to risk in_memory space corruption.
SCRIPT: