POST
|
Morning, Using ArcGIS 10.1 Build 3035... I am having terrible trouble setting a NoData value for a file geodatabase rasterdataset with ArcObjects. I create the rasterDataset, and populate the pixels without trouble. I set the NoData to -9999, which is my preferred nodata value.
//http://forums.esri.com/Thread.asp?c=93&f=993&t=258752
private IRaster getRaster(IRasterDataset rasterDataset, float noDataValue)
{
// Create a raster in the dataset; also add a bands collection
IRaster rc = new RasterClass();
IRasterBandCollection rasterBC;
rasterBC = (IRasterBandCollection)rc;
rasterBC.AppendBands((IRasterBandCollection)rasterDataset);
// Now set the raster properties
IRasterProps resultProps = (IRasterProps)rasterBC.Item(0);
// assign the NoDataValue and return
resultProps.NoDataValue = noDataValue;
return rc;
}
There are no errors thrown, so I assume all is well. I then look at the properties of my new rasterDataset in ArcCatalog. All settings are fine OTHER than the NoValue. Hmm. I have been tearing my hair out trying to make this value get saved into the FGBD. To try and find my mistake, using ArcCatalog, I manually created a new FGBD, then manually created a new RasterDataset (picel type: floating point, and set the NoData value to -9999. It appears to accept the value, but if I then F5 to refresh the geodatabase, and check the raster settings, the noData value is blank. Hmm. This leads me to believe there is a problem setting the novalue field in ArcGIS10.1 when using a file geodatabase. It is not just in ArcObjects, but also in ArcCatalog. I trawled thru the forums, and can see others have had this problem, but there is nobody with a clear solution which actually works. Indeed, if it does not manually work in ArcCatalog, then ArcObjects has no chance. Can anyone help?
... View more
12-07-2013
06:19 PM
|
0
|
2
|
700
|
POST
|
Hi, I have a small extension to create a raster dataset with 5 bands into a GDB. this works no problem, but I am struggling to set the name of each band to the correct name rather than the default 'value'. Does anyone know of a code snippet to set the name of a band? Here is a code snippet to create the bands. It works fine, but the names are unrealistic. //Define the origin for the raster dataset, which is the lower left corner of the raster.
IPoint origin = new PointClass();
origin.PutCoords(lowerLeft.x, lowerLeft.y);
//Define the dimension of the raster dataset.
int width = nColumns; //This is the width of the raster dataset.
int height = nRows; //This is the height of the raster dataset.
double xCell = cellSize; //This is the cell size in x direction.
double yCell = cellSize; //This is the cell size in y direction.
int NumBand = 5; // This is the number of bands the raster dataset contains.
//Create a raster dataset in grid format.
rasterDataset = rasterWs.CreateRasterDataset(rasterFilename, "GRID", origin, width, height, xCell, yCell, NumBand, rstPixelType.PT_FLOAT, sr, true);
//Get the raster band.
IRasterBandCollection rasterBands = (IRasterBandCollection)rasterDataset;
IRasterBand rasterBand;
IRasterProps rasterProps;
rasterBand = rasterBands.Item(0);
rasterProps = (IRasterProps)rasterBand;
//Set NoData if necessary. For a multiband image, NoData value needs to be set for each band.
const double NoDataValue = -9999.99;
rasterProps.NoDataValue = Convert.ToSingle(NoDataValue);
//Create a raster from the dataset.
IRaster raster = rasterDataset.CreateDefaultRaster();
IRasterEdit rasterEdit = (IRasterEdit)raster;
... View more
12-05-2013
07:39 PM
|
0
|
2
|
2664
|
POST
|
Hi, My feature request is at: https://c.na1.visual.force.com/apex/ideaView?id=08730000000bsadAAA I was hoping we could get a few votes for it, but these requests are not easy to find, so get little support. Is there any update when raster support will be added? regards pk
... View more
01-06-2012
07:08 PM
|
0
|
0
|
1736
|
POST
|
Hi John, thanks for commenting. I asked Kris for the specific license details and costs, but she has not gotten back to me. All I know is I can develop my software for free! but must pay an undisclosed amount for an undisclosed license when we want to do something meaningful. I thought the idea of this API was to give geospatial teams the basic capability of creating and consuming geodatabases form their software systems, which ultimately drive the use (and hence sales) of ESRI products. I do like the API but it is pretty unfair letting folks invest their time learning the API only to find it is not freely available.
... View more
11-23-2011
02:04 PM
|
0
|
0
|
157
|
POST
|
Hi I recently contacted ESRI Australia with regards to the license structure for the geodatabase API. It turns out that it is not free. Can anyone shed any light on this? It seems to make the whole thing pointless. if I am to pay a license fee, I may as well use the regular arcobjects. regards pk Dear Paul, Esri have responded to the question you asked about pricing for Geodatabase API: The client can develop with the API for free, but if they wish to embed the product in their application and sell it, they will need to pay fees. Please let me know if you need anything further. Regards Kris Kris McKee | Manager, Client Service Centre Esri Australia | 111 Elizabeth Street | Brisbane, QLD 4000 | Australia
... View more
11-22-2011
05:15 PM
|
0
|
1
|
3530
|
POST
|
Thanks for the tip. I have done as you asked. The documentation says rasters will be in future releases, but your comment here suggest otherwise. This is a bit confusing. I am sure many folks are patiently waiting for raster support in the new version regards
... View more
11-05-2011
09:18 PM
|
0
|
0
|
1736
|
POST
|
Hi, Any update when the file GDB API will be augmented with support for raster data? Rasters are a big part of many datasets and as such, I would consider them essential. Good work guys.
... View more
10-26-2011
07:08 AM
|
0
|
0
|
1736
|
POST
|
Hi, I have discovered a bug when importing a collada dae file into ArcGIS 10.1 SP2 I am using the 'Import 3D files (3D analyst) tool from the toolbox. the import user interface permits me to select the file to import. This is ok. It then requires me to select the out_featureclass - the destination for the multipatch featureclass. If I simply enter a filename into the textbox, all is well, and the import works just fine. However, this textbox has a browse button at the right side. If I click it, I can select a path and filename for the output. Using this meachnism causes the import to fail. sometime it imports the geometry, sometimes not. It ALWAYS fails to import the textures associated with the collada files. This is very repeatable. I have tested it with tif and png files.
... View more
08-11-2011
06:43 PM
|
0
|
1
|
2239
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|