Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Raster RowCount problem - different values

$
0
0
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.

I have also used this code and have gotten the same, different, result from what ArcCatalog is showing.
Code:

        Geoprocessor gp = new Geoprocessor();
            GetRasterProperties getRP = new GetRasterProperties();
            getRP.in_raster = rlyr.Raster;
            getRP.property_type = "COLUMNCOUNT";
            gp.Execute(getRP, null);
            double cntcol = getRP.property;

            getRP.property_type = "ROWCOUNT";
            gp.Execute(getRP, null);
            double cntrow = getRP.property;

How is ArcCatalog getting it's rowcount value?

++++EDIT - I tried to get this with Python and got the same value as ArcCatalog -

>>> rowCount = arcpy.GetRasterProperties_management("s60193copy_01.cit", "ROWCOUNT")

>>> print rowCount

10037
++++EDIT
Any help or insight is appreciated!

-bert
Attached Thumbnails
Click image for larger version

Name:	rasterLayerProps.png‎
Views:	N/A
Size:	34.8 KB
ID:	19577   Click image for larger version

Name:	rasterLayerProps_ArcCatalog.png‎
Views:	N/A
Size:	38.4 KB
ID:	19578  

Viewing all articles
Browse latest Browse all 1374

Trending Articles