code: def asDictionary(self):
          
          #
          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
docs: returns the object as a python dictionary