gws.types

class gws.types.Enum[source]
gws.types.Extent = typing.Tuple[float, float, float, float]

alias An array of 4 elements representing extent coordinates [minx, miny, maxx, maxy]

gws.types.Point = typing.Tuple[float, float]

alias Point coordinates [x, y]

gws.types.Size = typing.Tuple[float, float]

alias Size [width, height]

gws.types.Measurement = typing.Tuple[float, str]

alias A value with a unit

gws.types.Tag

alias of builtins.tuple

class gws.types.Axis[source]

Axis orientation.

xy = 'xy'
yx = 'yx'
gws.types.Literal

alias of builtins.str

gws.types.FilePath

alias of builtins.str

gws.types.DirPath

alias of builtins.str

gws.types.Duration

alias of builtins.str

gws.types.Color

alias of builtins.str

gws.types.Regex

alias of builtins.str

gws.types.FormatStr

alias of builtins.str

gws.types.Crs

alias of builtins.str

gws.types.Date

alias of builtins.str

gws.types.DateTime

alias of builtins.str

gws.types.Url

alias of builtins.str

class gws.types.ext[source]
class action[source]
class Config[source]
class Props[source]
class auth[source]
class method[source]
class Config[source]
class provider[source]
class Config[source]
class template[source]
class Config[source]
class Props[source]
class db[source]
class provider[source]
class Config[source]
class layer[source]
class Config[source]
class Props[source]
class search[source]
class provider[source]
class Config[source]
class storage[source]
class Config[source]
class helper[source]
class Config[source]
class ows[source]
class provider[source]
class Config[source]
class service[source]
class Config[source]
class gws.types.Data(*args, **kwargs)[source]

Basic data object.

get(k, default=None)[source]
class gws.types.Config(*args, **kwargs)[source]

Configuration base type

uid = ''

unique ID

class gws.types.WithType(*args, **kwargs)[source]
type = None

object type

class gws.types.AccessType[source]
allow = 'allow'
deny = 'deny'
class gws.types.Access(*args, **kwargs)[source]

Access rights definition for authorization roles

type = None

access type (deny or allow)

role = None

a role to which this rule applies

class gws.types.WithAccess(*args, **kwargs)[source]
access = None

access rights

class gws.types.WithTypeAndAccess(*args, **kwargs)[source]
type = None

object type

access = None

access rights

class gws.types.AttributeType[source]
bool = 'bool'
bytes = 'bytes'
date = 'date'
datetime = 'datetime'
float = 'float'
geometry = 'geometry'
int = 'int'
list = 'list'
str(bytes_or_buffer[, encoding[, errors]]) → str = 'str'
text = 'text'
time = 'time'
class gws.types.GeometryType[source]
curve = 'CURVE'
geomcollection = 'GEOMCOLLECTION'
geometry = 'GEOMETRY'
linestring = 'LINESTRING'
multicurve = 'MULTICURVE'
multilinestring = 'MULTILINESTRING'
multipoint = 'MULTIPOINT'
multipolygon = 'MULTIPOLYGON'
multisurface = 'MULTISURFACE'
point = 'POINT'
polygon = 'POLYGON'
polyhedralsurface = 'POLYHEDRALSURFACE'
surface = 'SURFACE'
class gws.types.Attribute(*args, **kwargs)[source]
title = ''
type = 'str'
value = None
editable = True
class gws.types.Params(*args, **kwargs)[source]
projectUid = None

project uid

locale = None

locale for this request

class gws.types.NoParams(*args, **kwargs)[source]
class gws.types.ResponseError(*args, **kwargs)[source]
class gws.types.Response(*args, **kwargs)[source]
class gws.types.HttpResponse(*args, **kwargs)[source]
class gws.types.FileResponse(*args, **kwargs)[source]
class gws.types.Props(*args, **kwargs)[source]

Properties base type

class gws.types.Bounds(*args, **kwargs)[source]
class gws.types.CorsOptions(*args, **kwargs)[source]
class gws.types.DocumentRoot(*args, **kwargs)[source]
class gws.types.FeatureProps(*args, **kwargs)[source]
class gws.types.IBaseRequest[source]
cookie(key: str, default: str = None) → str[source]
env(key: str, default: str = None) → str[source]
error_response(err) → gws.types.IResponse[source]
file_response(path: str, mimetype: str, status: int = 200, attachment_name: str = None) → gws.types.IResponse[source]
has_param(key: str) → bool[source]
header(key: str, default: str = None) → str[source]
init()[source]
param(key: str, default: str = None) → str[source]
redirect_response(location, status=302)[source]
response(content: str, mimetype: str, status: int = 200) → gws.types.IResponse[source]
struct_response(data: gws.types.Response, status: int = 200) → gws.types.IResponse[source]
url_for(url: str) → str[source]
class gws.types.IFeature[source]
apply_data_model(model: Optional[gws.types.IModel] = None) → gws.types.IFeature[source]
apply_templates(templates: List[ITemplate] = None, extra_context: dict = None, keys: List[str] = None) → gws.types.IFeature[source]
attr(name: str)[source]
to_geojson() → dict[source]
to_svg(rv: gws.types.MapRenderView, style: Optional[gws.types.IStyle] = None) → str[source]
to_svg_tags(rv: gws.types.MapRenderView, style: Optional[gws.types.IStyle] = None) → List[tuple][source]
transform_to(crs) → gws.types.IFeature[source]
class gws.types.IObject[source]
append_child(obj: gws.types.IObject) → gws.types.IObject[source]
create_child(klass, cfg) → gws.types.IObject[source]
get_children(klass) → List[gws.types.IObject][source]
get_closest(klass) → gws.types.IObject[source]
initialize(cfg)[source]
is_a(klass)[source]
post_configure()[source]
post_initialize()[source]
props_for(user) → Optional[dict][source]
set_uid(uid)[source]
var(key, default=None, parent=False)[source]
class gws.types.IResponse[source]
add_header(key, value)[source]
class gws.types.IRole[source]
can_use(obj, parent=None)[source]
class gws.types.ISession[source]
get(key, default=None)[source]
set(key, val)[source]
class gws.types.IShape[source]
intersects(shape: gws.types.IShape) → bool[source]
to_multi() → gws.types.IShape[source]
to_type(new_type: gws.types.GeometryType) → gws.types.IShape[source]
tolerance_polygon(tolerance, resolution=None) → gws.types.IShape[source]
transformed_to(to_crs, **kwargs) → gws.types.IShape[source]
class gws.types.IStyle[source]
class gws.types.IUser[source]
attribute(key: str, default: str = '') → str[source]
can_use(obj, parent=None) → bool[source]
has_role(role: str) → bool[source]
init_from_data(provider, uid, roles, attributes) → gws.types.IUser[source]
init_from_source(provider, uid, roles=None, attributes=None) → gws.types.IUser[source]
class gws.types.LayerLegend(*args, **kwargs)[source]
class gws.types.MapRenderInput(*args, **kwargs)[source]
class gws.types.MapRenderInputItem(*args, **kwargs)[source]
class gws.types.MapRenderInputItemType[source]
features = 'features'
fragment = 'fragment'
image = 'image'
image_layer = 'image_layer'
svg_layer = 'svg_layer'
class gws.types.MapRenderOutput(*args, **kwargs)[source]
class gws.types.MapRenderOutputItem(*args, **kwargs)[source]
class gws.types.MapRenderView(*args, **kwargs)[source]
class gws.types.MetaContact(*args, **kwargs)[source]
class gws.types.MetaData(*args, **kwargs)[source]
class gws.types.MetaInspireDegreeOfConformity[source]
conformant = 'conformant'
notConformant = 'notConformant'
notEvaluated = 'notEvaluated'
class gws.types.MetaInspireMandatoryKeyword[source]
chainDefinitionService = 'chainDefinitionService'
comEncodingService = 'comEncodingService'
comGeographicCompressionService = 'comGeographicCompressionService'
comGeographicFormatConversionService = 'comGeographicFormatConversionService'
comMessagingService = 'comMessagingService'
comRemoteFileAndExecutableManagement = 'comRemoteFileAndExecutableManagement'
comService = 'comService'
comTransferService = 'comTransferService'
humanCatalogueViewer = 'humanCatalogueViewer'
humanChainDefinitionEditor = 'humanChainDefinitionEditor'
humanFeatureGeneralizationEditor = 'humanFeatureGeneralizationEditor'
humanGeographicDataStructureViewer = 'humanGeographicDataStructureViewer'
humanGeographicFeatureEditor = 'humanGeographicFeatureEditor'
humanGeographicSpreadsheetViewer = 'humanGeographicSpreadsheetViewer'
humanGeographicSymbolEditor = 'humanGeographicSymbolEditor'
humanGeographicViewer = 'humanGeographicViewer'
humanInteractionService = 'humanInteractionService'
humanServiceEditor = 'humanServiceEditor'
humanWorkflowEnactmentManager = 'humanWorkflowEnactmentManager'
infoCatalogueService = 'infoCatalogueService'
infoCoverageAccessService = 'infoCoverageAccessService'
infoFeatureAccessService = 'infoFeatureAccessService'
infoFeatureTypeService = 'infoFeatureTypeService'
infoGazetteerService = 'infoGazetteerService'
infoManagementService = 'infoManagementService'
infoMapAccessService = 'infoMapAccessService'
infoOrderHandlingService = 'infoOrderHandlingService'
infoProductAccessService = 'infoProductAccessService'
infoRegistryService = 'infoRegistryService'
infoSensorDescriptionService = 'infoSensorDescriptionService'
infoStandingOrderService = 'infoStandingOrderService'
metadataGeographicAnnotationService = 'metadataGeographicAnnotationService'
metadataProcessingService = 'metadataProcessingService'
metadataStatisticalCalculationService = 'metadataStatisticalCalculationService'
spatialCoordinateConversionService = 'spatialCoordinateConversionService'
spatialCoordinateTransformationService = 'spatialCoordinateTransformationService'
spatialCoverageVectorConversionService = 'spatialCoverageVectorConversionService'
spatialDimensionMeasurementService = 'spatialDimensionMeasurementService'
spatialFeatureGeneralizationService = 'spatialFeatureGeneralizationService'
spatialFeatureManipulationService = 'spatialFeatureManipulationService'
spatialFeatureMatchingService = 'spatialFeatureMatchingService'
spatialImageCoordinateConversionService = 'spatialImageCoordinateConversionService'
spatialImageGeometryModelConversionService = 'spatialImageGeometryModelConversionService'
spatialOrthorectificationService = 'spatialOrthorectificationService'
spatialPositioningService = 'spatialPositioningService'
spatialProcessingService = 'spatialProcessingService'
spatialProximityAnalysisService = 'spatialProximityAnalysisService'
spatialRectificationService = 'spatialRectificationService'
spatialRouteDeterminationService = 'spatialRouteDeterminationService'
spatialSamplingService = 'spatialSamplingService'
spatialSensorGeometryModelAdjustmentService = 'spatialSensorGeometryModelAdjustmentService'
spatialSubsettingService = 'spatialSubsettingService'
spatialTilingChangeService = 'spatialTilingChangeService'
subscriptionService = 'subscriptionService'
taskManagementService = 'taskManagementService'
temporalProcessingService = 'temporalProcessingService'
temporalProximityAnalysisService = 'temporalProximityAnalysisService'
temporalReferenceSystemTransformationService = 'temporalReferenceSystemTransformationService'
temporalSamplingService = 'temporalSamplingService'
temporalSubsettingService = 'temporalSubsettingService'
thematicChangeDetectionService = 'thematicChangeDetectionService'
thematicClassificationService = 'thematicClassificationService'
thematicFeatureGeneralizationService = 'thematicFeatureGeneralizationService'
thematicGeocodingService = 'thematicGeocodingService'
thematicGeographicInformationExtractionService = 'thematicGeographicInformationExtractionService'
thematicGeoparsingService = 'thematicGeoparsingService'
thematicGoparameterCalculationService = 'thematicGoparameterCalculationService'
thematicImageManipulationService = 'thematicImageManipulationService'
thematicImageProcessingService = 'thematicImageProcessingService'
thematicImageSynthesisService = 'thematicImageSynthesisService'
thematicImageUnderstandingService = 'thematicImageUnderstandingService'
thematicMultibandImageManipulationService = 'thematicMultibandImageManipulationService'
thematicObjectDetectionService = 'thematicObjectDetectionService'
thematicProcessingService = 'thematicProcessingService'
thematicReducedResolutionGenerationService = 'thematicReducedResolutionGenerationService'
thematicSpatialCountingService = 'thematicSpatialCountingService'
thematicSubsettingService = 'thematicSubsettingService'
workflowEnactmentService = 'workflowEnactmentService'
class gws.types.MetaInspireResourceType[source]
dataset = 'dataset'
series = 'series'
service = 'service'
class gws.types.MetaInspireSpatialDataServiceType[source]
discovery = 'discovery'
download = 'download'
invoke = 'invoke'
other = 'other'
transformation = 'transformation'
view = 'view'
class gws.types.MetaInspireTheme[source]
ac = 'ac'
ad = 'ad'
af = 'af'
am = 'am'
au = 'au'
br = 'br'
bu = 'bu'
cp = 'cp'
ef = 'ef'
el = 'el'
er = 'er'
ge = 'ge'
gg = 'gg'
gn = 'gn'
hb = 'hb'
hh = 'hh'
hy = 'hy'
lc = 'lc'
lu = 'lu'
mf = 'mf'
mr = 'mr'
nz = 'nz'
of = 'of'
oi = 'oi'
pd = 'pd'
pf = 'pf'
ps = 'ps'
rs = 'rs'
sd = 'sd'
so = 'so'
sr = 'sr'
su = 'su'
tn = 'tn'
us = 'us'
class gws.types.MetaIsoMaintenanceFrequencyCode[source]
annually = 'annually'
asNeeded = 'asNeeded'
biannually = 'biannually'
continual = 'continual'
daily = 'daily'
fortnightly = 'fortnightly'
irregular = 'irregular'
monthly = 'monthly'
notPlanned = 'notPlanned'
quarterly = 'quarterly'
unknown = 'unknown'
weekly = 'weekly'
class gws.types.MetaIsoOnLineFunction[source]
download = 'download'
information = 'information'
offlineAccess = 'offlineAccess'
order = 'order'
search = 'search'
class gws.types.MetaIsoScope[source]
attribute = 'attribute'
attributeType = 'attributeType'
collectionHardware = 'collectionHardware'
collectionSession = 'collectionSession'
dataset = 'dataset'
dimensionGroup = 'dimensionGroup'
feature = 'feature'
featureType = 'featureType'
fieldSession = 'fieldSession'
initiative = 'initiative'
model = 'model'
nonGeographicDataset = 'nonGeographicDataset'
otherAggregate = 'otherAggregate'
platformSeries = 'platformSeries'
productionSeries = 'productionSeries'
propertyType = 'propertyType'
sensor = 'sensor'
sensorSeries = 'sensorSeries'
series = 'series'
service = 'service'
software = 'software'
stereomate = 'stereomate'
tile = 'tile'
transferAggregate = 'transferAggregate'
class gws.types.MetaIsoSpatialRepresentationType[source]
grid = 'grid'
stereoModel = 'stereoModel'
textTable = 'textTable'
tin = 'tin'
vector = 'vector'
video = 'video'
class gws.types.MetaIsoTopicCategory[source]
biota = 'biota'
boundaries = 'boundaries'
climatologyMeteorologyAtmosphere = 'climatologyMeteorologyAtmosphere'
economy = 'economy'
elevation = 'elevation'
environment = 'environment'
farming = 'farming'
geoscientificInformation = 'geoscientificInformation'
health = 'health'
imageryBaseMapsEarthCover = 'imageryBaseMapsEarthCover'
inlandWaters = 'inlandWaters'
intelligenceMilitary = 'intelligenceMilitary'
location = 'location'
oceans = 'oceans'
planningCadastre = 'planningCadastre'
society = 'society'
structure = 'structure'
transportation = 'transportation'
utilitiesCommunication = 'utilitiesCommunication'
class gws.types.ModelProps(*args, **kwargs)[source]
class gws.types.ModelRule(*args, **kwargs)[source]
class gws.types.OwsOperation[source]
class gws.types.Projection(*args, **kwargs)[source]
class gws.types.RewriteRule(*args, **kwargs)[source]
class gws.types.SearchArgs(*args, **kwargs)[source]
class gws.types.SearchFilter(*args, **kwargs)[source]
class gws.types.SelectArgs(*args, **kwargs)[source]
class gws.types.ShapeProps(*args, **kwargs)[source]
class gws.types.SourceLayer(*args, **kwargs)[source]
class gws.types.SourceStyle(*args, **kwargs)[source]
class gws.types.SpecValidator[source]
method_spec(name)[source]
read_value(val, type_name, path='', strict=True)[source]
class gws.types.SqlTable(*args, **kwargs)[source]
class gws.types.SqlTableColumn(*args, **kwargs)[source]
class gws.types.StorageDirectory(*args, **kwargs)[source]
class gws.types.StorageElement(*args, **kwargs)[source]
class gws.types.StorageEntry(*args, **kwargs)[source]
class gws.types.StorageRecord(*args, **kwargs)[source]
class gws.types.StyleGeometryOption[source]
all = 'all'
none = 'none'
class gws.types.StyleLabelAlign[source]
center = 'center'
left = 'left'
right = 'right'
class gws.types.StyleLabelFontStyle[source]
italic = 'italic'
normal = 'normal'
class gws.types.StyleLabelFontWeight[source]
bold = 'bold'
normal = 'normal'
class gws.types.StyleLabelOption[source]
all = 'all'
none = 'none'
class gws.types.StyleLabelPlacement[source]
end = 'end'
middle = 'middle'
start = 'start'
class gws.types.StyleMarker[source]
arrow = 'arrow'
circle = 'circle'
cross = 'cross'
square = 'square'
class gws.types.StyleProps(*args, **kwargs)[source]
class gws.types.StyleStrokeLineCap[source]
butt = 'butt'
round = 'round'
square = 'square'
class gws.types.StyleStrokeLineJoin[source]
bevel = 'bevel'
miter = 'miter'
round = 'round'
class gws.types.StyleType[source]
css = 'css'
cssSelector = 'cssSelector'
class gws.types.StyleValues(*args, **kwargs)[source]
class gws.types.SvgFragment(*args, **kwargs)[source]
class gws.types.TemplateLegendMode[source]
html = 'html'
image = 'image'
class gws.types.TemplateOutput(*args, **kwargs)[source]
class gws.types.TemplateProps(*args, **kwargs)[source]
class gws.types.TemplateQualityLevel(*args, **kwargs)[source]
class gws.types.UserProps(*args, **kwargs)[source]
class gws.types.IApi[source]
class gws.types.IApplication[source]
developer_option(name)[source]
find_action(action_type, project_uid=None)[source]
require_helper(key)[source]
class gws.types.IAuthManager[source]
authenticate(method: gws.types.IAuthMethod, login, password, **kw) → Optional[gws.types.IUser][source]
close_session(sess: gws.types.ISession, req: gws.types.IRequest, res: gws.types.IResponse) → gws.types.ISession[source]
create_stored_session(type: str, method: gws.types.IAuthMethod, user: gws.types.IUser) → gws.types.ISession[source]
delete_stored_sessions()[source]
destroy_stored_session(sess: gws.types.ISession)[source]
find_stored_session(uid)[source]
get_method(type: str) → Optional[gws.types.IAuthMethod][source]
get_provider(uid: str) → Optional[gws.types.IAuthProvider][source]
get_role(name: str) → gws.types.IRole[source]
get_user(user_fid: str) → Optional[gws.types.IUser][source]
login(method: gws.types.IAuthMethod, login: str, password: str, req: gws.types.IRequest) → gws.types.ISession[source]
logout(sess: gws.types.ISession, req: gws.types.IRequest) → gws.types.ISession[source]
new_session(**kwargs)[source]
open_session(req: gws.types.IRequest) → gws.types.ISession[source]
save_stored_session(sess: gws.types.ISession)[source]
serialize_user(user: gws.types.IUser) → str[source]
stored_session_records() → List[dict][source]
unserialize_user(s: str) → gws.types.IUser[source]
class gws.types.IAuthMethod[source]
close_session(auth: gws.types.IAuthManager, sess: gws.types.ISession, req: gws.types.IRequest, res: gws.types.IResponse)[source]
login(auth: gws.types.IAuthManager, login: str, password: str, req: gws.types.IRequest) → Optional[gws.types.ISession][source]
logout(auth: gws.types.IAuthManager, sess: gws.types.ISession, req: gws.types.IRequest) → gws.types.ISession[source]
open_session(auth: gws.types.IAuthManager, req: gws.types.IRequest) → Optional[gws.types.ISession][source]
class gws.types.IAuthProvider[source]
authenticate(method: gws.types.IAuthMethod, login: str, password: str, **kwargs) → Optional[gws.types.IUser][source]
get_user(user_uid: str) → Optional[gws.types.IUser][source]
user_from_dict(d: dict) → gws.types.IUser[source]
user_to_dict(u: gws.types.IUser) → dict[source]
class gws.types.IClient[source]
class gws.types.IDbProvider[source]
class gws.types.ILayer[source]
configure_legend() → gws.types.LayerLegend[source]
configure_metadata(provider_meta=None) → gws.types.MetaData[source]
edit_access(user)[source]
edit_operation(operation: str, feature_props: List[FeatureProps]) → List[gws.types.IFeature][source]
get_features(bounds: gws.types.Bounds, limit: int = 0) → List[gws.types.IFeature][source]
mapproxy_config(mc)[source]
ows_enabled(service: gws.types.IOwsService) → bool[source]
render_box(rv: gws.types.MapRenderView, extra_params=None)[source]
render_html_legend(context=None) → str[source]
render_legend(context=None) → Optional[str][source]
render_legend_image(context=None) → bytes[source]
render_svg(rv: gws.types.MapRenderView, style: Optional[gws.types.IStyle] = None) → str[source]
render_svg_tags(rv: gws.types.MapRenderView, style: Optional[gws.types.IStyle] = None) → List[tuple][source]
render_xyz(x, y, z)[source]
class gws.types.IMap[source]
class gws.types.IModel[source]
apply(atts: List[gws.types.Attribute]) → List[gws.types.Attribute][source]
apply_to_dict(d: dict) → List[gws.types.Attribute][source]
class gws.types.IMonitor[source]
add_directory(path, pattern)[source]
add_path(path)[source]
start()[source]
class gws.types.IOwsProvider[source]
find_features(args: gws.types.SearchArgs) → List[gws.types.IFeature][source]
operation(name: str) → gws.types.OwsOperation[source]
class gws.types.IOwsService[source]
error_response(err: Exception) → gws.types.HttpResponse[source]
handle(req: gws.types.IRequest) → gws.types.HttpResponse[source]
class gws.types.IPrinter[source]
class gws.types.IProject[source]
class gws.types.IRequest[source]
acquire(klass: str, uid: str) → Optional[gws.types.IObject][source]
auth_close(res: gws.types.IResponse)[source]
auth_open()[source]
login(login: str, password: str)[source]
logout()[source]
require(klass: str, uid: str) → gws.types.IObject[source]
require_layer(uid: str) → gws.types.ILayer[source]
require_project(uid: str) → gws.types.IProject[source]
class gws.types.IRootObject[source]
create(klass, cfg=None)[source]
create_object(klass, cfg, parent=None)[source]
create_shared_object(klass, uid, cfg)[source]
create_unbound_object(klass, cfg)[source]
find(klass, uid=None) → gws.types.IObject[source]
find_all(klass=None) → List[gws.types.IObject][source]
find_by_uid(uid) → gws.types.IObject[source]
find_first(klass) → gws.types.IObject[source]
class gws.types.ISearchProvider[source]
can_run(args: gws.types.SearchArgs)[source]
context_shape(args: gws.types.SearchArgs) → gws.types.IShape[source]
run(layer: gws.types.ILayer, args: gws.types.SearchArgs) → List[gws.types.IFeature][source]
class gws.types.ITemplate[source]
add_headers_and_footers(context: dict, in_path: str, out_path: str, format: str) → str[source]
dpi_for_quality(quality)[source]
normalize_context(context: dict) → dict[source]
render(context: dict, mro: Optional[gws.types.MapRenderOutput] = None, out_path: str = None, legends: dict = None, format: str = None) → gws.types.TemplateOutput[source]
class gws.types.IWebSite[source]
url_for(req, url)[source]
class gws.types.ISqlProvider[source]
describe(table: gws.types.SqlTable) → Dict[str, gws.types.SqlTableColumn][source]
edit_operation(operation: str, table: gws.types.SqlTable, features: List[IFeature]) → List[gws.types.IFeature][source]
select(args: gws.types.SelectArgs, extra_connect_params: dict = None) → List[gws.types.IFeature][source]
class gws.types.IVectorLayer[source]
connect_feature(feature: gws.types.IFeature) → gws.types.IFeature[source]