<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to extract information from a raster to a shapefile in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-extract-information-from-a-raster-to-a/m-p/192693#M2750</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks a lot for answering!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I would think that a Zonal Statistics as a table would be the best fit &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This time I tried to make a Zonal Statistics as a Table with the shapefile and &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;the ASCII file&lt;/SPAN&gt;&lt;SPAN&gt; (rather than with the raster) and it did produce a real table. I think that this solves the problem of the cells whose center is not inside a province (although they partly cover them) but the mean that the Zonal Statistics produces does not seem weighted according to what % of the cell covers every province. (Still, it's an improvement thanks!!).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I still don't understand 1) why I can't produce the same Zonal Statistics with the converted Raster and 2) why the ASCII file is a little shifted to the right with respect to the raster file: the raster file comes actually from a conversion of the ASCII file!! For some strange reason the position of the raster with respect to Europe is correct, while the position of the ASCII file is not. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; you also describe something that I think that weighted overlay should be better. &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One problem with the weighted overlay is that my lightning data are not integers but float (I just realized that from my message it sounded like they were integer: they are expressed in # of lightning per square Km in fact). Even abstracting from this issue, I'm not sure I understand how I would use the output of a weighted overlay to get the raster information into the polygons. How can I tell the Weighted Overlay to produce this "density percentage" based on how much of a province each cell covers (it doesn't seem that the Weighted Overlay takes the shapefile as an input in any place)? Also: for cells that cover more than 1 province, how can I tell ArcGIS to give different weights when assigning their value to the different provinces?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Do the polygon and raster have the same coordinate systems?&amp;nbsp; &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes: EU's provinces come with a Geographic Coordinate System (ETRS 1989) and I assign it correctly to the raster (I know that the assignment is correct because I double checked the spacial join of the points to the polygons).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Since you did the conversion to points, generally how many points are in each polygon?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It depends on how big the provinces are: for some, there's only 1 cell covering the whole province (and for some of these small provinces this cell has even the center outside it, so that nothing gets assigned when I join the points to the polygons); other provinces however are very big, and are covered by 8-10 points/cells. In principle, I'm sure that the join of points to polygons is a fair approximation to what I need, but since this is not the first time I'm trying to perform this operation I wanted to know whether there was a better way around.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&amp;nbsp;&amp;nbsp; Also are you using the Ascii file directly or did you go ahead and convert it?&amp;nbsp; &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No: the first thing I do is to Convert the ASCII to a Raster: would it be easier to work with the ASCII file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&amp;nbsp;&amp;nbsp; I am not sure why you could not clip the raster, the Raster clip is under Data Management &amp;gt; Raster &amp;gt; Raster Processing.&amp;nbsp; That clip will take the raster as an input. There are a lot of moving parts and will probably require a stepwise process, but based on your last statement I would re evaluate your inputs.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to use this clip raster but I don't understand where the output is stored (and how it should look like). The procedure seems to work fine (there is not error message), but after I clip my raster with the shapefile it seems that i) no new layer gets added to the working directory and ii) in the directory where I asked ArcGIS to store the new clipped raster there is no file called as I called the clipped raster. I tried both checking and unchecking the option "Use Input Features for Clipping Geometry (optional)". I'm not sure what I am doing wrong...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bruno&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Mar 2012 15:27:23 GMT</pubDate>
    <dc:creator>BrunoCaprettini</dc:creator>
    <dc:date>2012-03-06T15:27:23Z</dc:date>
    <item>
      <title>How to extract information from a raster to a shapefile</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-extract-information-from-a-raster-to-a/m-p/192691#M2748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everyone.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm a PhD student in economics and a newbie to ArcGIS, so forgive my incompetence.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've the following problem. I've a raster dataset with information on the number of lightning on a 50Km x 50Km cell-grid over Europe. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The information comes actually from a ASCII file but I have no problem in converting into a raster dataset. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I also have a shapefile with the borders of all the provinces of Europe, and I can superimpose the 2 datasets correctly and define a common projection for the 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I would like to do is to calculate the total number of lightning that fell in every province in Europe. Since not all the cells fall exactly within 1 province, I would like to weight the number of lightning contained in every cell by the % of area of this cell that falls within every province. In this way a cell were 3 lightnings fell in 2003 that is entirely within the province of Barcelona will assign 3 lightnings to Barcelona, while another cell with 3 lightnings that were only 1/3 over the province of Barcelona would assign only 1 lightning. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The final database to be exported would be one with 1 observation for every province in Europe and the corresponding statistics for lightnings attached to it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I can do now is to transform the raster dataset into a point dataset, and then ask a spacial join to compute summary statistics for all the cells whose center falls within any given province. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't like this procedure because not only does not allow me to weight less cells that do not fall entirely within a province, but also because it does not use the information of cells whose center does not fall within the province (but still cover part of the province). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure what I should do and with which tools or file types I should work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to Clip the raster with the shapefile but it could not use the raster as an input. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried to compute Zonal Statistics as a Table (under the Spatial Analyst Toolbox), but the result is a table of only 1 row. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, I tried to compute Zonal Statistics but ArcGIS crashed. I run ArcGIS with an ArcInfo licence for students, btw. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope to have made myself clear: let me know if I can clarify something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for the help!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bruno&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Mar 2012 12:15:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-extract-information-from-a-raster-to-a/m-p/192691#M2748</guid>
      <dc:creator>BrunoCaprettini</dc:creator>
      <dc:date>2012-03-04T12:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract information from a raster to a shapefile</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-extract-information-from-a-raster-to-a/m-p/192692#M2749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For part of your description, I would think that a Zonal Statistics as a table would be the best fit and then again you also describe something that I think that weighted overlay should be better. The key to the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000rq000000.htm"&gt;weighted overlay&lt;/A&gt;&lt;SPAN&gt; is that you will have to create the density percentage raster.&amp;nbsp; However, since you said that the zonal statistics as a table will only make one result and the zonal statistics is failing there must be something else wrong. Do the polygon and raster have the same coordinate systems?&amp;nbsp; Since you did the conversion to points, generally how many points are in each polygon?&amp;nbsp; Also are you using the Ascii file directly or did you go ahead and convert it?&amp;nbsp; I am not sure why you could not clip the raster, the Raster clip is under Data Management &amp;gt; Raster &amp;gt; Raster Processing.&amp;nbsp; That clip will take the raster as an input. There are a lot of moving parts and will probably require a stepwise process, but based on your last statement I would re evaluate your inputs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 10:27:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-extract-information-from-a-raster-to-a/m-p/192692#M2749</guid>
      <dc:creator>JeffreySwain</dc:creator>
      <dc:date>2012-03-05T10:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract information from a raster to a shapefile</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-extract-information-from-a-raster-to-a/m-p/192693#M2750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks a lot for answering!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I would think that a Zonal Statistics as a table would be the best fit &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This time I tried to make a Zonal Statistics as a Table with the shapefile and &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;the ASCII file&lt;/SPAN&gt;&lt;SPAN&gt; (rather than with the raster) and it did produce a real table. I think that this solves the problem of the cells whose center is not inside a province (although they partly cover them) but the mean that the Zonal Statistics produces does not seem weighted according to what % of the cell covers every province. (Still, it's an improvement thanks!!).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I still don't understand 1) why I can't produce the same Zonal Statistics with the converted Raster and 2) why the ASCII file is a little shifted to the right with respect to the raster file: the raster file comes actually from a conversion of the ASCII file!! For some strange reason the position of the raster with respect to Europe is correct, while the position of the ASCII file is not. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; you also describe something that I think that weighted overlay should be better. &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One problem with the weighted overlay is that my lightning data are not integers but float (I just realized that from my message it sounded like they were integer: they are expressed in # of lightning per square Km in fact). Even abstracting from this issue, I'm not sure I understand how I would use the output of a weighted overlay to get the raster information into the polygons. How can I tell the Weighted Overlay to produce this "density percentage" based on how much of a province each cell covers (it doesn't seem that the Weighted Overlay takes the shapefile as an input in any place)? Also: for cells that cover more than 1 province, how can I tell ArcGIS to give different weights when assigning their value to the different provinces?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Do the polygon and raster have the same coordinate systems?&amp;nbsp; &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes: EU's provinces come with a Geographic Coordinate System (ETRS 1989) and I assign it correctly to the raster (I know that the assignment is correct because I double checked the spacial join of the points to the polygons).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Since you did the conversion to points, generally how many points are in each polygon?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It depends on how big the provinces are: for some, there's only 1 cell covering the whole province (and for some of these small provinces this cell has even the center outside it, so that nothing gets assigned when I join the points to the polygons); other provinces however are very big, and are covered by 8-10 points/cells. In principle, I'm sure that the join of points to polygons is a fair approximation to what I need, but since this is not the first time I'm trying to perform this operation I wanted to know whether there was a better way around.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&amp;nbsp;&amp;nbsp; Also are you using the Ascii file directly or did you go ahead and convert it?&amp;nbsp; &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No: the first thing I do is to Convert the ASCII to a Raster: would it be easier to work with the ASCII file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&amp;nbsp;&amp;nbsp; I am not sure why you could not clip the raster, the Raster clip is under Data Management &amp;gt; Raster &amp;gt; Raster Processing.&amp;nbsp; That clip will take the raster as an input. There are a lot of moving parts and will probably require a stepwise process, but based on your last statement I would re evaluate your inputs.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to use this clip raster but I don't understand where the output is stored (and how it should look like). The procedure seems to work fine (there is not error message), but after I clip my raster with the shapefile it seems that i) no new layer gets added to the working directory and ii) in the directory where I asked ArcGIS to store the new clipped raster there is no file called as I called the clipped raster. I tried both checking and unchecking the option "Use Input Features for Clipping Geometry (optional)". I'm not sure what I am doing wrong...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bruno&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 15:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-extract-information-from-a-raster-to-a/m-p/192693#M2750</guid>
      <dc:creator>BrunoCaprettini</dc:creator>
      <dc:date>2012-03-06T15:27:23Z</dc:date>
    </item>
  </channel>
</rss>

