James is out the rest of the week so I'm not sure why he said he was going to provide a work around. I will take a look at it today and see if we can figure out what is going on.

From your code snippet, I assuming that the billingLayer is actually all the North Dakota road files and that you are trying to find the closest road to a particular point within a 100 feet, is this correct?

We figured out what was happening. The NDlkaA10 shapefile actually has an extra column on it called "Symbol" since not all the columns are the same across all the shapefiles the query is causing an error when it hits a shapefile that doesn't have the "Symbol" column. We are looking into a better way to handle this exception so it's apparent what is going on to the developer and they can fix the issue.

The best way to get it to work now is to pass in the column names that you care about instead of returning all of the columns. One requirement is that the columns you specify must exist in all the shapfiles that make up the MultiShapefileFeaturelayer. Below is a code example on how to specify only the columns you want returned for the feature.

That seems to have solved the error issue which is great. However now it is taking a extreme amount of time to find the closest feature. Do you maybe have any suggestions on how I can speed this process up?

I have tried to call GetFeaturesWithinDistanceOf and it seems to return every feature in the MultiShapeFileFeatureLayer no matter what distance I give it.

Basically what I'm looking to do is load all of North Dakotas shapefiles. And using points from a GPS unit on a truck find the nearest road and display that road in a report format with distance and time on road.

I have the distance and time all finished just cannot pull the road name for the report.

Example:

I-94 58456ft 1h 21min

HWY-1 12345ft 2hr

Main Steet 1000ft 22min

If there is a better example out there that I may not have found that would be great too.

This returns any features within a quarter mile of the point passed in.

I noticed that the coordinates you posted were from Minnesota but it should work exacltly the same as North Dakota assuming you have it in a MultiShapeFileFeatureLayer like you did earlier in North Dakota.

I'm getting good speed on both of the queries (less than a second), maybe you don't have your spatial indexes setup correctly. Here is the code where I'm loading up the MultiShapeFileFeatureLayer and the corresponding indexes.

Thats it and I bet I stared at that in other posts and the wiki multiple times just didn't click. Can run through about 5k points in about 2 min now which is acceptable on our end as we are doing alot of processing between plotting the point on the map and then moving to the next point.