gis.geos.WKTWriter.trim

trim New in Django 1.10. This property is used to enable or disable trimming of unnecessary decimals. >>> from django.contrib.gis.geos import Point, WKTWriter >>> pnt = Point(1, 1) >>> wkt_w = WKTWriter() >>> wkt_w.trim False >>> wkt_w.write(pnt) 'POINT (1.0000000000000000 1.0000000000000000)' >>> wkt_w.trim = True >>> wkt_w.write(pnt) 'POINT (1 1)'

gis.geos.WKTWriter.write()

write(geom) Returns the WKT of the given geometry. Example: >>> from django.contrib.gis.geos import Point, WKTWriter >>> pnt = Point(1, 1) >>> wkt_w = WKTWriter() >>> wkt_w.write(pnt) 'POINT (1.0000000000000000 1.0000000000000000)'

gis.measure.A

class A Alias for Area class.

gis.measure.Area

class Area(**kwargs) [source] To initialize an area object, pass in a keyword corresponding to the desired unit attribute name set with desired value. For example, the following creates an area object representing 5 square miles: >>> a = Area(sq_mi=5) __getattr__(unit_att) Returns the area value in units corresponding to the given unit attribute. For example: >>> print(a.sq_km) 12.949940551680001 classmethod unit_attname(unit_name) Returns the area unit attribut

gis.measure.Area.__getattr__()

__getattr__(unit_att) Returns the area value in units corresponding to the given unit attribute. For example: >>> print(a.sq_km) 12.949940551680001

gis.measure.D

class D Alias for Distance class.

gis.measure.Distance

class Distance(**kwargs) [source] To initialize a distance object, pass in a keyword corresponding to the desired unit attribute name set with desired value. For example, the following creates a distance object representing 5 miles: >>> dist = Distance(mi=5) __getattr__(unit_att) Returns the distance value in units corresponding to the given unit attribute. For example: >>> print(dist.km) 8.04672 classmethod unit_attname(unit_name) Returns the distance unit attr

gis.measure.Distance.__getattr__()

__getattr__(unit_att) Returns the distance value in units corresponding to the given unit attribute. For example: >>> print(dist.km) 8.04672

gis.utils.LayerMapping

class LayerMapping(model, data_source, mapping, layer=0, source_srs=None, encoding=None, transaction_mode='commit_on_success', transform=True, unique=True, using='default') The following are the arguments and keywords that may be used during instantiation of LayerMapping objects. Argument Description model The geographic model, not an instance. data_source The path to the OGR-supported data source file (e.g., a shapefile). Also accepts django.contrib.gis.gdal.DataSource instances. mapping A

gis.utils.LayerMapping.save()

LayerMapping.save(verbose=False, fid_range=False, step=False, progress=False, silent=False, stream=sys.stdout, strict=False) The save() method also accepts keywords. These keywords are used for controlling output logging, error handling, and for importing specific feature ranges. Save Keyword Arguments Description fid_range May be set with a slice or tuple of (begin, end) feature ID’s to map from the data source. In other words, this keyword enables the user to selectively import a subset ra