Results 1 to 10 of 10

Thread: free SW for Transverse Mercator projections?

  1. #1

    Question free SW for Transverse Mercator projections?

    Does it exist?

    I also need Lambert Azimutal Equal Area projections.
    Last edited by jumpjack; 02-05-2009 at 08:48 AM.

  2. #2

  3. #3

    Post

    Quote Originally Posted by RobA View Post
    Take a look at Flex Projector and G.Projector

    One of them may have the projections you require.

    -Rob A>
    I didn't notice Flex Projctor also supports raster images, I'll try it again.
    I also already tried G.Projector, but it lacks Transverse Mercator projections.

    I found a dozen of programs: DGALWARP, fGIS, GRASS, PROJ.4, GMT & WinGMT, fTools... but I always miss HOW to use them! They're really complex programs! I just need to know how to get a projection from an image, I can't study tons of pages about cartography! :-(

    DGALWARP appears to be quite good to be explained in a forum: does anybody have an idea of the needed command line to put one of these images into Transverse Mercator and Lambert Azimuthal Equal Area?

  4. #4

    Post

    Based on your other post, I think what you want is to go from an image like this (equirectangular):

    remappingtest.png

    to this:

    remappingtest_sin.png

    I did this using Gimp, with the mathmap plugin, using the following mathmap script I wrote:
    Code:
    unit filter sinusoidal (unit stretched image in)
        divs = 9;
        py = 2;
        counter = 0;
        while (counter <= divs) do
          px = if (x>1-(2*counter/divs)-1/divs && x<=1-(2*counter/divs)+1/divs) 
               then (x-(1-(2*counter/divs)))/cos(y*pi)+1-(2*counter/divs)
               end;
          py = if (x>1-(2*counter/divs)-1/divs && x<=1-(2*counter/divs)+1/divs &&
                   px<=1-(2*counter/divs)+1/divs  && px>=1-(2*counter/divs)-1/divs)
               then y
               else py
               end;
          counter = counter + 1;
        end;
        in(xy:[px,py])
    end
    Change the divs=9 to however many "petals" you want.

    edit: Another thing tha might make this easier to assemble is what i did in the next one. I offset bottom half of the image by 1/2 the petal width (in this case 60 px), ran the filter, then offset the bottom half back (-60px), with wrap on, of course.:

    remappingtest_sin2.png

    -Rob A>

  5. #5

    Post

    Quote Originally Posted by RobA View Post
    Based on your other post, I think what you want is to go from an image like this (equirectangular):

    remappingtest.png

    to this:

    remappingtest_sin.png

    I did this using Gimp, with the mathmap plugin, using the following mathmap script I wrote:
    that's a very cool news: I'm a developer, so maybe I could easily implement other projections I need... if just knew the formulas/algorithms I need!

    I already tried "gores" projections, but it's only good up to 70-75° latitude: it's really hard to properly stitch gores at poles, that's why I also need the Lambert azimutal projection centered on poles.
    Do you know the formula for it too?

  6. #6
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,610

    Default

    See the other thread for a description of how to use Wilbur to do the projection you're asking about. It should be possible to do this with an FT projection definition.

  7. #7

    Post

    Quote Originally Posted by jumpjack View Post
    that's a very cool news: I'm a developer, so maybe I could easily implement other projections I need... if just knew the formulas/algorithms I need!

    I already tried "gores" projections, but it's only good up to 70-75° latitude: it's really hard to properly stitch gores at poles, that's why I also need the Lambert azimutal projection centered on poles.
    Do you know the formula for it too?
    Almost every protection formula is at wikipedia:

    http://en.wikipedia.org/wiki/Lambert...rea_projection

    -Rob A>

  8. #8

    Post

    Quote Originally Posted by RobA View Post
    Based on your other post, I think what you want is to go from an image like this (equirectangular):

    remappingtest.png

    to this:

    remappingtest_sin.png

    I did this using Gimp, with the mathmap plugin, using the following mathmap script I wrote:
    Code:
    unit filter sinusoidal (unit stretched image in)
        divs = 9;
        py = 2;
        counter = 0;
        while (counter <= divs) do
          px = if (x>1-(2*counter/divs)-1/divs && x<=1-(2*counter/divs)+1/divs) 
               then (x-(1-(2*counter/divs)))/cos(y*pi)+1-(2*counter/divs)
               end;
          py = if (x>1-(2*counter/divs)-1/divs && x<=1-(2*counter/divs)+1/divs &&
                   px<=1-(2*counter/divs)+1/divs  && px>=1-(2*counter/divs)-1/divs)
               then y
               else py
               end;
          counter = counter + 1;
        end;
        in(xy:[px,py])
    end
    Change the divs=9 to however many "petals" you want.

    edit: Another thing tha might make this easier to assemble is what i did in the next one. I offset bottom half of the image by 1/2 the petal width (in this case 60 px), ran the filter, then offset the bottom half back (-60px), with wrap on, of course.:

    remappingtest_sin2.png

    -Rob A>
    I just discovered that GIMP plugins can also be written in Python:
    http://www.jamesh.id.au/software/pygimp/

    Are you able to port your short source to python? I already know it, so I won't have to learn a new language.

  9. #9

    Post

    Quote Originally Posted by jumpjack View Post
    I just discovered that GIMP plugins can also be written in Python:
    http://www.jamesh.id.au/software/pygimp/

    Are you able to port your short source to python? I already know it, so I won't have to learn a new language.
    If you know python YOU should be able to convert it . The math for that mapping is trivial (I got it from wikipedia)

    If you are willing to use Gimp then the mathmap script will work fine, as mathmap is available for every OS.

    It is much faster than scripting in scheme and much simpler than scripting in python (when performing manipulation of image data.)

    If you want a stand-alone python script, I'll leave that to you...

    -Rob A>

  10. #10

    Default

    If somebody is still looking for solution, I coded sinusoidal gores projection in javascript, and it is available here http://www.winski.net/?page_id=12 under BSD license (you can do whatever you want with the program and its source). It works in a web browser so you don't have to download anything.
    Last edited by winski; 02-25-2015 at 11:03 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •