Alex,

There is nothing wrong with that. If you gdal_translate a TIF to BMP the 
projection/reference will be stored on a 
.bmp.aux.xml. The question is, why in the process of creating those BMP and JPG 
the auxiliary files are not been 
created.

Regards,

Ivan


>  -------Original Message-------
>  From: alex <[email protected]>
>  Subject: [gdal-dev] GDALGetProjectionRef(...) problem on filetype JPEG and 
> BMP
>  Sent: Sep 17 '09 06:44
>  
>    Good day.
>    I encountered the following problem using GDAL. GDALGetProjectionRef(...) 
> works with file formats TIF, but 
JPG and BMP returns an empty string.
>  
>    Used as:
>    There have been downloaded sources from 
> http://download.osgeo.org/gdal/gdal162.zip
>  Sources was built using Visual Studio 2005, the utility nmake, using the 
> command line interface.
>    Then was opened raster map file with format MapInfo by my program. MapInfo 
> file was created by using the 
export map function of the MapInfo program.
>  
>    I used the C API library GDAL. In the body of the program:
>  
>  GDALDatasetH pDataset = GDALOpen("map_filename", GA_ReadOnly);
>  
>    and
>  
>  GDALGetGeoTransform(...) and GDALRasterIO(...)
>  
>    Then I opened the map file and exported part of it to coordinatesof I 
> needed.
>    It worked with the map file format map_filename.tif + map_filename.tab, 
> map_filename.jpg + 
map_filename.tab,map_filename.bmp + map_filename.tab.
>  
>    Then I could to get access to the map coordinates in the format .TIF using 
> the function:
>  
>  GDALGetProjectionRef(pDataset)
>  
>    which returned the projection maps of the form <wkt format projection 
> string>, as was intended.
>  
>    But when opening files type .JPG and .BMP
>  
>  GDALGetProjectionRef (pDataset)
>  
>    returns an empty string "".
>    I think that the library is somehow obtains a coordinate system maps, 
> because
>  GDALGetGeoTransform (...) work.
>  
>    Please specify how i can get a system of map coordinates for these files 
> are JPG and BMP and import it into an 
object of class OGRSpatialReference.
>  
>    I apologize for my poor language skills.
>    Thank you.
>  
>  
>  _______________________________________________
>  gdal-dev mailing list
>  [email protected]
>  http://lists.osgeo.org/mailman/listinfo/gdal-dev
>  
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to