<?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: Raster RowCount problem -  different values in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53979#M1463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: rwmeier&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know about that property, see the first screen shot, I show it there. The point of the post is not trying to find the row count, but asking why the row count from code, the RowCount property is different from the RowCount listed in the properties in ArcCatalog, see other screen shot.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Nov 2012 00:07:13 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2012-11-29T00:07:13Z</dc:date>
    <item>
      <title>Raster RowCount problem -  different values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53977#M1461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to get the row count of a raster, I have been able to do this easily enough, but the value does not match what is in the properties screen in ArcCatalog, see difference in the screen shots attached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also used this code and have gotten the same, different, result from what ArcCatalog is showing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Geoprocessor gp = new Geoprocessor();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetRasterProperties getRP = new GetRasterProperties();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getRP.in_raster = rlyr.Raster;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getRP.property_type = "COLUMNCOUNT";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Execute(getRP, null);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double cntcol = getRP.property;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getRP.property_type = "ROWCOUNT";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Execute(getRP, null);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; double cntrow = getRP.property;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How is ArcCatalog getting it's rowcount value?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;++++EDIT - I tried to get this with Python and got the same value as ArcCatalog - &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; rowCount = arcpy.GetRasterProperties_management("s60193copy_01.cit", "ROWCOUNT")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; print rowCount&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;10037&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;++++EDIT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help or insight is appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-bert&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:04:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53977#M1461</guid>
      <dc:creator>RobertMEIER</dc:creator>
      <dc:date>2021-12-10T22:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Raster RowCount problem -  different values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53978#M1462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not tried it but I guess your rlyr object is a RasterLayer object? If so this interface actually has a row count method called...wait for it... RowCount!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 21:30:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53978#M1462</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2012-11-28T21:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Raster RowCount problem -  different values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53979#M1463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: rwmeier&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know about that property, see the first screen shot, I show it there. The point of the post is not trying to find the row count, but asking why the row count from code, the RowCount property is different from the RowCount listed in the properties in ArcCatalog, see other screen shot.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 00:07:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53979#M1463</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-11-29T00:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Raster RowCount problem -  different values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53980#M1464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not having the original dataset to interrogate makes it difficult to answer why the code version reports a different row count. I note that that the screen shot from ArcCatalog shows the cell size to be not symmetrical. This could be the source of the error? Maybe the algorithm behind the code version computes the row count based upon cell size and extent of dataset? This is the only thing I can think of. You can test this with a dataset that has a more typically symmetrical cell size.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a raster using the &lt;/SPAN&gt;&lt;STRONG&gt;Create Raster Dataset&lt;/STRONG&gt;&lt;SPAN&gt; tool so you know you are creating a grid that conforms to the esri standard and compare the different row count techniques.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 07:58:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53980#M1464</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2012-11-29T07:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Raster RowCount problem -  different values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53981#M1465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: rwmeier&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The file is an Intergraph cit file. A scanned image. If you want to look at the file, I have attached a zip file with the cit file in it. A cit has mutiple files it uses, similar to a shape file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-bert&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 11:23:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53981#M1465</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-11-29T11:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Raster RowCount problem -  different values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53982#M1466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;OK found the source of the difference. Go to ArcCatalog and work out the vertical extent distance (Extent top - extent bottom). This gives you a value of 10194.24176. Divide that by your Y length cell size and you get 10037. The code method you are using is assuming that you X and Y size are the same, but they are not in your case, thus if you divide the vertical extent difference by X length size you get 55996.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it suggests that the code method assumes X and Y are the same length for a cell which is the normal case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 13:13:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/raster-rowcount-problem-different-values/m-p/53982#M1466</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2012-11-29T13:13:02Z</dc:date>
    </item>
  </channel>
</rss>

