Changeset 6400


Ignore:
Timestamp:
Feb 24, 2009, 4:49:08 PM (15 years ago)
Author:
ole
Message:

Added data from Leharne for use with arbitrary meridian.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/coordinate_transforms/test_redfearn.py

    r6149 r6400  
    122122
    123123    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)
    127134        zone, easting, northing = redfearn(-29.233299999,114.05)
    128135
     
    131138        assert num.allclose(northing, 6762559.15978)
    132139
    133         #Testing using the native zone
     140        # Testing using the native zone
    134141        zone, easting, northing = redfearn(-29.233299999,114.05, zone=50)
    135142
     
    138145        assert num.allclose(northing, 6762559.15978)
    139146
    140         #Then project to zone 49
     147        # Then project to zone 49
    141148        zone, easting, northing = redfearn(-29.233299999,114.05,zone=49)
    142149
     
    147154       
    148155
    149        
    150 
    151         #First test native projection (zone 49)
     156        # First test native projection (zone 49)
    152157        zone, easting, northing = redfearn(-29.1333,113.9667)
    153158
     
    156161        assert num.allclose(northing, 6773605.46384)
    157162
    158         #Then project to zone 50
     163        # Then project to zone 50
    159164        zone, easting, northing = redfearn(-29.1333,113.9667,zone=50)
    160165
     
    163168        assert num.allclose(northing, 6773440.04726)
    164169
    165         #Testing point on zone boundary
    166         #First test native projection (zone 50)
     170        # Testing point on zone boundary
     171        # First test native projection (zone 50)
    167172        zone, easting, northing = redfearn(-29.1667,114)
    168173
     
    171176        assert num.allclose(northing, 6769820.01453)
    172177
    173         #Then project to zone 49
     178        # Then project to zone 49
    174179        zone, easting, northing = redfearn(-29.1667,114,zone=49)
    175180
     
    178183        assert num.allclose(northing, 6769820.01453)
    179184
    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)
    182187        zone, easting, northing = redfearn(-28.2167,113.4167)
    183188
     
    186191        assert num.allclose(northing, 6876426.38578)
    187192
    188         #Then project to zone 50
     193        # Then project to zone 50
    189194        zone, easting, northing = redfearn(-28.2167,113.4167,zone=50)
    190195
     
    193198        assert num.allclose(northing, 6873587.50926)
    194199
    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)
    197202        zone, easting, northing = redfearn(-44,178)
    198203
     
    201206        assert num.allclose(northing, 5127641.114461)
    202207
    203         #Then project to zone 59
     208        # Then project to zone 59
    204209        zone, easting, northing = redfearn(-44,178,zone=59)
    205210
     
    208213        assert num.allclose(northing, 5104249.395469)
    209214
    210         #Then skip three zones 57 (native 60)
     215        # Then skip three zones 57 (native 60)
    211216        zone, easting, northing = redfearn(-44,178,zone=57)
    212217
     
    223228        # Google Earth (he he)
    224229       
    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)
    227232        zone, easting, northing = redfearn(44,156)
    228233
     
    237242        #assert num.allclose(northing, 14876249.1268)
    238243       
    239         #Then project to zone 56
     244        # Then project to zone 56
    240245        zone, easting, northing = redfearn(44,156,zone=56)
    241246
     
    267272    #    #assert allclose(northing, 6181725.1724276)
    268273
     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
    269297    def test_convert_lats_longs(self):
    270298
Note: See TracChangeset for help on using the changeset viewer.