[fdo][FDO240][New] GDAL: Data Model Tile Size returned as 1
Greg Boone
greg.boone at autodesk.com
Mon Oct 30 10:57:45 EST 2006
You can view the artifact detail at the following URL:
https://fdo.osgeo.org/servlets/Scarab/id/FDO240
Type
Defect
Artifact ID
FDO240 (GDAL: Data Model Tile Size returned as 1)
Reported by
Greg Boone
gregboone (greg.boone at autodesk.com)
New artifact details:
---------------------------------------------------------
- Artifact created
- Platform set to new value
All
- Artifact Status set to new value
New
- Component set to new value
GDAL
- Subcomponent set to new value
RASTER
- Summary set to new value
GDAL: Data Model Tile Size returned as 1
- Description set to new value
Hi Frank,
I am attempting to execute the following test....
(See <<<<<<<< Below)
void RfpTestJpg::testSpecialCharacters()
{
wprintf (L"Testing: %ls\n\n", L"RfpTestJpg::testSpecialCharacters()");
FdoPtr<FdoIConnection> connection = CreateConnection();
connection->SetConnectionString(L"DefaultRasterFileLocation=\"../../TestData/JPG/NBenguela.2004357.aqua.250m (.!,@#$%^()_+=-`~[]').jpg\"");
connection->Open();
FdoICommand* cmd = connection->CreateCommand(FdoCommandType_Select);
FdoPtr<FdoISelect> cmdSelect = dynamic_cast<FdoISelect*>(cmd);
cmdSelect->SetFeatureClassName(L"default");
FdoPtr<FdoIFeatureReader> featureReader = cmdSelect->Execute();
FdoInt32 count=0;
while (featureReader->ReadNext())
{
FdoStringP name = featureReader->GetString(L"FeatId");
FdoPtr<FdoIRaster> raster = featureReader->GetRaster(L"Raster");
FdoInt32 xsize = raster->GetImageXSize();
FdoInt32 ysize = raster->GetImageYSize();
CPPUNIT_ASSERT(xsize == 4000);
CPPUNIT_ASSERT(ysize == 5400); <<<<<<<<<<<<<<<<<<<
FdoPtr<FdoRasterDataModel> dataModel = raster->GetDataModel();
FdoInt32 ppb = dataModel->GetBitsPerPixel();
CPPUNIT_ASSERT(ppb == 24);
FdoRasterDataModelType dmType = dataModel->GetDataModelType();
CPPUNIT_ASSERT(dmType == FdoRasterDataModelType_RGB);
FdoInt32 xTileSize = dataModel->GetTileSizeX();
FdoInt32 yTileSize = dataModel->GetTileSizeY();
CPPUNIT_ASSERT(xTileSize == 4000);
CPPUNIT_ASSERT(yTileSize == 5400);
Which calls.....
/// <summary>Gets the data model in use by this raster property.</summary> /// <returns>Returns the current data model.</returns>
FdoRasterDataModel* FdoRfpBandRaster::GetDataModel () {
_validate();
if( m_dataModel != NULL )
return FDO_SAFE_ADDREF(m_dataModel.p);
FdoPtr<FdoRasterDataModel> dataModel = FdoRasterDataModel::Create();
FdoPtr<FdoRfpImage> image =m_geoBandRaster->GetImage();
if( image->m_components == 4 )
dataModel->SetDataModelType(FdoRasterDataModelType_RGBA);
else if( image->m_components == 3 )
dataModel->SetDataModelType(FdoRasterDataModelType_RGB);
else if( GDALGetRasterColorInterpretation( image->m_redBand ) == GCI_PaletteIndex )
dataModel->SetDataModelType(FdoRasterDataModelType_Palette);
else
dataModel->SetDataModelType(FdoRasterDataModelType_Gray);
if( image->m_gdalDataType == GDT_Float32
|| image->m_gdalDataType == GDT_Float64 )
dataModel->SetDataType( FdoRasterDataType_Float );
else if( image->m_gdalDataType == GDT_Int16
|| image->m_gdalDataType == GDT_Int32 )
dataModel->SetDataType( FdoRasterDataType_Integer );
else
dataModel->SetDataType( FdoRasterDataType_UnsignedInteger );
dataModel->SetBitsPerPixel( image->m_bytesPerPixel * 8 );
// set organization to pixel
dataModel->SetOrganization( FdoRasterDataOrganization_Pixel );
// Typical "web" use produces modest screen sized images. For these
// we might as well treat them as one big tile, as this reduces to one
// big efficient read in GDAL. A single RasterIO() call. For big requested
// images we treat one row as a tile so we never use too much memory.
// TODO: We really should be using the tilesize provided by the application.
if( GetImageXSize() * (double) GetImageYSize() > 4000000 )
{
dataModel->SetTileSizeX(GetImageXSize());
dataModel->SetTileSizeY(1); <<<<<<<<<<<<<<<<<<<
}
else
{
dataModel->SetTileSizeX( GetImageXSize() );
dataModel->SetTileSizeY( GetImageYSize() );
}
m_dataModel = dataModel;
return FDO_SAFE_ADDREF(m_dataModel.p); }
I am expecting the Y Image size to be 5400. Instead, the provider is setting the Y tile size to 1.
- OS Distribution and Version set to new value
SP2
- Operating system set to new value
Windows XP
- Priority set to new value
P2
- Defect Severity set to new value
High
---------------------------------------------------------
This message was automatically generated by Project Tracker.
More information about the Fdo_issues
mailing list