Projecting a Map From Imagery: MMPS and GIMP

On friday I created an equirectangular map(or a known portion of one…) from a partial image as from space using Photoshop and the Flaming Pear Flexify 2 tool. Photoshop is fairly expensive and Flexify isn’t exactly cheap. This means they aren’t universally available. I try whenever possible to create tutorials using freely available open-source or shareware applications. Today, I will try to do the same thing I did last time using GIMP and Matthew’s Map Projection Software(MMPS).
First, I loaded the jpg of my image of Asdakseghzan as seen from space into GIMP.
Zeta-GoldI resized the canvas into a square, using Image>Canvas Size… I’ll set both the width and height to match the larger of the existing values. In this case the image is wider than it is high, so I set the height to match the width to avoid losing any information. I hit the Center button under Offset, and told it not to resize any layers.
Next, I make a new transparent layer to act as a template for the placement and sizing of the circular area. With that layer selected, I use the ellipse select tool with aspect ratio fixed at 1:1 to select a circular area centered on the image and covering a maximum possible area. If necessary, use the tool options to set the position to 0,0 and the size to the height and width of the image. Select>Invert and fill the surrounding area with a dark color. Create another layer, fill it with another contrasting color, and move that layer beneath the image layer.
Now select the image layer. Move the layer till the round edge of the planet is close to a round edge of the template. Usually, I use the arrow keys to get this as close as posssible. Even if you get part of the edge matched up perfectly, the limb of the planet in the image will probably diverge from the edge of the template. If not, you’re golden, but if so you’ll need to rescale the layer. This was much easier in Photoshop. I’m not sure you get what you pay for, but there are perks.
Tools>Transform Tools>Scale to start the scaling process. Make sure Keep Aspect is checked. Grab the side perpendicular from the side where the image touches the template and drag till the limb follows the template. My planet image touched the template on the left side, so I stretched up and down on the top and bottom handles.
Now I had a pretty decent centered, maximally space-filling image, ready for reprojection. So I export it as a ppm. On my first try, I saved it as a jpeg and made a conversion using the ImageMagick mogrify facility, but that proved unnecessary.
Zeta-Gold_mergedMy initial plan was to forego dealing with my traced “map.” It wasn’t really all that hot, and the scale and shift process in GIMP seemed a bit horrific. Well, with a bit of practice, scaling and adjusting the position of layers didn’t seem quite as bad, and more practice seemed like a good idea. So I did it anyway.
Asdakseghzan_merged

 

Asdakseghzan_scaled

I decided to just show the thumbnail, ’cause there’s a LOT of whitespace here!

 

 

 

 

 

 

As you can see, the fit isn’t quite as precise as with the version I made in Photoshop. With a lot of effort, I could have made it better, but without transparency sizing is a frustrating endeavor. In order to maintain the tracing as a separable element, I hid the other layers and created a version with just the tracing itself. This is what I would project…

Now we get onto the CLI shell. The commands here assume you’re using some sort of UNIX-based OS like Linux or Mac OS X. Microsoft commands will differ somewhat.

First, I changed my working directory to the location of my images. Next, I gave the following command to reproject the contents of merged_image into map_image:
{location of MMPS}/project -i orthographic -w 2048 -h 1024 -lat -7 -long 7 -turn 2 -f merged_image.ppm > map_image.ppm

Optimally, the app would be on the search list, but the name “project” conflicts with one of my gis tools, so I have to use the full path. Your mileage might vary.

When MMPS was done projecting the basic composite, this was the result.
Zeta-Gold_map
I also projected the tracing.
Asdakseghzan_projected
I loaded that into GIMP as a layer on top of the other elements. Because the PPM format which MMPS uses doesn’t support transparency(so far as I, or apparently MMPS, know), I had to select the empty areas and make them transparent using a layer mask. This was made easy by the high contrast between the background elements and the tracing. If I had been working in black and white, it would have been more involved.
Asdakseghzan_mapWhile the process of positioning and scaling the elements was more difficult, I managed this in about half the time I took with Photoshop. There are a number of reasons for that. I’ve had more experience with the process, for one. I also did this in a more hurried and slipshod way; I spent a lot of time in Photoshop refining the fit between elements. The major difference, though, comes down to the crashing problem. If I hadn’t been required to restart the program and retrace the process from the beginning several times(Photoshop usually crashed on the first attempt to open the Save As dialog after using Flexify), the Photoshop would still have been somewhat quicker. Better Transform tools will tell. You may get something for what you pay for, but free is still pretty darned attractive.

Now that we have these existing elements properly projected(more or less), now it’s time to add in the rest of the world and bring this stuff into more robust mapping tools. That’s for the next few posts.

Thank you for reading. Please feel free to comment, leave suggestions or ask questions.
The Astrographer

Advertisements
This entry was posted in Building a Worldmap, Mapping, Planetary Stuff, Projects, World Building and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s