• OrientedImage
  • class Esri::ArcGISRuntime::OrientedImage

    An object representing camera location along with its image URL, attributes and other associated metadata returned by oriented imagery search operations. More...

    Header: #include <OrientedImage.h>
    Since: Esri::ArcGISRuntime 300.2
    Inherits: Esri::ArcGISRuntime::Object, Esri::ArcGISRuntime::GeoElement, and Esri::ArcGISRuntime::Loadable

    Public Functions

    QFuture<Esri::ArcGISRuntime::OrientedImageRaster *> createImageSpaceRasterAsync(QObject *parent = nullptr)
    QUrl dataUrl() const
    QFuture<Esri::ArcGISRuntime::Point> imageToLocationAsync(const QPointF &imageCoordinate)
    QFuture<QPointF> locationToImageAsync(const Esri::ArcGISRuntime::Point &location)
    Esri::ArcGISRuntime::OrientedImageType type() const

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::AttributeListModel *attributes() const override
    virtual void cancelLoad() override
    virtual Esri::ArcGISRuntime::Geometry geometry() const override
    virtual void load() override
    virtual Esri::ArcGISRuntime::Error loadError() const override
    virtual Esri::ArcGISRuntime::LoadStatus loadStatus() const override
    virtual void retryLoad() override
    virtual void setGeometry(const Esri::ArcGISRuntime::Geometry &geometry) override

    Signals

    void doneLoading(const Esri::ArcGISRuntime::Error &loadError)
    void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Detailed Description

    An OrientedImage includes attributes from the associated feature, augmented with oriented imagery metadata. Its geometry represents the geographic camera location where the image was captured. Note, Loading OrientedImage with images in formats like MRF, COG will fail to load.

    See also OrientedImageryLayer::searchImagesAsync(const Esri::ArcGISRuntime::Point&, Esri::ArcGISRuntime::OrientedImageSearchParameters*, QObject*) and OrientedImageryLayer::fetchImageForFeatureAsync(Esri::ArcGISRuntime::Feature*, QObject*).

    Member Function Documentation

    [override virtual] Esri::ArcGISRuntime::AttributeListModel *OrientedImage::attributes() const

    Reimplements: GeoElement::attributes() const.

    Returns the attributes of the GeoElement as a collection of name/value pairs.

    [override virtual] void OrientedImage::cancelLoad()

    Reimplements: Loadable::cancelLoad().

    Cancels loading metadata for the object.

    Cancels loading the metadata if the object is loading and always calls doneLoading.

    QFuture<Esri::ArcGISRuntime::OrientedImageRaster *> OrientedImage::createImageSpaceRasterAsync(QObject *parent = nullptr)

    Creates a raster for displaying the image without georeferencing, with an optional parent.

    If the OrientedImage isn't loaded, this method loads it first. If the image failed to load, the method fails with its load error.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    QUrl OrientedImage::dataUrl() const

    Returns the local file path of the downloaded oriented image content, or the image source URL.

    When OrientedImage is loaded, the image data would be downloaded and stored locally. The `DataURI` property will point to the local file path of the downloaded image content or the URL or remote URL of the image source.

    [signal] void OrientedImage::doneLoading(const Esri::ArcGISRuntime::Error &loadError)

    Signal emitted when this object is done loading.

    • loadError - Details about any error that may have occurred

    Note: If there is a load error, it will also be emitted on the errorOccurred signal.

    See also Loadable and Object.

    [override virtual] Esri::ArcGISRuntime::Geometry OrientedImage::geometry() const

    Reimplements: GeoElement::geometry() const.

    Returns the geometry defines the shape and location of the GeoElement.

    See also setGeometry().

    QFuture<Esri::ArcGISRuntime::Point> OrientedImage::imageToLocationAsync(const QPointF &imageCoordinate)

    Converts a 2D image image coordinate (in pixels) to geographic or projected location.

    • imageCoordinate - The 2D image coordinate (in pixels) relative to the image space to convert.

    This method leverages internal camera orientation parameters (such as pitch, roll, heading, and focal length) to calculate where a image coordinate falls on the GeoView. The returned map point will match the SpatialReference of the parent layer. Call to this method will load the OrientedImage, if not loaded. Note, This method returns an error if the conversion fails.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    [override virtual] void OrientedImage::load()

    Reimplements: Loadable::load().

    Loads the metadata for the object asynchronously.

    Loads the metadata if the object is not loaded and always calls doneLoading.

    [override virtual] Esri::ArcGISRuntime::Error OrientedImage::loadError() const

    Reimplements: Loadable::loadError() const.

    Returns the load error.

    See also Error.

    [override virtual] Esri::ArcGISRuntime::LoadStatus OrientedImage::loadStatus() const

    Reimplements: Loadable::loadStatus() const.

    Returns the load status.

    See also LoadStatus.

    [signal] void OrientedImage::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Signal emitted when the load status changes for this object.

    See also Loadable.

    QFuture<QPointF> OrientedImage::locationToImageAsync(const Esri::ArcGISRuntime::Point &location)

    Converts GeoView location back into a 2D image coordinate (in pixels).

    • location - The geographic or projected GeoView location to convert.

    Determines where a real-world map location appears within the frame of this specific image. The origin (0,0) is at the top-left of the image. If a map location falls outside the image's field of view or behind the camera frustum, the resulting image coordinate value may fall outside the valid bounds of the image dimensions. Call to this method will load the OrientedImage, if not loaded. Note, This method returns an error if the conversion fails.

    For 3D, if the feature representing the camera location does not have the Z value, it is recommended to first add the layer to a Scene before obtaining the OrientedImage. Associating the layer with a Scene allows elevation data from the Scene's base Surface to be used in calculations, resulting in improved conversion accuracy.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    [override virtual] void OrientedImage::retryLoad()

    Reimplements: Loadable::retryLoad().

    Loads or retries loading metadata for the object asynchronously.

    Will retry loading the metadata if the object is failed to load. Will load the object if it is not loaded. Will not retry to load the object if the object is loaded. Will always call the done loading if this is called.

    [override virtual] void OrientedImage::setGeometry(const Esri::ArcGISRuntime::Geometry &geometry)

    Reimplements: GeoElement::setGeometry(const Esri::ArcGISRuntime::Geometry &geometry).

    Sets the geometry to geometry.

    See also geometry.

    Esri::ArcGISRuntime::OrientedImageType OrientedImage::type() const

    Returns the oriented imagery type.