Segment mean shift error 999999

1638
5
02-26-2018 10:02 PM
IanDavies
New Contributor III

Apologies beforehand, I've not done much image analysis in ArcMap. I'm trying to do OBIA on a portion of the NAIP 2016 aerial imagery for Washington (accessed on the GIS server through https://gis.apfo.usda.gov/arcgis/services).

I'm following these steps on the ESRI website. First, I use the Segmented Mean Shift tool on a small portion of the NAIP image. There are 4 bands, but the tool takes the first three by default. However, after running for a few minutes I get an Error 999999 and an incomplete output raster in grayscale. 

Does anyone have any idea what I could be doing wrong?

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

source location of files?

path details?

software and versions?

usually the multi-9 error is related to inputs or poorly formed inputs (ie spaces in paths, incomplete paths, etc etc)

0 Kudos
IanDavies
New Contributor III

Hey Dan,

Thanks for replying. I'm using ArcMap 10.4.1. The NAIP file I'm using is accessed through a USDA server since it's such a large image. To do this, I go into the Catalog sidebar, scroll down to GIS Servers, click "Add ArcGIS Server", and add the server URL https://gis.apfo.usda.gov/arcgis/services). The file I use is in the NAIP folder, called "Washington", which I drag into my Table of Contents.

The inputs to Segment Mean Shift are just the defaults, but I set processing extent to the extent of a small polygon feature in a separate geodatabase, rather than running analysis for the entire image. The path file for the NAIP image just reads "NAIP\Washington". There is no way to link directly to the file (e.g. clicking the yellow folder next to Input Raster and navigating to the USDA server - the raster files don't appear).

I'm not sure how to get around using a server since the entire NAIP file for Washington is 1.88 TB. To clarify even further, I am accessing the NAIP file in the way this tutorial recommends.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Ian... Hmmm sounded familiar

https://community.esri.com/message/714330-tool-failure-during-classification-wizard

with no resolution

and this document which I haven't gone through fully

https://community.esri.com/docs/DOC-1787

So probably neither are of help, but at least the error message means something 'generic' is amiss.  Perhaps between the tutorial and the last document something will click about your environment

ThomasMaurer
New Contributor

Hi Ian,

It is a good idea to try things out on small portion / extent of the data first before running a long job. Instead of setting extent for the gp tool, a more flexible way is to use on-the-fly raster functions. You can add those onto the image service layer in Pro or ArcMap. Then you can pan and zoom to different locations and check out the results in important hot spots before you run it all on TB of pixels.

 

The SegmentMeanShift raster function (not the gp tool) only takes 3 band 8 bit input. It was developed originally for RGB images. Add the ExtractBandFunction first to pick the 3 bands you want to use. This can be RGB, but you can also create a false color image using the IR band + 2 other bands. It depends on the task, what you want to do or classify in the end. Choose the 3 bands such that things you want to distinguish later are as different in color as possible. On top of ExtractBandFunction, add SegmentMeanShift function and it should work fine.

If you have input 16 bit not 8 bit, add Stretch function to scale pixel values down to 8 bit.

In general, play with ExtractBands and Stretch and their params until you like the intermediate, 3 band 8 bit false color image. Then apply Segment on that result.

Once you are done and happy with your function chain applied to image service, remove the segment raster function and run the segment gp tool on that layer. Alternatively, you can also run the function chain (incl the segment raster function) in the GenerateRasterTool for parallel processing.

Hope that helps. Best, Tom.

IanDavies
New Contributor III

Awesome! Yes this worked perfectly for the small portion I was interested in. Thank you Tom.

0 Kudos