Project a disk to a plane...

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jumpjack
Posts: 69
Joined: 2010-12-10T05:29:16-07:00
Authentication code: 8675308

Project a disk to a plane...

Post by jumpjack »

I have this image:
http://photojournal.jpl.nasa.gov/jpeg/PIA19932.jpg

I want to convert it into mercator projection; of course it will be just half the width of a full mercator projection, as it's just one emisphere, but it's ok for me.

How do I do that?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Project a disk to a plane...

Post by snibgo »

IM doesn't have built-in operations for map projections.

You need to know the input projection. It might be rectlinear (like a photograph taken from an infinite distance).

Then you need a bit of maths to convert from rectilinear to mercator. Fortunately, many people have done this. A quick Google turns up this one: http://www.users.globalnet.co.uk/~arcus/mmps/
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Project a disk to a plane...

Post by fmw42 »

Imagemagick does not have a distort method to deal directly with Mercator (or any other such cartographic projections) Projections. You could implement the mathematics of the Mercator projection with the IM -fx function, but it would be extremely slow.

The closest thing in IM is a depolar transform. See http://www.imagemagick.org/Usage/distorts/#polar
Post Reply