class LayerMapping:
Constant | FIELD_TYPES |
Undocumented |
Constant | MULTI_TYPES |
Undocumented |
Method | __init__ |
No summary |
Method | check_fid_range |
Check the fid_range keyword. |
Method | check_layer |
Check the Layer metadata and ensure that it's compatible with the mapping information and model. Unlike previous revisions, there is no need to increment through each feature in the Layer. |
Method | check_srs |
Check the compatibility of the given spatial reference object. |
Method | check_unique |
Check the unique keyword parameter -- may be a sequence or string. |
Method | coord_transform |
Return the coordinate transformation object. |
Method | feature_kwargs |
Given an OGR Feature, return a dictionary of keyword arguments for constructing the mapped model. |
Method | geometry_field |
Return the GeometryField instance associated with the geographic column. |
Method | make_multi |
Given the OGRGeomType for a geometry and its associated GeometryField, determine whether the geometry should be turned into a GeometryCollection. |
Method | save |
Save the contents from the OGR DataSource Layer into the database according to the mapping dictionary given at initialization. |
Method | unique_kwargs |
Given the feature keyword arguments (from feature_kwargs ), construct and return the uniqueness keyword arguments -- a subset of the feature kwargs. |
Method | verify_fk |
Given an OGR Feature, the related model and its dictionary mapping, retrieve the related model for the ForeignKey mapping. |
Method | verify_geom |
Verify the geometry -- construct and return a GeometryCollection if necessary (for example if the model field is MultiPolygonField while the mapped shapefile only contains Polygons). |
Method | verify_ogr_field |
Verify if the OGR Field contents are acceptable to the model field. If they are, return the verified value, otherwise raise an exception. |
Instance Variable | coord_dim |
Undocumented |
Instance Variable | ds |
Undocumented |
Instance Variable | encoding |
Undocumented |
Instance Variable | fields |
Undocumented |
Instance Variable | geo_field |
Undocumented |
Instance Variable | geom_field |
Undocumented |
Instance Variable | layer |
Undocumented |
Instance Variable | mapping |
Undocumented |
Instance Variable | model |
Undocumented |
Instance Variable | source_srs |
Undocumented |
Instance Variable | spatial_backend |
Undocumented |
Instance Variable | transaction_decorator |
Undocumented |
Instance Variable | transaction_mode |
Undocumented |
Instance Variable | transform |
Undocumented |
Instance Variable | unique |
Undocumented |
Instance Variable | using |
Undocumented |
Undocumented
Undocumented
Value |
|
Save the contents from the OGR DataSource Layer into the database according to the mapping dictionary given at initialization.
sys.stdout
, but any object with a write
method is supported.feature_kwargs
), construct
and return the uniqueness keyword arguments -- a subset of the feature
kwargs.