Ticket #2134: gdal-1.6.0-ogrspatialreference-20080223.patch
| File gdal-1.6.0-ogrspatialreference-20080223.patch, 4.7 kB (added by dgrichard, 3 months ago) |
|---|
-
gdal-trunk/ogr/ogrspatialreference.cpp
old new 3196 3196 } 3197 3197 3198 3198 /************************************************************************/ 3199 /* SetEqui distantCylindricalSphere()*/3199 /* SetEquirectangular() */ 3200 3200 /************************************************************************/ 3201 3201 3202 OGRErr OGRSpatialReference::SetEqui distantCylindricalSphere(3202 OGRErr OGRSpatialReference::SetEquirectangular( 3203 3203 double dfCenterLat, double dfCenterLong, 3204 double dfScale,3205 3204 double dfFalseEasting, 3206 3205 double dfFalseNorthing ) 3207 3206 3208 3207 { 3209 SetProjection( SRS_PT_EQUI DISTANT_CYLINDRICAL_SHERE);3208 SetProjection( SRS_PT_EQUIRECTANGULAR ); 3210 3209 SetNormProjParm( SRS_PP_LATITUDE_OF_ORIGIN, dfCenterLat ); 3211 3210 SetNormProjParm( SRS_PP_CENTRAL_MERIDIAN, dfCenterLong ); 3212 SetNormProjParm( SRS_PP_SCALE_FACTOR, dfScale );3213 3211 SetNormProjParm( SRS_PP_FALSE_EASTING, dfFalseEasting ); 3214 3212 SetNormProjParm( SRS_PP_FALSE_NORTHING, dfFalseNorthing ); 3213 SetNormProjParm( SRS_PP_PSEUDO_STD_PARALLEL_1, dfCenterLat ); 3215 3214 3216 3215 return OGRERR_NONE; 3217 3216 } 3218 3217 3219 3218 /************************************************************************/ 3220 /* OSRSetEqui distantCylindricalSphere()*/3219 /* OSRSetEquirectangular() */ 3221 3220 /************************************************************************/ 3222 3221 3223 OGRErr OSRSetEquidistantCylindricalSphere( OGRSpatialReferenceH hSRS, 3224 double dfCenterLat, double dfCenterLong, 3225 double dfScale, 3226 double dfFalseEasting, 3227 double dfFalseNorthing ) 3228 3222 OGRErr OSRSetEquirectangular( OGRSpatialReferenceH hSRS, 3223 double dfCenterLat, double dfCenterLong, 3224 double dfFalseEasting, 3225 double dfFalseNorthing ) 3226 3229 3227 { 3230 return ((OGRSpatialReference *) hSRS)->SetEquidistantCylindricalSphere( 3231 dfCenterLat, dfCenterLong, dfScale, 3228 VALIDATE_POINTER1( hSRS, "OSRSetEquirectangular", CE_Failure ); 3229 3230 return ((OGRSpatialReference *) hSRS)->SetEquirectangular( 3231 dfCenterLat, dfCenterLong, 3232 3232 dfFalseEasting, dfFalseNorthing ); 3233 3233 } 3234 3234 3235 3235 /************************************************************************/ 3236 /* SetEquirectangular() */ 3236 /* SetEquirectangular2() */ 3237 /* Generalized form */ 3237 3238 /************************************************************************/ 3238 3239 3239 OGRErr OGRSpatialReference::SetEquirectangular (3240 OGRErr OGRSpatialReference::SetEquirectangular2( 3240 3241 double dfCenterLat, double dfCenterLong, 3242 double dfPseudoStdParallel1, 3241 3243 double dfFalseEasting, 3242 3244 double dfFalseNorthing ) 3243 3245 … … 3247 3249 SetNormProjParm( SRS_PP_CENTRAL_MERIDIAN, dfCenterLong ); 3248 3250 SetNormProjParm( SRS_PP_FALSE_EASTING, dfFalseEasting ); 3249 3251 SetNormProjParm( SRS_PP_FALSE_NORTHING, dfFalseNorthing ); 3252 SetNormProjParm( SRS_PP_PSEUDO_STD_PARALLEL_1, dfPseudoStdParallel1 ); 3250 3253 3251 3254 return OGRERR_NONE; 3252 3255 } 3253 3256 3254 3257 /************************************************************************/ 3255 /* OSRSetEquirectangular ()*/3258 /* OSRSetEquirectangular2() */ 3256 3259 /************************************************************************/ 3257 3260 3258 OGRErr OSRSetEquirectangular( OGRSpatialReferenceH hSRS, 3259 double dfCenterLat, double dfCenterLong, 3260 double dfFalseEasting, 3261 double dfFalseNorthing ) 3261 OGRErr OSRSetEquirectangular2( OGRSpatialReferenceH hSRS, 3262 double dfCenterLat, double dfCenterLong, 3263 double dfPseudoStdParallel1, 3264 double dfFalseEasting, 3265 double dfFalseNorthing ) 3262 3266 3263 3267 { 3264 3268 VALIDATE_POINTER1( hSRS, "OSRSetEquirectangular", CE_Failure ); 3265 3269 3266 return ((OGRSpatialReference *) hSRS)->SetEquirectangular (3270 return ((OGRSpatialReference *) hSRS)->SetEquirectangular2( 3267 3271 dfCenterLat, dfCenterLong, 3272 dfPseudoStdParallel1, 3268 3273 dfFalseEasting, dfFalseNorthing ); 3269 3274 } 3270 3275
