class GeometryField(forms.Field): (source)
Known subclasses: django.contrib.gis.forms.fields.GeometryCollectionField
, django.contrib.gis.forms.fields.LineStringField
, django.contrib.gis.forms.fields.MultiLineStringField
, django.contrib.gis.forms.fields.MultiPointField
, django.contrib.gis.forms.fields.MultiPolygonField
, django.contrib.gis.forms.fields.PointField
, django.contrib.gis.forms.fields.PolygonField
This is the basic form field for a Geometry. Any textual input that is accepted by GEOSGeometry is accepted by this form. By default, this includes WKT, HEXEWKB, WKB (in a buffer), and GeoJSON.
Method | __init__ |
Undocumented |
Method | clean |
Validate that the input value can be converted to a Geometry object and return it. Raise a ValidationError if the value cannot be instantiated as a Geometry. |
Method | has |
Compare geographic value of data with its initial value. |
Method | to |
Transform the value to a Geometry object. |
Class Variable | default |
Undocumented |
Instance Variable | geom |
Undocumented |
Instance Variable | srid |
Undocumented |
Inherited from Field
:
Method | __deepcopy__ |
Undocumented |
Method | bound |
Return the value that should be shown for this field on render of a bound form, given the submitted POST data for the field and the initial data, if any. |
Method | get |
Return a BoundField instance that will be used when accessing the form field in a template. |
Method | prepare |
Undocumented |
Method | run |
Undocumented |
Method | validate |
Undocumented |
Method | widget |
Given a Widget instance (*not* a Widget class), return a dictionary of any HTML attributes that should be added to the Widget, based on this Field. |
Class Variable | default |
Undocumented |
Class Variable | empty |
Undocumented |
Instance Variable | disabled |
Undocumented |
Instance Variable | error |
Undocumented |
Instance Variable | help |
Undocumented |
Instance Variable | initial |
Undocumented |
Instance Variable | label |
Undocumented |
Instance Variable | label |
Undocumented |
Instance Variable | localize |
Undocumented |
Instance Variable | required |
Undocumented |
Instance Variable | show |
Undocumented |
Instance Variable | validators |
Undocumented |
Instance Variable | widget |
Undocumented |
django.forms.fields.Field.clean
Validate that the input value can be converted to a Geometry object and return it. Raise a ValidationError if the value cannot be instantiated as a Geometry.
django.forms.fields.Field.has_changed
Compare geographic value of data with its initial value.
django.contrib.gis.forms.fields.GeometryCollectionField
, django.contrib.gis.forms.fields.LineStringField
, django.contrib.gis.forms.fields.MultiLineStringField
, django.contrib.gis.forms.fields.MultiPointField
, django.contrib.gis.forms.fields.MultiPolygonField
, django.contrib.gis.forms.fields.PointField
, django.contrib.gis.forms.fields.PolygonField
Undocumented