ArcGIS Server: allowing tile resampling.

5956
19
Jump to solution
03-17-2017 08:54 AM
AlessandroValra
Occasional Contributor III

I've been trying to achieve what I was able to do in ArcGIS Online with ArcGIS Server as well.

I red this illuminating discussion on how to allow visualizing tile layers in ArcGIS Online for those scales where no cache was created through resampling.

It was as simple as entering the administrator REST directory by inserting "/admin/" in the right place (.../rest/admin/services/...), entering the edit page and adding {"resampling":true} to the service definition properties.

However, in the ArcGIS Server administrator directory, the edit page looks very different than it is in AGOL, and I am unsure on where should I place the "resampling":true string...

Is it even possible or am I wasting my time? Basically, I'd like to be able to zoom beyond the scales where I built the cache and being able to still visualize the tile service, although blurried because resampled. At least it would be better than nothing as it is now. Generating the cache is not a workaround as I'm very interested in the possibility of resampling on-the-fly possibly.

Finally, I have already set the tiling scheme to present the LODs from 0 to 17, and the cache is only generated until 14 (included). Below is the edit page of my service:

{
 "serviceName": "Italia_web_POP",
 "type": "MapServer",
 "description": "",
 "capabilities": "Map,Query,Data",
 "provider": "ArcObjects",
 "clusterName": "default",
 "minInstancesPerNode": 1,
 "maxInstancesPerNode": 1,
 "instancesPerContainer": 1,
 "maxWaitTime": 60,
 "maxStartupTime": 300,
 "maxIdleTime": 1800,
 "maxUsageTime": 600,
 "loadBalancing": "ROUND_ROBIN",
 "isolationLevel": "HIGH",
 "configuredState": "STARTED",
 "recycleInterval": 24,
 "recycleStartTime": "00:00",
 "keepAliveInterval": 1800,
 "private": false,
 "isDefault": false,
 "maxUploadFileSize": 0,
 "allowedUploadFileTypes": "",
 "properties": {
  "maxImageHeight": "4096",
  "virtualCacheDir": "/rest/directories/arcgiscache",
  "maxSampleSize": "100000",
  "exportTilesAllowed": "false",
  "textAntialiasingMode": "Force",
  "maxImageWidth": "4096",
  "enableDynamicLayers": "false",
  "dynamicDataWorkspaces": "[]",
  "supportedImageReturnTypes": "URL",
  "disableIdentifyRelates": "false",
  "isCached": "true",
  "maxScale": "36111.909642999999",
  "maxBufferCount": "100",
  "schemaLockingEnabled": "true",
  "maxRecordCount": "1000",
  "filePath": "C:\\arcgisserver\\directories\\arcgissystem\\arcgisinput\\STUDIOSIT\\Italia_web_POP.MapServer\\extracted\\v101\\Italia_web_POP.msd",
  "cacheOnDemand": "false",
  "useLocalCacheDir": "true",
  "cacheExtent": "full",
  "outputDir": "C:\\arcgisserver\\directories\\arcgisoutput",
  "virtualOutputDir": "/rest/directories/arcgisoutput",
  "minScale": "18489297.737236001",
  "maxDomainCodeCount": "25000",
  "maxExportTilesCount": "100000",
  "tilingScheme": "1",
  "ignoreCache": "false",
  "antialiasingMode": "None",
  "clientCachingAllowed": "true",
  "cacheDir": "C:\\arcgisserver\\directories\\arcgiscache"
 },
 "extensions": [
  {
   "typeName": "NAServer",
   "capabilities": "null",
   "enabled": "false",
   "maxUploadFileSize": 0,
   "allowedUploadFileTypes": "",
   "properties": {
    "oDCostMatrix_MaxDestinationsToFind": "",
    "serviceArea_MaxBreakValue_TimeUnits": "esriTimeUnitsMinutes",
    "vRP_MaxFeaturesInPolygonBarriers": "",
    "vRP_MaxRoutes": "",
    "serviceArea_MaxBarriers": "",
    "route_MaxFeaturesInLineBarriers": "",
    "vRP_ForceHierarchyBeyondDistanceUnits": "esriMeters",
    "route_ForceHierarchyBeyondDistanceUnits": "esriMeters",
    "locationAllocation_MaxDemandPoints": "",
    "closestFacility_MaxFeaturesInPolygonBarriers": "",
    "closestFacility_MaxFacilities": "",
    "oDCostMatrix_MaxDestinations": "",
    "serviceArea_MaxBreakValue_Length": "",
    "serviceArea_ForceHierarchyBeyondTimeUnits": "esriTimeUnitsMinutes",
    "serviceArea_ForceHierarchyBeyondDistanceUnits": "esriMeters",
    "vRP_MaxFeaturesInLineBarriers": "",
    "closestFacility_ForceHierarchyBeyondDistanceUnits": "esriMeters",
    "route_AllowTimeWindows": "true",
    "serviceArea_MaxFacilities": "",
    "locationAllocation_MaxFeaturesInPolygonBarriers": "",
    "oDCostMatrix_MaxFeaturesInLineBarriers": "",
    "route_MaxFeaturesInPolygonBarriers": "",
    "locationAllocation_ForceHierarchyBeyondDistance": "",
    "saveLayerOnServerWhenError": "false",
    "route_ForceHierarchyBeyondDistance": "",
    "locationAllocation_ForceHierarchyBeyondDistanceUnits": "esriMeters",
    "serviceArea_ForceHierarchyBeyondTime": "",
    "route_MaxStops": "",
    "serviceArea_MaxFeaturesInLineBarriers": "",
    "closestFacility_MaxIncidents": "",
    "oDCostMatrix_ForceHierarchyBeyondDistanceUnits": "esriMeters",
    "allowSaveLayerOnServer": "true",
    "route_MaxBarriers": "",
    "vRP_MaxBarriers": "",
    "oDCostMatrix_ForceHierarchyBeyondDistance": "",
    "serviceArea_MaxBreakValue_LengthUnits": "esriMeters",
    "serviceArea_ForceHierarchyBeyondDistance": "",
    "saveLayerOnServerWhenDebugging": "false",
    "closestFacility_MaxFeaturesInLineBarriers": "",
    "oDCostMatrix_MaxFeaturesInPolygonBarriers": "",
    "oDCostMatrix_MaxBarriers": "",
    "closestFacility_MaxFacilitiesToFind": "",
    "closestFacility_MaxBarriers": "",
    "serviceArea_MaxBreakValue_Other": "",
    "defaultOutputGeometryPrecisionUnits": "esriMeters",
    "vRP_ForceHierarchyBeyondDistance": "",
    "oDCostMatrix_MaxOrigins": "",
    "locationAllocation_MaxBarriers": "",
    "locationAllocation_MaxFeaturesInLineBarriers": "",
    "closestFacility_ForceHierarchyBeyondDistance": "",
    "nALayerDir": "C:\\arcgisserver\\directories\\arcgisoutput",
    "vRP_MaxOrders": "",
    "serviceArea_ForceHierarchyBeyondOther": "",
    "defaultOutputGeometryPrecision": "",
    "serviceArea_MaxFeaturesInPolygonBarriers": "",
    "serviceArea_MaxBreakValue_Time": "",
    "locationAllocation_MaxFacilities": ""
   }
  },
  {
   "typeName": "MobileServer",
   "capabilities": "",
   "enabled": "false",
   "maxUploadFileSize": 0,
   "allowedUploadFileTypes": "",
   "properties": {}
  },
  {
   "typeName": "KmlServer",
   "capabilities": "SingleImage,SeparateImages,Vectors",
   "enabled": "false",
   "maxUploadFileSize": 0,
   "allowedUploadFileTypes": "",
   "properties": {
    "minRefreshPeriod": "30",
    "compatibilityMode": "GoogleEarth",
    "imageSize": "1024",
    "dpi": "96",
    "endPointURL": "",
    "featureLimit": "1000000",
    "useDefaultSnippets": "false"
   }
  },
  {
   "typeName": "WFSServer",
   "capabilities": "null",
   "enabled": "false",
   "maxUploadFileSize": 0,
   "allowedUploadFileTypes": "",
   "properties": {
    "phone": "",
    "appSchemaURI": "http://www.geomaster.it:6080/arcgis/services/STUDIOSIT/Italia_web_POP/MapServer/WFSServer",
    "providerSite": "",
    "administrativeArea": "",
    "electronicMailAddress": "",
    "pathToStoredQueryFile": "",
    "enableTransactions": "false",
    "city": "",
    "hourOfService": "",
    "title": "",
    "postalCode": "",
    "customGetCapabilities": "false",
    "name": "Italia_web_POP",
    "deliveryPoint": "",
    "role": "",
    "axisOrderWFS10": "longlat",
    "axisOrderWFS11": "latlong",
    "serviceTypeVersion": "",
    "accessConstraints": "",
    "positionName": "",
    "abstract": "",
    "onlineResource": "http://www.geomaster.it:6080/arcgis/services/STUDIOSIT/Italia_web_POP/MapServer/WFSServer",
    "facsimile": "",
    "keyword": "",
    "defMaxFeaturesValue": "",
    "individualName": "",
    "fees": "",
    "serviceType": "",
    "enableDefMaxFeatures": "false",
    "country": "",
    "providerName": "",
    "transactionsWithoutLocks": "false",
    "pathToCustomGetCapabilitiesFiles": "",
    "appSchemaPrefix": "STUDIOSIT_Italia_web_POP",
    "contactInstructions": ""
   }
  },
  {
   "typeName": "SchematicsServer",
   "capabilities": "Query",
   "enabled": "false",
   "maxUploadFileSize": 0,
   "allowedUploadFileTypes": "",
   "properties": {}
  },
  {
   "typeName": "FeatureServer",
   "capabilities": "Create,Query,Update,Delete,Uploads,Editing",
   "enabled": "false",
   "maxUploadFileSize": 0,
   "allowedUploadFileTypes": "",
   "properties": {
    "creatorPresent": "false",
    "dataInGdb": "false",
    "xssPreventionEnabled": "true",
    "allowGeometryUpdates": "true",
    "syncVersionCreationRule": "versionPerDownloadedMap",
    "allowOthersToQuery": "true",
    "syncEnabled": "false",
    "editorTrackingTimeZoneID": "UTC",
    "enableZDefaults": "false",
    "realm": "",
    "allowOthersToDelete": "false",
    "allowTrueCurvesUpdates": "false",
    "datasetInspected": "true",
    "editorTrackingRespectsDayLightSavingTime": "false",
    "zDefaultValue": "0",
    "enableOwnershipBasedAccessControl": "false",
    "editorTrackingTimeInUTC": "true",
    "allowOthersToUpdate": "false"
   }
  },
  {
   "typeName": "WCSServer",
   "capabilities": "null",
   "enabled": "false",
   "maxUploadFileSize": 0,
   "allowedUploadFileTypes": "",
   "properties": {
    "phone": "",
    "maxImageHeight": "",
    "maxImageWidth": "",
    "city": "",
    "providerWebsite": "",
    "title": "STUDIOSIT_Italia_web_POP",
    "customGetCapabilities": "false",
    "name": "Italia_web_POP",
    "province": "",
    "role": "",
    "accessConstraints": "Nessuno",
    "abstract": "",
    "onlineResource": "http://www.geomaster.it:6080/arcgis/services/STUDIOSIT/Italia_web_POP/MapServer/WCSServer",
    "keywords": "",
    "fax": "",
    "zipcode": "",
    "fees": "",
    "country": "",
    "responsiblePerson": "",
    "providerName": "",
    "responsiblePosition": "",
    "email": "",
    "address": "",
    "pathToCustomGetCapabilitiesFiles": "",
    "serviceHour": "",
    "contactInstructions": ""
   }
  },
  {
   "typeName": "WMSServer",
   "capabilities": "GetCapabilities,GetMap,GetFeatureInfo,GetStyles,GetLegendGraphic,GetSchemaExtension",
   "enabled": "false",
   "maxUploadFileSize": 0,
   "allowedUploadFileTypes": "",
   "properties": {
    "reaspect": "false",
    "inheritLayerNames": "false",
    "contactPosition": "",
    "contactVoiceTelephone": "",
    "city": "",
    "contactFacsimileTelephone": "",
    "title": "STUDIOSIT_Italia_web_POP",
    "contactOrganization": "",
    "customGetCapabilities": "false",
    "name": "WMS",
    "stateOrProvince": "",
    "accessConstraints": "",
    "abstract": "",
    "onlineResource": "http://www.geomaster.it:6080/arcgis/services/STUDIOSIT/Italia_web_POP/MapServer/WMSServer",
    "keyword": "",
    "postCode": "",
    "fees": "",
    "addressType": "",
    "pathToCustomSLDFile": "",
    "country": "",
    "address": "",
    "contactElectronicMailAddress": "",
    "pathToCustomGetCapabilitiesFiles": "",
    "contactPerson": "",
    "listSupportedCRS": ""
   }
  }
 ],
 "datasets": []
}

19 Replies
Jack_Zhang
Occasional Contributor

Hi Nicolas, I'm sorry i can't share the URL, but good to hear yours working. My tile schema is 1:2000, 1:1000, 1:500, 1:250, where I created cache for 1:2000 and 1:1000. My ArcGIS Server is 10.5, I tested on both the built-in JS viewer in the REST end point which runs JS API 3.18, as we as JS API 3.25, both returns me 404 error though resampling worked fine. 

0 Kudos
NicolasGIS
Occasional Contributor III

Hi Jack,

Sorry, I had misunderstood your point.

It does return some 404 errors for me as well. It is I believe the normal workflow: I request a tile which does not exist (404 error), resampling is enabled so OK let's resample the previous one !

What I meant on my previous post related to 404 errors, is that when reaching the level for which there were no tiles (in my case level 15) it tried to resample the previous one (14) but as my schema was not a level/2 one, it looked for a wrong tile so it returned 404 error once again and so on even for levels which had tiles. So at the end, I had a blank tile when "overzooming".

If you pay attention to the 404 errors I had on my post, it goes from level 15 to 0 but tiles did not exist only at level 15 !

I hope it is clearer but I think you are good !

0 Kudos
by Anonymous User
Not applicable

is this not possible for ImageServices? (published straight from mosaic dataset in Catalog 10.5.1?)  If so, I wish it was. This would be extremely useful for aerial imagery sets. I added the property and it didn't do anything. Does it only work with MapServer services published out of MXD?

0 Kudos
NicolasGIS
Occasional Contributor III

It works on cached service : did you generate a cache for your service ?

0 Kudos
by Anonymous User
Not applicable

They are cached 10.5.1 image services. Folder: ImageryBasemap   I added the JSON and it seems to have no effect. Currently just re-added it to 2017. This would be very useful. Because it would enable users to publish the service, start tiling, but users could begin using it immediately while it tiles. And moreover it would enable dramatic space savings (terabytes) by having us not have to cache 1:71.  Just having it resample on the fly. Because otherwise it just "disappears".  However, what I did was enable tiling on demand. However I've noticed that can be very slow if the server is under load. Resampling is much faster. 

For a test I disabled tile on demand and added resample to the 2016 imagery ImageryBasemap/Chatham_Pictometry_2016 (ImageServer)  

It does not resample. Bug?

AndyVenuto1
New Contributor II

Kevin, I totally agree. This would be extremely helpful to many folks.

by Anonymous User
Not applicable

And now I'm back in tiling hell. I need to add literally one tile to the 2017 imagery, and no dice.  I finally added the raster after getting past another long-standing bug cannot add to existing mosaic dataset  Now it simply won't start tiling the service.  Restarted service, restarted caching GP tools, rebuilt status etc. The overall imagery workflow could use input from stakeholders ie users. For example they could crib from my thread on settings and guide users in the Docs to simply use bilinear jpg ybcr 80% in a gdb (not SDE). Basically all the raster defaults are wrong for aerials (ie nearest neighbor is the default). Fix the bugs, up the performance. A bug bounty might be win-win for the company and community... food for thought..

Jack_Zhang
Occasional Contributor

FYI, just got ESRI support replied me on this question. Basically it seems it's expected and no way to fix.  the original answer is below

"The reason why the ArcGIS Online servers do not have the 404 it that the blankTile parameter is not usually included in ArcGIS Online basemaps and tiles requests. Hence there is no error to report back.
ArcGIS Online has a different mechanism when it comes to detecting missing tiles. Its basemaps use a content delivery network (CDN) to provide faster response time.

The 404 error is considered part of the expected behavior for ArcGIS Server basemaps as per this documentation.
 

" By specifying this option, it does not necessarily mean resampling to any scale will work. For example, a tiled map layer may not have data beyond level 15 in some areas (for example rural areas). But in other areas (for example metropolitan areas), it may have data down to level 19. Enabling resampling would draw images all over to the last level and deliver a consistent user experience. In areas with no data, blurred images display. The tiled services need to return a 404 for missing tiles to get this option to work. Note that 404s for missing tiles did not become the default for ArcGIS Server until 10.2. Added at 3.6, updated at 3.12""

0 Kudos
by Anonymous User
Not applicable

Jack, thanks for that reply. Well, that's unfortunate. I may look in to geoserver or other software and maybe cut the cord on the ImageServer license.

0 Kudos
by Anonymous User
Not applicable

I will be looking in to why we need to continue paying for ImageServer if this can't get fixed soon.

I would like to tile to 1:1,100 and then after that, tile on Demand. BUT... I also want it to resample at the same time. The reason is that resampling is fast while tile on demand is slow. Server should be smart enough to show the user the fast resample, and then show the tiles when they are ready; and in the future when users view that extent it will show just the tiles.