Index: port/cpl_string.h
===================================================================
--- port/cpl_string.h	(revision 13695)
+++ port/cpl_string.h	(working copy)
@@ -157,13 +157,16 @@
  * 1200 - VC++ 6.0
  * 1200-1202 - eVC++ 4.0
  */
-#if (_MSC_VER <= 1202)
-#  define MSVC_OLD_STUPID_BEHAVIOUR
+#if defined(_MSC_VER)
+#  if (_MSC_VER <= 1202)
+#    define MSVC_OLD_STUPID_BEHAVIOUR
+#  endif
 #endif
  
 
 /* Avoid C2614 errors */
 #ifdef MSVC_OLD_STUPID_BEHAVIOUR
     using std::string;
 # define std_string string
 #else
Index: port/cpl_vsil_unix_stdio_64.cpp
===================================================================
--- port/cpl_vsil_unix_stdio_64.cpp	(revision 13695)
+++ port/cpl_vsil_unix_stdio_64.cpp	(working copy)
@@ -36,6 +36,7 @@
  ****************************************************************************/
 
 #include "cpl_port.h"
+#include <string>
 
 #if !defined(WIN32) && !defined(WIN32CE)
 
@@ -398,7 +399,7 @@
 void VSIInstallLargeFileHandler()
 
 {
-    VSIFileManager::InstallHandler( string(""), 
+    VSIFileManager::InstallHandler( std::string(""), 
                                     new VSIUnixStdioFilesystemHandler );
 }
 
Index: frmts/ilwis/ilwisdataset.h
===================================================================
--- frmts/ilwis/ilwisdataset.h	(revision 13695)
+++ frmts/ilwis/ilwisdataset.h	(working copy)
@@ -34,7 +34,6 @@
 #include "gdal_pam.h"
 #include "cpl_csv.h"
 #include "ogr_spatialref.h"
-//#include "Windows.h"
 #include <string>
 #include <map>
 
@@ -42,12 +41,10 @@
 #include  <io.h>
 #endif
 
-#include  <stdio.h>
-#include  <stdlib.h>
+#include  <cstdio>
+#include  <cstdlib>
 
 
-using namespace std;
-
 CPL_C_START
 void	GDALRegister_ILWIS(void);
 CPL_C_END
@@ -71,8 +68,8 @@
 public:
     ValueRange(double min, double max);	// step = 1
     ValueRange(double min, double max, double step);	
-    ValueRange(string str);
-    string ToString();
+    ValueRange(std::string str);
+    std::string ToString();
     double get_Minimum() { return _rLo; }
     double get_Maximum() { return _rHi; }
     double get_StepSize() { return _rStep; }
@@ -108,7 +105,7 @@
     bool bValue;
     ValueRange vr;
     ilwisStoreType stStoreType;
-    string stDomain;
+    std::string stDomain;
 };
 
 /************************************************************************/
@@ -127,8 +124,8 @@
 
     ILWISRasterBand( ILWISDataset *, int );
     ~ILWISRasterBand();
-    CPLErr GetILWISInfo(string pszFileName);
-    void ILWISOpen( string pszFilename);
+    CPLErr GetILWISInfo(std::string pszFileName);
+    void ILWISOpen( std::string pszFilename);
 				
     virtual CPLErr IReadBlock( int, int, void * );
     virtual CPLErr IWriteBlock( int, int, void * ); 
@@ -145,16 +142,16 @@
 {
     friend class ILWISRasterBand;
     CPLString osFileName;
-    string pszIlwFileName;
+    std::string pszIlwFileName;
     char	 *pszProjection;
     double adfGeoTransform[6];
     int    bGeoDirty;
     int		 bNewDataset;            /* product of Create() */
-    string pszFileType; //indicating the input dataset: Map/MapList
-    CPLErr ReadProjection( string csyFileName);
+    std::string pszFileType; //indicating the input dataset: Map/MapList
+    CPLErr ReadProjection( std::string csyFileName);
     CPLErr WriteProjection();
     CPLErr WriteGeoReference();
-    void   CollectTransformCoef(string &pszRefFile );
+    void   CollectTransformCoef(std::string &pszRefFile );
 		
 public:
     ILWISDataset();
@@ -186,16 +183,14 @@
 // 
 //////////////////////////////////////////////////////////////////////
 
-using std::map;
-
 class CompareAsNum
 {
 public:
-	bool operator() (const string&, const string&) const;
+	bool operator() (const std::string&, const std::string&) const;
 };
 
-typedef map<string, string>          SectionEntries;
-typedef map<string, SectionEntries*> Sections;
+typedef std::map<std::string, std::string> SectionEntries;
+typedef std::map<std::string, SectionEntries*> Sections;
 
 class IniFile  
 {
@@ -203,17 +198,17 @@
 	IniFile();
 	virtual ~IniFile();
 
-	void Open(const string& filename);
+	void Open(const std::string& filename);
 	void Close();
 
-	void SetKeyValue(const string& section, const string& key, const string& value);
-	string GetKeyValue(const string& section, const string& key);
+	void SetKeyValue(const std::string& section, const std::string& key, const std::string& value);
+	std::string GetKeyValue(const std::string& section, const std::string& key);
 
-	void RemoveKeyValue(const string& section, const string& key);
-	void RemoveSection(const string& section);
+	void RemoveKeyValue(const std::string& section, const std::string& key);
+	void RemoveSection(const std::string& section);
 
 private:
-	string filename;
+	std::string filename;
 	Sections sections;
 
 	void Load();
Index: frmts/ilwis/ilwiscoordinatesystem.cpp
===================================================================
--- frmts/ilwis/ilwiscoordinatesystem.cpp	(revision 13695)
+++ frmts/ilwis/ilwiscoordinatesystem.cpp	(working copy)
@@ -26,9 +26,8 @@
  ****************************************************************************/
 #include "cpl_conv.h"
 #include "ilwisdataset.h"
+#include <string>
 
-//using namespace std;
-
 typedef struct 
 {
     const char  *pszIlwisDatum;
@@ -44,10 +43,10 @@
 		double invFlattening; 
 } IlwisEllips;
 
-string ReadElement(string section, string entry, string filename);
-bool WriteElement(string sSection, string sEntry, string fn, string sValue);
-bool WriteElement(string sSection, string sEntry, string fn, int nValue);
-bool WriteElement(string sSection, string sEntry, string fn, double dValue);
+std::string ReadElement(std::string section, std::string entry, std::string filename);
+bool WriteElement(std::string sSection, std::string sEntry, std::string fn, std::string sValue);
+bool WriteElement(std::string sSection, std::string sEntry, std::string fn, int nValue);
+bool WriteElement(std::string sSection, std::string sEntry, std::string fn, double dValue);
 
 static IlwisDatums iwDatums[] =
 {
@@ -242,7 +241,7 @@
 #endif
 
 /* ==================================================================== */
-/*      Some "standard" strings.                                        */
+/*      Some "standard" std::strings.                                        */
 /* ==================================================================== */
 
 #define ILW_False_Easting "False Easting"
@@ -255,17 +254,17 @@
 #define ILW_Latitude_True_Scale "Latitude of True Scale"
 #define ILW_Height_Persp_Center "Height Persp. Center"
 
-double ReadPrjParms(string section, string entry, string filename)
+double ReadPrjParms(std::string section, std::string entry, std::string filename)
 {
-    string str = ReadElement(section, entry, filename);
-    //string str="";
+    std::string str = ReadElement(section, entry, filename);
+    //std::string str="";
     if (str.length() != 0)
         return atof(str.c_str());
     else
         return 0;
 }
 
-static int fetchParms(string csyFileName, double * padfPrjParams)
+static int fetchParms(std::string csyFileName, double * padfPrjParams)
 {
     int     i;
 
@@ -273,8 +272,8 @@
     for ( i = 0; i < 13; i++ )
         padfPrjParams[i] = 0.0;
 		
-    string pszProj = ReadElement("CoordSystem", "Projection", csyFileName);
-    string pszEllips = ReadElement("CoordSystem", "Ellipsoid", csyFileName);
+    std::string pszProj = ReadElement("CoordSystem", "Projection", csyFileName);
+    std::string pszEllips = ReadElement("CoordSystem", "Ellipsoid", csyFileName);
 
     //fetch info about a custom ellipsoid
     if( EQUALN( pszEllips.c_str(), "User Defined", 12 ) )
@@ -313,7 +312,7 @@
  * --- Gauss Colombia
  * --- Gauss-Boaga Italy
 **/
-static int mapTMParms(string sProj, double dfZone, double &dfFalseEasting, double &dfCentralMeridian)
+static int mapTMParms(std::string sProj, double dfZone, double &dfFalseEasting, double &dfCentralMeridian)
 {
     if( EQUALN( sProj.c_str(), "Gauss-Krueger Germany", 21 ) )
     {
@@ -351,7 +350,7 @@
  * Compute the scale factor from Latitude_Of_True_Scale parameter.
  *
 **/
-static int scaleFromLATTS( string sEllips, double phits, double &scale )  
+static int scaleFromLATTS( std::string sEllips, double phits, double &scale )  
 {
     if( EQUALN( sEllips.c_str(), "Sphere", 6 ) ) 
     {
@@ -407,11 +406,11 @@
  * [12] Satellite Height
 **/ 
 
-CPLErr ILWISDataset::ReadProjection( string csyFileName )
+CPLErr ILWISDataset::ReadProjection( std::string csyFileName )
 {
-    string pszEllips;
-    string pszDatum;
-    string pszProj;
+    std::string pszEllips;
+    std::string pszDatum;
+    std::string pszProj;
 		
     //translate ILWIS pre-defined coordinate systems
     if( EQUALN( csyFileName.c_str(), "latlon.csy", 10 )) 
@@ -627,7 +626,7 @@
     }
     else if( EQUALN( pszProj.c_str(), "UTM", 3 ) )
     {
-        string pszNH = ReadElement("Projection", "Northern Hemisphere", csyFileName);
+        std::string pszNH = ReadElement("Projection", "Northern Hemisphere", csyFileName);
         oSRS.SetProjCS("UTM");
         if( EQUALN( pszNH.c_str(), "Yes", 3 ) )
             oSRS.SetUTM( (int) padfPrjParams[11], 1);  
@@ -755,7 +754,7 @@
     return CE_None;
 }
 
-void WriteFalseEastNorth(string csFileName, OGRSpatialReference oSRS)
+void WriteFalseEastNorth(std::string csFileName, OGRSpatialReference oSRS)
 {
 			WriteElement("Projection", ILW_False_Easting, csFileName, 
 										oSRS.GetNormProjParm(SRS_PP_FALSE_EASTING, 0.0));
@@ -763,13 +762,13 @@
 										oSRS.GetNormProjParm(SRS_PP_FALSE_NORTHING, 0.0));
 }
 
-void WriteProjectionName(string csFileName, string stProjection)
+void WriteProjectionName(std::string csFileName, std::string stProjection)
 {
     WriteElement("CoordSystem", "Type", csFileName, "Projection");
     WriteElement("CoordSystem", "Projection", csFileName, stProjection);
 }
 
-void WriteUTM(string csFileName, OGRSpatialReference oSRS)
+void WriteUTM(std::string csFileName, OGRSpatialReference oSRS)
 {
     int	bNorth, nZone;
 
@@ -783,7 +782,7 @@
     WriteElement("Projection", "Zone", csFileName, nZone);
 }
 
-void WriteAlbersConicEqualArea(string csFileName, OGRSpatialReference oSRS)
+void WriteAlbersConicEqualArea(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Albers EqualArea Conic");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -796,7 +795,7 @@
     WriteElement("Projection", ILW_Standard_Parallel_2, csFileName, 
                  oSRS.GetNormProjParm(SRS_PP_STANDARD_PARALLEL_2, 0.0));
 }
-void WriteAzimuthalEquidistant(string csFileName, OGRSpatialReference oSRS)
+void WriteAzimuthalEquidistant(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Azimuthal Equidistant");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -806,7 +805,7 @@
                  oSRS.GetNormProjParm(SRS_PP_LATITUDE_OF_ORIGIN, 0.0));
     WriteElement("Projection", ILW_Scale_Factor, csFileName, "1.0000000000"); 
 }
-void WriteCylindricalEqualArea(string csFileName, OGRSpatialReference oSRS)
+void WriteCylindricalEqualArea(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Central Cylindrical");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -814,7 +813,7 @@
                  oSRS.GetNormProjParm(SRS_PP_CENTRAL_MERIDIAN, 0.0));
 }
 
-void WriteCassiniSoldner(string csFileName, OGRSpatialReference oSRS)
+void WriteCassiniSoldner(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Cassini");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -825,7 +824,7 @@
     WriteElement("Projection", ILW_Scale_Factor, csFileName, "1.0000000000"); 
 }
 
-void WriteStereographic(string csFileName, OGRSpatialReference oSRS)
+void WriteStereographic(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Stereographic");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -837,7 +836,7 @@
                  oSRS.GetNormProjParm(SRS_PP_SCALE_FACTOR, 0.0)); 
 }
 
-void WriteEquidistantConic(string csFileName, OGRSpatialReference oSRS)
+void WriteEquidistantConic(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Equidistant Conic");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -851,7 +850,7 @@
                  oSRS.GetNormProjParm(SRS_PP_STANDARD_PARALLEL_2, 0.0));
 }
 
-void WriteTransverseMercator(string csFileName, OGRSpatialReference oSRS)
+void WriteTransverseMercator(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Transverse Mercator");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -863,7 +862,7 @@
                  oSRS.GetNormProjParm(SRS_PP_SCALE_FACTOR, 0.0)); 
 }
 
-void WriteGnomonic(string csFileName, OGRSpatialReference oSRS)
+void WriteGnomonic(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Gnomonic");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -873,7 +872,7 @@
                  oSRS.GetNormProjParm(SRS_PP_LATITUDE_OF_ORIGIN, 0.0));
 }
 
-void WriteLambertConformalConic(string csFileName, OGRSpatialReference oSRS)
+void WriteLambertConformalConic(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Lambert Conformal Conic");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -884,7 +883,7 @@
     WriteElement("Projection", ILW_Scale_Factor, csFileName, "1.0000000000"); 
 }
 
-void WriteLambertConformalConic2SP(string csFileName, OGRSpatialReference oSRS)
+void WriteLambertConformalConic2SP(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Lambert Conformal Conic");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -899,7 +898,7 @@
                  oSRS.GetNormProjParm(SRS_PP_STANDARD_PARALLEL_2, 0.0));
 }
 
-void WriteLambertAzimuthalEqualArea(string csFileName, OGRSpatialReference oSRS)
+void WriteLambertAzimuthalEqualArea(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Lambert Azimuthal EqualArea");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -909,7 +908,7 @@
                  oSRS.GetNormProjParm(SRS_PP_LATITUDE_OF_ORIGIN, 0.0));
 }
 
-void WriteMercator_1SP(string csFileName, OGRSpatialReference oSRS)
+void WriteMercator_1SP(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Mercator");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -919,7 +918,7 @@
                  oSRS.GetNormProjParm(SRS_PP_LATITUDE_OF_ORIGIN, 0.0));
 }
 
-void WriteMillerCylindrical(string csFileName, OGRSpatialReference oSRS)
+void WriteMillerCylindrical(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Miller");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -927,7 +926,7 @@
                  oSRS.GetNormProjParm(SRS_PP_CENTRAL_MERIDIAN, 0.0));
 }
 
-void WriteMolleweide(string csFileName, OGRSpatialReference oSRS)
+void WriteMolleweide(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Mollweide");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -935,7 +934,7 @@
                  oSRS.GetNormProjParm(SRS_PP_CENTRAL_MERIDIAN, 0.0));
 }
 
-void WriteOrthographic(string csFileName, OGRSpatialReference oSRS)
+void WriteOrthographic(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Orthographic");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -945,7 +944,7 @@
                  oSRS.GetNormProjParm(SRS_PP_LATITUDE_OF_ORIGIN, 0.0));
 }
 
-void WritePlateRectangle(string csFileName, OGRSpatialReference oSRS)
+void WritePlateRectangle(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Plate Rectangle");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -956,7 +955,7 @@
     WriteElement("Projection", ILW_Latitude_True_Scale, csFileName, "0.0000000000"); 
 }
 
-void WritePolyConic(string csFileName, OGRSpatialReference oSRS)
+void WritePolyConic(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "PolyConic");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -967,7 +966,7 @@
     WriteElement("Projection", ILW_Scale_Factor, csFileName, "1.0000000000"); 
 }
 
-void WriteRobinson(string csFileName, OGRSpatialReference oSRS)
+void WriteRobinson(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Robinson");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -975,7 +974,7 @@
                  oSRS.GetNormProjParm(SRS_PP_CENTRAL_MERIDIAN, 0.0));
 }
 
-void WriteSinusoidal(string csFileName, OGRSpatialReference oSRS)
+void WriteSinusoidal(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "Sinusoidal");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -983,7 +982,7 @@
                  oSRS.GetNormProjParm(SRS_PP_CENTRAL_MERIDIAN, 0.0));
 }
 
-void WriteVanderGrinten(string csFileName, OGRSpatialReference oSRS)
+void WriteVanderGrinten(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "VanderGrinten");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -991,7 +990,7 @@
                  oSRS.GetNormProjParm(SRS_PP_CENTRAL_MERIDIAN, 0.0));
 }
 
-void WriteGeoStatSat(string csFileName, OGRSpatialReference oSRS)
+void WriteGeoStatSat(std::string csFileName, OGRSpatialReference oSRS)
 {
     WriteProjectionName(csFileName, "GeoStationary Satellite");
     WriteFalseEastNorth(csFileName, oSRS);
@@ -1019,9 +1018,9 @@
     int                 bHaveSRS;
     char		*pszP = pszProjection;
 		
-    string csFileName = CPLResetExtension(osFileName, "csy" );
-    string pszBaseName = string(CPLGetBasename( osFileName ));
-    string pszPath = string(CPLGetPath( osFileName ));
+    std::string csFileName = CPLResetExtension(osFileName, "csy" );
+    std::string pszBaseName = std::string(CPLGetBasename( osFileName ));
+    std::string pszPath = std::string(CPLGetPath( osFileName ));
     bool fProjection = ((strlen(pszProjection)>0) && (pszProjection != NULL));
     if( fProjection && (oSRS.importFromWkt( &pszP ) == OGRERR_NONE) )
     {
@@ -1031,9 +1030,9 @@
         bHaveSRS = FALSE;
 		
     IlwisDatums   *piwDatum = iwDatums;
-    string pszEllips;
-    string pszDatum;
-    string pszProj;
+    std::string pszEllips;
+    std::string pszDatum;
+    std::string pszProj;
 		
 /* -------------------------------------------------------------------- */
 /*      Collect datum/ellips information.                                      */
@@ -1043,8 +1042,8 @@
         poGeogSRS = oSRS.CloneGeogCS();
     }
 
-    string grFileName = CPLResetExtension(osFileName, "grf" );
-    string csy;
+    std::string grFileName = CPLResetExtension(osFileName, "grf" );
+    std::string csy;
     if( poGeogSRS )
     {
         csy = pszBaseName + ".csy";
Index: frmts/ilwis/ilwisdataset.cpp
===================================================================
--- frmts/ilwis/ilwisdataset.cpp	(revision 13695)
+++ frmts/ilwis/ilwisdataset.cpp	(working copy)
@@ -28,42 +28,43 @@
 
 
 #include "ilwisdataset.h"
-#include <float.h>
-#include <limits.h>
+#include <cfloat>
+#include <climits>
+#include <string>
 
 // IniFile.cpp: implementation of the IniFile class.
 //
 //////////////////////////////////////////////////////////////////////
-bool CompareAsNum::operator() (const string& s1, const string& s2) const
+bool CompareAsNum::operator() (const std::string& s1, const std::string& s2) const
 {
     long Num1 = atoi(s1.c_str());
     long Num2 = atoi(s2.c_str());
     return Num1 < Num2;
 }
 
-string TrimSpaces(const string& input)
+std::string TrimSpaces(const std::string& input)
 {
     // find first non space
     if ( input.empty()) 
-        return string();
+        return std::string();
 
     size_t iFirstNonSpace = input.find_first_not_of(' ');
     size_t iFindLastSpace = input.find_last_not_of(' ');
-    if (iFirstNonSpace == string::npos || iFindLastSpace == string::npos)
-        return string();
+    if (iFirstNonSpace == std::string::npos || iFindLastSpace == std::string::npos)
+        return std::string();
 
     return input.substr(iFirstNonSpace, iFindLastSpace - iFirstNonSpace + 1);
 }
 
-string GetLine(FILE* fil)
+std::string GetLine(FILE* fil)
 {
     const char *p = CPLReadLineL( fil );
     if (p == NULL)
-        return string();
+        return std::string();
 
     CPLString osWrk = p;
     osWrk.Trim();
-    return string(osWrk);
+    return std::string(osWrk);
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -79,7 +80,7 @@
 
 }
 
-void IniFile::Open(const string& filenam)
+void IniFile::Open(const std::string& filenam)
 {
     filename = filenam;
 
@@ -99,7 +100,7 @@
     sections.clear();
 }
 
-void IniFile::SetKeyValue(const string& section, const string& key, const string& value)
+void IniFile::SetKeyValue(const std::string& section, const std::string& key, const std::string& value)
 {
     Sections::iterator iterSect = sections.find(section);
     if (iterSect == sections.end())
@@ -116,7 +117,7 @@
         (*entries)[key] = value;
     }
 }
-string IniFile::GetKeyValue(const string& section, const string& key)
+std::string IniFile::GetKeyValue(const std::string& section, const std::string& key)
 {
 	Sections::iterator iterSect = sections.find(section);
 	if (iterSect != sections.end())
@@ -127,10 +128,10 @@
 			return (*iterEntry).second;
 	}
 
-	return string();
+	return std::string();
 }
 
-void IniFile::RemoveKeyValue(const string& section, const string& key)
+void IniFile::RemoveKeyValue(const std::string& section, const std::string& key)
 {
     Sections::iterator iterSect = sections.find(section);
     if (iterSect != sections.end())
@@ -141,7 +142,7 @@
     }
 }
 
-void IniFile::RemoveSection(const string& section)
+void IniFile::RemoveSection(const std::string& section)
 {
     Sections::iterator iterSect = sections.find(section);
     if (iterSect != sections.end())
@@ -160,9 +161,9 @@
     if (filIni == NULL)
         return;
 
-    string section, key, value;
+    std::string section, key, value;
     state = FindSection;
-    string s;
+    std::string s;
     while (!VSIFEofL(filIni) || !s.empty() )
     {
         switch (state)
@@ -175,7 +176,7 @@
             if (s[0] == '[')
             {
                 size_t iLast = s.find_first_of(']');
-                if (iLast != string::npos)
+                if (iLast != std::string::npos)
                 {
                     section = s.substr(1, iLast - 1);
                     state = ReadFindKey;
@@ -189,7 +190,7 @@
           case FindKey:
           {
               size_t iEqu = s.find_first_of('=');
-              if (iEqu != string::npos)
+              if (iEqu != std::string::npos)
               {
                   key = s.substr(0, iEqu);
                   value = s.substr(iEqu + 1);
@@ -231,7 +232,7 @@
         SectionEntries::iterator iterEntry;
         for (iterEntry = (*entries).begin(); iterEntry != (*entries).end(); ++iterEntry)
         {
-            string key = (*iterEntry).first;
+            std::string key = (*iterEntry).first;
             osLine.Printf( "%s=%s\r\n", 
                            TrimSpaces(key).c_str(), (*iterEntry).second.c_str());
             VSIFWriteL( osLine.c_str(), 1, strlen(osLine), filIni );
@@ -253,28 +254,28 @@
         return (long)floor(x + 0.5);
 }
 
-string ReadElement(string section, string entry, string filename)
+std::string ReadElement(std::string section, std::string entry, std::string filename)
 {
     if (section.length() == 0)
-        return string();
+        return std::string();
     if (entry.length() == 0)
-        return string();
+        return std::string();
     if (filename.length() == 0)
-        return string();
+        return std::string();
 
     IniFile MyIniFile;
     MyIniFile = IniFile();
     MyIniFile.Open(filename);
 
-    string ret = MyIniFile.GetKeyValue(section, entry);
+    std::string ret = MyIniFile.GetKeyValue(section, entry);
 
     MyIniFile.Close();
 
     return ret;
 }
 
-bool WriteElement(string sSection, string sEntry,
-                             string fn, string sValue)
+bool WriteElement(std::string sSection, std::string sEntry,
+                             std::string fn, std::string sValue)
 {
     if (0 == fn.length())
         return false;
@@ -288,35 +289,35 @@
     return true;
 }
 
-bool WriteElement(string sSection, string sEntry,
-                             string fn, int nValue)
+bool WriteElement(std::string sSection, std::string sEntry,
+                             std::string fn, int nValue)
 {
     if (0 == fn.length())
         return false;
 
     char strdouble[45];
     sprintf(strdouble, "%d", nValue);
-    string sValue = string(strdouble);
+    std::string sValue = std::string(strdouble);
     return WriteElement(sSection, sEntry, fn, sValue) != 0;
 }
 
-bool WriteElement(string sSection, string sEntry,
-                             string fn, double dValue)
+bool WriteElement(std::string sSection, std::string sEntry,
+                             std::string fn, double dValue)
 {
     if (0 == fn.length())
         return false;
 
     char strdouble[45];
     sprintf(strdouble, "%.6f", dValue);
-    string sValue = string(strdouble);
+    std::string sValue = std::string(strdouble);
     return WriteElement(sSection, sEntry, fn, sValue) != 0;
 }
 
-static CPLErr GetRowCol(string str,int &Row, int &Col)
+static CPLErr GetRowCol(std::string str,int &Row, int &Col)
 {
-    string delimStr = " ,;";
+    std::string delimStr = " ,;";
     size_t iPos = str.find_first_of(delimStr);
-    if (iPos != string::npos)
+    if (iPos != std::string::npos)
     {
         Row = atoi(str.substr(0, iPos).c_str());
     }
@@ -327,7 +328,7 @@
         return CE_Failure;
     }
     iPos = str.find_last_of(delimStr);
-    if (iPos != string::npos)
+    if (iPos != std::string::npos)
     {
         Col = atoi(str.substr(iPos+1, str.length()-iPos).c_str());
     }
@@ -369,9 +370,9 @@
 }
 
 //Determine store type of ILWIS raster
-static string GDALType2ILWIS(GDALDataType type)
+static std::string GDALType2ILWIS(GDALDataType type)
 {
-    string sStoreType;
+    std::string sStoreType;
     sStoreType = "";
     switch( type )
     {
@@ -407,9 +408,9 @@
     return sStoreType;
 }
 
-static CPLErr GetStoreType(string pszFileName, ilwisStoreType &stStoreType)
+static CPLErr GetStoreType(std::string pszFileName, ilwisStoreType &stStoreType)
 {
-    string st = ReadElement("MapStore", "Type", pszFileName.c_str());
+    std::string st = ReadElement("MapStore", "Type", pszFileName.c_str());
 		
     if( EQUAL(st.c_str(),"byte"))
     {
@@ -475,11 +476,11 @@
 /*      the transform coefficients from the extent and pixelsize        */
 /************************************************************************/
 
-void ILWISDataset::CollectTransformCoef(string &pszRefName)
+void ILWISDataset::CollectTransformCoef(std::string &pszRefName)
 
 {
     pszRefName = "";
-    string georef;
+    std::string georef;
     if ( EQUAL(pszFileType.c_str(),"Map") )
         georef = ReadElement("Map", "GeoRef", osFileName);
     else
@@ -490,23 +491,23 @@
     if( (georef.length() != 0) && !EQUAL(georef.c_str(),"none"))
     {
         //Form the geo-referencing name
-        string pszBaseName = string(CPLGetBasename(georef.c_str()) );
-        string pszPath = string(CPLGetPath( osFileName ));
-        pszRefName = string(CPLFormFilename(pszPath.c_str(),
+        std::string pszBaseName = std::string(CPLGetBasename(georef.c_str()) );
+        std::string pszPath = std::string(CPLGetPath( osFileName ));
+        pszRefName = std::string(CPLFormFilename(pszPath.c_str(),
                                             pszBaseName.c_str(),"grf" ));
 
         //Check the geo-reference type,support for the GeoRefCorners only 
-        string georeftype = ReadElement("GeoRef", "Type", pszRefName);
+        std::string georeftype = ReadElement("GeoRef", "Type", pszRefName);
         if (EQUAL(georeftype.c_str(),"GeoRefCorners"))
         {
             //Center or top-left corner of the pixel approach? 
-            string IsCorner = ReadElement("GeoRefCorners", "CornersOfCorners", pszRefName);
+            std::string IsCorner = ReadElement("GeoRefCorners", "CornersOfCorners", pszRefName);
 
             //Collect the extent of the coordinates 
-            string sMinX = ReadElement("GeoRefCorners", "MinX", pszRefName);
-            string sMinY = ReadElement("GeoRefCorners", "MinY", pszRefName);
-            string sMaxX = ReadElement("GeoRefCorners", "MaxX", pszRefName);
-            string sMaxY = ReadElement("GeoRefCorners", "MaxY", pszRefName);
+            std::string sMinX = ReadElement("GeoRefCorners", "MinX", pszRefName);
+            std::string sMinY = ReadElement("GeoRefCorners", "MinY", pszRefName);
+            std::string sMaxX = ReadElement("GeoRefCorners", "MaxX", pszRefName);
+            std::string sMaxY = ReadElement("GeoRefCorners", "MaxY", pszRefName);
 				
             //Calculate pixel size in X and Y direction from the extent
             double PixelSizeX = floor((atof(sMaxX.c_str()) - 
@@ -543,9 +544,9 @@
 
 CPLErr ILWISDataset::WriteGeoReference()
 {
-    string grFileName = CPLResetExtension(osFileName, "grf" );
+    std::string grFileName = CPLResetExtension(osFileName, "grf" );
     double dLLLat, dLLLong, dURLat, dURLong;
-    string georef;
+    std::string georef;
 		
     int   nXSize = GetRasterXSize();
     int   nYSize = GetRasterYSize();
@@ -577,8 +578,8 @@
 
             //Re-write the GeoRef property to raster ODF
             //Form band file name  
-            string sBaseName = string(CPLGetBasename(osFileName) );
-            string sPath = string(CPLGetPath(osFileName));
+            std::string sBaseName = std::string(CPLGetBasename(osFileName) );
+            std::string sPath = std::string(CPLGetPath(osFileName));
             if (nBands == 1) 
             {
                 WriteElement("Map", "GeoRef", osFileName, sBaseName + ".grf");
@@ -591,7 +592,7 @@
                       WriteElement("MapList", "GeoRef", osFileName, sBaseName + ".grf");
                     char pszName[100];
                     sprintf(pszName, "%s_band_%d", sBaseName.c_str(),iBand + 1 );
-                    string pszODFName = string(CPLFormFilename(sPath.c_str(),pszName,"mpr"));
+                    std::string pszODFName = std::string(CPLFormFilename(sPath.c_str(),pszName,"mpr"));
                     WriteElement("Map", "GeoRef", pszODFName, sBaseName + ".grf");
                 }
             }
@@ -671,29 +672,29 @@
     if( poOpenInfo->nHeaderBytes < 1 )
         return NULL;
 
-    string sExt = CPLGetExtension( poOpenInfo->pszFilename );
+    std::string sExt = CPLGetExtension( poOpenInfo->pszFilename );
     if (!EQUAL(sExt.c_str(),"mpr") && !EQUAL(sExt.c_str(),"mpl"))
         return NULL;
 
     if (!CheckASCII(poOpenInfo->pabyHeader, poOpenInfo->nHeaderBytes))
         return NULL;
 
-    string ilwistype = ReadElement("Ilwis", "Type", poOpenInfo->pszFilename);
+    std::string ilwistype = ReadElement("Ilwis", "Type", poOpenInfo->pszFilename);
     if( ilwistype.length() == 0)
         return NULL;
 		
-    string sFileType;	//map or map list
+    std::string sFileType;	//map or map list
     int    iBandCount;
-    string mapsize;
-    string maptype = ReadElement("BaseMap", "Type", poOpenInfo->pszFilename);
-    string sBaseName = string(CPLGetBasename(poOpenInfo->pszFilename) );
-    string sPath = string(CPLGetPath( poOpenInfo->pszFilename));
+    std::string mapsize;
+    std::string maptype = ReadElement("BaseMap", "Type", poOpenInfo->pszFilename);
+    std::string sBaseName = std::string(CPLGetBasename(poOpenInfo->pszFilename) );
+    std::string sPath = std::string(CPLGetPath( poOpenInfo->pszFilename));
 							
     //Verify whether it is a map list or a map
     if( EQUAL(ilwistype.c_str(),"MapList") )
     {
-        sFileType = string("MapList");
-        string sMaps = ReadElement("MapList", "Maps", poOpenInfo->pszFilename);
+        sFileType = std::string("MapList");
+        std::string sMaps = ReadElement("MapList", "Maps", poOpenInfo->pszFilename);
         iBandCount = atoi(sMaps.c_str());
         mapsize = ReadElement("MapList", "Size", poOpenInfo->pszFilename);
         for (int iBand = 0; iBand < iBandCount; ++iBand )
@@ -701,19 +702,19 @@
             //Form the band file name.
             char cBandName[45];
             sprintf( cBandName, "Map%d", iBand);
-            string sBandName = ReadElement("MapList", string(cBandName), poOpenInfo->pszFilename);
-            string pszBandBaseName = string(CPLGetBasename(sBandName.c_str()) );
-            string pszBandPath = string(CPLGetPath( sBandName.c_str()));
+            std::string sBandName = ReadElement("MapList", std::string(cBandName), poOpenInfo->pszFilename);
+            std::string pszBandBaseName = std::string(CPLGetBasename(sBandName.c_str()) );
+            std::string pszBandPath = std::string(CPLGetPath( sBandName.c_str()));
             if ( 0 == pszBandPath.length() )
             { 
-                sBandName = string(CPLFormFilename(sPath.c_str(),
+                sBandName = std::string(CPLFormFilename(sPath.c_str(),
                                                    pszBandBaseName.c_str(),"mpr" ));
             }
             //Verify the file exetension, it must be an ILWIS raw data file
             //with extension .mp#, otherwise, unsupported 
             //This drive only supports a map list which stores a set of ILWIS raster maps, 
-            string sMapStoreName = ReadElement("MapStore", "Data", sBandName);
-            string sExt = CPLGetExtension( sMapStoreName.c_str() );
+            std::string sMapStoreName = ReadElement("MapStore", "Data", sBandName);
+            std::string sExt = CPLGetExtension( sMapStoreName.c_str() );
             if ( !EQUALN( sExt.c_str(), "mp#", 3 ))
             {
                 CPLError( CE_Failure, CPLE_AppDefined,
@@ -728,10 +729,10 @@
         sFileType = "Map";
         iBandCount = 1;
         mapsize = ReadElement("Map", "Size", poOpenInfo->pszFilename);
-        string sMapType = ReadElement("Map", "Type", poOpenInfo->pszFilename);
+        std::string sMapType = ReadElement("Map", "Type", poOpenInfo->pszFilename);
         ilwisStoreType stStoreType;
         if (  
-            GetStoreType(string(poOpenInfo->pszFilename), stStoreType) != CE_None )
+            GetStoreType(std::string(poOpenInfo->pszFilename), stStoreType) != CE_None )
         {
             //CPLError( CE_Failure, CPLE_AppDefined,
             //			"Unsupported ILWIS data file. \n"
@@ -776,7 +777,7 @@
 /* -------------------------------------------------------------------- */
 /*      Collect the geotransform coefficients                           */
 /* -------------------------------------------------------------------- */
-    string pszGeoRef;
+    std::string pszGeoRef;
     poDS->CollectTransformCoef(pszGeoRef);
 
 /* -------------------------------------------------------------------- */
@@ -786,8 +787,8 @@
     {
 		
         //	Fetch coordinate system
-        string csy = ReadElement("GeoRef", "CoordSystem", pszGeoRef);
-        string pszProj;
+        std::string csy = ReadElement("GeoRef", "CoordSystem", pszGeoRef);
+        std::string pszProj;
 
         if( (csy.length() != 0) && !EQUAL(csy.c_str(),"unknown.csy"))
         {
@@ -796,9 +797,9 @@
             if( !(EQUALN( csy.c_str(), "latlon.csy", 10 )) && 
                 !(EQUALN( csy.c_str(), "LatlonWGS84.csy", 15 )))            
             {
-                string pszBaseName = string(CPLGetBasename(csy.c_str()) );
-                string pszPath = string(CPLGetPath( poDS->osFileName ));
-                csy = string(CPLFormFilename(pszPath.c_str(),
+                std::string pszBaseName = std::string(CPLGetBasename(csy.c_str()) );
+                std::string pszPath = std::string(CPLGetPath( poDS->osFileName ));
+                csy = std::string(CPLFormFilename(pszPath.c_str(),
                                              pszBaseName.c_str(),"csy" ));
                 pszProj = ReadElement("CoordSystem", "Type", csy);
                 if (pszProj.length() == 0 ) //default to projection
@@ -873,23 +874,23 @@
 /*      Translate the data type.                                        */
 /*	Determine store type of ILWIS raster                            */
 /* -------------------------------------------------------------------- */
-    string sDomain= "value.dom";
+    std::string sDomain= "value.dom";
     double stepsize = 1;
-    string sStoreType = GDALType2ILWIS(eType);
+    std::string sStoreType = GDALType2ILWIS(eType);
     if( EQUAL(sStoreType.c_str(),""))
         return NULL;
     else if( EQUAL(sStoreType.c_str(),"Real") || EQUAL(sStoreType.c_str(),"float"))
         stepsize = 0;
 
-    string pszBaseName = string(CPLGetBasename( pszFilename ));
-    string pszPath = string(CPLGetPath( pszFilename ));
+    std::string pszBaseName = std::string(CPLGetBasename( pszFilename ));
+    std::string pszPath = std::string(CPLGetPath( pszFilename ));
 		
 /* -------------------------------------------------------------------- */
 /*      Write out object definition file for each band                  */
 /* -------------------------------------------------------------------- */
-    string pszODFName;
-    string pszDataBaseName;
-    string pszFileName;
+    std::string pszODFName;
+    std::string pszDataBaseName;
+    std::string pszFileName;
 
     char strsize[45];
     sprintf(strsize, "%d %d", nYSize, nXSize);
@@ -897,17 +898,17 @@
     //Form map/maplist name. 
     if ( nBands == 1 )
     {
-        pszODFName = string(CPLFormFilename(pszPath.c_str(),pszBaseName.c_str(),"mpr"));
+        pszODFName = std::string(CPLFormFilename(pszPath.c_str(),pszBaseName.c_str(),"mpr"));
         pszDataBaseName = pszBaseName;
         pszFileName = CPLFormFilename(pszPath.c_str(),pszBaseName.c_str(),"mpr");
     }
     else
     {
         pszFileName = CPLFormFilename(pszPath.c_str(),pszBaseName.c_str(),"mpl");
-        WriteElement("Ilwis", "Type", string(pszFileName), "MapList");
-        WriteElement("MapList", "GeoRef", string(pszFileName), "none.grf");
-        WriteElement("MapList", "Size", string(pszFileName), string(strsize));
-        WriteElement("MapList", "Maps", string(pszFileName), nBands);
+        WriteElement("Ilwis", "Type", std::string(pszFileName), "MapList");
+        WriteElement("MapList", "GeoRef", std::string(pszFileName), "none.grf");
+        WriteElement("MapList", "Size", std::string(pszFileName), std::string(strsize));
+        WriteElement("MapList", "Maps", std::string(pszFileName), nBands);
     }
 
     for( iBand = 0; iBand < nBands; iBand++ )
@@ -916,10 +917,10 @@
         {
             char pszBandName[100];
             sprintf(pszBandName, "%s_band_%d", pszBaseName.c_str(),iBand + 1 );
-            pszODFName = string(pszBandName) + ".mpr";
-            pszDataBaseName = string(pszBandName);
+            pszODFName = std::string(pszBandName) + ".mpr";
+            pszDataBaseName = std::string(pszBandName);
             sprintf(pszBandName, "Map%d", iBand);	
-            WriteElement("MapList", string(pszBandName), string(pszFileName), pszODFName);
+            WriteElement("MapList", std::string(pszBandName), std::string(pszFileName), pszODFName);
             pszODFName = CPLFormFilename(pszPath.c_str(),pszDataBaseName.c_str(),"mpr");
         }
 /* -------------------------------------------------------------------- */
@@ -935,17 +936,17 @@
         adfMinMax[1] = 9999999.9;
         
         WriteElement("BaseMap", "Domain", pszODFName, sDomain);
-        string pszDataName = pszDataBaseName + ".mp#";
+        std::string pszDataName = pszDataBaseName + ".mp#";
         WriteElement("MapStore", "Data", pszODFName, pszDataName);
         WriteElement("MapStore", "Structure", pszODFName, "Line");
         WriteElement("MapStore", "Type", pszODFName, sStoreType);
 
         char strdouble[45];
         sprintf(strdouble, "%.3f:%.3f:%3f:offset=0", adfMinMax[0], adfMinMax[1],stepsize);
-        string range = string(strdouble);
+        std::string range = std::string(strdouble);
         WriteElement("BaseMap", "Range", pszODFName, range);
         WriteElement("Map", "GeoRef", pszODFName, "none.grf");
-        WriteElement("Map", "Size", pszODFName, string(strsize));
+        WriteElement("Map", "Size", pszODFName, std::string(strsize));
 							
 /* -------------------------------------------------------------------- */
 /*      Try to create the data file.                                    */
@@ -970,7 +971,7 @@
     poDS->bNewDataset = TRUE;
     poDS->SetDescription(pszFilename);
     poDS->osFileName = pszFileName;
-    poDS->pszIlwFileName = string(pszFileName);
+    poDS->pszIlwFileName = std::string(pszFileName);
     if ( nBands == 1 )
         poDS->pszFileType = "Map";
     else
@@ -1030,14 +1031,14 @@
 
     if( poDS == NULL )
         return NULL;
-    string pszBaseName = string(CPLGetBasename( pszFilename ));
-    string pszPath = string(CPLGetPath( pszFilename ));
+    std::string pszBaseName = std::string(CPLGetBasename( pszFilename ));
+    std::string pszPath = std::string(CPLGetPath( pszFilename ));
 				
 /* -------------------------------------------------------------------- */
 /*  Copy and geo-transform and projection information.                  */
 /* -------------------------------------------------------------------- */
     double adfGeoTransform[6];
-    string georef;
+    std::string georef;
     const char  *pszProj;
 
     if( poSrcDS->GetGeoTransform( adfGeoTransform ) == CE_None
@@ -1085,26 +1086,26 @@
         pData = (GByte *) CPLMalloc( nLineSize );
         				
         //Determine store type of ILWIS raster
-        string sStoreType = GDALType2ILWIS( eType );
+        std::string sStoreType = GDALType2ILWIS( eType );
         if( EQUAL(sStoreType.c_str(),""))
             return NULL;
         else if( EQUAL(sStoreType.c_str(),"Real") || EQUAL(sStoreType.c_str(),"float"))
             stepsize = 0;
 
         //Form the image file name, create the object definition file. 
-        string pszODFName;
-        string pszDataBaseName;
+        std::string pszODFName;
+        std::string pszDataBaseName;
         if (nBands == 1) 
         {
-            pszODFName = string(CPLFormFilename(pszPath.c_str(),pszBaseName.c_str(),"mpr"));
+            pszODFName = std::string(CPLFormFilename(pszPath.c_str(),pszBaseName.c_str(),"mpr"));
             pszDataBaseName = pszBaseName;
         }
         else
         {
             char pszName[100];
             sprintf(pszName, "%s_band_%d", pszBaseName.c_str(),iBand + 1 );
-            pszODFName = string(CPLFormFilename(pszPath.c_str(),pszName,"mpr"));
-            pszDataBaseName = string(pszName);
+            pszODFName = std::string(CPLFormFilename(pszPath.c_str(),pszName,"mpr"));
+            pszDataBaseName = std::string(pszName);
         }
 /* -------------------------------------------------------------------- */
 /*      Write data definition file for each band (.mpr)                 */
@@ -1122,7 +1123,7 @@
             // only write a range if we got a correct one from the source dataset (otherwise ILWIS can't show the map properly)
             char strdouble[45];
             sprintf(strdouble, "%.3f:%.3f:%3f:offset=0", adfMinMax[0], adfMinMax[1],stepsize);
-            string range = string(strdouble);
+            std::string range = std::string(strdouble);
             WriteElement("BaseMap", "Range", pszODFName, range);
         }
         WriteElement("Map", "GeoRef", pszODFName, georef);
@@ -1133,7 +1134,7 @@
         CPLErr      eErr = CE_None;
 			
         //For file name for raw data, and create binary files. 
-        string pszDataFileName = CPLResetExtension(pszODFName.c_str(), "mp#" );
+        std::string pszDataFileName = CPLResetExtension(pszODFName.c_str(), "mp#" );
 				
         fpData = desBand->fpRaw;
         if( fpData == NULL )
@@ -1225,22 +1226,22 @@
 ILWISRasterBand::ILWISRasterBand( ILWISDataset *poDS, int nBand )
 
 {
-    string sBandName;
+    std::string sBandName;
     if ( EQUAL(poDS->pszFileType.c_str(),"Map"))  		
-        sBandName = string(poDS->osFileName);
+        sBandName = std::string(poDS->osFileName);
     else //map list
     {
         //Form the band name
         char cBandName[45];
         sprintf( cBandName, "Map%d", nBand-1);
-        sBandName = ReadElement("MapList", string(cBandName), string(poDS->osFileName));
-        string sInputPath = string(CPLGetPath( poDS->osFileName));	
-        string sBandPath = string(CPLGetPath( sBandName.c_str()));
-        string sBandBaseName = string(CPLGetBasename( sBandName.c_str()));
+        sBandName = ReadElement("MapList", std::string(cBandName), std::string(poDS->osFileName));
+        std::string sInputPath = std::string(CPLGetPath( poDS->osFileName));	
+        std::string sBandPath = std::string(CPLGetPath( sBandName.c_str()));
+        std::string sBandBaseName = std::string(CPLGetBasename( sBandName.c_str()));
         if ( 0==sBandPath.length() )
-            sBandName = string(CPLFormFilename(sInputPath.c_str(),sBandBaseName.c_str(),"mpr" ));		
+            sBandName = std::string(CPLFormFilename(sInputPath.c_str(),sBandBaseName.c_str(),"mpr" ));		
         else
-            sBandName = string(CPLFormFilename(sBandPath.c_str(),sBandBaseName.c_str(),"mpr" ));		
+            sBandName = std::string(CPLFormFilename(sBandPath.c_str(),sBandBaseName.c_str(),"mpr" ));		
     }
 
     if (poDS->bNewDataset)  //for Create() function
@@ -1294,10 +1295,10 @@
 /************************************************************************/
 /*                             ILWISOpen()                             */
 /************************************************************************/
-void ILWISRasterBand::ILWISOpen( string pszFileName )
+void ILWISRasterBand::ILWISOpen( std::string pszFileName )
 {
-    string pszDataFile;
-    pszDataFile = string(CPLResetExtension( pszFileName.c_str(), "mp#" ));
+    std::string pszDataFile;
+    pszDataFile = std::string(CPLResetExtension( pszFileName.c_str(), "mp#" ));
     //both for reading and writing, the file must exist
 
 #ifdef WIN32
@@ -1313,11 +1314,11 @@
 /************************************************************************/
 /*                       GetILWISInfo()                                 */
 /************************************************************************/
-CPLErr ILWISRasterBand::GetILWISInfo(string pszFileName)
+CPLErr ILWISRasterBand::GetILWISInfo(std::string pszFileName)
 {
-    string domName = ReadElement("BaseMap", "Domain", pszFileName.c_str());
-    string pszBaseName = string(CPLGetBasename( domName.c_str() ));
-    string pszPath = string(CPLGetPath( pszFileName.c_str() ));
+    std::string domName = ReadElement("BaseMap", "Domain", pszFileName.c_str());
+    std::string pszBaseName = std::string(CPLGetBasename( domName.c_str() ));
+    std::string pszPath = std::string(CPLGetPath( pszFileName.c_str() ));
 		
     if (GetStoreType(pszFileName, psInfo.stStoreType) != CE_None)
     {
@@ -1356,7 +1357,7 @@
              || EQUAL(pszBaseName.c_str(),"none" )
              || EQUAL(pszBaseName.c_str(),"coordbuf") 
              || EQUAL(pszBaseName.c_str(),"binary") 
-             || EQUAL(pszBaseName.c_str(),"string") )
+             || EQUAL(pszBaseName.c_str(),"std::string") )
     {
         CPLError( CE_Failure, CPLE_AppDefined, 
                   "Unsupported ILWIS domain type.");
@@ -1364,10 +1365,10 @@
     }
     else
     {
-        string pszDomainName;
-        pszDomainName = string(CPLFormFilename(pszPath.c_str(),pszBaseName.c_str(),"dom" ));
+        std::string pszDomainName;
+        pszDomainName = std::string(CPLFormFilename(pszPath.c_str(),pszBaseName.c_str(),"dom" ));
 				
-        string domType = ReadElement("Domain", "Type", pszDomainName.c_str());
+        std::string domType = ReadElement("Domain", "Type", pszDomainName.c_str());
         if EQUAL(domType.c_str(),"domainvalue")  
             {
                 if (psInfo.stStoreType == stFloat)
@@ -1377,7 +1378,7 @@
                 psInfo.bValue = true; 
             }
         else if((!EQUAL(domType.c_str(),"domainbit")) 
-                && (!EQUAL(domType.c_str(),"domainstring")) 
+                && (!EQUAL(domType.c_str(),"domainstd::string")) 
                 && (!EQUAL(domType.c_str(),"domaincolor"))
                 && (!EQUAL(domType.c_str(),"domainbinary")) 
                 && (!EQUAL(domType.c_str(),"domaincoordBuf")) 
@@ -1395,7 +1396,7 @@
 		
     if (psInfo.bValue)
     {
-        string rangeString = ReadElement("BaseMap", "Range", pszFileName.c_str());
+        std::string rangeString = ReadElement("BaseMap", "Range", pszFileName.c_str());
         psInfo.vr = ValueRange(rangeString);
     }
     return CE_None;
@@ -1692,7 +1693,7 @@
     char *endptr;
     char *begin = const_cast<char*>(s);
 
-    // skip leading spaces; strtol will return 0 on a string with only spaces
+    // skip leading spaces; strtol will return 0 on a std::string with only spaces
     // which is not what we want
     while (isspace(*begin)) ++begin;
 
@@ -1709,7 +1710,7 @@
     return r;
 }
 
-ValueRange::ValueRange(string sRng)
+ValueRange::ValueRange(std::string sRng)
 {
     char* sRange = new char[sRng.length() + 1];
     for (unsigned int i = 0; i < sRng.length(); ++i)
@@ -1851,7 +1852,7 @@
     }
 }
 
-string ValueRange::ToString()
+std::string ValueRange::ToString()
 {
     char buffer[200];
     if (fabs(get_rLo()) > 1.0e20 || fabs(get_rHi()) > 1.0e20)
@@ -1860,7 +1861,7 @@
         sprintf(buffer, "%.*f:%.*f:%.*f:offset=%.0f", get_iDec(), get_rLo(), get_iDec(), get_rHi(), get_iDec(), get_rStep(), get_rRaw0());
     else
         sprintf(buffer, "%f:%f:%f:offset=%.0f", get_rLo(), get_rHi(), get_rStep(), get_rRaw0());
-    return string(buffer);
+    return std::string(buffer);
 }
 
 double ValueRange::rValue(int iRaw)

