pepys_import.core.formats package

Submodules

pepys_import.core.formats.file_data module

pepys_import.core.formats.location module

class pepys_import.core.formats.location.Location(errors=None, error_type=None)[source]

Bases: object

check_valid()[source]

Checks whether the location is valid (ie. has both a latitude and a longitude)

Returns

Validity

Return type

Boolean

convert_point()[source]
Returns formatted latitude and longitude values. The format is as follows:

DD(D) MM SS.SS H (Degrees Minutes Seconds Hemisphere)

decimal_degrees_to_degrees_minutes_seconds()[source]

Converts decimal degrees of latitude and longitude values to degrees, minutes, and seconds

classmethod from_geometry(geom)[source]
property latitude

Returns the latitude of the Location object, in decimal degrees

Returns

Latitude

Return type

float

property longitude

Returns the longitude of the Location object, in decimal degrees

Returns

Longitude

Return type

float

set_from_wkb(wkb_string)[source]

Sets the location from a Well-Known Binary blob

Parameters

wkb_string (String) – String containing Well-Known Binary blog in hex format

set_from_wkt_string(wkt_string)[source]

Sets the location from a Well-Known Text string

Parameters

wkt_string (String) – Well-Known Text

set_latitude_decimal_degrees(latitude)[source]

Sets the latitude of the Location object to a latitude given in decimal degrees

Parameters

latitude (float) – Latitude to set to, in decimal degrees (use +/- values for North/South)

Returns

Whether latitude was set successfully

Return type

Boolean

set_latitude_dms(degrees, minutes, seconds, hemisphere)[source]

Sets the latitude value of the Location object to a latitude given in degrees, minutes and seconds format.

Parameters
  • degrees (float) – Degrees of latitude (must be positive float)

  • minutes (float) – Minutes of latitude (must be positive float)

  • seconds (float) – Seconds of latitude (must be positive float)

  • hemisphere (String) – Hemisphere of latitude (must be “N” or “S”)

Returns

Whether latitude was set successfully

Return type

Boolean

set_longitude_decimal_degrees(longitude)[source]

Sets the longitude value of the Location object to a longitude given in decimal degrees

Parameters

longitude (float) – Longitude to set to, in decimal degrees (use +/- values for East/West)

Returns

Whether longitude was set successfully

Return type

Boolean

set_longitude_dms(degrees, minutes, seconds, hemisphere)[source]

Sets the longitude value of the Location object to a longitude given in degrees, minutes and seconds format.

Parameters
  • degrees (float) – Degrees of longitude (must be positive float)

  • minutes (float) – Minutes of longitude (must be positive float)

  • seconds (float) – Seconds of longitude (must be positive float)

  • hemisphere (String) – Hemisphere of longitude (must be “E” or “W”)

Returns

Whether longitude was set successfully

Return type

Boolean

to_wkt()[source]

Returns the location stored in the Location object in Well-Known Text format, ready for assigning to the _location attribute of a SQLAlchemy/GeoAlchemy model

Returns

Well-Known Text of location

Return type

String

pepys_import.core.formats.rep_line module

class pepys_import.core.formats.rep_line.REPLine(line_number, line)[source]

Bases: object

get_location()[source]
get_platform()[source]
parse(errors, error_type)[source]
print()[source]
pepys_import.core.formats.rep_line.parse_timestamp(date, time)[source]

pepys_import.core.formats.unit_conversion module

class pepys_import.core.formats.unit_conversion.Singleton(name, bases, attrs, **kwargs)[source]

Bases: type

Define an Instance operation that lets clients access its unique instance.

class pepys_import.core.formats.unit_conversion.UnitConversion(*args, **kwargs)[source]

Bases: object

get_unit_registry()[source]

Module contents