But the rule to do what? The tiles are designed to "match" each other if arranged in certain ways. The program knows that, say, a tile from a particular part of the image is to be used as, say, a plains tile bounded by plains on all sides. I suppose that this is hard-coded, so you won't be able to find some other file that specifies how it works. If you want to change the tile graphics, you need to look at the game itself to see which tile graphics are used in which contexts.
And welcome to CFC, of course!