... eString (( 0 , 0 ), ( 0 , 50 ), ( 50 , 50 ), ( 50 , 0 ), ( 0 , 0 )) >>> line [ 0 ] (0.0, 0.0) >>> line [ - 2 ] (50.0, 0.0) Polygon 上のインデックス指定は、そのインデックスに対応するリング ( LinearRing オブジェクト) を返します: >>> from django.contrib.gi ... s.geos import Polygon >>> poly = Polygon ((( 0.0 , 0.0 ), ( 0.0 , 50.0 ), ( 50.0 , 50.0 ), ( 50.0 , 0.0 ), ( 0.0 , 0.0 ))) >>> poly [ 0 ] <Linea ... ry. dims ¶ ジオメトリの次元を返します: Point および MultiPoint に対しては 0 LineString および MultiLineString に対しては 1 Polygon および MultiPolygon に対しては 2 です。 GeometryCollection が空の場合は -1 を返します。 空ではない GeometryCollection の要 ... ... eString (( 0 , 0 ), ( 0 , 50 ), ( 50 , 50 ), ( 50 , 0 ), ( 0 , 0 )) >>> line [ 0 ] (0.0, 0.0) >>> line [ - 2 ] (50.0, 0.0) Polygon 上のインデックス指定は、そのインデックスに対応するリング ( LinearRing オブジェクト) を返します: >>> from django.contrib.gi ... s.geos import Polygon >>> poly = Polygon ((( 0.0 , 0.0 ), ( 0.0 , 50.0 ), ( 50.0 , 50.0 ), ( 50.0 , 0.0 ), ( 0.0 , 0.0 ))) >>> poly [ 0 ] <Linea ... ry. dims ¶ ジオメトリの次元を返します: Point および MultiPoint に対しては 0 LineString および MultiLineString に対しては 1 Polygon および MultiPolygon に対しては 2 です。 GeometryCollection が空の場合は -1 を返します。 空ではない GeometryCollection の要 ... ... いますが、ルックアップはラスタの両側で同じように使用できます。ルックアップがラスター入力をサポートしていない場合、入力は ST_Polygon 関数を使用して必要に応じて自動的にジオメトリに変換されます。 ラスタルックアップの概要 も参照してください。 ルックアップで使 ... T_Contains(rast, rst) N, B rast__1__contains=(rst, 2) ST_Contains(rast, 1, rst, 2) B, C rast__contains=geom ST_Contains(ST_Polygon(rast), geom) B, C rast__1__contains=geom ST_Contains(ST_Polygon(rast, 1), geom) B, C poly__contains=rst ST_Contains(poly, ... ST_Polygon(rst)) B, C poly__contains=(rst, 1) ST_Contains(poly, ST_Polygon(rst, 1)) C rast__crosses=rst ST_Crosses(ST_Polygon(rast), ... ... いますが、ルックアップはラスタの両側で同じように使用できます。ルックアップがラスター入力をサポートしていない場合、入力は ST_Polygon 関数を使用して必要に応じて自動的にジオメトリに変換されます。 ラスタルックアップの概要 も参照してください。 ルックアップで使 ... T_Contains(rast, rst) N, B rast__1__contains=(rst, 2) ST_Contains(rast, 1, rst, 2) B, C rast__contains=geom ST_Contains(ST_Polygon(rast), geom) B, C rast__1__contains=geom ST_Contains(ST_Polygon(rast, 1), geom) B, C poly__contains=rst ST_Contains(poly, ... ST_Polygon(rst)) B, C poly__contains=(rst, 1) ST_Contains(poly, ST_Polygon(rst, 1)) C rast__crosses=rst ST_Crosses(ST_Polygon(rast), ... ... me number of geographic features ( Feature ), information about the type of features contained in that layer (e.g. points, polygons, etc.), as well as the names and types of any additional fields ( Field ) of data that may be associated with each featur ... 間参照系 (spatial reference system) と座標変換をサポートしています。 >>> from django.contrib.gis.gdal import OGRGeometry >>> polygon = OGRGeometry ( "POLYGON((0 0, 5 0, 5 5, 0 5))" ) class OGRGeometry ( geom_input , srs = None ) [ソース] ¶ このオブジェクト ... から OGRGeometry を構築する。 classmethod from_bbox ( bbox ) [ソース] ¶ 与えられたバウンディングボックス (4要素タプル) から Polygon を構築します。 __len__ () ¶ LineString の点の数、 Polygon のリングの数、または GeometryCollection のジオメトリの数を返しま ... ... me number of geographic features ( Feature ), information about the type of features contained in that layer (e.g. points, polygons, etc.), as well as the names and types of any additional fields ( Field ) of data that may be associated with each featur ... 間参照系 (spatial reference system) と座標変換をサポートしています。 >>> from django.contrib.gis.gdal import OGRGeometry >>> polygon = OGRGeometry ( "POLYGON((0 0, 5 0, 5 5, 0 5))" ) class OGRGeometry ( geom_input , srs = None ) [ソース] ¶ このオブジェクト ... から OGRGeometry を構築する。 classmethod from_bbox ( bbox ) [ソース] ¶ 与えられたバウンディングボックス (4要素タプル) から Polygon を構築します。 __len__ () ¶ LineString の点の数、 Polygon のリングの数、または GeometryCollection のジオメトリの数を返しま ... ... shp INFO: Open of `world/data/TM_WORLD_BORDERS-0.3.shp' using driver `ESRI Shapefile' successful. 1: TM_WORLD_BORDERS-0.3 (Polygon) ...\> ogrinfo world\data\TM_WORLD_BORDERS-0.3.shp INFO: Open of `world/data/TM_WORLD_BORDERS-0.3.shp' using driver `ESRI ... Shapefile' successful. 1: TM_WORLD_BORDERS-0.3 (Polygon) ogrinfo tells us that the shapefile has one layer, and that this layer contains polygon data. To find out more, we'll spe ... g driver `ESRI Shapefile' successful. Layer name: TM_WORLD_BORDERS-0.3 Metadata: DBF_DATE_LAST_UPDATE=2008-07-30 Geometry: Polygon Feature Count: 246 Extent: (-180.000000, -90.000000) - (180.000000, 83.623596) Layer SRS WKT: GEOGCRS["WGS 84", DATUM["Wor ... ... shp INFO: Open of `world/data/TM_WORLD_BORDERS-0.3.shp' using driver `ESRI Shapefile' successful. 1: TM_WORLD_BORDERS-0.3 (Polygon) ...\> ogrinfo world\data\TM_WORLD_BORDERS-0.3.shp INFO: Open of `world/data/TM_WORLD_BORDERS-0.3.shp' using driver `ESRI ... Shapefile' successful. 1: TM_WORLD_BORDERS-0.3 (Polygon) ogrinfo tells us that the shapefile has one layer, and that this layer contains polygon data. To find out more, we'll spe ... g driver `ESRI Shapefile' successful. Layer name: TM_WORLD_BORDERS-0.3 Metadata: DBF_DATE_LAST_UPDATE=2008-07-30 Geometry: Polygon Feature Count: 246 Extent: (-180.000000, -90.000000) - (180.000000, 83.623596) Layer SRS WKT: GEOGCRS["WGS 84", DATUM["Wor ... ... len ( layer )) # getting the number of features in the layer (should be 3) 3 >>> print ( layer . geom_type ) # Should be 'Polygon' Polygon >>> print ( layer . srs ) # WGS84 in WKT GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_1984",6378137,298 ... TestGeo ( models . Model ): name = models . CharField ( max_length = 25 ) # corresponds to the 'str' field poly = models . PolygonField ( srid = 4269 ) # we want our model in a different SRID def __str__ ( self ): return "Name: %s " % self . name LayerM ... import TestGeo >>> mapping = { ... "name" : "str" , # The 'name' model field maps to the 'str' layer field. ... "poly" : "POLYGON" , # For geometry fields use OGC name. ... } # The mapping is a dictionary >>> lm = LayerMapping ( TestGeo , "test_poly.sh ... ... len ( layer )) # getting the number of features in the layer (should be 3) 3 >>> print ( layer . geom_type ) # Should be 'Polygon' Polygon >>> print ( layer . srs ) # WGS84 in WKT GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_1984",6378137,298 ... TestGeo ( models . Model ): name = models . CharField ( max_length = 25 ) # corresponds to the 'str' field poly = models . PolygonField ( srid = 4269 ) # we want our model in a different SRID def __str__ ( self ): return "Name: %s " % self . name LayerM ... import TestGeo >>> mapping = { ... "name" : "str" , # The 'name' model field maps to the 'str' layer field. ... "poly" : "POLYGON" , # For geometry fields use OGC name. ... } # The mapping is a dictionary >>> lm = LayerMapping ( TestGeo , "test_poly.sh ... 2026年10月08日