I have a map in a bitmap image format (.bmp) where each region is assigned an RGB colour. What I want is a list of every adjacent region, for every region.
So if region1 is adjacent to region2 and region3, I want this output in a text/csv file:
region1, region2 region1, region3
I can also deal with the output where we have duplicate adjacency links:
region1, region2 region1, region3 region2, region1 region3, region1
And I can also deal with an adjacency matrix:
(whatever), region1, region2, region3 region1, 0, 1, 1 region2, 1, 0, 0 region3, 1, 0, 0
And I can deal with the regions being named after their colour number. (probably the simplest thing to do) So the actual output would probably look like:
hFF0000, h00FF00 hFF0000, h0000FF (or) hFF0000, h00FF00 hFF0000, h0000FF h00FF00, hFF0000 h0000FF, hFF0000 (or) (whatever), hFF0000, h00FF00, h0000FF hFF0000, 0, 1, 1 h00FF00, 1, 0, 0 h0000FF, 1, 0, 0
The output will then be processed in Excel.
I feel like what I'm looking for is a very basic feature for a geography software, and I've tried to find it in QGIS, but I didn't find it and I am confused by all the vocabulary I don't understand. What I remember from my last geography class is that we talked about rocks and coloured maps.
Like, I know what's a raster and what's a vector, but the software is constantly asking me for a coordinate system, and I don't know what to answer because this isn't a real world map and I don't care about the GPS coordinate. Also, every raster operation seem to want to operate on a single band, the bands are named after the RGB colour, so are all of those processes only working with 1 colour component of my pixels?? I can't deal with that, because I need all 3 colour components to know which region is which.
This map is the regions map for the Total War Three Kingdoms video game, taking place in China circa 200 AD, and I want the adjacency dataset because I'm building a modelling Excel workbook, and some buildings give a critical effect to their adjacent regions.
So my precise questions are :
- Is this doable in QGIS?
- If not doable in QGIS, can another free software do it? (free as in money)
- And finally, how can I do this in said software?