Georeferencing API
    Preparing search index...
    • Synchronously backward-map output pixel centres through the fit and resample the source. Use the worker engine for interactive applications.

      When the inverse is expensive (thin plate spline or a reprojected output CRS), source positions are computed exactly at a few positions per row and linearly interpolated in between wherever the interpolation error at the segment midpoint stays within maxError source pixels, as the GDAL approximate transformer does. Other models are always mapped exactly.

      Parameters

      • input: Pixels

        Orientation-normalized RGBA; may be a reduced-resolution preview.

      • metadata: ImageMetadata

        Original canonical dimensions, used to scale coordinates into the decoded buffer.

      • fit: Fit

        Same fit used for preview and final export.

      • workingCrs: string

        Coordinate system in which the fit operates.

      • grid: Omit<Raster, "data">

        Validated output from outputGrid; this function allocates width × height × 4 bytes.

      • method: Resampler

        Interpolation kernel.

      • definitions: Definitions = {}

        Host projection definitions.

      • Optionalprogress: (v: number) => void

        Synchronous progress fractions, reported every 32 rows and at completion.

      • maxError: number = DEFAULT_APPROXIMATION_ERROR

        Approximation tolerance in decoded source pixels; 0 maps every pixel exactly.

      Returns Raster

      Newly allocated raster; the input is not mutated.