4.4.4. General Utils¶
-
pyprom.lib.util.dottedDecimaltoDegrees(coordinate)[source]¶ Converts dotted Decimal coordinate to a DMS
Parameters: coordinate (float) – dd coordinate to convert. Returns: degrees, minutes, seconds Return type: int, int, int
-
pyprom.lib.util.degreesToDottedDecimal(deg, mnt=0, sec=0)[source]¶ Accepts dms and converts to dd
Parameters: - deg (int) – degrees
- mnt (int) – minutes
- sec (int) – seconds
Returns: dotted decimal format
Return type: float
-
pyprom.lib.util.coordinateHashToList(coordianteHash)[source]¶ Converts a coordinateHash to a list of coordinates.
Parameters: coordianteHash – a hash using {x1:[y1:True,y2:True..],x1:[y1:True,y2:True..]} format Returns: list coordinates [[x1,y1],[x1,y2]….]
-
pyprom.lib.util.coordinateHashToGridPointList(coordinateHash)[source]¶ Converts a coordinateHash to a
pyprom.lib.locations.gridpoint.GridPointlist.Parameters: coordinateHash (dict) – a hash using {x1:[y1:True,y2:True..],x1:[y1:True,y2:True..]} format Returns: list of BaseGridPoint objects.
-
pyprom.lib.util.compressRepetetiveChars(string)[source]¶ Accepts String like “HHLHHHLL” and removes continuous redundant chars “HLHL”
Parameters: string (str) – “H” and “L” string Returns: condensed non repeating string.
-
pyprom.lib.util.seconds_to_arcseconds(seconds)[source]¶ Convert Seconds to Arc Seconds
Parameters: seconds (float) – Returns: converts seconds into arcseconds.