doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
geotransform
The affine transformation matrix used to georeference the source, as a tuple of six coefficients which map pixel/line coordinates into georeferenced space using the following relationship: Xgeo = GT(0) + Xpixel*GT(1) + Yline*GT(2)
Ygeo = GT(3) + Xpixel*GT(4) + Yline*GT(5)
The same values can be retrieve... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.geotransform |
height
The height of the source in pixels (Y-axis). >>> GDALRaster({'width': 10, 'height': 20, 'srid': 4326}).height
20 | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.height |
info
Returns a string with a summary of the raster. This is equivalent to the gdalinfo command line utility. | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.info |
is_vsi_based
A boolean indicating if this raster is stored in GDAL’s virtual filesystem. | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.is_vsi_based |
metadata
The metadata of this raster, represented as a nested dictionary. The first-level key is the metadata domain. The second-level contains the metadata item names and values from each domain. To set or update a metadata item, pass the corresponding metadata item to the method using the nested structure described... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.metadata |
name
The name of the source which is equivalent to the input file path or the name provided upon instantiation. >>> GDALRaster({'width': 10, 'height': 10, 'name': 'myraster', 'srid': 4326}).name
'myraster' | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.name |
origin
Coordinates of the top left origin of the raster in the spatial reference system of the source, as a point object with x and y members. >>> rst = GDALRaster({'width': 10, 'height': 20, 'srid': 4326})
>>> rst.origin
[0.0, 0.0]
>>> rst.origin.x = 1
>>> rst.origin
[1.0, 0.0] | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.origin |
scale
Pixel width and height used for georeferencing the raster, as a point object with x and y members. See geotransform for more information. >>> rst = GDALRaster({'width': 10, 'height': 20, 'srid': 4326})
>>> rst.scale
[1.0, -1.0]
>>> rst.scale.x = 2
>>> rst.scale
[2.0, -1.0] | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.scale |
skew
Skew coefficients used to georeference the raster, as a point object with x and y members. In case of north up images, these coefficients are both 0. >>> rst = GDALRaster({'width': 10, 'height': 20, 'srid': 4326})
>>> rst.skew
[0.0, 0.0]
>>> rst.skew.x = 3
>>> rst.skew
[3.0, 0.0] | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.skew |
srid
The Spatial Reference System Identifier (SRID) of the raster. This property is a shortcut to getting or setting the SRID through the srs attribute. >>> rst = GDALRaster({'width': 10, 'height': 20, 'srid': 4326})
>>> rst.srid
4326
>>> rst.srid = 3086
>>> rst.srid
3086
>>> rst.srs.srid # This is equivalent
3086 | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.srid |
srs
The spatial reference system of the raster, as a SpatialReference instance. The SRS can be changed by setting it to an other SpatialReference or providing any input that is accepted by the SpatialReference constructor. >>> rst = GDALRaster({'width': 10, 'height': 20, 'srid': 4326})
>>> rst.srs.srid
4326
>>> rst.s... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.srs |
transform(srs, driver=None, name=None, resampling='NearestNeighbour', max_error=0.0)
Transforms this raster to a different spatial reference system (srs), which may be a SpatialReference object, or any other input accepted by SpatialReference (including spatial reference WKT and PROJ strings, or an integer SRID). It ... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.transform |
vsi_buffer
A bytes representation of this raster. Returns None for rasters that are not stored in GDAL’s virtual filesystem. | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.vsi_buffer |
warp(ds_input, resampling='NearestNeighbour', max_error=0.0)
Returns a warped version of this raster. The warping parameters can be specified through the ds_input argument. The use of ds_input is analogous to the corresponding argument of the class constructor. It is a dictionary with the characteristics of the targe... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.warp |
width
The width of the source in pixels (X-axis). >>> GDALRaster({'width': 10, 'height': 20, 'srid': 4326}).width
10 | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GDALRaster.width |
class GeometryCollection
add(geom)
Adds a geometry to this geometry collection. Not applicable to other geometry types. | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GeometryCollection |
add(geom) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.GeometryCollection.add |
class Layer
Layer is a wrapper for a layer of data in a DataSource object. You never create a Layer object directly. Instead, you retrieve them from a DataSource object, which is essentially a standard Python container of Layer objects. For example, you can access a specific layer by its index (e.g. ds[0] to access t... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer |
extent | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.extent |
field_precisions | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.field_precisions |
field_widths | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.field_widths |
fields | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.fields |
geom_type | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.geom_type |
get_fields() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.get_fields |
get_geoms(geos=False) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.get_geoms |
name | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.name |
num_feat | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.num_feat |
num_fields | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.num_fields |
spatial_filter | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.spatial_filter |
srs | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.srs |
test_capability(capability) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Layer.test_capability |
class LineString
x
Returns a list of X coordinates in this line: >>> OGRGeometry('LINESTRING (1 2,3 4)').x
[1.0, 3.0]
y
Returns a list of Y coordinates in this line: >>> OGRGeometry('LINESTRING (1 2,3 4)').y
[2.0, 4.0]
z
Returns a list of Z coordinates in this line, or None if the line does not have Z c... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.LineString |
x | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.LineString.x |
y | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.LineString.y |
z | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.LineString.z |
class OGRGeometry(geom_input, srs=None)
This object is a wrapper for the OGR Geometry class. These objects are instantiated directly from the given geom_input parameter, which may be a string containing WKT, HEX, GeoJSON, a buffer containing WKB data, or an OGRGeomType object. These objects are also returned from the... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry |
__getitem__() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.__getitem__ |
__iter__() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.__iter__ |
__len__() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.__len__ |
area | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.area |
boundary() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.boundary |
clone() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.clone |
close_rings() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.close_rings |
contains(other) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.contains |
convex_hull | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.convex_hull |
coord_dim | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.coord_dim |
coords | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.coords |
crosses(other) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.crosses |
difference() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.difference |
dimension | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.dimension |
disjoint(other) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.disjoint |
envelope | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.envelope |
equals(other) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.equals |
ewkt | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.ewkt |
extent | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.extent |
geom_count | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.geom_count |
geom_name | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.geom_name |
geom_type | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.geom_type |
geos | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.geos |
gml | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.gml |
hex | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.hex |
intersection() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.intersection |
intersects(other) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.intersects |
json | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.json |
kml | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.kml |
num_coords | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.num_coords |
num_points | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.num_points |
overlaps(other) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.overlaps |
point_count | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.point_count |
srid | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.srid |
srs | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.srs |
sym_difference() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.sym_difference |
touches(other) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.touches |
transform(coord_trans, clone=False) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.transform |
tuple | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.tuple |
union() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.union |
within(other) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.within |
wkb | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.wkb |
wkb_size | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.wkb_size |
wkt | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeometry.wkt |
class OGRGeomType(type_input)
This class allows for the representation of an OGR geometry type in any of several ways: >>> from django.contrib.gis.gdal import OGRGeomType
>>> gt1 = OGRGeomType(3) # Using an integer for the type
>>> gt2 = OGRGeomType('Polygon') # Using a string
>>> gt3 = OGRGeomType('P... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeomType |
django | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeomType.django |
name | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeomType.name |
num | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.OGRGeomType.num |
class Point
x
Returns the X coordinate of this point: >>> OGRGeometry('POINT (1 2)').x
1.0
y
Returns the Y coordinate of this point: >>> OGRGeometry('POINT (1 2)').y
2.0
z
Returns the Z coordinate of this point, or None if the point does not have a Z coordinate: >>> OGRGeometry('POINT (1 2 3)').z
3.0 | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Point |
x | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Point.x |
y | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Point.y |
z | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Point.z |
class Polygon
shell
Returns the shell or exterior ring of this polygon, as a LinearRing geometry.
exterior_ring
An alias for shell.
centroid
Returns a Point representing the centroid of this polygon. | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Polygon |
centroid | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Polygon.centroid |
exterior_ring | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Polygon.exterior_ring |
shell | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.Polygon.shell |
class SpatialReference(srs_input)
Spatial reference objects are initialized on the given srs_input, which may be one of the following: OGC Well Known Text (WKT) (a string) EPSG code (integer or string) PROJ string A shorthand string for well-known standards ('WGS84', 'WGS72', 'NAD27', 'NAD83') Example: >>> wgs84 = ... | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.SpatialReference |
__getitem__(target) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.SpatialReference.__getitem__ |
angular_name | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.SpatialReference.angular_name |
angular_units | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.SpatialReference.angular_units |
attr_value(target, index=0) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.SpatialReference.attr_value |
auth_code(target) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.SpatialReference.auth_code |
auth_name(target) | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.SpatialReference.auth_name |
clone() | django.ref.contrib.gis.gdal#django.contrib.gis.gdal.SpatialReference.clone |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.