... いますが、ルックアップはラスタの両側で同じように使用できます。ルックアップがラスター入力をサポートしていない場合、入力は 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(pol ... y, 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(pol ... y, 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 ... ... ジェクトの作成例を示します ( 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 . ... SRID 値を持つ) 場合は、空間データベースの変換プロシージャを使用して、モデルのフィールドの SRID に暗黙的に変換されます: >>> poly_3084 = GEOSGeometry ( ... "POLYGON(( 10 10, 10 20, 20 20, 20 15, 10 10))" , srid = 3084 ... ) # SRID 3084 is 'NAD83(HARN) ... ... ジェクトの作成例を示します ( 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 . ... SRID 値を持つ) 場合は、空間データベースの変換プロシージャを使用して、モデルのフィールドの SRID に暗黙的に変換されます: >>> poly_3084 = GEOSGeometry ( ... "POLYGON(( 10 10, 10 20, 20 20, 20 15, 10 10))" , srid = 3084 ... ) # SRID 3084 is 'NAD83(HARN) ... ... スを表すタプルであることもあります。例えば: class ZipcodeFeed ( Feed ): def geometry ( self , obj ): # Can also return: `obj.poly`, and `obj.poly.centroid`. return obj . poly . extent # tuple like: (X0, Y0, X1, Y1). item_geometry ( item ) ¶ これをセット ... すタプルとなります。たとえば次のようになります: class ZipcodeFeed ( Feed ): def item_geometry ( self , obj ): # Returns the polygon. return obj . poly SyndicationFeed サブクラス ¶ 以下の django.utils.feedgenerator.SyndicationFeed のサブクラスが利用可能 ... ango の admin サイト 次のトピックへ 地理情報サイトマップ 関連キーワード Feed geometry item self フィード サブクラス ソース poly GeoDjango ジオメトリ return フォーマット syndication セット contrib 提供 オーバーライド GEOSGeometry インスタンス ボックス ... ... スを表すタプルであることもあります。例えば: class ZipcodeFeed ( Feed ): def geometry ( self , obj ): # Can also return: `obj.poly`, and `obj.poly.centroid`. return obj . poly . extent # tuple like: (X0, Y0, X1, Y1). item_geometry ( item ) ¶ これをセット ... すタプルとなります。たとえば次のようになります: class ZipcodeFeed ( Feed ): def item_geometry ( self , obj ): # Returns the polygon. return obj . poly SyndicationFeed サブクラス ¶ 以下の django.utils.feedgenerator.SyndicationFeed のサブクラスが利用可能 ... サイト 次のトピックへ 地理情報サイトマップ 関連キーワード Feed geometry class obj item def self フィード サブクラス ソース poly GeoDjango django ジオメトリ return Geo フォーマット syndication Django セット 関連するページ 配信 (syndication) フィード フ ... ... 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 ... .gis.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 ] <Li ... nearRing object at 0x1044395b0> >>> poly [ 0 ][ - 2 ] # second-to-last coordinate of external ring (50.0, 0.0) さらに、ジオメトリの座標や要素はPythonのリストのよう ... ... 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 ... .gis.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 ] <Li ... nearRing object at 0x1044395b0> >>> poly [ 0 ][ - 2 ] # second-to-last coordinate of external ring (50.0, 0.0) さらに、ジオメトリの座標や要素はPythonのリストのよう ... ... イルのような、GDALがサポートするデータソースが必要です (ここでは、3つのフィーチャを持つ単純なポリゴンシェープファイル、 test_poly.shp を使用しています): >>> from django.contrib.gis.gdal import DataSource >>> ds = DataSource ( "test_poly.shp" ) >>> laye ... 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, ... rt models class 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 " % ... ... イルのような、GDALがサポートするデータソースが必要です (ここでは、3つのフィーチャを持つ単純なポリゴンシェープファイル、 test_poly.shp を使用しています): >>> from django.contrib.gis.gdal import DataSource >>> ds = DataSource ( "test_poly.shp" ) >>> laye ... 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, ... rt models class 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 " % ... 2026年10月08日