pyams_gis package ⊞

pyams_gis.includeme(config)[source]

Pyramid include

pyams_gis.area

class pyams_gis.area.GeoArea[source]

Bases: persistent.Persistent

GeoArea attribute object

get_coordinates(projection=4326)[source]
projection

Projection system

wgs_coordinates
x1

West limit

x2

East limit

y1

South limit

y2

North limit

pyams_gis.configuration

class pyams_gis.configuration.MapConfiguration[source]

Bases: persistent.Persistent, zope.container.contained.Contained

Map configuration persistent class

attribution_control

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

crs

CRS: Coordinates reference system to use for the map

get_configuration()[source]
initial_bounds

Initial bounds: Initial map location bounds

initial_center

Initial center: Initial map location center

keyboard

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

layer_control

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

layers

Layers list: List of available layers displayed into this map

scroll_wheel_zoom

Scroll wheel zoom?: If ‘yes’, the map can be zoomed using the mouse wheel

zoom_control

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

zoom_level

Initial zoom level: Zoom level at which to display map

pyams_gis.configuration.map_configuration_factory(context)[source]

Map configuration factory

pyams_gis.include

pyams_gis.include.include_package(config)[source]

Pyramid include

pyams_gis.layer

class pyams_gis.layer.BaseTileMapLayer[source]

Bases: pyams_gis.layer.MapLayer

Base tile map layer

attribution

Layer attribution: String used by the attribution control

bounds

Layer bounds: Geographical bounds into which layer tiles are displayed

get_configuration()[source]

Get configuration mapping

class pyams_gis.layer.EsriFeatureMapLayer[source]

Bases: pyams_gis.layer.MapLayer

ESRI feature map layer

depends = {'L.esri.featureLayer': <Resource 'js/leaflet-esri-2.0.8.js' in library 'pyams_gis'>}
factory = 'PyAMS_GIS.factory.ESRI.Feature'
get_configuration()[source]

Get configuration mapping

layer_type = 'ESRI Features'
token

Token: Token used in all service requests

url

Layer URL: URL used to get the feature layer

where

Where condition: Optional expression used to filter features

class pyams_gis.layer.GeoportalMapLayer[source]

Bases: pyams_gis.layer.BaseTileMapLayer

Geoportal map layer persistent class

api_key

API key: Key used to access layer data

crs

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

depends = {'L.geoportalLayer.WMS': <Resource 'js/leaflet-gp-3.0.2.js' in library 'pyams_gis'>}
factory = 'PyAMS_GIS.factory.Geoportal.WMS'
get_configuration()[source]

Get configuration mapping

layer_name

IGN layer name: Name of layer in IGN format

layer_type = 'Geoportal'
class pyams_gis.layer.GoogleMapLayer[source]

Bases: pyams_gis.layer.MapLayer

Google maps layer

api_key

API key: Google API key used to access maps data

depends = {'L.gridLayer.googleMutant': <Resource 'js/leaflet-google-mutant.js' in library 'pyams_gis'>}
factory = 'PyAMS_GIS.factory.Google'
get_configuration()[source]

Get configuration mapping

layer_type = 'Google'
type

Map type: Type of GoogleMaps layer type

class pyams_gis.layer.MapLayer[source]

Bases: persistent.Persistent, zope.container.contained.Contained

Base tile map layer persistent class

depends = {}
factory = None
get_configuration()[source]

Get configuration mapping

layer_type = None
max_zoom

Maximum zoom level: Maximum zoom level at which layer is displayed

min_zoom

Minimum zoom level: Minimum zoom level at which layer is displayed

name

Layer name

title

Layer title: Full layer title

class pyams_gis.layer.TileMapLayer[source]

Bases: pyams_gis.layer.BaseTileMapLayer

Base tile map layer persistent class

factory = 'PyAMS_GIS.factory.TileLayer'
get_configuration()[source]

Get configuration mapping

layer_type = 'Tile'
url

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

class pyams_gis.layer.WMSMapLayer[source]

Bases: pyams_gis.layer.TileMapLayer

WMS map mayer persistent class

crs

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

factory = 'PyAMS_GIS.factory.WMS'
format

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

get_configuration()[source]

Get configuration mapping

layer_type = 'WMS'
layers

Layers: Comma-separated list of WMS layers to show

styles

Styles: Comma-separated list of WMS styles

transparent

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

uppercase

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

version

Version: Version of the WMS service to use

pyams_gis.point

class pyams_gis.point.GeoPoint[source]

Bases: persistent.Persistent

GeoPoint attribute object

get_coordinates(projection=4326)[source]
latitude

Latitude

longitude

Longitude

projection

Projection system

wgs_coordinates
class pyams_gis.point.GeoPointZ[source]

Bases: pyams_gis.point.GeoPoint

GeoPointZ attribute object

altitude

Altitude

pyams_gis.schema

class pyams_gis.schema.GeoAreaField(**kwargs)[source]

Bases: zope.schema._bootstrapfields.Object

GeoArea field class

class pyams_gis.schema.GeoPointField(**kwargs)[source]

Bases: zope.schema._bootstrapfields.Object

GeoPoint field class

class pyams_gis.schema.GeoPointZField(**kwargs)[source]

Bases: zope.schema._bootstrapfields.Object

GeoPointZ field class

interface pyams_gis.schema.IGeoAreaField[source]

Extends: zope.schema.interfaces.IObject

GeoArea schema field interface

interface pyams_gis.schema.IGeoPointField[source]

Extends: zope.schema.interfaces.IObject

GeoPoint schema field interface

interface pyams_gis.schema.IGeoPointZField[source]

Extends: zope.schema.interfaces.IObject

GeoPointZ schema field interface

pyams_gis.site

pyams_gis.transform

pyams_gis.transform.transform(point, from_srid, to_srid)[source]

Transform point coordinates from source projection to another projection

Parameters:
  • point – source point coordinates; can be given as a (longitude, latitude) tuple or as a mapping containing both keys
  • from_srid – source coordinates system given as SRID
  • to_srid – target coordinates system given as SRID
Returns:

mapping with new ‘point’ coordinates containing transformed coordinates, and ‘projection’ key containing SRID of result projection system

pyams_gis.utility

class pyams_gis.utility.MapLayersVocabulary(context)[source]

Bases: zope.schema.vocabulary.SimpleVocabulary

Map manager layers vocabulary

class pyams_gis.utility.MapManager[source]

Bases: zope.container.folder.Folder

Map manager utility