Getting all results of one to many spatial join in ArcPy? [closed] The 2019 Stack Overflow Developer Survey Results Are InProgramatically setting default Geodatabase and Workspaces for map document?Spatial Join Hangs on Two Specific Shapefiles in QGIS 2.8Spatial Join Yielding NULL values in ArcPy?Incomplete spatial join in PostgreSQLArcpy Spatial Join - Not joining all records with 'JOIN_ONE_TO_MANY', 'KEEP_ALL' optionUsing ArcPy to join feature class to Oracle Spatial View?One-to-Many Spatial Join in QGISBuffered one-to-many spatial join QGIS3Running spatial analysis using ArcPy in PyCharm failed with error code 1073740791 (0xC0000409)Spatial join in ArcMap vs. ArcPy (how to make them the same)
The phrase "to the numbers born"?
With regards to an effect that triggers when a creature attacks, how does it entering the battlefield tapped and attacking apply?
What is the accessibility of a package's `Private` context variables?
Why isn't airport relocation done gradually?
How can I connect public and private node through a reverse SSH tunnel?
Sums of normal random variables
How to display lines in a file like ls displays files in a directory?
How to type a long/em dash `—`
What is the grammatical structure of "Il est de formation classique"?
Mathematics of imaging the black hole
Why can't devices on different VLANs, but on the same subnet, communicate?
Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?
Balance problems for leveling up mid-fight?
Distance from One
How to notate time signature switching consistently every measure
Table Fragmentation
Can an undergraduate be advised by a professor who is very far away?
Why doesn't shell automatically fix "useless use of cat"?
Is it okay to consider publishing in my first year of PhD?
writing variables above the numbers in tikz picture
Are spiders unable to hurt humans, especially very small spiders?
Can there be female White Walkers?
Is "plugging out" electronic devices an American expression?
How to type this arrow in math mode?
Getting all results of one to many spatial join in ArcPy? [closed]
The 2019 Stack Overflow Developer Survey Results Are InProgramatically setting default Geodatabase and Workspaces for map document?Spatial Join Hangs on Two Specific Shapefiles in QGIS 2.8Spatial Join Yielding NULL values in ArcPy?Incomplete spatial join in PostgreSQLArcpy Spatial Join - Not joining all records with 'JOIN_ONE_TO_MANY', 'KEEP_ALL' optionUsing ArcPy to join feature class to Oracle Spatial View?One-to-Many Spatial Join in QGISBuffered one-to-many spatial join QGIS3Running spatial analysis using ArcPy in PyCharm failed with error code 1073740791 (0xC0000409)Spatial join in ArcMap vs. ArcPy (how to make them the same)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm currently creating a tool for another team, and the final step is to run a spatial join analysis. the input polygon layer has 55 results, while the input point layer has over 400 currently, but this can go up and down, but never below the 55.
The only issue is when I run the analysis, I only get 55 polygons coming out the other end. The weird thing about this is, if I do the whole process in ArcMap I get the full 400+polygons with the right data. Even simply just copying and pasting the Python snippet of the correct results, and adjusting the inputs so they are formatted correctly doesn't seem to work.
Here is the code;
arcpy.SpatialJoin_analysis(result, result3, "YankosTool".format(gdb, today), "JOIN_ONE_TO_MANY", "KEEP_ALL")
where results is a polygon with 55 items in it and result3 is point layer with over 400 items in it. they are all located in the same GDB, and it works fine when done through arcmap manually
Has anyone encountered anything like this before where ArcPy seems limited compared to ArcMap?
It just seems bizarre to me that running the exact same process, copy and pasted, between ArcMap and arcpy gives different results like that.
arcpy spatial-join
closed as off-topic by PolyGeo♦ Apr 5 at 20:16
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
add a comment |
I'm currently creating a tool for another team, and the final step is to run a spatial join analysis. the input polygon layer has 55 results, while the input point layer has over 400 currently, but this can go up and down, but never below the 55.
The only issue is when I run the analysis, I only get 55 polygons coming out the other end. The weird thing about this is, if I do the whole process in ArcMap I get the full 400+polygons with the right data. Even simply just copying and pasting the Python snippet of the correct results, and adjusting the inputs so they are formatted correctly doesn't seem to work.
Here is the code;
arcpy.SpatialJoin_analysis(result, result3, "YankosTool".format(gdb, today), "JOIN_ONE_TO_MANY", "KEEP_ALL")
where results is a polygon with 55 items in it and result3 is point layer with over 400 items in it. they are all located in the same GDB, and it works fine when done through arcmap manually
Has anyone encountered anything like this before where ArcPy seems limited compared to ArcMap?
It just seems bizarre to me that running the exact same process, copy and pasted, between ArcMap and arcpy gives different results like that.
arcpy spatial-join
closed as off-topic by PolyGeo♦ Apr 5 at 20:16
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
2
Add the relevant code to your question
– BERA
Apr 5 at 15:59
it seems a bit useless to do that, as like I said copying and pasting across from arcmap's results windows still gives the same issue, and not being able to see the layers ruins context, no?
– ronanemmet
Apr 5 at 16:16
2
Your path may be causing problems. Try using os.path.join instead:os.path.join(gdb, 'YankosTool'+today)(or add an r in front). What is result and result3? Show how you create the variables
– BERA
Apr 5 at 16:24
1
Please include these for troubleshooting: a) arcpy code for creating result and result3 and b) print of arcpy.GetCount_management() for both result and result3 -- I want to ensure that the features created in arcpy do have the expected numbers of rows.
– smiller
Apr 5 at 17:08
1
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
Apr 5 at 19:00
add a comment |
I'm currently creating a tool for another team, and the final step is to run a spatial join analysis. the input polygon layer has 55 results, while the input point layer has over 400 currently, but this can go up and down, but never below the 55.
The only issue is when I run the analysis, I only get 55 polygons coming out the other end. The weird thing about this is, if I do the whole process in ArcMap I get the full 400+polygons with the right data. Even simply just copying and pasting the Python snippet of the correct results, and adjusting the inputs so they are formatted correctly doesn't seem to work.
Here is the code;
arcpy.SpatialJoin_analysis(result, result3, "YankosTool".format(gdb, today), "JOIN_ONE_TO_MANY", "KEEP_ALL")
where results is a polygon with 55 items in it and result3 is point layer with over 400 items in it. they are all located in the same GDB, and it works fine when done through arcmap manually
Has anyone encountered anything like this before where ArcPy seems limited compared to ArcMap?
It just seems bizarre to me that running the exact same process, copy and pasted, between ArcMap and arcpy gives different results like that.
arcpy spatial-join
I'm currently creating a tool for another team, and the final step is to run a spatial join analysis. the input polygon layer has 55 results, while the input point layer has over 400 currently, but this can go up and down, but never below the 55.
The only issue is when I run the analysis, I only get 55 polygons coming out the other end. The weird thing about this is, if I do the whole process in ArcMap I get the full 400+polygons with the right data. Even simply just copying and pasting the Python snippet of the correct results, and adjusting the inputs so they are formatted correctly doesn't seem to work.
Here is the code;
arcpy.SpatialJoin_analysis(result, result3, "YankosTool".format(gdb, today), "JOIN_ONE_TO_MANY", "KEEP_ALL")
where results is a polygon with 55 items in it and result3 is point layer with over 400 items in it. they are all located in the same GDB, and it works fine when done through arcmap manually
Has anyone encountered anything like this before where ArcPy seems limited compared to ArcMap?
It just seems bizarre to me that running the exact same process, copy and pasted, between ArcMap and arcpy gives different results like that.
arcpy spatial-join
arcpy spatial-join
edited Apr 5 at 20:16
PolyGeo♦
53.9k1781246
53.9k1781246
asked Apr 5 at 15:40
ronanemmetronanemmet
62
62
closed as off-topic by PolyGeo♦ Apr 5 at 20:16
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
closed as off-topic by PolyGeo♦ Apr 5 at 20:16
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
2
Add the relevant code to your question
– BERA
Apr 5 at 15:59
it seems a bit useless to do that, as like I said copying and pasting across from arcmap's results windows still gives the same issue, and not being able to see the layers ruins context, no?
– ronanemmet
Apr 5 at 16:16
2
Your path may be causing problems. Try using os.path.join instead:os.path.join(gdb, 'YankosTool'+today)(or add an r in front). What is result and result3? Show how you create the variables
– BERA
Apr 5 at 16:24
1
Please include these for troubleshooting: a) arcpy code for creating result and result3 and b) print of arcpy.GetCount_management() for both result and result3 -- I want to ensure that the features created in arcpy do have the expected numbers of rows.
– smiller
Apr 5 at 17:08
1
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
Apr 5 at 19:00
add a comment |
2
Add the relevant code to your question
– BERA
Apr 5 at 15:59
it seems a bit useless to do that, as like I said copying and pasting across from arcmap's results windows still gives the same issue, and not being able to see the layers ruins context, no?
– ronanemmet
Apr 5 at 16:16
2
Your path may be causing problems. Try using os.path.join instead:os.path.join(gdb, 'YankosTool'+today)(or add an r in front). What is result and result3? Show how you create the variables
– BERA
Apr 5 at 16:24
1
Please include these for troubleshooting: a) arcpy code for creating result and result3 and b) print of arcpy.GetCount_management() for both result and result3 -- I want to ensure that the features created in arcpy do have the expected numbers of rows.
– smiller
Apr 5 at 17:08
1
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
Apr 5 at 19:00
2
2
Add the relevant code to your question
– BERA
Apr 5 at 15:59
Add the relevant code to your question
– BERA
Apr 5 at 15:59
it seems a bit useless to do that, as like I said copying and pasting across from arcmap's results windows still gives the same issue, and not being able to see the layers ruins context, no?
– ronanemmet
Apr 5 at 16:16
it seems a bit useless to do that, as like I said copying and pasting across from arcmap's results windows still gives the same issue, and not being able to see the layers ruins context, no?
– ronanemmet
Apr 5 at 16:16
2
2
Your path may be causing problems. Try using os.path.join instead:
os.path.join(gdb, 'YankosTool'+today) (or add an r in front). What is result and result3? Show how you create the variables– BERA
Apr 5 at 16:24
Your path may be causing problems. Try using os.path.join instead:
os.path.join(gdb, 'YankosTool'+today) (or add an r in front). What is result and result3? Show how you create the variables– BERA
Apr 5 at 16:24
1
1
Please include these for troubleshooting: a) arcpy code for creating result and result3 and b) print of arcpy.GetCount_management() for both result and result3 -- I want to ensure that the features created in arcpy do have the expected numbers of rows.
– smiller
Apr 5 at 17:08
Please include these for troubleshooting: a) arcpy code for creating result and result3 and b) print of arcpy.GetCount_management() for both result and result3 -- I want to ensure that the features created in arcpy do have the expected numbers of rows.
– smiller
Apr 5 at 17:08
1
1
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
Apr 5 at 19:00
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
Apr 5 at 19:00
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
2
Add the relevant code to your question
– BERA
Apr 5 at 15:59
it seems a bit useless to do that, as like I said copying and pasting across from arcmap's results windows still gives the same issue, and not being able to see the layers ruins context, no?
– ronanemmet
Apr 5 at 16:16
2
Your path may be causing problems. Try using os.path.join instead:
os.path.join(gdb, 'YankosTool'+today)(or add an r in front). What is result and result3? Show how you create the variables– BERA
Apr 5 at 16:24
1
Please include these for troubleshooting: a) arcpy code for creating result and result3 and b) print of arcpy.GetCount_management() for both result and result3 -- I want to ensure that the features created in arcpy do have the expected numbers of rows.
– smiller
Apr 5 at 17:08
1
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
Apr 5 at 19:00