-1

I have been supplied with a matrix of bathymetry (water depth) data. The matrix represents an evenly spaced grid of depths, and is in .csv format.

The matrix has some 'screened out' areas which have value -9999. The -9999 points need to be identified and turned into some kind of feature to be used later. The majority will be in clusters inside the grid - large areas of screened out data containing many (>1000) adjacent points. However...

  • It could be that some or all of the outer edge values of the grid have value -9999.
  • It is possible that there are lone points/lines of points which have value -9999.
  • There are likely to be areas of -9999 surrounding regions of 'good' (not -9999) data - polygons within polygons.

My task: Identify each separate area (or point) of -9999 value within the csv file, and produce a separate polygon/point for each one. The polygons would be the outer/inner boundaries of the -9999 area

The next steps involve placing items on the map, avoiding the -9999 features.

I created my own function to identify the -9999 values and create polygons, but it has some issues, and I am sure there must be pre-built libraries which can do this better than I.

Can anybody advise a way to approach this, and perhaps give some useful library/function recommendations? I am beginning to doubt whether polygons/features are the way to do this, but that approach does seem to have some nice advantages if it can work.

Thank you!

Hamo
  • 99
  • 2
  • 11

1 Answers1

0

You can achieve this in 3 steps with geoprocessing tools:

  1. Use IsNull to create a new raster where NoData values are converted to 1 (and all other values to 0).
  2. Convert your new raster to polygons with Raster To Polygon.
  3. Separate multipart polygons with Multipart To Singlepart.

You can perfectly automate this workflow, either with ModelBuilder or with arcpy. If you are familiar with Python I advise you to use arcpy, check the code sample at the end of each tool's help page.

GISGe
  • 444
  • 3
  • 15
  • That's great. Thank you, I'll give it a go. But I was hoping I might be able to automate it with python. Any thoughts on that? – Hamo Feb 08 '18 at 14:45
  • what about a solution which is completely free of GIS? I'd like to get away from that and use only python. Ideally. thanks! – Hamo Feb 08 '18 at 16:11