MCPcopy
hub / github.com/django/django / make_multi

Method make_multi

django/contrib/gis/utils/layermapping.py:549–558  ·  view source on GitHub ↗

Given the OGRGeomType for a geometry and its associated GeometryField, determine whether the geometry should be turned into a GeometryCollection.

(self, geom_type, model_field)

Source from the content-addressed store, hash-verified

547 return opts.get_field(self.geom_field)
548
549 def make_multi(self, geom_type, model_field):
550 """
551 Given the OGRGeomType for a geometry and its associated GeometryField,
552 determine whether the geometry should be turned into a
553 GeometryCollection.
554 """
555 return (
556 geom_type.num in self.MULTI_TYPES
557 and model_field.__class__.__name__ == "Multi%s" % geom_type.django
558 )
559
560 def save(
561 self,

Callers 2

check_layerMethod · 0.95
verify_geomMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected