[gdal-dev] MEM Driver under Vista 64?
Chris Eustace
Chris.Eustace at petrosys.com.au
Wed Aug 27 00:42:36 EDT 2008
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
>
More information about the gdal-dev
mailing list