gis.db.models.functions.SnapToGrid

class SnapToGrid(expression, *args, **extra)

Availability: PostGIS, SpatiaLite (≥ 3.1)

Accepts a single geographic field or expression and returns a geometry with all points snapped to the given grid. How the geometry is snapped to the grid depends on how many numeric (either float, integer, or long) arguments are given.

Number of Arguments Description
1 A single size to snap both the X and Y grids to.
2 X and Y sizes to snap the grid to.
4 X, Y sizes and the corresponding X, Y origins.
doc_Django
2016-10-09 18:37:25
Comments
Leave a Comment

Please login to continue.