wasm-spatial-core
    Preparing search index...

    Function geoJsonFeatureCollection

    • Generate a GeoJSON FeatureCollection string from multiple features.

      Arguments

      • coords — Flat Float64Array with all feature coordinates concatenated
      • types — Comma-separated geometry types (one per feature)
      • properties_json — Properties for each feature, separated by \x01 (unit separator). Each segment should be a valid JSON object string. Use "{}" for empty properties.

      Returns

      A JSON string representing a GeoJSON FeatureCollection.

      Example (JS)

      const coords = new Float64Array([116.4, 39.9, 121.5, 31.2]);
      const json = core.geoJsonFeatureCollection(coords, "Point,Point", '{"name":"BJ"}\x01{"name":"SH"}');

      Parameters

      • coords: Float64Array
      • types: string
      • properties_json: string

      Returns string