returning true only if the specified data format is available natively. The autoconvert parameter is set to false to filter out auto-convertible data formats, DataObject dataObject = new DataObject("Some string data to store.")
USING GETDATA IN KST CODE
The following example code uses the GetDataPresent(String, Boolean) method to first check if a specified data format is available natively (auto-convertible data formats are filtered) if the specified format is available, the example retrieves the data by using the GetData(String) method. ' If the desired data format is present, use one of the GetData methods to retrieve theĭata = Tr圜ast(dataObject.GetData(desiredFormat), Byte()) If dataObject.GetDataPresent(desiredFormat) Then ' This particular overload of GetDataPresent looks for both native and auto-convertible ' Use the GetDataPresent method to check for the presence of a desired data format.
If the desired data format is present, use one of the GetData methods to retrieve theĭata = dataObject.GetData(desiredFormat) as byte ĭim dataObject As New DataObject("Some string data to store.")ĭim desiredFormat As String = DataFormats.UnicodeText If (dataObject.GetDataPresent(desiredFormat)) This particular overload of GetDataPresent looks for both native and auto-convertible Use the GetDataPresent method to check for the presence of a desired data format. String desiredFormat = DataFormats.UnicodeText See for details.The following example uses this method to first check whether a specified data format is available (natively or by auto-convert) if the specified format is available, the example retrieves the data by using the GetData(String) method.
USING GETDATA IN KST DOWNLOAD
GetData('CMIP5', var='tmin', res=10, rcp=85, model='AC', year=70)įunction (var, model, rcp, year, res, lon, lat, path, download = TRUE) In addition, you need to provide model, rcp and year. Only resolutions 2.5, 5, and 10 are currently available. To get (projected) future climate data (CMIP5), you must provide arguments var and res as above. In all cases there are 12 (monthly) files for each variable except for 'bio' which contains 19 files. In the case of res=0.5, you must also provide a lon and lat argument for a tile for the lower resolutions global data will be downloaded. Valid resolutions are 0.5, 2.5, 5, and 10 (minutes of a degree). Valid variables names are 'tmin', 'tmax', 'prec' and 'bio'. If name='worldclim' you must also provide arguments var, and a resolution res. These should be single numbers somewhere within the SRTM tile that you want. If name is 'SRTM' you must provide 'lon' and 'lat' arguments (longitude and latitude). If it is TRUE values for neighbouring countries are set to NA. In the case of alt you can set 'mask' to FALSE. In the case of GADM you must also provide the level of administrative subdivision (0=country, 1=first level subdivision).
USING GETDATA IN KST ISO
Countries are specified by their 3 letter ISO codes. If name is 'alt' or 'GADM' you must provide a 'country=' argument. 'countries' has polygons for all countries at a higher resolution than the 'wrld_simpl' data in the maptools package. 'SRTM' refers to the hole-filled CGIAR-SRTM (90 m resolution). 'worldclim' is a database of global interpolated climate data. 'GADM' is a database of global administrative boundaries.
'alt' stands for altitude (elevation) the data were aggregated from SRTM 90 m resolution data between -60 and 60 latitude. See Details ValueĪ spatial object (Raster* or Spatial*) Details