Ticket #3398 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

PCI layer names have disappeared since the new SDK is in use

Reported by: gaige Owned by: warmerdam
Priority: normal Milestone: 1.8.0
Component: GDAL_Raster Version: 1.7.0
Severity: normal Keywords: pcidsk
Cc:

Description (last modified by warmerdam) (diff)

Prior to 1.7, PCI Layer names were based on the layer description in the metadata. Now, that information is never loaded. This patch restores the SetDescription? call.

A change to the SDK was necessary to push the value through.

==== frmts/pcidsk/pcidskdataset2.cpp#2 (text) ====

160a161,164
> 	
> 	std::string channelDescription = poChannel->GetDescription();
> 	
> 	this->SetDescription( CPLString(channelDescription));
1373c1377,1379
<             poDS->SetBand( iBand+1, new PCIDSK2Band( poDS, poFile, iBand+1 ));
---
>             PCIDSK2Band *newBand = new PCIDSK2Band( poDS, poFile, iBand+1 );
> 			char **metaData = newBand->GetMetadata( NULL);
> 			poDS->SetBand( iBand+1, newBand);

==== frmts/pcidsk/sdk/channel/cpcidskchannel.cpp#2 (text) ====

41a42,52
> void PCIDSKChannel::SetDescription( std::string value)
> {
> 	description = value;
> }
> 
> std::string PCIDSKChannel::GetDescription()
> {
> 	return description;
> }
> 
> 

==== frmts/pcidsk/sdk/core/cpcidskfile.cpp#2 (text) ====

400a401,404
> 		
> 		// fetch description
> 		std::string description;
> 		ih.Get(0,64,description);
461a466
> 		channel->SetDescription( description);

==== frmts/pcidsk/sdk/pcidsk_channel.h#2 (text) ====

43a44
> 		std::string description;
63a65,67
> 		
> 		std::string GetDescription();
> 		void SetDescription( std::string value);

Change History

Changed 3 years ago by warmerdam

  • keywords pcidsk added
  • status changed from new to assigned
  • component changed from default to GDAL_Raster
  • description modified (diff)
  • milestone changed from 1.7.2 to 1.8.0

Changed 3 years ago by warmerdam

  • status changed from assigned to closed
  • resolution set to fixed

Support for reading and writing descriptions added to the PCIDSK SDK in trunk (r18783).

Support for attaching channel descriptions to the PCIDSK2Band added to GDAL in trunk (r18784).

Note: See TracTickets for help on using tickets.