-1

I have an integer FGDB raster and a FGDB point layer, both in the same CRS/projection. I'd like to count the number of points that overlay each raster cell and then apply that count to the raster (either as the new raster cell value or perhaps in a different field in the raster's attribute table - assuming it had one).

I could convert the raster to a polygon layer and do a point-in-polygon analysis, then convert the polygon back to a raster, but that seems kind of cumbersome.

A search through help files and the internet turns up nothing. Surely I can't be the first to be faced with this?

I have access to both Arc 10.4.1 and QGIS 2.16.1.

Stu Smith
  • 8,252
  • 8
  • 35
  • 84
  • So are there coincident points? So, one pixel could have a value of 2 or more? Do you have access to spatial analyst? – Fezter Dec 09 '16 at 01:51
  • 1
    Please choose only one GIS package, since GIS SE has a "One question per Question" policy. – Vince Dec 09 '16 at 01:56
  • As per the [Tour] there should be only one question asked per question and by asking the same question for each of two products you are effectively asking two questions. In this case a clean Q&A still resulted but far more often multiple questions per question leads to convoluted Q&A and makes finding clear answers to clear questions harder for subsequent visitors who are usually looking for a single answer to their single question. – PolyGeo Dec 09 '16 at 02:53
  • @PolyGeo thanks for your efforts to maintain this site! But I gotta take exception to having this (single!) question put on hold. I asked one question: how to count the number of points per raster cell. Additionally, I provided diligent background research. I also provided a possible (albeit kludgey) approach. I don't care what software package - Arc or QGIS - works, I just need a solution. Where do you see multiple questions? I don't get it... Please help me out and take this off hold. Thanks. – Stu Smith Dec 09 '16 at 03:24
  • 1
    The question mark in your question is poorly placed but I think what you are asking is: 1. How do I count the number of points that overlay each raster cell and then apply that count to the raster using ArcGIS for Desktop? 2. How do I count the number of points that overlay each raster cell and then apply that count to the raster using QGIS? Both are good questions when asked in their own question, asked both in the same question is too broad for focussed Q&A. – PolyGeo Dec 09 '16 at 04:06
  • I try not to start answering a question until there is one question per question but, from the two answers you got in the one answer posted, it looks like the QGIS one may be a duplicate of http://gis.stackexchange.com/questions/94358 and the ArcGIS one may involve Point to Raster etc. Asked separately you would already have our QGIS specialists looking at one and our ArcGIS specialists looking at the other, and we would then get at least one good answer to each of two well scoped questions. – PolyGeo Dec 09 '16 at 04:26
  • So are you proposing that I submit TWO posts, each with the exact same text ('cause it's the same question, regardless of software platform)? The posts would differ only in that one gets Arc tags and the other gets QGIS tags? – Stu Smith Dec 09 '16 at 05:41
  • What if I also had access to SAGA? GRASS? R?... Would that now be a total of 5 separate posts, each with the same question? – Stu Smith Dec 09 '16 at 05:43
  • 1
    If you are actually using and trying to do this with 5 GIS products, then when you describe precisely what you have tried and where you are stuck with each product those questions may resemble each other but will be far from identical. – PolyGeo Dec 09 '16 at 11:11
  • 1
    Keep in mind that the purpose of GIS SE is to compile a comprehensive question/answer database. Questions which attract partial answers (A or B) introduce unnecessary complexity. The example here demonstrates the problem, since a QGIS solution is already in the database, yet an AND question requires a duplicate reference. Rather than offering multiple software solutions, you should provide specific details on one of them (for example, the licence level and available extensions in ArcGIS Desktop) – Vince Dec 09 '16 at 11:57

1 Answers1

0

ArcGIS

If you have access to Spatial Analyst, 3D Analyst, or have an Advanced License, then I suggest you use the Point to Raster tool.

You can convert your points to a raster and the cell_assignment parameter can be set to COUNT to determine how many points are in a particular location.

QGIS

I found this post which might work for you.

How to convert a point layer to a raster grid that shows the frequency of points per cell in QGIS

Fezter
  • 21,867
  • 11
  • 68
  • 123