Manage station location data.

class watex.site.Location(lat=None, lon=None, **kwds)[source]#

Bases: object

Location class

Assert, convert coordinates lat/lon , east/north to approprite format

Parameters:
  • lat (float or string (DD:MM:SS.ms)) – latitude of point

  • lon (float or string (DD:MM:SS.ms)) – longitude of point

  • east (float) – easting coordinate in meters

  • north (float) – northing coordinate in meters

  • datum (string) – well known datum ex. WGS84, NAD27, NAD83, etc.

  • utm_zone (Optional, string) – zone number and ‘S’ or ‘N’ e.g. ‘55S’. Defaults to the centre point of the provided points

  • epsg (Optional, int) – epsg number defining projection (see http://spatialreference.org/ref/ for moreinfo) Overrides utm_zone if both are provided

  • reference_ellipsoid (Optional, int) – reference ellipsoids is derived from Peter H. Dana’s website- http://www.utexas.edu/depts/grg/gcraft/notes/datum/elist.html Department of Geography, University of Texas at Austin Internet: pdana@mail.utexas.edu . Default is 23 constrained to WGS84.

property east#
property elev#
property lat#
property lon#
property north#
to_latlon(east=None, north=None, utm_zone=None, reference_ellipsoid=None, datum=None)[source]#

Project coodinate on longitude latitude once data are utm at given reference ellispoid constrained to WGS-84 by default.

Parameters:
  • east (float) – easting coordinate in meters

  • north (float) – northing coordinate in meters

  • utm_zone (Optional, string (##N or ##S)) – utm zone in the form of number and North or South hemisphere, 10S or 03N

  • datum (Optional, string) – well known datum ex. WGS84, NAD27, etc.

  • reference_ellipsoid (Optional, int) – reference ellipsoids is derived from Peter H. Dana’s website- http://www.utexas.edu/depts/grg/gcraft/notes/datum/elist.html Department of Geography, University of Texas at Austin Internet: pdana@mail.utexas.edu . Default is 23 constrained to WGS84.

Returns:

proj_point – projected point in lat and lon in Datum, as decimal degrees.

Return type:

tuple(lat, lon)

to_utm(lat=None, lon=None, datum=None, utm_zone=None, epsg=None, reference_ellipsoid=None)[source]#

Project coordinates to utm if coordinates are in degrees at given reference ellipsoid constrained to WGS84 by default.

Parameters:
  • lat (float or string (DD:MM:SS.ms)) – latitude of point

  • lon (float or string (DD:MM:SS.ms)) – longitude of point

  • datum (string) – well known datum ex. WGS84, NAD27, NAD83, etc.

  • utm_zone (Optional, string) – zone number and ‘S’ or ‘N’ e.g. ‘55S’. Defaults to the centre point of the provided points

  • epsg (Optional, int) – epsg number defining projection (see http://spatialreference.org/ref/ for moreinfo) Overrides utm_zone if both are provided

  • reference_ellipsoid (Optional, int) – reference ellipsoids is derived from Peter H. Dana’s website- http://www.utexas.edu/depts/grg/gcraft/notes/datum/elist.html Department of Geography, University of Texas at Austin Internet: pdana@mail.utexas.edu . Default is 23 constrained to WGS84.

Returns:

proj_point – projected point in UTM in Datum

Return type:

tuple(easting, northing, zone)

property utm_zone#