Skip to main content
Solved

Convert extremely big raster to polygons

  • May 17, 2017
  • 3 replies
  • 120 views

Hi, I'm trying to convert a raster that is some 7 gigapixel to polygons without resampling.

The raster is global land cover data, and it is one band 129 600 by 55 800 pixels (7,2 Gpx...).

Trying to use the rastertopolygoncoercer obviously crashes. I don't want to resample because of the resolution and my following work. Instead what I want to do is to dissolve polygons based on 23 possible values represented in the raster. Land cover is fairly coherent I believe.

But... I am at a loss trying to figure out how I should solve this. Maybe some kind of loop reading 10-100-1000? rows at a time, dissolving these and writing to an appending fileset.

I believe that the final dataset would, should... could be in a manageable size. Maybe I'm wrong and the only option is to resample.

Best answer by takashi

Hi @rydentobbe, just an idea. How about splitting the large raster into small tiles with the RasterTiler? Then, create polygons for each tile and dissolve them grouping by an attribute storing the 23 values.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • Best Answer
  • May 17, 2017

Hi @rydentobbe, just an idea. How about splitting the large raster into small tiles with the RasterTiler? Then, create polygons for each tile and dissolve them grouping by an attribute storing the 23 values.


  • Author
  • May 17, 2017

Ah...! That just might work. I'll try it at once


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • May 17, 2017

Hi @rydentobbe, just an idea. How about splitting the large raster into small tiles with the RasterTiler? Then, create polygons for each tile and dissolve them grouping by an attribute storing the 23 values.

That's what I did, with a similar scenario a few years ago. Chunked the raster into tiles, converted each tile into polygons and then dissolved them back together.

 

 

Due to some weird slivers prodiced by the dissolver (0 area) I ended up creating a one pixel overlap in the tiles to ensure the polygons dissolved together properly. There have been significant improvements in the dissolver since then, so that may not be necessary.