def asDictionary(self):
        """ returns the object as a python dictionary """
        #
        template = {"x" : self._x,
                    "y" : self._y,
                    "spatialReference" : self.spatialReference
                    }
        if not self._z is None:
            template['z'] = self._z
        if not self._m is None:
            template['z'] = self._m
        return template