geonode.layers.utils
Utilities for managing GeoNode layers
Attributes
Functions
|
Replaces a string that matches the regex with the replacement. |
|
|
|
Converts the data to Shapefiles or Geotiffs and returns |
|
Finds out if a filename is a Feature or a Vector |
|
Create a brand new name |
|
Checks if the layer is a string and fetches it from the database. |
Create a default user |
|
|
|
|
|
|
|
|
Return bbox in the format [xmin,xmax,ymin,ymax]. |
Delete orphaned layer files. |
|
|
Escapes a given input string using the provided source character set, |
|
|
|
|
|
|
|
|
|
|
|
|
Module Contents
- geonode.layers.utils.WRITE_PERMISSIONS = ['change_dataset_data', 'change_dataset_style', 'change_resourcebase_metadata'][source]
- geonode.layers.utils.OWNER_PERMISSIONS = ['change_resourcebase', 'delete_resourcebase', 'change_resourcebase_permissions', 'publish_resourcebase'][source]
- geonode.layers.utils._clean_string(str, regex='(^[^a-zA-Z\\._]+)|([^a-zA-Z\\._0-9]+)', replace='_')[source]
Replaces a string that matches the regex with the replacement.
- geonode.layers.utils.get_files(filename)[source]
Converts the data to Shapefiles or Geotiffs and returns a dictionary with all the required files
- geonode.layers.utils.dataset_type(filename)[source]
Finds out if a filename is a Feature or a Vector returns a gsconfig resource_type string that can be either ‘featureType’ or ‘coverage’
- geonode.layers.utils.get_valid_dataset_name(layer, overwrite)[source]
Checks if the layer is a string and fetches it from the database.
- geonode.layers.utils.surrogate_escape_string(input_string, source_character_set)[source]
Escapes a given input string using the provided source character set, using the surrogateescape codec error handler.
- geonode.layers.utils.set_datasets_permissions(permissions_name, resources_names=None, users_usernames=None, groups_names=None, delete_flag=False, verbose=False)[source]