function writePointGeometry(geometry, options) {
  const coordinates = geometry.getCoordinates();
  /** @type {EsriJSONPoint} */
  let esriJSON;
  const layout = geometry.getLayout();
  if (layout === 'XYZ') {
    esriJSON = {
      x: coordinates[0],
      y: coordinates[1],
      z: coordinates[2],
    };
  } else if (layout === 'XYM') {
    esriJSON = {
      x: coordinates[0],
      y: coordinates[1],
      m: coordinates[2],
    };
  } else if (layout === 'XYZM') {
    esriJSON = {
      x: coordinates[0],
      y: coordinates[1],
      z: coordinates[2],
      m: coordinates[3],
    };
  } else if (layout === 'XY') {
    esriJSON = {
      x: coordinates[0],
      y: coordinates[1],
    };
  } else {
    throw new Error('Invalid geometry layout');
  }
  return esriJSON;
}
@param {import("../geom/Point.js").default} geometry Geometry.
@param {import("./Feature.js").WriteOptions} [options] Write options.
@return {EsriJSONPoint} EsriJSON geometry.