GeoJSONUtils: {
    fromFlat3Coordinates: ((flat3Coords: [number, number, number][], geometryType:
        | "Point"
        | "LineString"
        | "Polygon"
        | "MultiPoint"
        | "MultiLineString"
        | "MultiPolygon"
        | "GeometryCollection") => GeoJSON.Geometry);
    fromFlatCoordinates: ((flatCoords: number[], geometryType:
        | "Point"
        | "LineString"
        | "Polygon"
        | "MultiPoint"
        | "MultiLineString"
        | "MultiPolygon"
        | "GeometryCollection") => GeoJSON.Geometry);
    getOpenLayersFeature: ((feature: Feature<Geometry, GeoJsonProperties>) => Feature);
    toFlatCoordinates: ((geojson: Geometry) => number[]);
}

Type declaration

  • fromFlat3Coordinates: ((flat3Coords: [number, number, number][], geometryType:
        | "Point"
        | "LineString"
        | "Polygon"
        | "MultiPoint"
        | "MultiLineString"
        | "MultiPolygon"
        | "GeometryCollection") => GeoJSON.Geometry)
      • (flat3Coords, geometryType): GeoJSON.Geometry
      • Creates a simple GeoJSON Geometry object from a list of 3D coordinates.

        Parameters

        • flat3Coords: [number, number, number][]

          Coordinates

        • geometryType:
              | "Point"
              | "LineString"
              | "Polygon"
              | "MultiPoint"
              | "MultiLineString"
              | "MultiPolygon"
              | "GeometryCollection"

          Geometry type

        Returns GeoJSON.Geometry

        GeoJSON geometry object

  • fromFlatCoordinates: ((flatCoords: number[], geometryType:
        | "Point"
        | "LineString"
        | "Polygon"
        | "MultiPoint"
        | "MultiLineString"
        | "MultiPolygon"
        | "GeometryCollection") => GeoJSON.Geometry)
      • (flatCoords, geometryType): GeoJSON.Geometry
      • Creates a simple GeoJSON Geometry object from a list of flat coordinates.

        Prefer fromFlat3Coordinates if possible (quicker, no object creation).

        Parameters

        • flatCoords: number[]

          Coordinates

        • geometryType:
              | "Point"
              | "LineString"
              | "Polygon"
              | "MultiPoint"
              | "MultiLineString"
              | "MultiPolygon"
              | "GeometryCollection"

          Geometry type

        Returns GeoJSON.Geometry

        GeoJSON geometry object

  • getOpenLayersFeature: ((feature: Feature<Geometry, GeoJsonProperties>) => Feature)
      • (feature): Feature
      • Parameters

        • feature: Feature<Geometry, GeoJsonProperties>

        Returns Feature

  • toFlatCoordinates: ((geojson: Geometry) => number[])
      • (geojson): number[]
      • Given a simple GeoJSON Geometry object, returns the flat coordinates

        Parameters

        • geojson: Geometry

          GeoJSON geometry object

        Returns number[]

        Flat coordinates