doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
class Translate(expression, x, y, z=0.0, **extra) | django.ref.contrib.gis.functions#django.contrib.gis.db.models.functions.Translate |
class Union(expr1, expr2, **extra) | django.ref.contrib.gis.functions#django.contrib.gis.db.models.functions.Union |
class GeometryCollectionField | django.ref.contrib.gis.model-api#django.contrib.gis.db.models.GeometryCollectionField |
class GeometryField | django.ref.contrib.gis.model-api#django.contrib.gis.db.models.GeometryField |
GeometryField.dim | django.ref.contrib.gis.model-api#django.contrib.gis.db.models.GeometryField.dim |
GeometryField.geography | django.ref.contrib.gis.model-api#django.contrib.gis.db.models.GeometryField.geography |
class LineStringField | django.ref.contrib.gis.model-api#django.contrib.gis.db.models.LineStringField |
class MakeLine(geo_field) | django.ref.contrib.gis.geoquerysets#django.contrib.gis.db.models.MakeLine |
class MultiLineStringField | django.ref.contrib.gis.model-api#django.contrib.gis.db.models.MultiLineStringField |
class MultiPointField | django.ref.contrib.gis.model-api#django.contrib.gis.db.models.MultiPointField |
class MultiPolygonField | django.ref.contrib.gis.model-api#django.contrib.gis.db.models.MultiPolygonField |
class PointField | django.ref.contrib.gis.model-api#django.contrib.gis.db.models.PointField |
class PolygonField | django.ref.contrib.gis.model-api#django.contrib.gis.db.models.PolygonField |
class RasterField | django.ref.contrib.gis.model-api#django.contrib.gis.db.models.RasterField |
class Union(geo_field) | django.ref.contrib.gis.geoquerysets#django.contrib.gis.db.models.Union |
class Feed
In addition to methods provided by the django.contrib.syndication.views.Feed base class, GeoDjango’s Feed class provides the following overrides. Note that these overrides may be done in multiple ways: from django.contrib.gis.feeds import Feed
class MyFeed(Feed):
# First, as a class attribute.
ge... | django.ref.contrib.gis.feeds#django.contrib.gis.feeds.Feed |
geometry(obj) | django.ref.contrib.gis.feeds#django.contrib.gis.feeds.Feed.geometry |
item_geometry(item) | django.ref.contrib.gis.feeds#django.contrib.gis.feeds.Feed.item_geometry |
class GeoAtom1Feed | django.ref.contrib.gis.feeds#django.contrib.gis.feeds.GeoAtom1Feed |
class GeoRSSFeed | django.ref.contrib.gis.feeds#django.contrib.gis.feeds.GeoRSSFeed |
class W3CGeoFeed | django.ref.contrib.gis.feeds#django.contrib.gis.feeds.W3CGeoFeed |
Field.geom_type
You generally shouldn’t have to set or change that attribute which should be set up depending on the field class. It matches the OpenGIS standard geometry name. | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.Field.geom_type |
Field.srid
This is the SRID code that the field value should be transformed to. For example, if the map widget SRID is different from the SRID more generally used by your application or database, the field will automatically convert input values into that SRID. | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.Field.srid |
class GeometryCollectionField | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.GeometryCollectionField |
class GeometryField | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.GeometryField |
class LineStringField | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.LineStringField |
class MultiLineStringField | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.MultiLineStringField |
class MultiPointField | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.MultiPointField |
class MultiPolygonField | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.MultiPolygonField |
class PointField | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.PointField |
class PolygonField | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.PolygonField |
class BaseGeometryWidget
This is an abstract base widget containing the logic needed by subclasses. You cannot directly use this widget for a geometry field. Note that the rendering of GeoDjango widgets is based on a template, identified by the template_name class attribute. | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.BaseGeometryWidget |
BaseGeometryWidget.display_raw
Boolean value specifying if a textarea input showing the serialized representation of the current geometry is visible, mainly for debugging purposes (default is False). | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.BaseGeometryWidget.display_raw |
BaseGeometryWidget.geom_type
The OpenGIS geometry type, generally set by the form field. | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.BaseGeometryWidget.geom_type |
BaseGeometryWidget.map_height | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.BaseGeometryWidget.map_height |
BaseGeometryWidget.map_srid
SRID code used by the map (default is 4326). | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.BaseGeometryWidget.map_srid |
BaseGeometryWidget.map_width
Height and width of the widget map (default is 400x600). | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.BaseGeometryWidget.map_width |
BaseGeometryWidget.supports_3d
Indicates if the widget supports edition of 3D data (default is False). | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.BaseGeometryWidget.supports_3d |
BaseGeometryWidget.template_name
The template used to render the map widget. | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.BaseGeometryWidget.template_name |
class OpenLayersWidget
This is the default widget used by all GeoDjango form fields. template_name is gis/openlayers.html. OpenLayersWidget and OSMWidget use the openlayers.js file hosted on the cdnjs.cloudflare.com content-delivery network. You can subclass these widgets in order to specify your own version of the O... | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.OpenLayersWidget |
class OSMWidget
This widget uses an OpenStreetMap base layer to display geographic objects on. Attributes are:
template_name
gis/openlayers-osm.html
default_lat
default_lon
The default center latitude and longitude are 47 and 5, respectively, which is a location in eastern France.
default_zoom
The... | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.OSMWidget |
default_lat | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.OSMWidget.default_lat |
default_lon
The default center latitude and longitude are 47 and 5, respectively, which is a location in eastern France. | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.OSMWidget.default_lon |
default_zoom
The default map zoom is 12. | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.OSMWidget.default_zoom |
template_name
gis/openlayers-osm.html | django.ref.contrib.gis.forms-api#django.contrib.gis.forms.widgets.OSMWidget.template_name |
class CoordTransform(source, target) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.CoordTransform |
class DataSource(ds_input, encoding='utf-8')
The constructor for DataSource only requires one parameter: the path of the file you want to read. However, OGR also supports a variety of more complex data sources, including databases, that may be accessed by passing a special name string instead of a path. For more info... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.DataSource |
layer_count | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.DataSource.layer_count |
name | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.DataSource.name |
class Driver(dr_input)
The Driver class is used internally to wrap an OGR DataSource driver.
driver_count
Returns the number of OGR vector drivers currently registered. | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Driver |
driver_count | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Driver.driver_count |
class Envelope(*args)
Represents an OGR Envelope structure that contains the minimum and maximum X, Y coordinates for a rectangle bounding box. The naming of the variables is compatible with the OGR Envelope C structure.
min_x
The value of the minimum X coordinate.
min_y
The value of the maximum X coordinate.... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Envelope |
expand_to_include(*args) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Envelope.expand_to_include |
ll | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Envelope.ll |
max_x | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Envelope.max_x |
max_y | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Envelope.max_y |
min_x | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Envelope.min_x |
min_y | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Envelope.min_y |
tuple | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Envelope.tuple |
ur | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Envelope.ur |
wkt | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Envelope.wkt |
class Feature
Feature wraps an OGR feature. You never create a Feature object directly. Instead, you retrieve them from a Layer object. Each feature consists of a geometry and a set of fields containing additional properties. The geometry of a field is accessible via its geom property, which returns an OGRGeometry ob... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Feature |
fid | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Feature.fid |
fields | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Feature.fields |
geom | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Feature.geom |
geom_type | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Feature.geom_type |
get | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Feature.get |
index | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Feature.index |
layer_name | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Feature.layer_name |
num_fields | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Feature.num_fields |
class Field
name
Returns the name of this field: >>> city['Name'].name
'Name'
type
Returns the OGR type of this field, as an integer. The FIELD_CLASSES dictionary maps these values onto subclasses of Field: >>> city['Density'].type
2
type_name
Returns a string with the name of the data type of this fiel... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Field |
as_datetime() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Field.as_datetime |
as_double() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Field.as_double |
as_int() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Field.as_int |
as_string() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Field.as_string |
name | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Field.name |
precision | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Field.precision |
type | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Field.type |
type_name | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Field.type_name |
value | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Field.value |
width | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Field.width |
class GDALBand
GDALBand instances are not created explicitly, but rather obtained from a GDALRaster object, through its bands attribute. The GDALBands contain the actual pixel values of the raster.
description
The name or description of the band, if any.
width
The width of the band in pixels (X-axis).
h... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand |
color_interp(as_string=False)
The color interpretation for the band, as an integer between 0and 16. If as_string is True, the data type is returned as a string with the following possible values: GCI_Undefined, GCI_GrayIndex, GCI_PaletteIndex, GCI_RedBand, GCI_GreenBand, GCI_BlueBand, GCI_AlphaBand, GCI_HueBand, GCI_... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.color_interp |
data(data=None, offset=None, size=None, shape=None)
The accessor to the pixel values of the GDALBand. Returns the complete data array if no parameters are provided. A subset of the pixel array can be requested by specifying an offset and block size as tuples. If NumPy is available, the data is returned as NumPy array... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.data |
datatype(as_string=False)
The data type contained in the band, as an integer constant between 0 (Unknown) and 11. If as_string is True, the data type is returned as a string with the following possible values: GDT_Unknown, GDT_Byte, GDT_UInt16, GDT_Int16, GDT_UInt32, GDT_Int32, GDT_Float32, GDT_Float64, GDT_CInt16, G... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.datatype |
description
The name or description of the band, if any. | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.description |
height
The height of the band in pixels (Y-axis). | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.height |
max
The maximum pixel value of the band (excluding the “no data” value). | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.max |
mean
The mean of all pixel values of the band (excluding the “no data” value). | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.mean |
metadata
The metadata of this band. The functionality is identical to GDALRaster.metadata. | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.metadata |
min
The minimum pixel value of the band (excluding the “no data” value). | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.min |
nodata_value
The “no data” value for a band is generally a special marker value used to mark pixels that are not valid data. Such pixels should generally not be displayed, nor contribute to analysis operations. To delete an existing “no data” value, set this property to None (requires GDAL ≥ 2.1). | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.nodata_value |
pixel_count
The total number of pixels in this band. Is equal to width * height. | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.pixel_count |
statistics(refresh=False, approximate=False)
Compute statistics on the pixel values of this band. The return value is a tuple with the following structure: (minimum, maximum, mean, standard deviation). If the approximate argument is set to True, the statistics may be computed based on overviews or a subset of image t... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.statistics |
std
The standard deviation of all pixel values of the band (excluding the “no data” value). | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.std |
width
The width of the band in pixels (X-axis). | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALBand.width |
class GDALRaster(ds_input, write=False)
The constructor for GDALRaster accepts two parameters. The first parameter defines the raster source, and the second parameter defines if a raster should be opened in write mode. For newly-created rasters, the second parameter is ignored and the new raster is always created in ... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster |
bands
List of all bands of the source, as GDALBand instances. >>> rst = GDALRaster({"width": 1, "height": 2, 'srid': 4326,
... "bands": [{"data": [0, 1]}, {"data": [2, 3]}]})
>>> len(rst.bands)
2
>>> rst.bands[1].data()
array([[ 2., 3.]], dtype=float32) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.bands |
driver
The name of the GDAL driver used to handle the input file. For GDALRasters created from a file, the driver type is detected automatically. The creation of rasters from scratch is an in-memory raster by default ('MEM'), but can be altered as needed. For instance, use GTiff for a GeoTiff file. For a list of file... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.driver |
extent
Extent (boundary values) of the raster source, as a 4-tuple (xmin, ymin, xmax, ymax) in the spatial reference system of the source. >>> rst = GDALRaster({'width': 10, 'height': 20, 'srid': 4326})
>>> rst.extent
(0.0, -20.0, 10.0, 0.0)
>>> rst.origin.x = 100
>>> rst.extent
(100.0, -20.0, 110.0, 0.0) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.extent |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.