tetrakarbon
10-17-2005, 01:07 PM
Hi guys! I'm creating a large map from the thousands of small, 256x256 pixel maps from google maps. I have already written a script that downloaded all the images, and saved them with a name indicating where they ought to be on the map (say, 1-1.png is top, left hand corner).
Anyway, I have to now piece all of these images together. There are about 1,800 images, so doing this by hand is a real pain (I actually have already done about 1/8th of the work, and it took 1.5 hours so far). So here's my question: is there a way in photoshop to automate this.
I know about droplets and batch things, etc. But I don't know how to make 'merge two images, with the second directly placed directly below the first in the new image.' If I knew how to do this, I could create ~60 columns with everything lined up.
Any suggestions guys? Without an alternative, I'm afraid I might have to give up :( Thanks!
-- Ned Ruggeri
Kraellin
10-17-2005, 02:22 PM
simplest way i know of is to make a new image of the size you want the whole map to be. turn on grid lines or guide lines with 'snap to' turned on and then simply control e each of the smaller images into place. still going to take a while though.
there are also programs out there for doing this sort of thing. in fact, google has one, i think. but not sure you can control it that much. it might be web based. these type programs typically use a keyword, go out and find images on the web and then import them into a grid type image.
Cameraken
10-17-2005, 02:38 PM
Hi Ned
Welcome to Retouch Pro.
This sounds an interesting project. How did you write your script. Was it in Visual Basic? And how did you download the correct images? Did you do it by postcode? If so how did you get the postcodes in order?
Are your pictures overlapping areas or are they edge to edge correct?
This should be fairly easy in Visual Basic.
Create a new image of the correct size then just read the first 256 pixels of one picture and write them to the new image.Then go on to the next 256 pixels from 1-2 etc.
Even if the images overlap then the process should be the same with a few less than 256 pixels.
I know there is montage software out there which may do this for you but you could write it yourself fairly easily.
Ken
tetrakarbon
10-17-2005, 04:36 PM
Thanks for all the advice guys! I figured out to do it, so I’m all set. Here’s how to do so, for anyone needing to know in the future. I won’t go into how to get images off Google maps, though if anyone’s ever interested, send me an email (rug5geri56uchi5cago5.ed5u – delete 5’s, turn 6 into an @). The way I did it was using ImageMagick for windows. I wrote a Java program to take advantage of its DOS command line, montage. Basically, this is the line:
Montage –geometry +0+0 rowX.bmp imageToMergeX.png rowX.bmp
This appends the image ToMergeX.png to the right of rowX.bmp’s image, saving the result as rowX.bmp. Using a for loop, I continually appended a sequence of images (the horizontal slices of the map) to a horizontal slice file. I created a second, outer for loop in order to get to the next slice. Here’s the program in Java, using the convention x-y.png:
import java.io.*;
public class mergehoriz
{
private static int startx = 16773;
private static int endx = 16834;
private static int starty = 24329;
private static int endy = 24397;
public static void main(String args[]) throws java.io.IOException, java.lang.InterruptedException
{
for(int y = starty; y <= endy; y++)
{
for(int x = startx; x <= endx; x++)
{
String prelim = y + "-horiz.bmp";
String merger = x + "-" + y + ".png";
String[] CMD = {"montage", "-geometry", "+0+0", prelim, merger, prelim};
Process p = Runtime.getRuntime().exec(CMD);
p.waitFor();
System.out.println(x - startx);
}
}
}
}
Now I’ll just have to put together the 60 horizontal slices, but this isn’t a big problem for me. I actually don’t know how to use montage for vertical stacking, but I won’t need to for what I do.
Take it easy everyone! Hope this helps if you ever get a similar problem!
-- Ned Rugeri
rondon
10-17-2005, 05:00 PM
I've laced some of those google maps together... the hard way.
There are other sources.... and maybe more interesting if this is just for chuckles.
Terra client allows you to select and area while zoomed out and then save it at whatever level you choose with a click of the mouse... all 1 big photo. or several depending on various limitations.. In my case a phone modem so I take chunks of 30mb or so.
The other is more interesting... World Wind.. from NASA.... a 3D globe that can be zoomed into for higher resolution views...
It really requires a hi-speed connection but a friend downloaded and sent much of it so I squeak by... but not as smoothly.
I may have heard that a new version is near so anyone interested might want to check that out.
Once skilled at this one folks can zoom into valleys with the Mts. on the side etc.
winwintoo
10-18-2005, 08:41 AM
Have you seen Google Earth (http://earth.google.com/downloads.html) ?
margaret
rondon
10-18-2005, 11:24 AM
I had heard of it... followed your link and discovered that also requires Hi_Speed..... sad.. My only hope for Hi Speed is when/if the new wireless becomes available... haven't heard much about that lately. We lag so far behind many other countries on speed... even those who have it are supposed to be runnning slower here in the US.
winwintoo
10-18-2005, 12:07 PM
Even with hi-speed, you really need to want to see whatever you're looking at :D
Course I'm trying to run it in the VirtualPC emulator which doesn't help, but I've heard of western companies that operate in the former Soviet regions that are using it successfully to suss out locations - apparently some of those regions haven't heard that the cold war is over and like to keep secrets.
Take care, Margaret