def __update__(self, feature):
        """
        Called by the protocol on object update.

        Arguments:

        * ``feature`` The GeoJSON feature as received from the client.
        """
        for p in class_mapper(self.__class__).iterate_properties:
            if not isinstance(p, ColumnProperty):
                continue
            col = p.columns[0]
            if isinstance(col.type, Geometry):
                geom = feature.geometry
                if geom and not isinstance(geom, geojson.geometry.Default):
                    srid = col.type.srid
                    shape = asShape(geom)
                    setattr(self, p.key, from_shape(shape, srid=srid))
                    self._shape = shape
            elif not col.primary_key:
                if p.key in feature.properties:
                    setattr(self, p.key, feature.properties[p.key])

        if self.__add_properties__:
                for k in self.__add_properties__:
                    setattr(self, k, feature.properties.get(k))
def __update__ ( self , feature ) : for p in class_mapper ( self . __class__ ) . iterate_properties : if not isinstance ( p , ColumnProperty ) : continue col = p . columns [ 0 ] if isinstance ( col . type , Geometry ) : geom = feature . geometry if geom and not isinstance ( geom , geojson . geometry . Default ) : srid = col . type . srid shape = asShape ( geom ) setattr ( self , p . key , from_shape ( shape , srid = srid ) ) self . _shape = shape elif not col . primary_key : if p . key in feature . properties : setattr ( self , p . key , feature . properties [ p . key ] ) if self . __add_properties__ : for k in self . __add_properties__ : setattr ( self , k , feature . properties . get ( k ) )
Called by the protocol on object update.

        Arguments:

        * ``feature`` The GeoJSON feature as received from the client.