Changeset 13868
- Timestamp:
- 02/23/08 17:33:56 (3 months ago)
- Files:
-
- trunk/gdal/ogr/ogr_spatialref.h (modified) (1 diff)
- trunk/gdal/ogr/ogr_srs_api.h (modified) (4 diffs)
- trunk/gdal/ogr/ogr_srs_proj4.cpp (modified) (2 diffs)
- trunk/gdal/ogr/ogrspatialreference.cpp (modified) (3 diffs)
- trunk/gdal/swig/include/osr.i (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/gdal/ogr/ogr_spatialref.h
r13482 r13868 307 307 double dfFalseEasting, double dfFalseNorthing ); 308 308 309 /** Equidistant Cylindrical Sphere */310 OGRErr SetEquidistantCylindricalSphere(double dfCenterLat, double dfCenterLong,311 double dfScale,312 double dfFalseEasting, double dfFalseNorthing );313 314 309 /** Equirectangular */ 315 310 OGRErr SetEquirectangular(double dfCenterLat, double dfCenterLong, 316 311 double dfFalseEasting, double dfFalseNorthing ); 312 /** Equirectangular generalized form : */ 313 OGRErr SetEquirectangular2( double dfCenterLat, double dfCenterLong, 314 double dfPseudoStdParallel1, 315 double dfFalseEasting, double dfFalseNorthing ); 317 316 318 317 /** Geostationary Satellite */ trunk/gdal/ogr/ogr_srs_api.h
r13719 r13868 97 97 #define SRS_PT_EQUIDISTANT_CONIC \ 98 98 "Equidistant_Conic" 99 #define SRS_PT_EQUIDISTANT_CYLINDRICAL_SHERE \100 "Equidistant_Cylindrical_Sphere"101 99 #define SRS_PT_EQUIRECTANGULAR "Equirectangular" 102 100 #define SRS_PT_GALL_STEREOGRAPHIC \ … … 392 390 double dfFalseEasting, double dfFalseNorthing ); 393 391 394 /** Equidistant Cylindrical Sphere */395 OGRErr CPL_DLL OSRSetEquidistantCylindricalSphere( OGRSpatialReferenceH hSRS,396 double dfCenterLat, double dfCenterLong,397 double dfScale,398 double dfFalseEasting,399 double dfFalseNorthing );400 401 392 /** Eckert I-VI */ 402 393 OGRErr CPL_DLL OSRSetEckert( OGRSpatialReferenceH hSRS, int nVariation, … … 417 408 double dfFalseEasting, double dfFalseNorthing ); 418 409 410 /** Equirectangular generalized form */ 411 OGRErr CPL_DLL OSRSetEquirectangular2( OGRSpatialReferenceH hSRS, 412 double dfCenterLat, double dfCenterLong, 413 double dfPseudoStdParallel1, 414 double dfFalseEasting, 415 double dfFalseNorthing ); 416 419 417 /** Gall Stereograpic */ 420 418 OGRErr CPL_DLL OSRSetGS( OGRSpatialReferenceH hSRS, double dfCentralMeridian, … … 430 428 double dfFalseEasting, double dfFalseNorthing ); 431 429 432 /** Gauss LabordeReunion */430 /** Gauss Laborde Reunion */ 433 431 OGRErr CPL_DLL OSRSetGaussLabordeReunion( OGRSpatialReferenceH hSRS, 434 432 double dfCenterLat, double dfCenterLong, trunk/gdal/ogr/ogr_srs_proj4.cpp
r13719 r13868 490 490 else if( EQUAL(pszProj,"eqc") ) 491 491 { 492 SetEquirectangular( OSR_GDV( papszNV, "lat_ts", 0.0 ), 493 OSR_GDV( papszNV, "lon_0", 0.0 ), 494 OSR_GDV( papszNV, "x_0", 0.0 ), 495 OSR_GDV( papszNV, "y_0", 0.0 ) ); 496 } 497 498 else if( EQUAL(pszProj,"eqr") ) 499 { 500 SetEquidistantCylindricalSphere( OSR_GDV( papszNV, "lat_ts", 0.0 ), 501 OSR_GDV( papszNV, "lon_0", 0.0 )+dfFromGreenwich, 502 OSR_GDV( papszNV, "k_0", 6378137.0 ), 503 OSR_GDV( papszNV, "x_0", 0.0 ), 504 OSR_GDV( papszNV, "y_0", 0.0 ) ); 492 if( OSR_GDV( papszNV, "lat_0", 0.0 ) != OSR_GDV( papszNV, "lat_ts", 0.0 ) ) 493 SetEquirectangular2( OSR_GDV( papszNV, "lat_0", 0.0 ), 494 OSR_GDV( papszNV, "lon_0", 0.0 )+dfFromGreenwich, 495 OSR_GDV( papszNV, "lat_ts", 0.0 ), 496 OSR_GDV( papszNV, "x_0", 0.0 ), 497 OSR_GDV( papszNV, "y_0", 0.0 ) ); 498 else 499 SetEquirectangular( OSR_GDV( papszNV, "lat_ts", 0.0 ), 500 OSR_GDV( papszNV, "lon_0", 0.0 )+dfFromGreenwich, 501 OSR_GDV( papszNV, "x_0", 0.0 ), 502 OSR_GDV( papszNV, "y_0", 0.0 ) ); 505 503 } 506 504 … … 1229 1227 } 1230 1228 1231 else if( EQUAL(pszProjection,SRS_PT_EQUIDISTANT_CYLINDRICAL_SHERE) )1232 {1233 sprintf( szProj4+strlen(szProj4),1234 "+proj=eqr +lat_ts=%.16g +lon_0=%.16g +k_0=%.16g +x_0=%.16g +y_0=%.16g ",1235 GetNormProjParm(SRS_PP_LATITUDE_OF_ORIGIN,0.0),1236 GetNormProjParm(SRS_PP_CENTRAL_MERIDIAN,0.0),1237 GetNormProjParm(SRS_PP_SCALE_FACTOR,6378137.0),1238 GetNormProjParm(SRS_PP_FALSE_EASTING,0.0),1239 GetNormProjParm(SRS_PP_FALSE_NORTHING,0.0) );1240 }1241 1242 1229 else if( EQUAL(pszProjection,SRS_PT_EQUIRECTANGULAR) ) 1243 1230 { 1244 1231 sprintf( szProj4+strlen(szProj4), 1245 "+proj=eqc +lat_ts=%.16g +lon_0=%.16g +x_0=%.16g +y_0=%.16g ", 1232 "+proj=eqc +lat_ts=%.16g +lat_0=%.16g +lon_0=%.16g +x_0=%.16g +y_0=%.16g ", 1233 GetNormProjParm(SRS_PP_PSEUDO_STD_PARALLEL_1, 1234 GetNormProjParm(SRS_PP_LATITUDE_OF_ORIGIN,0.0)), 1246 1235 GetNormProjParm(SRS_PP_LATITUDE_OF_ORIGIN,0.0), 1247 1236 GetNormProjParm(SRS_PP_CENTRAL_MERIDIAN,0.0), trunk/gdal/ogr/ogrspatialreference.cpp
r13859 r13868 3197 3197 3198 3198 /************************************************************************/ 3199 /* SetEquidistantCylindricalSphere() */3200 /************************************************************************/3201 3202 OGRErr OGRSpatialReference::SetEquidistantCylindricalSphere(3203 double dfCenterLat, double dfCenterLong,3204 double dfScale,3205 double dfFalseEasting,3206 double dfFalseNorthing )3207 3208 {3209 SetProjection( SRS_PT_EQUIDISTANT_CYLINDRICAL_SHERE );3210 SetNormProjParm( SRS_PP_LATITUDE_OF_ORIGIN, dfCenterLat );3211 SetNormProjParm( SRS_PP_CENTRAL_MERIDIAN, dfCenterLong );3212 SetNormProjParm( SRS_PP_SCALE_FACTOR, dfScale );3213 SetNormProjParm( SRS_PP_FALSE_EASTING, dfFalseEasting );3214 SetNormProjParm( SRS_PP_FALSE_NORTHING, dfFalseNorthing );3215 3216 return OGRERR_NONE;3217 }3218 3219 /************************************************************************/3220 /* OSRSetEquidistantCylindricalSphere() */3221 /************************************************************************/3222 3223 OGRErr OSRSetEquidistantCylindricalSphere( OGRSpatialReferenceH hSRS,3224 double dfCenterLat, double dfCenterLong,3225 double dfScale,3226 double dfFalseEasting,3227 double dfFalseNorthing )3228 3229 {3230 return ((OGRSpatialReference *) hSRS)->SetEquidistantCylindricalSphere(3231 dfCenterLat, dfCenterLong, dfScale,3232 dfFalseEasting, dfFalseNorthing );3233 }3234 3235 /************************************************************************/3236 3199 /* SetEquirectangular() */ 3237 3200 /************************************************************************/ … … 3248 3211 SetNormProjParm( SRS_PP_FALSE_EASTING, dfFalseEasting ); 3249 3212 SetNormProjParm( SRS_PP_FALSE_NORTHING, dfFalseNorthing ); 3213 SetNormProjParm( SRS_PP_PSEUDO_STD_PARALLEL_1, dfCenterLat ); 3250 3214 3251 3215 return OGRERR_NONE; … … 3266 3230 return ((OGRSpatialReference *) hSRS)->SetEquirectangular( 3267 3231 dfCenterLat, dfCenterLong, 3232 dfFalseEasting, dfFalseNorthing ); 3233 } 3234 3235 /************************************************************************/ 3236 /* SetEquirectangular2() */ 3237 /* Generalized form */ 3238 /************************************************************************/ 3239 3240 OGRErr OGRSpatialReference::SetEquirectangular2( 3241 double dfCenterLat, double dfCenterLong, 3242 double dfPseudoStdParallel1, 3243 double dfFalseEasting, 3244 double dfFalseNorthing ) 3245 3246 { 3247 SetProjection( SRS_PT_EQUIRECTANGULAR ); 3248 SetNormProjParm( SRS_PP_LATITUDE_OF_ORIGIN, dfCenterLat ); 3249 SetNormProjParm( SRS_PP_CENTRAL_MERIDIAN, dfCenterLong ); 3250 SetNormProjParm( SRS_PP_FALSE_EASTING, dfFalseEasting ); 3251 SetNormProjParm( SRS_PP_FALSE_NORTHING, dfFalseNorthing ); 3252 SetNormProjParm( SRS_PP_PSEUDO_STD_PARALLEL_1, dfPseudoStdParallel1 ); 3253 3254 return OGRERR_NONE; 3255 } 3256 3257 /************************************************************************/ 3258 /* OSRSetEquirectangular2() */ 3259 /************************************************************************/ 3260 3261 OGRErr OSRSetEquirectangular2( OGRSpatialReferenceH hSRS, 3262 double dfCenterLat, double dfCenterLong, 3263 double dfPseudoStdParallel1, 3264 double dfFalseEasting, 3265 double dfFalseNorthing ) 3266 3267 { 3268 VALIDATE_POINTER1( hSRS, "OSRSetEquirectangular", CE_Failure ); 3269 3270 return ((OGRSpatialReference *) hSRS)->SetEquirectangular2( 3271 dfCenterLat, dfCenterLong, 3272 dfPseudoStdParallel1, 3268 3273 dfFalseEasting, dfFalseNorthing ); 3269 3274 } trunk/gdal/swig/include/osr.i
r13719 r13868 54 54 %constant char *SRS_PT_ECKERT_VI = SRS_PT_ECKERT_VI; 55 55 %constant char *SRS_PT_EQUIDISTANT_CONIC = SRS_PT_EQUIDISTANT_CONIC; 56 %constant char *SRS_PT_EQUIDISTANT_CYLINDRICAL_SHERE = SRS_PT_EQUIDISTANT_CYLINDRICAL_SHERE;57 56 %constant char *SRS_PT_EQUIRECTANGULAR = SRS_PT_EQUIRECTANGULAR; 58 57 %constant char *SRS_PT_GALL_STEREOGRAPHIC = SRS_PT_GALL_STEREOGRAPHIC; … … 452 451 } 453 452 454 %feature( "kwargs" ) SetEquidistantCylindricalSphere; 455 OGRErr SetEquidistantCylindricalSphere( double clat, double clong, double sc, double fe, double fn ) { 456 return OSRSetEquidistantCylindricalSphere( self, clat, clong, sc, fe, fn ); 453 %feature( "kwargs" ) SetEquirectangular2; 454 OGRErr SetEquirectangular2( double clat, double clong, 455 double pseudostdparallellat, 456 double fe, double fn ) { 457 return OSRSetEquirectangular2( self, clat, clong, 458 pseudostdparallellat, 459 fe, fn ); 457 460 } 458 461
