geonode.layers.models

Attributes

logger

shp_exts

csv_exts

kml_exts

vec_exts

cov_exts

TIME_REGEX

TIME_REGEX_FORMAT

Classes

Style

Model for storing styles.

DatasetManager

Dataset

Dataset (inherits ResourceBase fields)

AttributeManager

Helper class to access filtered attributes

Attribute

Auxiliary model for storing layer attributes.

Module Contents

geonode.layers.models.logger[source]
geonode.layers.models.shp_exts = ['.shp'][source]
geonode.layers.models.csv_exts = ['.csv'][source]
geonode.layers.models.kml_exts = ['.kml'][source]
geonode.layers.models.vec_exts[source]
geonode.layers.models.cov_exts = ['.tif', '.tiff', '.geotiff', '.geotif', '.asc'][source]
geonode.layers.models.TIME_REGEX[source]
geonode.layers.models.TIME_REGEX_FORMAT[source]
class geonode.layers.models.Style[source]

Bases: django.db.models.Model, geonode.security.models.PermissionLevelMixin

Model for storing styles.

name[source]
sld_title[source]
sld_body[source]
sld_version[source]
sld_url[source]
workspace[source]
__str__()[source]
absolute_url()[source]
get_self_resource()[source]

Get associated resource base.

class geonode.layers.models.DatasetManager[source]

Bases: geonode.base.models.ResourceBaseManager

class geonode.layers.models.Dataset(*args, **kwargs)[source]

Bases: geonode.base.models.ResourceBase

Dataset (inherits ResourceBase fields)

PERMISSIONS[source]
objects[source]
workspace[source]
store[source]
name[source]
typename[source]
ows_url[source]
is_mosaic[source]
has_time[source]
has_elevation[source]
time_regex[source]
elevation_regex[source]
ptype[source]
default_style[source]
styles[source]
remote_service[source]
charset[source]
use_featureinfo_custom_template[source]
featureinfo_custom_template[source]
is_vector()[source]
property is_raster[source]
property display_type[source]
property data_model[source]
property data_objects[source]
property attributes[source]
property service_typename[source]
property gtype[source]
get_base_file()[source]

Get the shp or geotiff file for this layer.

get_absolute_url()[source]
property capabilities_url[source]
property dataset_ows_url[source]
property embed_url[source]
attribute_config()[source]
__str__()[source]
class Meta[source]

Bases: geonode.base.models.ResourceBase.Meta

permissions = (('change_dataset_data', 'Can edit layer data'), ('change_dataset_style', 'Can change layer style'))[source]
unique_together = ('store', 'workspace', 'name')[source]
LEVEL_READ = 'dataset_readonly'[source]
LEVEL_WRITE = 'dataset_readwrite'[source]
LEVEL_ADMIN = 'dataset_admin'[source]
property maps[source]
get_linked_resources(as_target: bool = False)[source]

Get all the linked resources to this ResourceBase instance. This is implemented as a method so that derived classes can override it (for instance, Maps may add related datasets)

property download_url[source]
property maplayers[source]
allowed_permissions()[source]
property class_name[source]
view_count_up(user, do_local=False)[source]

increase view counter, if user is not owner and not super

@param user which views layer @type User model

@param do_local - do local counter update even if pubsub is enabled @type bool

class geonode.layers.models.AttributeManager[source]

Bases: django.db.models.Manager

Helper class to access filtered attributes

visible()[source]
class geonode.layers.models.Attribute[source]

Bases: django.db.models.Model

Auxiliary model for storing layer attributes.

This helps reduce the need for runtime lookups to other servers, and lets users customize attribute titles, sort order, and visibility.

dataset[source]
attribute[source]
description[source]
attribute_label[source]
attribute_type[source]
visible[source]
display_order[source]

Attribute FeatureInfo-Type list

TYPE_PROPERTY = 'type_property'[source]
TYPE_HREF = 'type_href'[source]
TYPE_IMAGE = 'type_image'[source]
TYPE_VIDEO_MP4 = 'type_video_mp4'[source]
TYPE_VIDEO_OGG = 'type_video_ogg'[source]
TYPE_VIDEO_WEBM = 'type_video_webm'[source]
TYPE_VIDEO_3GP = 'type_video_3gp'[source]
TYPE_VIDEO_FLV = 'type_video_flv'[source]
TYPE_VIDEO_YOUTUBE = 'type_video_youtube'[source]
TYPE_AUDIO = 'type_audio'[source]
TYPE_IFRAME = 'type_iframe'[source]
TYPES[source]
featureinfo_type[source]
count[source]
min[source]
max[source]
average[source]
median[source]
stddev[source]
sum[source]
unique_values[source]
last_stats_updated[source]
objects[source]
__str__()[source]
unique_values_as_list()[source]