Changeset a8dd8b9 in tol
- Timestamp:
- Jan 2, 2010, 4:16:42 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 7618682
- Parents:
- d0fc203
- File:
-
- 1 edited
-
tol_pkg/GisTools/GisTools.tol (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol_pkg/GisTools/GisTools.tol
rd0fc203 ra8dd8b9 67 67 68 68 //////////////////////////////////////////////////////////////////////////// 69 Real initiali ce(Real void)69 Real initialize(Real void) 70 70 //////////////////////////////////////////////////////////////////////////// 71 71 { … … 119 119 Real _.b = b 120 120 ]]; 121 Real aux::initiali ce(?);121 Real aux::initialize(?); 122 122 Eval(name+"=aux") 123 123 }; … … 189 189 VMatrix lonlat, //Matrix with two columns, first one is longitud, second 190 190 //one is latitude, both meassured in in radians 191 Real zone) //UTMzone191 VMatrix lonZone) //UTM longitud zone 192 192 //////////////////////////////////////////////////////////////////////////// 193 193 { 194 194 //Central meridian of zone 195 Real long0 = (6*zone-183)*deg2rad;195 VMatrix long0 = (lonZone*6-183)*deg2rad; 196 196 //longitude of points 197 VMatrix long = ASin(Sin(SubCol(lonlat,[[1]])));197 VMatrix long = SubCol(lonlat,[[1]]); 198 198 //latitude of points 199 VMatrix lat = ASin(Sin(SubCol(lonlat,[[2]])));199 VMatrix lat = SubCol(lonlat,[[2]]); 200 200 Real e2 = _.e^2; 201 201 VMatrix e2sinlat2_1 = -(Sin(lat)^2)*e2+1; … … 247 247 VMatrix lonlat, //Matrix with two columns, first one is longitud, second 248 248 //one is latitude, both meassured in degrees 249 Real zone) //UTMzone250 //////////////////////////////////////////////////////////////////////////// 251 { 252 rad2utm(lonlat*deg2rad, zone)249 VMatrix lonZone) //UTM longitud zone 250 //////////////////////////////////////////////////////////////////////////// 251 { 252 rad2utm(lonlat*deg2rad,lonZone) 253 253 }; 254 254 … … 258 258 VMatrix utm2rad( 259 259 VMatrix xy, //Matrix with two columns 260 Real zone) //UTM zone 261 //////////////////////////////////////////////////////////////////////////// 262 { 260 VMatrix lonZone, //UTM longitud zone 261 VMatrix latZone) //UTM latitud zone 262 //////////////////////////////////////////////////////////////////////////// 263 { 264 //WriteLn("TRACE zone="<<zone); 263 265 //Central meridian of zone 264 Real long0 = (6*zone-183)*deg2rad; 266 VMatrix long0 = (lonZone*6-183)*deg2rad; 267 //WriteLn("TRACE long0="<<long0); 265 268 //easting of points 266 269 VMatrix x = SubCol(xy,[[1]])-500000; 267 270 //northing of points 268 VMatrix y = SubCol(xy,[[2]]); 271 VMatrix isSouthern = LT(latZone,latZone*0); 272 VMatrix y = 273 { 274 VMatrix aux = SubCol(xy,[[2]]); 275 IfVMat(isSouthern,-aux+1.E+7,aux) 276 }; 269 277 Real e2 = _.e^2; 270 278 Real e4 = _.e^4; … … 287 295 VMatrix sinfp = Sin(fp); 288 296 VMatrix cosfp = Cos(fp); 289 VMatrix tanfp = sinfp$/cosfp;297 VMatrix tanfp = Tan(fp); 290 298 VMatrix C1 = (cosfp^2)*_.e.2; 291 299 //WriteLn("TRACE C1="<<VMat2Mat(C1)); … … 317 325 VMatrix long = (Q5 - Q6 + Q7)$/cosfp+long0; 318 326 //WriteLn("TRACE long="<<VMat2Mat(long)); 319 long | lat327 long | IfVMat(isSouthern,-lat,lat) 320 328 }; 321 329 //////////////////////////////////////////////////////////////////////////// … … 324 332 VMatrix utm2deg( 325 333 VMatrix xy, //Matrix with two columns 326 Real zone) //UTM zone 327 //////////////////////////////////////////////////////////////////////////// 328 { 329 utm2rad(xy,zone)/deg2rad 334 VMatrix lonZone, //UTM longitud zone 335 VMatrix latZone) //UTM latitud zone 336 //////////////////////////////////////////////////////////////////////////// 337 { 338 utm2rad(xy,lonZone,latZone)/deg2rad 330 339 } 331 340 }; … … 643 652 644 653 654 655
Note: See TracChangeset
for help on using the changeset viewer.
