Re: [gdal-dev] Edit Metadata on MrSID image

2008-09-27 Thread Frank Warmerdam
On Fri, Sep 26, 2008 at 2:50 PM, Mullins, Steven
[EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 I would like to replace the projection WKT in a group of MrSID files.  I do 
 not need to modify the compressed image itself, only the metadata.  Can I do 
 this in GDAL?


Steve,

No, I do not believe you can.  I'm not sure if it can even
be done by the underlying mrsid libraries.

Best regards,

-- 
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] how can I configue which lib and .h files in vc2005 smart device application to open img?

2008-09-27 Thread liu_daojie
 
 hello:

how can I configue which lib and  .h files in vc2005 smart device 
application to  open img?
   and 

 
   m_pMemoryDC-SelectObject(m_pMemoryBitMap);
  CRect rc(0,0,m_pViewWidth,m_pViewHeight); 
  CBrush brush(RGB(255,255,255));
 m_pMemoryDC-FillRect(rc,brush); 
  GDALAllRegister(); 
  poDataset = (GDALDataset *) GDALOpen(m_strimagePath, GA_ReadOnly );
  if( poDataset != NULL )
  {
 
   GDALRasterBand *poBand1;   //遥感的一个波段
   GDALRasterBand *poBand2;
   GDALRasterBand *poBand3;
   int nBandCount,i;
   nBandCount=poDataset-GetRasterCount();
   poBand1=poDataset-GetRasterBand(1);
   poBand2=poDataset-GetRasterBand(2);
   poBand3=poDataset-GetRasterBand(3);
   
   if (poBand1!=NULL  poBand2 != NULL poBand3!=NULL)  
   {
   
   //获取图像的尺寸
   //获取图像窗口尺寸

   
   int nImgSizeX=poDataset-GetRasterXSize();
   int nImgSizeY=poDataset-GetRasterYSize();
 int nBufferSizeX,nBufferSizeY;
   
   nBufferSizeX = nImgSizeX;
   nBufferSizeY= nImgSizeY;
   
   
   
   byte *pafScanblock1 ;
   byte *pafScanblock2 ;
   byte *pafScanblock3 ;
   
 pafScanblock1 =new byte[(nBufferSizeX)*(nBufferSizeY)];
   pafScanblock2 = new byte[(nBufferSizeX)*(nBufferSizeY)];
   pafScanblock3 =new byte[(nBufferSizeX)*(nBufferSizeY)];
   
   byte *m_ByteBuff = new byte[(nBufferSizeX)*(nBufferSizeY)*3];
 
   
   poBand1-RasterIO( GF_Read, 0, 0,nBufferSizeX,nBufferSizeY, 
pafScanblock1,nBufferSizeX,nBufferSizeY, GDT_Byte,0, 0 );
 poBand2-RasterIO( GF_Read, 0, 0,nBufferSizeX,nBufferSizeY, 
pafScanblock2,nBufferSizeX,nBufferSizeY, GDT_Byte,0, 0 );
   
   poBand3-RasterIO( GF_Read, 0, 0,nBufferSizeX,nBufferSizeY, 
pafScanblock3,nBufferSizeX,nBufferSizeY, GDT_Byte,0, 0 );  
   //在View逐点显示图像

   for (int x = 0; x  nBufferSizeX; x ++) 
{ 
  for (int  y = 0; y  nBufferSizeY; y ++) 
 { 
  
m_pMemoryDC-SetPixel(x,y,RGB(pafScanblock1[y*nBufferSizeX+x],pafScanblock2[y*nBufferSizeX+x],pafScanblock3[y*nBufferSizeX+x]));
 
 } 
}  
GDALClose(poDataset);
   }
 can not get r g b ?

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev