I am trying to beautify a map by using Colorize
as demonstrated in the Mathematica documentation. First, I import a shapefile from DIVA-GIS for France which contains polygons for the country, its regions and departments.
mapdata = Import["http://gadm.org/data/shp/FRA_adm.zip", "Data"];
I then extract the region data and (poorly) place a bounding region around the map:
Graphics[Rectangle[{-6, 41}, {9.7, 51.5}]];
Graphics@{EdgeForm[Thick], FaceForm[White], ("Geometry" /. mapdata[[2]])};
t1 = Show[%%, %]
I can then Colorize
t2 = Colorize[MorphologicalComponents[t1, CornerNeighbors -> False], ColorFunction -> "LightTerrain"]
which gives me the following Image
(note, it is not a Graphic
)
I'd now like to take the department information and lay it over the colored regional map
t3 = Show[Graphics@{Black, EdgeForm[Thin], FaceForm[], ("Geometry" /. mapdata[[1]])}]
However the MorphologicalComponents
function rescaled the regional map, preventing me from overlapping t2 and t3 above.
Is there a way to get the same or similar effect as obtained through MorphologicalComponents
and Colorize
without losing the x,y coordinate data?