35 #include <ogr_spatialref.h>
36 #include <cpl_error.h>
46 #define OM_WGS84 "GEOGCS[\"WGS84\", DATUM[\"WGS84\", \
47 SPHEROID[\"WGS84\", 6378137.0, 298.257223563]], \
48 PRIMEM[\"Greenwich\", 0.0], \
49 UNIT[\"degree\",0.017453292519943295], \
50 AXIS[\"Longitude\",EAST], AXIS[\"Latitude\",NORTH]]"
76 change( dst_desc, src_desc );
117 OGRSpatialReference src, dst;
127 char * src_desc_noconst =
const_cast<char*
>(src_desc.c_str());
128 char * dst_desc_noconst =
const_cast<char*
>(dst_desc.c_str());
130 if ( src.importFromWkt( &src_desc_noconst ) != OGRERR_NONE ||
131 dst.importFromWkt( &dst_desc_noconst ) != OGRERR_NONE )
133 std::string msg =
"Invalid GeoTransform projection:\n src (";
134 msg += src_desc.c_str();
136 msg += dst_desc.c_str();
142 f_ctin = OGRCreateCoordinateTransformation( &src, &dst );
146 std::string msg =
"Invalid GeoTransform projection:\n src (";
147 msg += src_desc.c_str();
149 msg += dst_desc.c_str();
155 f_ctout = OGRCreateCoordinateTransformation( &dst, &src );
159 std::string msg =
"Invalid GeoTransform projection:\n src (";
160 msg += src_desc.c_str();
162 msg += dst_desc.c_str();
192 #ifndef GEO_TRANSFORMATIONS_OFF
193 return f_ctin->Transform( 1, x, y );
204 double x0,
double y0 )
const
211 #ifndef GEO_TRANSFORMATIONS_OFF
212 return f_ctin->Transform( 1, x, y );
226 #ifndef GEO_TRANSFORMATIONS_OFF
227 return f_ctout->Transform( 1, x, y );
238 double x0,
double y0 )
const
245 #ifndef GEO_TRANSFORMATIONS_OFF
246 return f_ctout->Transform( 1, x, y );
268 while (s1[i] ==
' ') i++;
269 while (s2[j] ==
' ') j++;
271 if (s1[i] != s2[j]) {
279 while (s2[j] ==
' ') j++;
282 return (s1[i] == s2[j]);
static Log * instance()
Returns the instance pointer, creating the object on the first call.
void error(const char *format,...)
'Error' level.
void info(const char *format,...)
'Info' level.