Select to view content in your preferred language

Download Rasters using envelope does not seem to clip original images of mosaic

331
0
11-01-2023 09:35 AM
Labels (1)
DavidPersson
New Contributor III

Hi, we have created an image service from a mosaic dataset, with the download operation enabled. The mosaic dataset resides in an enterprise geodatabase and the raster files that make up the mosaic (it's an ortho image split into tiles) reside on a network share.

What we are trying to accomplish is to employ the Download Rasters operation (and Raster File op) to download clipped parts of the raster files (original tiles)  that make up the mosaic, as per https://developers.arcgis.com/rest/services-reference/enterprise/download-rasters.htm

We are using the Query operation to find the specific raster IDs (of the original tiles) at a location, and then we employ these ids in the Download Rasters op. (If we do not use the 'where' param of the Query op defined as 'category = 1' then we get the ids of what we believe are overview tiles ( we have created overviews for this image service ).

When next we use the Download Rasters operation with the rasterIds received (all of them, including what we believe are the overview ones) together with the 'geometry' and 'geometryType' (an envelope, a rectangle) https://..../imageserver/rest/services/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export/ImageServer/download?f=json&geometryType=esriGeometryEnvelope&geometry=150737,6583891,150860,6584056&format=PNG&token=***generated_token***&rasterIds=1365,1311,2698,2722,2728,2731,2733,2734

 

the response we get back looks like below.

{
    "rasterFiles": [
        {
            "id": ".\\TIF\\RGB\\65835_1505.tif",
            "size": 122911100,
            "rasterIds": [
                1311
            ]
        },
        {
            "id": ".\\TIF\\RGB\\65835_1505.tif.ovr",
            "size": 33303142,
            "rasterIds": [
                1311
            ]
        },
        {
            "id": ".\\TIF\\RGB\\65835_1505.tif.aux.xml",
            "size": 7523,
            "rasterIds": [
                1311
            ]
        },
        {
            "id": ".\\TIF\\RGB\\65840_1505.tif",
            "size": 122911100,
            "rasterIds": [
                1365
            ]
        },
        {
            "id": ".\\TIF\\RGB\\65840_1505.tif.ovr",
            "size": 30324063,
            "rasterIds": [
                1365
            ]
        },
        {
            "id": ".\\TIF\\RGB\\65840_1505.tif.aux.xml",
            "size": 7459,
            "rasterIds": [
                1365
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_26_2698_s5e.png",
            "size": 55188,
            "rasterIds": [
                2698
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_26_2698_s5e.png.aux.xml",
            "size": 1183,
            "rasterIds": [
                2698
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_26_2698_s5e.pgw",
            "size": 90,
            "rasterIds": [
                2698
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_53_2722_s5e.png",
            "size": 6470,
            "rasterIds": [
                2722
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_53_2722_s5e.png.aux.xml",
            "size": 1183,
            "rasterIds": [
                2722
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_53_2722_s5e.pgw",
            "size": 90,
            "rasterIds": [
                2722
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_57_2728_s5e.png",
            "size": 861,
            "rasterIds": [
                2728
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_57_2728_s5e.png.aux.xml",
            "size": 1183,
            "rasterIds": [
                2728
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_57_2728_s5e.pgw",
            "size": 90,
            "rasterIds": [
                2728
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_59_2731_s5e.png",
            "size": 164,
            "rasterIds": [
                2731
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_59_2731_s5e.png.aux.xml",
            "size": 1183,
            "rasterIds": [
                2731
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_59_2731_s5e.pgw",
            "size": 92,
            "rasterIds": [
                2731
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_60_2733_s5e.png",
            "size": 79,
            "rasterIds": [
                2733
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_60_2733_s5e.png.aux.xml",
            "size": 1183,
            "rasterIds": [
                2733
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_60_2733_s5e.pgw",
            "size": 92,
            "rasterIds": [
                2733
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_61_2734_s5e.png",
            "size": 69,
            "rasterIds": [
                2734
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_61_2734_s5e.png.aux.xml",
            "size": 1183,
            "rasterIds": [
                2734
            ]
        },
        {
            "id": "https:....imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_61_2734_s5e.pgw",
            "size": 94,
            "rasterIds": [
                2734
            ]
        }
    ]
}

The first results are references to the original tiles in their original format, unclipped.

The remainder (imageserver/rest/directories/arcgisoutput/..) are clipped to the envelope and file format employed with Download Rasters, however when we fetch one of the latter ones with Raster File like below then the images produced are very low res. They are not the original tiles clipped (increasingly low res, that's why we are thinking perhaps overviews):

https://...imageserver/rest/services/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export/ImageServer/file?id=https://...imageserver/rest/directories/arcgisoutput/AG_Mosaik/AG_Mosaik_SBF_GIS_Ortofoto2023_Eskilstuna_tatort_export_ImageServer/_ags_44824192/\/AG_MOSAIK_SBF_GIS_AMD_ORTOFOTO2023_ESKILSTUNA_TATORT_OVR_Raster_61_2734_s5e.png&rasterId=2734&token=***generated_token***

If we use the Download Rasters op with only the rasterIds of the original tiles then we get only the initial part of the above response, we get no clipped and converted versions, i.e no /arcgisoutput/.. ids.

Are we perhaps misunderstanding something here? 🙂 Perhaps what we are trying to achieve isn't possible with the Download Rasters operation?

 

Config: ArcGIS Enterprise 10.9.1

0 Kudos
0 Replies