JAXA Earth API for JavaScript
    Preparing search index...

    Class Inspector

    A class for retrieving the data value and coordinates at a specific position on a DataObject.

    // Create an Inspector to examine values.
    const isp = new je.data.Inspector(dataObject);

    // Retrieve the pixel position at the location (135.0, 35.0) in latitude-longitude.
    console.log(isp.getPixelByCoordinateXY(135.0, 35.0));

    // Retrieve the latitude-longitude at the location (275, 225) in pixel position.
    console.log(isp.getCoordinateByPixelXY(275, 225));

    // Retrieve the value at the location (135.0, 35.0) in latitude-longitude.
    console.log(isp.getValueByCoordinateXY(135.0, 35.0));

    // Retrieve the value at the location (275, 225) in pixel position.
    console.log(isp.getValueByPixelXY(275, 225));
    Index

    Constructors

    Methods

    • Specifies a location by coordinates (latitude-longitude if the projection is EPSG:4326, or meters if EPSG:3857, etc.) and retrieves the pixel coordinates at that location.

      Returns null if the location is outside the range of the data.

      Parameters

      • x: number

        The X coordinate of the location whose coordinates you want to retrieve.

      • y: number

        The Y coordinate of the location whose coordinates you want to retrieve.

      Returns { x: number; y: number }

    • Specifies a location by pixel coordinates and retrieves the coordinates at that location (latitude-longitude if the projection is EPSG:4326, or meters if EPSG:3857, etc.).

      Returns null if the location is outside the range of the data.

      Parameters

      • x: number

        The X coordinate of the pixel position of the location whose coordinates you want to retrieve.

      • y: number

        The Y coordinate of the pixel position of the location whose coordinates you want to retrieve.

      Returns { x: number; y: number; projection: Projection }

    • Specifies a latitude-longitude and retrieves the value at that location. For the dataObject passed to the constructor, the top-left of the image is (dataObject.bbox[0], dataObject.bbox[3]) and the bottom-right of the image is (dataObject.bbox[2], dataObject.bbox[1]). Specify in latitude-longitude if dataObject.projection is EPSG:4326, or in meters if EPSG:3857.

      Returns null if the location is outside the range of the data.

      Parameters

      • x: number

        The X coordinate of the location whose value you want to retrieve.

      • y: number

        The Y coordinate of the location whose value you want to retrieve.

      Returns number

    • Specifies a location by pixel coordinates and retrieves the value at that location. The top-left pixel of the image is (0, 0) and the bottom-right pixel of the image is (width - 1, height - 1).

      Returns null if the location is outside the range of the data.

      Parameters

      • x: number

        The X coordinate of the pixel position of the location whose value you want to retrieve.

      • y: number

        The Y coordinate of the pixel position of the location whose value you want to retrieve.

      Returns number

    • Specifies a latitude-longitude and retrieves the description of the value at that location. For the dataObject passed to the constructor, the top-left of the image is (dataObject.bbox[0], dataObject.bbox[3]) and the bottom-right of the image is (dataObject.bbox[2], dataObject.bbox[1]). Specify in latitude-longitude if dataObject.projection is EPSG:4326, or in meters if EPSG:3857.

      Returns null if the location is outside the range of the data.

      Parameters

      • x: number

        The X coordinate of the location whose value description you want to retrieve.

      • y: number

        The Y coordinate of the location whose value description you want to retrieve.

      • digits: number

        The number of decimal places of the value. This is effective only when dataObject.photometricInterpretation = 1 and the value is a decimal.

      Returns string

    • Specifies a location by pixel coordinates and retrieves the description of the value at that location. The top-left pixel of the image is (0, 0) and the bottom-right pixel of the image is (width - 1, height - 1).

      Returns null if the location is outside the range of the data.

      Parameters

      • x: number

        The X coordinate of the pixel position of the location whose value description you want to retrieve.

      • y: number

        The Y coordinate of the pixel position of the location whose value description you want to retrieve.

      • digits: number = 2

        The number of decimal places of the value. This is effective only when dataObject.photometricInterpretation = 1 and the value is a decimal.

      Returns string