1

I want to get the distance between each polygon in one layer (each rectangle in a fishnet grid over the area in question) and the nearest polygon in another layer, but "Generate Near Table" never finishes. Because I am limited to using school computers I can't allow the program to run continuously long enough to finish. Any ideas for a workaround or another tool I can use to gather the same information?

I do have the "nearest only" box checked. Within each grid cell are aggregated points. I need the distance from the grid cell to the nearest park (polygons in another layer file). That data will be joined to an existing table and used as a potential explanatory variable in an OLS regression analysis, in which the dependent variable is number of points within the grid cell.

  • Check your geometries with Check Geometry / Repair Geometry to ensure that you've not got a bad geometry or two in there. Perhaps subset your inputs and run this as multiple operations (in a few instances of catalog) then merge the tables. You can't subset your 'to' features but you can subset your 'from' features, even if you do this one at a time you will eventually get a result - which is better than nothing. When you run your Generate Near Table you have checked the 'closest only' box haven't you? What are you trying to achieve? Are you trying to find which grids contain what polygons? – Michael Stimson May 7 '15 at 22:51
  • Added more information. Right now running subsets of the 'from' features seems like the only option. Thanks – Kaitlyn May 7 '15 at 23:16
  • Are you doing this in python, model builder or interactively? What kind of accuracy are you expecting? Would it be good enough to take the centroid of the park and find the closest grid square (much less processing involved) - this will identify the closest but the distance will be slightly off, in rare situations the centroid will be closer to a different grid than the closest vertex on the boundary; Perhaps simplifying the parks would also help (Simplify Polygon) by having less vertices to process. – Michael Stimson May 7 '15 at 23:32
  • 1
    I'm not clear on exactly what you're attempting to do; a graphic of the three layers may help. How large a grid are we talking (cell count)? How large an extent? How many park features? Have you done check geometry as Michael suggests? Are your near table inputs the parks and grid? Same or different CRS? Both in the map when tool is run? The alternative is a spatial join, but if either Near tool is failing to finish I suspect a spatial join would as well because there's some other issue going on. – Chris W May 8 '15 at 0:28
  • The grid overlays the five boroughs of NYC, about 5900 cells. Check geometry returns no problems, the near table inputs are only the grid and the parks layer, and the CRS and projection are the same for both. Unfortunately I need the distance from each and every cell to the nearest park, not just from each park to the nearest grid cell. 'Create near table' gives me the data I need (runs properly when reduce the extent to run only 30 or so grid cells at a time), its just the processing time that's an issue due to computer availability. I think 'Simplify Polygon' will be my next step. – Kaitlyn May 8 '15 at 3:16
1

Use eucledean raster distance to parks. Use grids to find statistics. To reduce time use reasonable cell size for distance raster, e.g. 50 m if this ie enough accurate for your purpose

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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