Raster over basemap

465
2
Jump to solution
09-04-2023 12:18 PM
Labels (2)
JustinSteventon
New Contributor II

Hi folks,

Hoping this is an easy one.

I want to have a single map view which contains multiple offline raster files rendered over online web maps.

The QML looks like this:

MapView {
    Map {
        Basemap {
            initStyle: Enums.BasemapStyleArcGISImageryStandard
        }
        RasterLayer {
            Raster {
            path: "file:///myfile.png"
        }
    }
}

This works for GeoTiff files, but not for PNG/JPG with associated world files. I have used Process Explorer (on Windows) to verify that the PGW/JGW files are found. I do not see anything wrong in the debug output and the format looks correct to me. Here is an example PGW:

0.00009554533861386
0
0
-0.00009554533861386
26.13346608087920941
-24.63415136266930716

When I debug the difference between the GeoTiff layer and the PNG/JPG ones, I see that the SpatialReference of the layer is null, whereas for the GeoTiff layer it is 4326.

I could not figure out how to force the SpatialReference onto a raster layer. Is this a thing?

Note that this issue reproduces with the "Raster layer" SDK sample even with 200.2.0, i.e. my GeoTiff works, but my PNG/JPG + world files do not.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
JamesBallard1
Esri Regular Contributor

Hi @JustinSteventon ,

I have some info to share, but admittedly I am not an expert on our supported raster formats.

I recommend taking a look at https://gist.github.com/nixta/9cf3b53e3340dc3314c6db40af06c709 

You may need more than just the world files for those formats. You may also need auxiliary files as well.

https://pro.arcgis.com/en/pro-app/latest/help/data/imagery/auxiliary-files.htm

View solution in original post

0 Kudos
2 Replies
JamesBallard1
Esri Regular Contributor

Hi @JustinSteventon ,

I have some info to share, but admittedly I am not an expert on our supported raster formats.

I recommend taking a look at https://gist.github.com/nixta/9cf3b53e3340dc3314c6db40af06c709 

You may need more than just the world files for those formats. You may also need auxiliary files as well.

https://pro.arcgis.com/en/pro-app/latest/help/data/imagery/auxiliary-files.htm

0 Kudos
JustinSteventon
New Contributor II

Thanks @JamesBallard1, that was the trick. I did not know about auxiliary files and now I do :-).