pyams_gis.interfaces package ⊞

interface pyams_gis.interfaces.IGeoArea[source]

Geographic area defined by a rectangle

x1

West limit

Implementation:pyams_utils.schema.DottedDecimalField
Read Only:False
Required:False
Default Value:None
Allowed Type:decimal.Decimal
y1

South limit

Implementation:pyams_utils.schema.DottedDecimalField
Read Only:False
Required:False
Default Value:None
Allowed Type:decimal.Decimal
x2

East limit

Implementation:pyams_utils.schema.DottedDecimalField
Read Only:False
Required:False
Default Value:None
Allowed Type:decimal.Decimal
y2

North limit

Implementation:pyams_utils.schema.DottedDecimalField
Read Only:False
Required:False
Default Value:None
Allowed Type:decimal.Decimal
projection

Projection system

Implementation:zope.schema.Choice
Read Only:False
Required:True
Default Value:4326
get_coordinates(self, projection=4326)

Get coordinates translated to given projection

wgs_coordinates

Coordinates in WGS84 projection

interface pyams_gis.interfaces.IGeoPoint[source]

GeoPoint attribute interface

longitude

Longitude

Implementation:pyams_utils.schema.DottedDecimalField
Read Only:False
Required:False
Default Value:None
Allowed Type:decimal.Decimal
latitude

Latitude

Implementation:pyams_utils.schema.DottedDecimalField
Read Only:False
Required:False
Default Value:None
Allowed Type:decimal.Decimal
projection

Projection system

Implementation:zope.schema.Choice
Read Only:False
Required:True
Default Value:4326
get_coordinates(self, projection=4326)

Get coordinates translated to given projection

wgs_coordinates

Coordinates tuple in WGS84 projection

interface pyams_gis.interfaces.IGeoPointZ[source]

Extends: pyams_gis.interfaces.IGeoPoint

GeoPointZ attribute interface

altitude

Altitude

Implementation:pyams_utils.schema.DottedDecimalField
Read Only:False
Required:False
Default Value:None
Allowed Type:decimal.Decimal

pyams_gis.interfaces.configuration

interface pyams_gis.interfaces.configuration.IMapConfiguration[source]

Map configuration interface

crs

CRS

Coordinates reference system to use for the map

Implementation:zope.schema.Choice
Read Only:False
Required:True
Default Value:‘L.CRS.EPSG3857’
layers

Layers list

List of available layers displayed into this map

Implementation:zope.schema.List
Read Only:False
Required:False
Default Value:None
Allowed Type:list

Value Type

Implementation:zope.schema.Choice
Read Only:False
Required:True
Default Value:None
attribution_control

Attribution control?

If ‘yes’, an attribution control is added to map

Implementation:zope.schema.Bool
Read Only:False
Required:True
Default Value:True
Allowed Type:bool
zoom_control

Zoom control?

If ‘yes’, a zoom control is added to map

Implementation:zope.schema.Bool
Read Only:False
Required:True
Default Value:True
Allowed Type:bool
layer_control

Layers control?

If ‘yes’, a layer selection control is added to map

Implementation:zope.schema.Bool
Read Only:False
Required:True
Default Value:False
Allowed Type:bool
initial_center

Initial center

Initial map location center

Implementation:pyams_gis.schema.GeoPointField
Read Only:False
Required:False
Default Value:None
Must Provide:pyams_gis.interfaces.IGeoPoint
zoom_level

Initial zoom level

Zoom level at which to display map

Implementation:zope.schema.Int
Read Only:False
Required:False
Default Value:None
Allowed Type:int
initial_bounds

Initial bounds

Initial map location bounds

Implementation:pyams_gis.schema.GeoAreaField
Read Only:False
Required:False
Default Value:None
Must Provide:pyams_gis.interfaces.IGeoArea
keyboard

Keyboard navigation?

If ‘yes’, makes the map focusable and allows users to navigate with keyboard arrows and +/- keys

Implementation:zope.schema.Bool
Read Only:False
Required:True
Default Value:True
Allowed Type:bool
scroll_wheel_zoom

Scroll wheel zoom?

If ‘yes’, the map can be zoomed using the mouse wheel

Implementation:zope.schema.Bool
Read Only:False
Required:True
Default Value:True
Allowed Type:bool
get_configuration(self)

Get map layers configuration

interface pyams_gis.interfaces.configuration.IMapConfigurationTarget[source]

Map configuration target marker interface

pyams_gis.interfaces.layer

interface pyams_gis.interfaces.layer.IBaseTileMapLayer[source]

Extends: pyams_gis.interfaces.layer.IMapLayer

Base tile map layer interface

attribution

Layer attribution

String used by the attribution control

Implementation:zope.schema.TextLine
Read Only:False
Required:False
Default Value:None
Allowed Type:str
bounds

Layer bounds

Geographical bounds into which layer tiles are displayed

Implementation:pyams_gis.schema.GeoAreaField
Read Only:False
Required:False
Default Value:None
Must Provide:pyams_gis.interfaces.IGeoArea
interface pyams_gis.interfaces.layer.IEsriBaseMapLayer[source]

Extends: pyams_gis.interfaces.layer.ITileMapLayer

ESRI map layer interface

interface pyams_gis.interfaces.layer.IEsriFeatureMapLayer[source]

Extends: pyams_gis.interfaces.layer.IMapLayer

ESRI feature layer interface

url

Layer URL

URL used to get the feature layer

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:None
Allowed Type:str
token

Token

Token used in all service requests

Implementation:zope.schema.TextLine
Read Only:False
Required:False
Default Value:None
Allowed Type:str
where

Where condition

Optional expression used to filter features

Implementation:zope.schema.TextLine
Read Only:False
Required:False
Default Value:None
Allowed Type:str
interface pyams_gis.interfaces.layer.IGeoportalMapLayer[source]

Extends: pyams_gis.interfaces.layer.IBaseTileMapLayer

French IGN map layer interface

api_key

API key

Key used to access layer data

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:None
Allowed Type:str
layer_name

IGN layer name

Name of layer in IGN format

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:None
Allowed Type:str
crs

CRS

Coordinates reference system to use for map requests; defaults to map request

Implementation:zope.schema.Choice
Read Only:False
Required:False
Default Value:None
interface pyams_gis.interfaces.layer.IGoogleMapLayer[source]

Extends: pyams_gis.interfaces.layer.IMapLayer

Google Maps layer

api_key

API key

Google API key used to access maps data

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:None
Allowed Type:str
type

Map type

Type of GoogleMaps layer type

Implementation:zope.schema.Choice
Read Only:False
Required:True
Default Value:‘roadmap’
interface pyams_gis.interfaces.layer.IMapLayer[source]

Extends: zope.location.interfaces.IContained, zope.annotation.interfaces.IAttributeAnnotatable

Base map layer interface

factory

Layer factory name

depends

List of layer factory dependent objects

name

Layer name

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:None
Allowed Type:str
layer_type

Layer type

title

Layer title

Full layer title

Implementation:pyams_i18n.schema.I18nTextLineField
Read Only:False
Required:True
Default Value:None
Allowed Type:dict

Key Type

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:None
Allowed Type:str

Value Type

Implementation:zope.schema.TextLine
Read Only:False
Required:False
Default Value:None
Allowed Type:str
min_zoom

Minimum zoom level

Minimum zoom level at which layer is displayed

Implementation:zope.schema.Int
Read Only:False
Required:True
Default Value:0
Allowed Type:int
max_zoom

Maximum zoom level

Maximum zoom level at which layer is displayed

Implementation:zope.schema.Int
Read Only:False
Required:True
Default Value:18
Allowed Type:int
get_configuration(self)

Get layer configuration mapping

interface pyams_gis.interfaces.layer.ITileMapLayer[source]

Extends: pyams_gis.interfaces.layer.IBaseTileMapLayer

Tile map layer interface

url

URL template

URL template used to get layer tiles (see leaflet.js docs)

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png’
Allowed Type:str
interface pyams_gis.interfaces.layer.IWMSMapLayer[source]

Extends: pyams_gis.interfaces.layer.ITileMapLayer

WMS map layer interface

crs

CRS

Coordinates reference system to use for map requests; defaults to map request

Implementation:zope.schema.Choice
Read Only:False
Required:False
Default Value:None
layers

Layers

Comma-separated list of WMS layers to show

Implementation:zope.schema.TextLine
Read Only:False
Required:False
Default Value:None
Allowed Type:str
styles

Styles

Comma-separated list of WMS styles

Implementation:zope.schema.TextLine
Read Only:False
Required:False
Default Value:None
Allowed Type:str
format

Layer format

WMS image format; use ‘image/png’ for layers with transparency

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:‘image/png’
Allowed Type:str
transparent

Transparent?

If ‘yes’, the WMS services will return images with transparency

Implementation:zope.schema.Bool
Read Only:False
Required:True
Default Value:False
Allowed Type:bool
version

Version

Version of the WMS service to use

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:‘1.1.1’
Allowed Type:str
uppercase

Uppercase?

If ‘yes’, WMS request parameters keys will be uppercase

Implementation:zope.schema.Bool
Read Only:False
Required:True
Default Value:False
Allowed Type:bool

pyams_gis.interfaces.utility

interface pyams_gis.interfaces.utility.IMapManager[source]

Extends: zope.container.interfaces.IContainer, zope.annotation.interfaces.IAttributeAnnotatable

Map manager interface

__setitem__(key, value)

Add the given object to the container under the given name.

Raises a TypeError if the key is not a unicode or ascii string.

Raises a ValueError if the key is empty, or if the key contains a character which is not allowed in an object name.

Raises a KeyError if the key violates a uniqueness constraint.

The container might choose to add a different object than the one passed to this method.

If the object doesn’t implement IContained, then one of two things must be done:

  1. If the object implements ILocation, then the IContained interface must be declared for the object.
  2. Otherwise, a ContainedProxy is created for the object and stored.

The object’s __parent__ and __name__ attributes are set to the container and the given name.

If the old parent was None, then an IObjectAddedEvent is generated, otherwise, an IObjectMovedEvent is generated. An IContainerModifiedEvent is generated for the container.

If the object replaces another object, then the old object is deleted before the new object is added, unless the container vetos the replacement by raising an exception.

If the object’s __parent__ and __name__ were already set to the container and the name, then no events are generated and no hooks. This allows advanced clients to take over event generation.

pyams_gis.interfaces.widget

interface pyams_gis.interfaces.widget.IGeoAreaWidget[source]

Extends: z3c.form.interfaces.IObjectWidget

GeoArea widget interface

interface pyams_gis.interfaces.widget.IGeoPointWidget[source]

Extends: z3c.form.interfaces.IObjectWidget

GeoPoint widget interface

interface pyams_gis.interfaces.widget.IGeoPointZWidget[source]

Extends: z3c.form.interfaces.IObjectWidget

GeoPointZ widget interface