def __create_coordinates(self, lat, lon, elev):
        """
        GeoJSON standard:
        Use to determine 2-point or 4-point coordinates
        :param list lat:
        :param list lon:
        :return dict:
        """
        # Sort lat an lon in numerical order
        lat.sort()
        lon.sort()
        geo_dict = {}
        # 4 coordinate values
        if len(lat) == 2 and len(lon) == 2:
            # Matching coordinate pairs. Not 4 unique values.
            if lat[0] == lat[1] and lon[0] == lon[1]:
                logger_noaa_lpd.info("coordinates found: {}".format("2"))
                lat.pop()
                lon.pop()
                geo_dict = self.__geo_point(lat, lon, elev)
            # 4 unique coordinates
            else:
                logger_noaa_lpd.info("coordinates found: {}".format("4"))
                geo_dict = self.__geo_multipoint(lat, lon, elev)
        # 2 coordinate values
        elif len(lat) == 1 and len(lon) == 1:
            logger_noaa_lpd.info("coordinates found: {}".format("2"))
            geo_dict = self.__geo_point(lat, lon, elev)
        # 0 coordinate values
        elif not lat and not lon:
            logger_noaa_lpd.info("coordinates found: {}".format("0"))
        else:
            geo_dict = {}
            logger_noaa_lpd.info("coordinates found: {}".format("too many"))
        return geo_dict
def __create_coordinates ( self , lat , lon , elev ) : lat . sort ( ) lon . sort ( ) geo_dict = { } if len ( lat ) == 2 and len ( lon ) == 2 : if lat [ 0 ] == lat [ 1 ] and lon [ 0 ] == lon [ 1 ] : logger_noaa_lpd . info ( "coordinates found: {}" . format ( "2" ) ) lat . pop ( ) lon . pop ( ) geo_dict = self . __geo_point ( lat , lon , elev ) else : logger_noaa_lpd . info ( "coordinates found: {}" . format ( "4" ) ) geo_dict = self . __geo_multipoint ( lat , lon , elev ) elif len ( lat ) == 1 and len ( lon ) == 1 : logger_noaa_lpd . info ( "coordinates found: {}" . format ( "2" ) ) geo_dict = self . __geo_point ( lat , lon , elev ) elif not lat and not lon : logger_noaa_lpd . info ( "coordinates found: {}" . format ( "0" ) ) else : geo_dict = { } logger_noaa_lpd . info ( "coordinates found: {}" . format ( "too many" ) ) return geo_dict
GeoJSON standard:
        Use to determine 2-point or 4-point coordinates
        :param list lat:
        :param list lon:
        :return dict: