per page, with , order by , clip by
Results of 1 - 1 of about 1 for TestGeo (0.001 sec.)
LayerMapping データインポートユーティリティ 9414
LayerMapping データインポートユーティリティ LayerMapping クラスは、ベクトル空間データファイル (例: shapefile) の内容を GeoDjango モデルにマッピングする方法を提供します。 このユーティリティは、ベクターレイヤーからジオメトリとフィールドを取り ... ここで、対応する Django モデルを定義します (必ず migrate を使ってください): from django.contrib.gis.db import models class TestGeo ( models . Model ): name = models . CharField ( max_length = 25 ) # corresponds to the 'str' field poly = models . Polygon ... チャを抽出し、データベースに配置します。 >>> from django.contrib.gis.utils import LayerMapping >>> from geoapp.models import TestGeo >>> mapping = { ... "name" : "str" , # The 'name' model field maps to the 'str' layer field. ... "poly" : "POLYGON" , # Fo ... r geometry fields use OGC name. ... } # The mapping is a dictionary >>> lm = LayerMapping ( TestGeo , "test_poly.shp" , mapping ) >>> lm . save ( verbose = True ) # Save the layermap, imports the data. Saved: Name: 1 Saved ...
https://man.mtool.work/django/6.1/ref/contrib/gis/layermapping.html
PREV 1 NEXT