3

I am using ArcGIS 10.1 with Python 2.7 I have a point layer with thousands of points that each hold an id value of its owner. One owner can have multiple points, meaning that points can have the same owner_id. I want to create a raster that counts the number of unique owner_ids in each cell.

Is there a way to create a raster with a value containing the count of unique owner_ids? In other words, I want a raster with the number of unique owners instead of a raster with the number of points in each cell.

I have tried creating separate raster grids for each individual owner and its points (found it somewhere on another forum), but since my data in total is more than a million different owner_ids, this will take way too long.

  • @Aaron, My owner_ids range from 1 to about 1 million (and are integers). If I select range in point to raster, a value of 0 means 1 unique owner_id and a value between 1 and 1 million means at least 2 unique owner_ids, but then still I don't know how many unique owner_ids per cell – Koen Jan 7 '15 at 14:51
  • there is something on the esri forum, where a possible workaround is mentioned, although i can't folow Bill Huber's method as explained in the last comment on this post: forums.esri.com/Thread.asp?c=93&f=995&t=199401 – Koen Jan 7 '15 at 18:15
1

Here is what I would do.

1: You should create a raster (a constant raster could do it) with the cell size you want.

http://pro.arcgis.com/fr/pro-app/tool-reference/spatial-analyst/create-constant-raster.htm

2: You convert that raster to polygons.

http://pro.arcgis.com/fr/pro-app/tool-reference/conversion/raster-to-polygon.htm

3: Make sure you have an unique identifier for each cell (there should be an FID) else create it with field calculator.

4: Make a Spatial Join where you sum up the points in each polygons.

http://pro.arcgis.com/fr/pro-app/tool-reference/analysis/spatial-join.htm

5: Convert the resulting polygons to points.

http://pro.arcgis.com/fr/pro-app/tool-reference/data-management/feature-to-point.htm

6: Then convert these points to a raster.

http://pro.arcgis.com/fr/pro-app/tool-reference/conversion/point-to-raster.htm

The spatial join will take some time as ArcGIS uses the calculate field function and it is really not optimized for huge database. But i think the whole process will work nicely. You could use the model builder if it is a recuring process.

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.