Changeset 6400
- Timestamp:
- Feb 24, 2009, 4:49:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/coordinate_transforms/test_redfearn.py
r6149 r6400 122 122 123 123 def test_UTM_6_nonstandard_projection(self): 124 #Test 6 (Geraldton, WA) 125 126 #First test native projection (zone 50) 124 """test_UTM_6_nonstandard_projection 125 126 Test that projections can be forced to 127 use other than native zone. 128 129 Data is from Geraldton, WA 130 """ 131 132 133 # First test native projection (zone 50) 127 134 zone, easting, northing = redfearn(-29.233299999,114.05) 128 135 … … 131 138 assert num.allclose(northing, 6762559.15978) 132 139 133 # Testing using the native zone140 # Testing using the native zone 134 141 zone, easting, northing = redfearn(-29.233299999,114.05, zone=50) 135 142 … … 138 145 assert num.allclose(northing, 6762559.15978) 139 146 140 # Then project to zone 49147 # Then project to zone 49 141 148 zone, easting, northing = redfearn(-29.233299999,114.05,zone=49) 142 149 … … 147 154 148 155 149 150 151 #First test native projection (zone 49) 156 # First test native projection (zone 49) 152 157 zone, easting, northing = redfearn(-29.1333,113.9667) 153 158 … … 156 161 assert num.allclose(northing, 6773605.46384) 157 162 158 # Then project to zone 50163 # Then project to zone 50 159 164 zone, easting, northing = redfearn(-29.1333,113.9667,zone=50) 160 165 … … 163 168 assert num.allclose(northing, 6773440.04726) 164 169 165 # Testing point on zone boundary166 # First test native projection (zone 50)170 # Testing point on zone boundary 171 # First test native projection (zone 50) 167 172 zone, easting, northing = redfearn(-29.1667,114) 168 173 … … 171 176 assert num.allclose(northing, 6769820.01453) 172 177 173 # Then project to zone 49178 # Then project to zone 49 174 179 zone, easting, northing = redfearn(-29.1667,114,zone=49) 175 180 … … 178 183 assert num.allclose(northing, 6769820.01453) 179 184 180 # Testing furthest point in Geraldton scenario)181 # First test native projection (zone 49)185 # Testing furthest point in Geraldton scenario) 186 # First test native projection (zone 49) 182 187 zone, easting, northing = redfearn(-28.2167,113.4167) 183 188 … … 186 191 assert num.allclose(northing, 6876426.38578) 187 192 188 # Then project to zone 50193 # Then project to zone 50 189 194 zone, easting, northing = redfearn(-28.2167,113.4167,zone=50) 190 195 … … 193 198 assert num.allclose(northing, 6873587.50926) 194 199 195 # Testing outside GDA zone (New Zeland)196 # First test native projection (zone 60)200 # Testing outside GDA zone (New Zeland) 201 # First test native projection (zone 60) 197 202 zone, easting, northing = redfearn(-44,178) 198 203 … … 201 206 assert num.allclose(northing, 5127641.114461) 202 207 203 # Then project to zone 59208 # Then project to zone 59 204 209 zone, easting, northing = redfearn(-44,178,zone=59) 205 210 … … 208 213 assert num.allclose(northing, 5104249.395469) 209 214 210 # Then skip three zones 57 (native 60)215 # Then skip three zones 57 (native 60) 211 216 zone, easting, northing = redfearn(-44,178,zone=57) 212 217 … … 223 228 # Google Earth (he he) 224 229 225 # Testing outside GDA zone (Northern Hemisphere)226 # First test native projection (zone 57)230 # Testing outside GDA zone (Northern Hemisphere) 231 # First test native projection (zone 57) 227 232 zone, easting, northing = redfearn(44,156) 228 233 … … 237 242 #assert num.allclose(northing, 14876249.1268) 238 243 239 # Then project to zone 56244 # Then project to zone 56 240 245 zone, easting, northing = redfearn(44,156,zone=56) 241 246 … … 267 272 # #assert allclose(northing, 6181725.1724276) 268 273 274 275 def test_nonstandard_meridian(self): 276 """test_nonstandard_meridian 277 278 This test will verify that redfearn can be used to project 279 points using an arbitrary central meridian. 280 """ 281 282 283 # FIXME: To do using csv file 284 pass 285 286 287 # The file projection_test_points.csv contains 10 points 288 # which straddle the boundary between UTM zones 53 and 54. 289 # They have been projected using a central meridian of 137.5 290 # degrees (the boundary is 138 so it is pretty much right 291 # in the middle of zones 53 and 54). 292 293 294 295 296 269 297 def test_convert_lats_longs(self): 270 298
Note: See TracChangeset
for help on using the changeset viewer.