... で実装された GEOS ジオメトリルーチンへの BSD ライセンスのインターフェイス。 Loosely-coupled to GeoDjango. For example, GEOSGeometry objects may be used outside of a Django project/application. In other words, no need to have DJANGO_SETTINGS_MODULE set or ... use a database, etc. ミュータビリティ (Mutability): GEOSGeometry オブジェクトは変更可能です。 クロスプラットフォームでテストされています。 チュートリアル ¶ このセクションには、 GEOSGeomet ... ry オブジェクトの簡単な紹介とチュートリアルが含まれています。 ジオメトリを作成する ¶ GEOSGeometry objects may be created in a few ways. The first is to simply instantiate the object on some spatial input -- the following ... ... で実装された GEOS ジオメトリルーチンへの BSD ライセンスのインターフェイス。 Loosely-coupled to GeoDjango. For example, GEOSGeometry objects may be used outside of a Django project/application. In other words, no need to have DJANGO_SETTINGS_MODULE set or ... use a database, etc. ミュータビリティ (Mutability): GEOSGeometry オブジェクトは変更可能です。 クロスプラットフォームでテストされています。 チュートリアル ¶ このセクションには、 GEOSGeomet ... ry オブジェクトの簡単な紹介とチュートリアルが含まれています。 ジオメトリを作成する ¶ GEOSGeometry objects may be created in a few ways. The first is to simply instantiate the object on some spatial input -- the following ... ... 、その点に注意してください: from django.contrib.gis.feeds import Feed class MyFeed ( Feed ): # First, as a class attribute. geometry = ... item_geometry = ... # Also a function with no arguments def geometry ( self ): ... def item_geometry ( self ): ... # ... And as a function with a single argument def geometry ( self , obj ): ... def item_geometry ( self , item ): ... geometry ( obj ) ¶ get_object() で返されたオブジェクトを受け取り ... 、 feed のジオメトリを返します。通常、これは GEOSGeometry インスタンスであり、ポイントまたはボックスを表すタプルであることもあります。例えば: class ZipcodeFeed ( Feed ): def geomet ... ... 、その点に注意してください: from django.contrib.gis.feeds import Feed class MyFeed ( Feed ): # First, as a class attribute. geometry = ... item_geometry = ... # Also a function with no arguments def geometry ( self ): ... def item_geometry ( self ): ... # ... And as a function with a single argument def geometry ( self , obj ): ... def item_geometry ( self , item ): ... geometry ( obj ) ¶ get_object() で返されたオブジェクトを受け取り ... 、 feed のジオメトリを返します。通常、これは GEOSGeometry インスタンスであり、ポイントまたはボックスを表すタプルであることもあります。例えば: class ZipcodeFeed ( Feed ): def geomet ... ... トリフィールド型は OpenGIS Simple Features 仕様 [ 1 ] に対応しています。ラスターデータに対するこのような標準は存在しません。 GeometryField ¶ class GeometryField [ソース] ¶ ジオメトリフィールドの基本クラス。 PointField ¶ class PointField [ソース] ¶ Point を ... ソース] ¶ MultiLineString を格納します。 MultiPolygonField ¶ class MultiPolygonField [ソース] ¶ MultiPolygon を格納します。 GeometryCollectionField ¶ class GeometryCollectionField [ソース] ¶ GeometryCollection を格納します。 RasterField ¶ class RasterFiel ... 84 、単位は緯度経度)。 Setting the SRID to -1 disables automatic SRID transformations when saving geometries. The assigned geometry's SRID is set to -1 , discarding any explicit SRID it had. SRID の選択 ¶ Choosing an appropriate SRID for your model is an ... ... トリフィールド型は OpenGIS Simple Features 仕様 [ 1 ] に対応しています。ラスターデータに対するこのような標準は存在しません。 GeometryField ¶ class GeometryField [ソース] ¶ ジオメトリフィールドの基本クラス。 PointField ¶ class PointField [ソース] ¶ Point を ... ソース] ¶ MultiLineString を格納します。 MultiPolygonField ¶ class MultiPolygonField [ソース] ¶ MultiPolygon を格納します。 GeometryCollectionField ¶ class GeometryCollectionField [ソース] ¶ GeometryCollection を格納します。 RasterField ¶ class RasterFiel ... 84 、単位は緯度経度)。 Setting the SRID to -1 disables automatic SRID transformations when saving geometries. The assigned geometry's SRID is set to -1 , discarding any explicit SRID it had. SRID の選択 ¶ Choosing an appropriate SRID for your model is an ... ... ンに加えて、 geojson シリアライザは serializers.serialize() によって呼び出されたときに、以下の追加オプションを受け付けます: geometry_field : GeoJSON フィーチャの geometry キーに使用するジオメトリフィールド名を含む文字列。これは、複数のジオメトリフィールド ... : GeoJSONフィーチャの id キーに使用するフィールド名を含む文字列。デフォルトではオブジェクトの主キーが使用されます。 srid : geometry の内容に使用する SRID。デフォルトは 4326 (WGS 84) です。 fields オプションは、他のすべてのシリアライザと同様に機能し、 pro ... m django.core.serializers import serialize from my_app.models import City serialize ( "geojson" , City . objects . all (), geometry_field = "point" , fields = [ "name" ]) 出力は以下の通りです: { "type" : "FeatureCollection" , "features" : [ { "type" : "F ... ... ンに加えて、 geojson シリアライザは serializers.serialize() によって呼び出されたときに、以下の追加オプションを受け付けます: geometry_field : GeoJSON フィーチャの geometry キーに使用するジオメトリフィールド名を含む文字列。これは、複数のジオメトリフィールド ... : GeoJSONフィーチャの id キーに使用するフィールド名を含む文字列。デフォルトではオブジェクトの主キーが使用されます。 srid : geometry の内容に使用する SRID。デフォルトは 4326 (WGS 84) です。 fields オプションは、他のすべてのシリアライザと同様に機能し、 pro ... m django.core.serializers import serialize from my_app.models import City serialize ( "geojson" , City . objects . all (), geometry_field = "point" , fields = [ "name" ]) 出力は以下の通りです: { "type" : "FeatureCollection" , "features" : [ { "type" : "F ... ... .shp' using 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", D ... .shp' using 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", D ... els . IntegerField ( "Sub-Region Code" ) lon = models . FloatField () lat = models . FloatField () # GeoDjango-specific: a geometry field (MultiPolygonField) mpoly = models . MultiPolygonField () # Returns the string representation of the model. def __st ... ... .shp' using 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", D ... .shp' using 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", D ... els . IntegerField ( "Sub-Region Code" ) lon = models . FloatField () lat = models . FloatField () # GeoDjango-specific: a geometry field (MultiPolygonField) mpoly = models . MultiPolygonField () # Returns the string representation of the model. def __st ... 2026年10月08日