~ubuntu-branches/debian/sid/gdal/sid

« back to all changes in this revision

Viewing changes to frmts/srtmhgt/srtmhgtdataset.cpp

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-05-07 15:04:42 UTC
  • mfrom: (5.5.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120507150442-2eks97loeh6rq005
Tags: 1.9.0-1
* Ready for sid, starting transition.
* All symfiles updated to latest builds.
* Added dh_numpy call in debian/rules to depend on numpy ABI.
* Policy bumped to 3.9.3, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: srtmhgtdataset.cpp 18117 2009-11-27 19:42:29Z rouault $
 
2
 * $Id: srtmhgtdataset.cpp 22163 2011-04-14 21:26:21Z rouault $
3
3
 *
4
4
 * Project:  SRTM HGT Driver
5
5
 * Purpose:  SRTM HGT File Read Support.
37
37
 
38
38
#define SRTMHG_NODATA_VALUE -32768
39
39
 
40
 
CPL_CVSID("$Id: srtmhgtdataset.cpp 18117 2009-11-27 19:42:29Z rouault $");
 
40
CPL_CVSID("$Id: srtmhgtdataset.cpp 22163 2011-04-14 21:26:21Z rouault $");
41
41
 
42
42
CPL_C_START
43
43
void    GDALRegister_SRTMHGT(void);
55
55
{
56
56
    friend class SRTMHGTRasterBand;
57
57
 
58
 
    FILE*  fpImage;
 
58
    VSILFILE*  fpImage;
59
59
    double adfGeoTransform[6];
60
60
    GInt16* panBuffer;
61
61
 
299
299
  int southWestLon = atoi(latLonValueString);
300
300
 
301
301
  if(fileName[0] == 'N' || fileName[0] == 'n')
302
 
    southWestLat = southWestLat;
 
302
    /*southWestLat = southWestLat */;
303
303
  else if(fileName[0] == 'S' || fileName[0] == 's')
304
304
    southWestLat = southWestLat * -1;
305
305
  else
306
306
    return NULL;
307
307
 
308
308
  if(fileName[3] == 'E' || fileName[3] == 'e')
309
 
    southWestLon = southWestLon;
 
309
    /*southWestLon = southWestLon */;
310
310
  else if(fileName[3] == 'W' || fileName[3] == 'w')
311
311
    southWestLon = southWestLon * -1;
312
312
  else
485
485
/* -------------------------------------------------------------------- */
486
486
/*      Write output file.                                              */
487
487
/* -------------------------------------------------------------------- */
488
 
    FILE* fp = VSIFOpenL(pszFilename, "wb");
 
488
    VSILFILE* fp = VSIFOpenL(pszFilename, "wb");
 
489
    if (fp == NULL)
 
490
    {
 
491
        CPLError( CE_Failure, CPLE_FileIO,
 
492
                  "Cannot create file %s", pszFilename );
 
493
        return NULL;
 
494
    }
489
495
 
490
496
    GInt16* panData = (GInt16*) CPLMalloc(sizeof(GInt16) * nXSize);
491
497
    GDALRasterBand* poSrcBand = poSrcDS->GetRasterBand(1);