Getting all results of one to many spatial join in ArcPy? [on hold]Programatically setting default...
expand `ifthenelse` immediately
What doth I be?
Important Resources for Dark Age Civilizations?
Is it possible to do 50 km distance without any previous training?
Rock identification in KY
Is it inappropriate for a student to attend their mentor's dissertation defense?
How to format long polynomial?
Uncaught TypeError: 'set' on proxy: trap returned falsish for property Name
Was any UN Security Council vote triple-vetoed?
Has there ever been an airliner design involving reducing generator load by installing solar panels?
"You are your self first supporter", a more proper way to say it
What does the "remote control" for a QF-4 look like?
meaning of に in 本当に?
Is it legal for company to use my work email to pretend I still work there?
When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?
How much of data wrangling is a data scientist's job?
Are the number of citations and number of published articles the most important criteria for a tenure promotion?
Maximum likelihood parameters deviate from posterior distributions
Are astronomers waiting to see something in an image from a gravitational lens that they've already seen in an adjacent image?
What does "Puller Prush Person" mean?
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
Can I make popcorn with any corn?
Which country benefited the most from UN Security Council vetoes?
What's that red-plus icon near a text?
Getting all results of one to many spatial join in ArcPy? [on hold]
Programatically 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
put on hold as off-topic by PolyGeo♦ 1 hour ago
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
If this question can be reworded to fit the rules in the help center, please edit the question.
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
put on hold as off-topic by PolyGeo♦ 1 hour ago
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
If this question can be reworded to fit the rules in the help center, please edit the question.
2
Add the relevant code to your question
– BERA
5 hours ago
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
5 hours ago
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
5 hours ago
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
4 hours ago
1
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
2 hours ago
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 1 hour ago
PolyGeo♦
53.9k1781245
53.9k1781245
asked 5 hours ago
ronanemmetronanemmet
12
12
put on hold as off-topic by PolyGeo♦ 1 hour ago
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
If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as off-topic by PolyGeo♦ 1 hour ago
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
If this question can be reworded to fit the rules in the help center, please edit the question.
2
Add the relevant code to your question
– BERA
5 hours ago
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
5 hours ago
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
5 hours ago
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
4 hours ago
1
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
2 hours ago
add a comment |
2
Add the relevant code to your question
– BERA
5 hours ago
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
5 hours ago
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
5 hours ago
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
4 hours ago
1
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
2 hours ago
2
2
Add the relevant code to your question
– BERA
5 hours ago
Add the relevant code to your question
– BERA
5 hours ago
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
5 hours ago
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
5 hours ago
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
5 hours ago
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
5 hours ago
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
4 hours ago
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
4 hours ago
1
1
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
2 hours ago
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
2 hours ago
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
5 hours ago
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
5 hours ago
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
5 hours ago
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
4 hours ago
1
What type of join? Intersect? Share line segment? The line you show is very much not copy as python script.
– FelixIP
2 hours ago