geetools.batch.utils
#
Missing docstring.
Module Contents#
Functions#
|
Convert an image to the specified data type. |
|
Creates the specified assets if they do not exist. |
|
Create an Asset. |
|
Download a file from a given url. |
|
Get EPSG from a shapefile using pycrs. |
|
Determine if points inside coordinates have Z values. |
|
Verify is a list is a list of points. |
|
Convert a KML file to a GeoJSON dict. |
|
Format a name to be accepted as a description. |
|
TODO missing docstring. |
|
Remove Z values from coordinates. |
Attributes#
- geetools.batch.utils.convertDataType(newtype)[source]#
Convert an image to the specified data type.
- Parameters:
newtype (str) – the data type. One of ‘float’, ‘int’, ‘byte’, ‘double’, ‘Uint8’,’int8’,’Uint16’, ‘int16’, ‘Uint32’,’int32’
- Returns:
a function to map over a collection
- Return type:
function
- geetools.batch.utils.createAssets(asset_ids, asset_type, mk_parents)[source]#
Creates the specified assets if they do not exist.
This is a fork of the original function in ‘ee.data’ module with the difference that.
If the asset already exists but the type is different that the one we want, raise an error
Starts the creation of folders since ‘user/username/’
Will be here until I can pull requests to the original repo
- Parameters:
asset_ids (list) – list of paths
asset_type (str) – the type of the assets. Options: “ImageCollection” or “Folder”
mk_parents (bool) – make the parents?
- Returns:
A description of the saved asset, including a generated ID
- geetools.batch.utils.downloadFile(url, name, extension, path=None)[source]#
Download a file from a given url.
- Parameters:
url (str) – full url
name (str) – name for the file (can contain a path)
extension (str) – extension for the file
- Returns:
the created file (closed)
- Return type:
file
- geetools.batch.utils.getProjection(filename, path=None)[source]#
Get EPSG from a shapefile using pycrs.
- Parameters:
filename (str) – an ESRI shapefile (.shp)
- geetools.batch.utils.kmlToGeoJsonDict(kmlfile=None, data=None, encoding=None)[source]#
Convert a KML file to a GeoJSON dict.