I have a KEA dataset of which the RAT has numerous columns. There are 11919 segments. I want to export this dataset either as shp or raster keeping the segment ID numbers, i.e. I want a shapefile or raster with only the segment numbers connected to the segments.

How do I do this?

I tried rastergis.exportGDALCols.Image in Python using RSGisLib but since the segment ID number column doesn't have a column name, that didn't work. I was able to export the RAT as a csv in Python with an additional column that contains segment numbers, but I need a shp or raster dataset to give me the spatial information of the segments.

  • 1
    Hello and welcome to GIS SE! Please take the tour. Regarding your question, what software do you use? It's also a plus if you provide information about what you already have tried to reach your goal. So, edit your question with further helpful context to get an answer to your question. – DirkB. Aug 20 '17 at 10:49
  • 1
    What software is this? – mdsumner Aug 20 '17 at 11:06
  • Thanks for your reactions, I have edited the question, I hope it's clearer now. I've also added a solution I found. – kmv Aug 20 '17 at 11:33

I have found a solution - gdal_polygonize.py gave me exactly what I needed, a shp with the segment IDnumbers as attribute.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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