Previous topic

mapfish.lib.filters.logical

Next topic

Tutorials

This Page

mapfish.lib.filters.spatial

class mapfish.lib.filters.spatial.Spatial(type, geom_column, **kwargs)

Spatial filter.

type
the type of filter to create. Possible values are Spatial.BOX, Spatial.WITHIN, and Spatial.GEOMETRY.
geom_column
the Column object corresponding to the geometry column.
**kwargs
epsg
the EPSG code of the lon, lat or box values, see below.

for Spatial.BOX filter:

box
a list of coordinates representing the bounding box [xmin, ymin, xmax, ymax]
tolerance
the tolerance around the box of the search region, is expressed in the units associated with the projection system of the lon/lat coordinates.

for Spatial.WITHIN filter:

lon
the x coordinate of the center of the search region, the projection system of that coordinate can be specified with the epsg key.
lat
the y coordinate of the center of the search region, the projection system of that coordinate can be specified with the epsg key.
tolerance
the tolerance around the center of the search region, is expressed in the units associated with the projection system of the lon/lat coordinates.

for Spatial.GEOMETRY filter:

geometry
the geometry to search in, formatted in a GeoJSON string
tolerance
the tolerance around the geometry of the search region, is expressed in the units associated with the projection system of the lon/lat coordinates.