2

I have a landcover raster with 1,364 X 1,303 cells. I would like to create an output vector mesh depicting every cell outline. Thus, the vector would contain 1,777,292 polygons.

The raster is a single-band, continuous, signed integer, 32-bit Arc Grid.

The Arc 10.0 Raster to Polygon tool dissolves the output shapefile where adjoining raster cells have the same value. I don't want the dissolved version - rather I need the outline mesh of every raster cell, regardless of it's value.

11
  • 1
    Please focus your question on one GIS product or the other to prevent it being too broad. You can always research/ask about the other product separately.
    – PolyGeo
    Commented Jan 31, 2016 at 19:54
  • 4
    The performance of your 1.8m row table is going to be awful, and it isn't likely to be all that useful. It might be worthwhile to stop and evaluate what you're likely to able to do with this undissolved raster as a vector that you can't do with it as a raster or dissolved vector.
    – Vince
    Commented Jan 31, 2016 at 20:01
  • 1
    @PolyGeo are you proposing that I ask the same exact question twice, once for Arc and once for QGIS?
    – Stu Smith
    Commented Jan 31, 2016 at 20:29
  • 1
    If you choose to work in ArcGIS here are some thoughts:
    – Tom Dilts
    Commented Jan 31, 2016 at 20:39
  • 2
    A polygon vs polyline fishnet wouldn't make a performance difference at 1.8m features, but using some looping to generate 1365x5 line segments at 1/5th the area width by 1304x5 segments 1/5th the area height will give you 13.5k lines that should render efficiently.
    – Vince
    Commented Jan 31, 2016 at 21:40

2 Answers 2

2

The asker provided the answer below within their question, and so it has been cut/paste to here:

The Arc Raster to Polygon tool automatically dissolves border lines where adjoining cell values are identical. There doesn't seem to be any way to force Arc to create a mesh for EVERY raster cell. So my solution is to create a new raster where every cell has a different value – thus no adjoining cells to dissolve. I did this by creating a new random raster, based on the raster of interest.

Starting with a 32-bit integer input raster named input123:

  1. Create Random Raster tool:
    • output = output123
    • output cell size = blank
    • environment:
    • output coordinate system = input123
    • processing extent → extent = input123
    • processing extent → snap raster = input123
    • raster analysis → cell size = input123
    • raster analysis → mask = input123

The output is a 32-bit floating-point raster with the same number of cells and geometry as the input raster.

  1. Convert the output from above to an integer (an integer raster is requred in the next step).
    • Raster Calculator tool:
    • Int(“output123” * 1000000)
      • output = output123_int

The output is a 32-bit integer raster

  1. Create the ouput polygon vector mesh. Alternatively, I could have output as a polyline.
    • Raster to Polygon tool.
      • input = output123_int
      • field = value
      • output = mesh123
      • simplify polygons checked off

Voila! The output is a vector mesh that contains the outline of the input raster's cells*.

Note that using a random raster carries the risk that the output will potentially have adjoining cells with the same value. This can be checked by calculating the output vector for polygon size and confirming that all features are the same size.

*Also note that with my data, the vector output contained fewer polygons than the number of input raster cells. The reason is that the raster had some NoData values along it's edges due to the warping effect of it's projection. Those NoData cells were not output to the final vector.

1

You can also accomplish this using [1] 'Create Fishnet'. Set the origin coordinate and resolution to match your raster; set to polygon and check the box to create label points. [2] 'Extract Values to Points' using your raster and the fishnet label points. [3] Join the raster data from your points to the fishnet polygon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.