1

I'm trying to build a tool in ModelBuilder to analyze where trips take place in relation to buffer zones. It takes as inputs an old buffer zone, a new buffer zone, and a set of trip data. The trip data is a geodatabase table that has a set of lat/lon for the pickup, another for a dropoff, and a trip ID to link the two. I'm trying to identify trips where the pickup and drop off both fall inside a buffer (then I'm comparing the old to the new).

To do this I'm generating XY events for the pickups, XY events for the dropoffs, filtering each to select the ones that fall inside the buffer, then using an Add Join to find the trips where both of them fall in the buffer.

The problem I'm facing is that when I just use layers, the results are wrong. I get a whole bunch of trips that have dropoffs outside of the buffer. When I add an additional step of converting the dropoffs in the buffer to a feature class and then performing the Add join, it works exactly as I expect. The only downside is that these feature classes are getting saved to the geodatabase and I have to clean that up. I thought the problem with the feature layers might be some kind of unintended run time reuse of layers, so I tried creating extra XY events to compensate but that didn't fix the problem.

What am I not understanding about the difference between feature layers and feature classes that is causing my models not to work?

Version of the model using only feature layers.

Here is the version of the model that only uses feature layers. The add join is not filtering properly. Somehow dropoffs that are outside of the buffer zones are being included in the join, despite the Select Layer by Location tool.

enter image description here

Here is the version of the model that exports the filtered dropoffs to feature classes and works exactly as expected.

1 Answer 1

1

I've run into basically the same issue. Different set of tools, but only writing the points to a new feature class seemed to be reliable. If you can live with the extra processing time involved in creating the feature class, you can make the tool clean up those features after it runs by making sure they are intermediate data. You can check by right clicking on the output (green ellipse) and selecting intermediate data if it's not already checked. Now, if you run the model as a tool or as a python script it will automatically delete that data.

For more on intermediate data, check here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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