USDA NAIP ArcGIS image server access?

I’m trying to use some (free, very high-res) image data provided by the USGS here:

http://gis.apfo.usda.gov/arcgis/rest/services/NAIP

It says that it’s available via SOAP and REST calls, but I think they’re using an ArcGIS server.

I tried this, with no success: SANDBOX

var c = new Cesium.Viewer(‘cesiumContainer’);
var imageProvider = new Cesium.ArcGisMapServerImageryProvider({
url: ‘http://gis.apfo.usda.gov/arcgis/rest/services/’,
layers: ‘NAIP/Alabama_2015_1m’
});
var imageLayer = new Cesium.ImageryLayer(imageProvider);
c.scene.imageryLayers.add(imageLayer);

``

Can anyone help me gain access to this stuff?

Thanks,

Dave

Hi Dave,

Cesium doesn’t directly support ArcGIS ImageServers, but it’s fairly easy to use the UrlTemplateImageryProvider:

var c = new Cesium.Viewer(‘cesiumContainer’);

var imageProvider = new Cesium.UrlTemplateImageryProvider({

url: ‘http://gis.apfo.usda.gov/arcgis/rest/services/NAIP/Alabama_2015_1m/ImageServer/exportImage?bbox={westProjected}%2C{southProjected}%2C{eastProjected}%2C{northProjected}&bboxSR=&size=&imageSR=&time=&format=jpgpng&pixelType=U8&noData=&noDataInterpretation=esriNoDataMatchAny&interpolation=+RSP_BilinearInterpolation&compression=&compressionQuality=&bandIds=&mosaicRule=&renderingRule=&f=image

});

var imageLayer = new Cesium.ImageryLayer(imageProvider);

c.scene.imageryLayers.add(imageLayer);

I built the URL by using the Esri web interface (http://gis.apfo.usda.gov/arcgis/rest/services/NAIP/Alabama_2015_1m/ImageServer/exportImage?bbox=-9851778.184583757,3527670.5901932847,-9448238.184583757,4172381.5901932847) to get a working image (just change the Format to Image) and then templatized the bbox parameter.

Kevin