Make a map that matches an image

Tips and tricks for using Geocart 3
Post Reply
jlertola
Posts: 9
Joined: Sat May 29, 2010 7:10 am

Make a map that matches an image

Post by jlertola » Mon Jun 14, 2010 9:09 pm

I am struggling with making a map the exact dimensions of an image. I have an image that is 600 pixels square and is exactly 10 degrees horizontally and vertically in the plate carree projection. I want to make a matching Geocart map so that I can turn this image into a database but I am struggling with sizing and positioning the Geocart map. In Geocart 2 I could set the pixels per degree in the Nominal scale dialogue. Or I could make the document 600 pixels wide and use the size to document command. But In Geocart 3 it looks like there is a small boarder around the map that Geocart includes when sizing to document, so that trick does not work any more. I am hunting for the correct size by typing small changes into the Nominal Scale and the Map Size and Resolution command but I am having a hard time getting anything that seems exact. Any help would be appreciated.

Thanks,
-Joe Lertola

daan
Site Admin
Posts: 721
Joined: Sun Mar 29, 2009 12:17 am
Location: Seattle

Re: Make a map that matches an image

Post by daan » Tue Jun 15, 2010 11:34 am

We removed pixels/degree as a scale unit because it would change according to changes you make in a map’s resolution. If you were to set your scale according to pixels/degree, it suddenly becomes unclear whether Geocart should pin the map’s scale by resolution or by scale ratio. Still, I see the use in being able to specify pixels/degree for this circumstance. I just need to think of a reasonable way to handle it.

It’s true the Size to Document command includes the border; that is to avoid having the outside bounding stroke hang off the page. However, the size you specify in the Map Size and Resolution dialog is the size without the border. Setting the value in there should work.

If you need to align a reference projection on top of an image, you should be aware of the image’s resolution and work at that resolution on screen. Choose Actual Pixels of Selected Object from the View menu to do that. Make your adjustments at that magnification.

When working in dpi:
  • Scale ratio = [(N pixels per inch) x (Z°/360° x 2π x 6,371,007 m x 39.37008 in./m)] ÷ P pixels
which simplifies to
  • Scale ratio = (N x Z x 4377758) ÷ P
P is the pixel width of the image in “geographic projection”.
N is the dpi of the image.
Z is the longitudinal degree span

In your particular case

P = 600
N = 72?
Z = 10

so
  • Scale = 1: 5253310
This formula applies to the earth with radius 6,371,007 m and assumes you know your image’s resolution in dpi, as opposed to pixels per mm, for example.

jlertola
Posts: 9
Joined: Sat May 29, 2010 7:10 am

Re: Make a map that matches an image

Post by jlertola » Tue Jun 15, 2010 7:33 pm

Thanks daan,

That formula does make the map the same size as my image. And once I have the map the correct size it seems like I can use the center in document command to line up the image and map automatically. So that solves my problem.

The Map Size and Resolution command does not seem to correspond to the actual size of the map though. I made a plate carree map that is 10 degrees wide and 10 degrees tall with the lower left corner at 0, 0. Using the scale you calculated this map is 600 points wide and tall. But the Map Size and Resolution command reports 601.9967 points wide and 602.995 points tall.

-Joe Lertola

daan
Site Admin
Posts: 721
Joined: Sun Mar 29, 2009 12:17 am
Location: Seattle

Re: Make a map that matches an image

Post by daan » Tue Jun 15, 2010 9:58 pm

The problem with trying to use Map Size for that sort of precision is that the reprojection facility blends and smears pixels. Even if only a little, pixels bleed slightly into surrounding pixels. All of them get counted. It’s the price of antialiasing. In the general case it is best to use the nominal scale facility to home into the precise scale, even if it takes a little fussing around.

Post Reply