Adds latitude and longitude metadata
492101
def add_latlon_metadata(lat_var, lon_var):
    """"""
    lat_var.long_name = 'latitude'
    lat_var.standard_name = 'latitude'
    lat_var.units = 'degrees_north'
    lat_var.axis = 'Y'

    lon_var.long_name = 'longitude'
    lon_var.standard_name = 'longitude'
    lon_var.units = 'degrees_east'
    lon_var.axis = 'X'
616499
def add_value(self, value, metadata=""):
        
        data = {
            'value': value,
            'metadata': metadata
        }

        return self.post('createValue', data)
106769
def serialize_field_value_geolocalization
      return unless value
      value_object = eval(value)
      serialized = {}

      # add basic info
      serialized[:latitude] = value_object[:lat]
      serialized[:longitude] = value_object[:lng]
      serialized[:address] = value_object[:address]

      # return serialized data
      serialized
    end
903481
def latitude(self, latitude):
        """"""
        if not (-90 <= latitude <= 90):
            raise ValueError('latitude was {}, but has to be in [-90, 90]'
                             .format(latitude))
        self._latitude = latitude
1372569
def add_to_results(self, data, label, results):
        
        for datum in data:
            if label is not None:
                datum.update({'type': label})

            results.append(datum)

        return results
341399
function addOptionals(geojson, settings){
    if(settings.crs && checkCRS(settings.crs)) {
      if(settings.isPostgres)
        geojson.geometry.crs = settings.crs;
      else
        geojson.crs = settings.crs;
    }
    if (settings.bbox) {
      geojson.bbox = settings.bbox;
    }
    if (settings.extraGlobal) {
      geojson.properties = {};
      for (var key in settings.extraGlobal) {
        geojson.properties[key] = settings.extraGlobal[key];
      }
    }
  }
1217411
def add_location_timezone_to_device(self, device_obj, location, timezone):
        
        dictify_device_meta(device_obj)
        device_obj['info']['description']['meta']['location'] = location
        device_obj['info']['description']['meta']['Location'] = location
        device_obj['info']['description']['meta']['timezone'] = timezone
        device_obj['info']['description']['meta']['Timezone'] = timezone
        return self.update_device(device_obj)
1024653
protected function generateGeoPosMetaTags()
    {
        // Geo-Position
        if (!empty($this->tsSetupSeo['geoPositionLatitude']) && !empty($this->tsSetupSeo['geoPositionLongitude'])) {
            $this->metaTagList['geo.icmb']     = array(
                'tag'        => 'meta',
                'attributes' => array(
                    'name'    => 'ICBM',
                    'content' => $this->tsSetupSeo['geoPositionLatitude'] . ', '
                        . $this->tsSetupSeo['geoPositionLongitude'],
                ),
            );
            $this->metaTagList['geo.position'] = array(
                'tag'        => 'meta',
                'attributes' => array(
                    'name'    => 'geo.position',
                    'content' => $this->tsSetupSeo['geoPositionLatitude'] . ';'
                        . $this->tsSetupSeo['geoPositionLongitude'],
                ),
            );
        }

        // Geo-Region
        if (!empty($this->tsSetupSeo['geoRegion'])) {
            $this->metaTagList['geo.region'] = array(
                'tag'        => 'meta',
                'attributes' => array(
                    'name'    => 'geo.region',
                    'content' => $this->tsSetupSeo['geoRegion'],
                ),
            );
        }

        // Geo Placename
        if (!empty($this->tsSetupSeo['geoPlacename'])) {
            $this->metaTagList['geo.placename'] = array(
                'tag'        => 'meta',
                'attributes' => array(
                    'name'    => 'geo.placename',
                    'content' => $this->tsSetupSeo['geoPlacename'],
                ),
            );
        }
    }
525903
def add_custom_metadata(self, key, value, meta_type=None):
        
        self.metadata.append({'key': key, 'value': value, 'type': meta_type})
1283456
def main(lat, lon, loc):
    """"""
    writer = get_writer()

    try:
        if (not lat or not lon) and (not loc):
            raise IncorrectParametersException('Please specify a latitude, longitude, or location'
                                               'Example: wilos --lat=19.8968 --lon=155.5828 --loc="hawaii"')
        if lat is not None and long is not None:
            get_live_weather(lat, lon, writer)
        elif loc is not None:
            loc_data = get_coordinates(loc)
            writer.title(loc_data['address'])
            get_live_weather(loc_data['coordinates']['lat'],
                             loc_data['coordinates']['lng'],
                             writer)

    except IncorrectParametersException as e:
        click.secho(e.message, fg="red", bold=True)
176556
function runListFeatures(callback) {
  var rectangle = {
    lo: {
      latitude: 400000000,
      longitude: -750000000
    },
    hi: {
      latitude: 420000000,
      longitude: -730000000
    }
  };
  console.log('Looking for features between 40, -75 and 42, -73');
  var call = client.listFeatures(rectangle);
  call.on('data', function(feature) {
      console.log('Found feature called "' + feature.name + '" at ' +
          feature.location.latitude/COORD_FACTOR + ', ' +
          feature.location.longitude/COORD_FACTOR);
  });
  call.on('end', callback);
}
435617
def add_item_metadata(self, handle, key, value):
        
        _mkdir_if_missing(self._metadata_fragments_abspath)

        prefix = self._handle_to_fragment_absprefixpath(handle)
        fpath = prefix + '.{}.json'.format(key)

        _put_obj(fpath, value)
788719
def addRnaQuantMetadata(self, fields):
        
        self._featureSetIds = fields["feature_set_ids"].split(',')
        self._description = fields["description"]
        self._name = fields["name"]
        self._biosampleId = fields.get("biosample_id", "")
        if fields["read_group_ids"] == "":
            self._readGroupIds = []
        else:
            self._readGroupIds = fields["read_group_ids"].split(',')
        if fields["programs"] == "":
            self._programs = []
        else:
            # Need to use program Id's here to generate a list of Programs
            # for now set to empty
            self._programs = []
73118
def _put_metadata(self, fs_remote, ds):
        """"""

        from six import text_type
        from fs.errors import ResourceNotFoundError


        identity = ds.identity
        d = identity.dict

        d['summary'] = ds.config.metadata.about.summary
        d['title'] = ds.config.metadata.about.title

        meta_stack = self._meta_infos(ds)

        def do_metadata():
            for path, ident in meta_stack:
                fs_remote.setcontents(path, ident)


        try:
            # Assume the directories already exist
            do_metadata()
        except ResourceNotFoundError:
            # Nope, make them and try again.
            parts = ['vid', 'id', 'vname', 'name']
            for p in parts:
                dirname = os.path.join('_meta', p)
                fs_remote.makedir(dirname, allow_recreate=True, recursive=True)

            do_metadata()
1141099
function setGeo( $latitude, $longitude, $params=FALSE ) {
    $this->geo['value']['latitude']  = $latitude;
    $this->geo['value']['longitude'] = $longitude;
    $this->geo['params'] = $this->_setParams( $params );
  }
627450
def add_location(self, location_name, parent_name=None, er_data=None, pmag_data=None):
        
        if not location_name:
            return False
        location = Location(location_name, data_model=self.data_model, er_data=er_data, pmag_data=pmag_data)
        self.locations.append(location)
        return location
319216
def addfunctions(dtls, bunchdt):
    """"""
    snames = [
        "BuildingSurface:Detailed",
        "Wall:Detailed",
        "RoofCeiling:Detailed",
        "Floor:Detailed",
        "FenestrationSurface:Detailed",
        "Shading:Site:Detailed",
        "Shading:Building:Detailed",
        "Shading:Zone:Detailed", ]
    for sname in snames:
        if sname.upper() in bunchdt:
            surfaces = bunchdt[sname.upper()]
            for surface in surfaces:
                func_dict = {
                    'area': fh.area,
                    'height': fh.height,  # not working correctly
                    'width': fh.width,  # not working correctly
                    'azimuth': fh.azimuth,
                    'tilt': fh.tilt,
                    'coords': fh.getcoords,  # needed for debugging
                }
                try:
                    surface.__functions.update(func_dict)
                except KeyError as e:
                    surface.__functions = func_dict