0

The Situation: I have a vector data map with all the countries in the World, including a unique landcode for every country. I need to convert it into a raster map, so I can eventually analyse (with Matlab) drought indicators for that country.

The Problem: The precipitation data I use has 720 columns and 360 rows. I want the raster map of world countries to be in the exact same amount of columns and rows. BUT the raster map also needs to have a cellsize of 0.5! Right now, when I use the vector to raster conversion tool, if I use cellsize = 0.5, the columns and rows become 720x287.

Question: How can I create a raster map of 720 columns and 360 rows, while setting cellsize at 0.5?

Additional info: Using ArcMap 10.4.1 Using Matlab R2015b Raster is .TIFF Vector is .shp

Raster layer properties enter image description here

1

The problem seems to be that while your precipitation data covers the whole world (east to west, pole to pole), your shapefile does not go from pole to pole (only 143.5/180 degrees). You can fix this

a) by padding the rasterized vector data in matlab using padarray(), or

b) by removing the excess rows in the raster data (i'd also suggest doing this in matlab).

Either way you need to check the North/south extent of you vector data, it might not be symmetrically.

| improve this answer | |
  • Thanks for your comment! You were right about the asymmertry of the North/South extent. I reckoned that including or excluding collumns and rows would displace Tanzania, while I could not find how to include assymetrical rows. However, I solved the problem another way! – Tristian May 25 '17 at 10:19
0

I solved the problem. In ArcMap, I imported the precipitation data (NetCDF). It was however flipped, but I could get it in the right orientation using the tools 'Flip' and 'Rotate'. Now this map had the right orientation and the right amount of columns and rows. Furthermore I just altered some of the default settings in environments: 1) I set the processing extent to the precipitation data. 2) I set the snap raster also to the precipitation data. 3) I set the cellsize of every output raster to 0.5. Finally, I converted the vector file of world countries to a ASCII file using the raster to ascii conversion tool. The ASCII file now has the same amount of rows and columns as the precipitation data with the cell size still intact!

| improve this answer | |

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.