Changeset 7317 for anuga_core/source/anuga/coordinate_transforms
- Timestamp:
- Jul 22, 2009, 9:22:11 AM (15 years ago)
- Location:
- anuga_core/source/anuga/coordinate_transforms
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/coordinate_transforms/geo_reference.py
r7276 r7317 14 14 ParsingError, ShapeError 15 15 from anuga.config import netcdf_float, netcdf_int, netcdf_float32 16 import anuga.utilities.log as log 16 17 17 18 import numpy as num … … 153 154 154 155 if self.false_easting != DEFAULT_FALSE_EASTING: 155 print "WARNING: False easting of %f specified." % self.false_easting 156 print "Default false easting is %f." % DEFAULT_FALSE_EASTING 157 print "ANUGA does not correct for differences in False Eastings." 156 log.critical("WARNING: False easting of %f specified." 157 % self.false_easting) 158 log.critical("Default false easting is %f." % DEFAULT_FALSE_EASTING) 159 log.critical("ANUGA does not correct for differences in " 160 "False Eastings.") 158 161 159 162 if self.false_northing != DEFAULT_FALSE_NORTHING: 160 print ("WARNING: False northing of %f specified." 161 % self.false_northing) 162 print "Default false northing is %f." % DEFAULT_FALSE_NORTHING 163 print "ANUGA does not correct for differences in False Northings." 163 log.critical("WARNING: False northing of %f specified." 164 % self.false_northing) 165 log.critical("Default false northing is %f." 166 % DEFAULT_FALSE_NORTHING) 167 log.critical("ANUGA does not correct for differences in " 168 "False Northings.") 164 169 165 170 if self.datum.upper() != DEFAULT_DATUM.upper(): 166 print "WARNING: Datum of %s specified." % self.datum167 print "Default Datum is %s." % DEFAULT_DATUM168 print "ANUGA does not correct for differences in datums."171 log.critical("WARNING: Datum of %s specified." % self.datum) 172 log.critical("Default Datum is %s." % DEFAULT_DATUM) 173 log.critical("ANUGA does not correct for differences in datums.") 169 174 170 175 if self.projection.upper() != DEFAULT_PROJECTION.upper(): 171 print "WARNING: Projection of %s specified." % self.projection 172 print "Default Projection is %s." % DEFAULT_PROJECTION 173 print "ANUGA does not correct for differences in Projection." 176 log.critical("WARNING: Projection of %s specified." 177 % self.projection) 178 log.critical("Default Projection is %s." % DEFAULT_PROJECTION) 179 log.critical("ANUGA does not correct for differences in " 180 "Projection.") 174 181 175 182 if self.units.upper() != DEFAULT_UNITS.upper(): 176 print "WARNING: Units of %s specified." % self.units177 print "Default units is %s." % DEFAULT_UNITS178 print "ANUGA does not correct for differences in units."183 log.critical("WARNING: Units of %s specified." % self.units) 184 log.critical("Default units is %s." % DEFAULT_UNITS) 185 log.critical("ANUGA does not correct for differences in units.") 179 186 180 187 ################################################################################ -
anuga_core/source/anuga/coordinate_transforms/lat_long_UTM_conversion.py
r4450 r7317 127 127 #UTMZone was originally returned here. I don't know what the 128 128 #letter at the end was for. 129 #print "UTMZone", UTMZone130 129 return (ZoneNumber, UTMEasting, UTMNorthing) 131 130 -
anuga_core/source/anuga/coordinate_transforms/redfearn.py
r6424 r7317 67 67 else: 68 68 K0 = scale_factor 69 #print 'scale', K070 69 zone_width = 6 #Degrees 71 70 -
anuga_core/source/anuga/coordinate_transforms/test_geo_reference.py
r7276 r7317 121 121 lofl = [[3.0,311.0], [677.0,6.0]] 122 122 new_lofl = g.change_points_geo_ref(lofl) 123 #print "lofl",lofl124 #print "new_lofl",new_lofl125 123 126 124 self.failUnless(type(new_lofl) == types.ListType, ' failed') … … 137 135 lofl = [[3.0,388.0]] 138 136 new_lofl = g.change_points_geo_ref(lofl) 139 #print "lofl",lofl140 #print "new_lofl",new_lofl141 137 142 138 self.failUnless(type(new_lofl) == types.ListType, ' failed') … … 152 148 lofl = [3.0,345.0] 153 149 new_lofl = g.change_points_geo_ref(lofl) 154 #print "lofl",lofl155 #print "new_lofl",new_lofl156 150 157 151 self.failUnless(type(new_lofl) == types.ListType, ' failed') … … 168 162 lofl = num.array([[3.0,323.0], [6.0,645.0]]) 169 163 new_lofl = g.change_points_geo_ref(lofl) 170 #print "4 lofl",lofl171 #print "4 new_lofl",new_lofl172 164 173 165 self.failUnless(isinstance(new_lofl, num.ndarray), ' failed') … … 183 175 lofl = num.array([[3.0,323.0]]) 184 176 185 186 #print "5 lofl before",lofl187 177 new_lofl = g.change_points_geo_ref(lofl.copy()) 188 #print "5 lofl",lofl189 #print "5 new_lofl",new_lofl190 178 191 179 self.failUnless(isinstance(new_lofl, num.ndarray), ' failed') … … 203 191 lofl = num.array([355.0,3.0]) 204 192 new_lofl = g.change_points_geo_ref(lofl.copy()) 205 #print "lofl",lofl206 #print "new_lofl",new_lofl207 193 208 194 self.failUnless(isinstance(new_lofl, num.ndarray), ' failed') … … 221 207 lofl = [[3.0,30.0], [67.0,6.0]] 222 208 new_lofl = g.change_points_geo_ref(lofl,points_geo_ref=points_geo_ref) 223 #print "lofl",lofl224 #print "new_lofl",new_lofl225 209 226 210 self.failUnless(type(new_lofl) == types.ListType, ' failed') -
anuga_core/source/anuga/coordinate_transforms/test_lat_long_UTM_conversion.py
r7276 r7317 57 57 lat = degminsec2decimal_degrees(-37,57,03.7203) 58 58 lon = degminsec2decimal_degrees(144,25,29.5244) 59 #print lat, lon60 59 61 60 zone, easting, northing = LLtoUTM(lat,lon) … … 77 76 78 77 zone, easting, northing = LLtoUTM(lat,lon) 79 #print zone, easting, northing80 78 81 79 assert zone == 52 … … 112 110 zone, easting, northing = LLtoUTM(lat,lon) 113 111 114 #print zone, easting, northing115 112 116 113 assert zone == 56 -
anuga_core/source/anuga/coordinate_transforms/test_redfearn.py
r7276 r7317 71 71 lat = degminsec2decimal_degrees(-37,57,03.7203) 72 72 lon = degminsec2decimal_degrees(144,25,29.5244) 73 #print lat, lon74 73 75 74 zone, easting, northing = redfearn(lat,lon) … … 86 85 87 86 zone, easting, northing = redfearn(lat,lon) 88 #print zone, easting, northing89 87 90 88 assert zone == 52 … … 116 114 117 115 zone, easting, northing = redfearn(lat,lon) 118 119 #print zone, easting, northing120 116 121 117 assert zone == 56 … … 452 448 points = [[lat_gong, lon_gong], [lat_2, lon_2]] 453 449 points, zone = convert_from_latlon_to_utm(points=points) 454 #print "points",points455 450 assert num.allclose(points[0][0], 308728.009) 456 451 assert num.allclose(points[0][1], 6180432.601)
Note: See TracChangeset
for help on using the changeset viewer.