I am not from the geographic field and am having issues finding the correct words to feed google, or this really hasn't been asked before.
- I have a map in a bunch of KMZ files.
- I want to cut them into tiles of different sizes so that my tile server can serve them to applications as overlays.
- Creating an image overlay is not a solution because I receive out of memory errors on my mobile device.
The KMZ files are really ZIP files and contain 9 PNG files and 1 KML file
The PNG files are visually aligned on the map in the following manner:
A1 | A2 | A3 ____________ B1 | B2 | B3 ____________ C1 | C2 | C3
The KML file contains placement information of files A1-C3
The KMZ files do not all cover the same amount of area (some are bigger some smaller) and the placement information is not the same for all KMZ files and their contents (the top-left top-right bottom-left bottom-right are not always rectangular, they may be stretched).
I have tried stitching the images together using java commands
Graphics2D but have noticed that they are stretched and don't fit exactly one into the other and leave spaces between the images. I assume this is because the earth is round and I am trying to do this on a plane.
I have thought about creating a canvas and projecting the images to their lat/lng positions and then creating an image of that.
Is there a program that does the tiling for me and how do I preprocess the KMZ files so that the program can use the images?
I don't know how to proceed.
How could I go about this?