[gdal-dev] MEM Driver under Vista 64?

Craig Miller craig.miller at spatialminds.com
Wed Aug 27 14:27:01 EDT 2008


Thanks Chris.   That did the trick.

Perhaps a quick note could be added to the MEM driver doc page?

Craig


-----Original Message-----
From: Chris Eustace [mailto:Chris.Eustace at petrosys.com.au] 
Sent: Tuesday, August 26, 2008 9:43 PM
To: Craig Miller
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] MEM Driver under Vista 64?

I had a near identical issue when upgrading from V1.4.x to V1.5.2.

The code checks the name passed in as the "filename" to Create(). ONLY 
if it is of the form "MEM:::" will it then look for other expected 
parameters (including PIXELS, LINES and DATAPOINTER). Otherwise, the 
passed in filename is pretty much ignored.

So, the actual answer is to rename "MEM:::" as anything else and you 
will be fine.

Chris Eustace.

Craig Miller wrote:
> I am working with an in-house utility written a couple of years ago that
> uses the MEM driver.  Recently, after upgrading to Vista64 the utility
> stopped working.  As it was using an old version of GDAL, I decided to
fetch
> the source from the vault and recompile/link against GDAL 1.5.2.  I didn't
> change any code, but the new utility is failing with "ERROR 1:  Missing
> required field (one of PIXELS, LINES, or DATAPOINTER)"
>
> I'm assuming the problem is either incorrect source (old code), a 64 bit
> issue, or a GDAL version issue.  Before I start modifying the code to
> allocate memory and include a DATAPOINTER I thought I'd ask if there were
> any changes between GDAL 1.4 (Maybe older) GDAL 1.5.2 that might cause
this
> or if it is a well known Vista 64 problem?
>  
> Here's the snippet of code that is fails on the poMemDriver->Create(.)
line:
>
>
> 	GDALDriver* poMemDriver;
> 	CString format = "MEM";
> 	CString filename = "MEM:::";
>
> 	poMemDriver = GetGDALDriverManager()->GetDriverByName(format);
> 	if (poMemDriver == NULL)
> 	{
> 		cout << "\"MEM\" driver not supported." <<  endl;
> 		return false;
> 	}
> 	m_poUtmRgbDataset = poMemDriver->Create( filename,
> 		m_poSrcDataset->GetRasterXSize(), 
> 		m_poSrcDataset->GetRasterYSize(), 
> 		3,  // 3 Bands, Red, Green, and Blue
> 		GDT_Byte,
> 		NULL);
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>   





No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.6.9/1635 - Release Date: 8/26/2008
7:29 AM





More information about the gdal-dev mailing list