Skip to main content
Solved

Convert extremely big raster to polygons


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.

View original
Did this help you find an answer to your question?

3 replies

takashi
Influencer
  • 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+28
  • Contributor
  • May 17, 2017
takashi wrote:

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.

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings