... 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 ... etry. 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), ... ... 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 ... ... 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 ... ... IS , Oracle, SpatiaLite 2 つの地理情報フィールドまたは式を受け取り、それらの両方のジオメトリの和集合を返します。 編集 ForcePolygonCW class ForcePolygonCW ( expression , ** extra ) [ソース] 利用可能なDB : PostGIS , SpatiaLite 1つの地理情報フィールドまたは ... ML) 表現を返します。 例: >>> qs = Zipcode . objects . annotate ( gml = AsGML ( "poly" )) >>> print ( qs [ 0 ] . gml ) <gml:Polygon srsName="EPSG:4326"><gml:OuterBoundaryIs>-147.78711,70.245363 ... -147.78711,70.245363</gml:OuterBoundaryIs></gml:Polygon> ... guage (KML) 表現を返す。 例: >>> qs = Zipcode . objects . annotate ( kml = AsKML ( "poly" )) >>> print ( qs [ 0 ] . kml ) <Polygon><outerBoundaryIs><LinearRing><coordinates>-103.04135,36.217596,0 ... -103.04135,36.217596,0</coordinates></LinearRing></ou ... ... の作成例を示します ( Zipcode モデルを想定): >>> from zipcode.models import Zipcode >>> z = Zipcode ( code = 77096 , poly = "POLYGON(( 10 10, 10 20, 20 20, 20 15, 10 10))" ) >>> z . save () GEOSGeometry オブジェクトもジオメトリモデルを保存するために使用で ... きます: >>> from django.contrib.gis.geos import GEOSGeometry >>> poly = GEOSGeometry ( "POLYGON(( 10 10, 10 20, 20 20, 20 15, 10 10))" ) >>> z = Zipcode ( code = 77096 , poly = poly ) >>> z . save () さらに、 GEOSGeome ... タベースの変換プロシージャを使用して、モデルのフィールドの SRID に暗黙的に変換されます: >>> poly_3084 = GEOSGeometry ( ... "POLYGON(( 10 10, 10 20, 20 20, 20 15, 10 10))" , srid = 3084 ... ) # SRID 3084 is 'NAD83(HARN) / Texas Centric Lambert Conformal' ... ... すタプルとなります。たとえば次のようになります: class ZipcodeFeed ( Feed ): def item_geometry ( self , obj ): # Returns the polygon. return obj . poly SyndicationFeed サブクラス 以下の django.utils.feedgenerator.SyndicationFeed のサブクラスが利用可能です ... ... ls that reference swappable models such as auth.User ( #33366 ). Fixed a long standing bug in ジオメトリのコレクション and Polygon that caused a crash on some platforms (reported on macOS based on the ARM64 architecture) ( #32600 ). ... ... (GEOSGeometry の属性) (Layer の属性) (OGRGeometry の属性) Extent3D (django.contrib.gis.db.models のクラス) exterior_ring (Polygon の属性) extra (InlineModelAdmin の属性) extra() (django.db.models.query.QuerySet モジュール) extra_context (django.views.g ... ate filter force_login() (Client のメソッド) FORCE_SCRIPT_NAME setting force_str() (django.utils.encoding モジュール) ForcePolygonCW (django.contrib.gis.db.models.functions のクラス) ForeignKey (django.db.models のクラス) form (BoundField の属性) Form ( ... 属性) FormView (組み込みクラス) frame_type (RowRange の属性) (ValueRange の属性) from_bbox() (OGRGeometry のクラスメソッド) (Polygon のクラスメソッド) from_db() (Model のクラスメソッド) from_db_value() (Field のメソッド) from_email (PasswordResetView の属 ... 2026年10月08日