ewang1205 has asked for the wisdom of the Perl Monks concerning the following question:

I need a algorithm to convert from latitude and longitude to x-coord and y-coord? Please help. Thanks! This is for Oil and Gas industry, specially at Gulf of Mexico locaiton. I don't know which map projection to use. How can I start to learn this? Thanks.
  • Comment on convert from latitude and longitude to x-coord and y-coord

Replies are listed 'Best First'.
Re: convert from latitude and longitude to x-coord and y-coord
by Albannach (Monsignor) on Nov 30, 2004 at 19:00 UTC
    Better than coding up an algorithm again, useGeo::Coordinates::UTM!

    Update: Changed reference to the more specific module which is probably what the OP is after, and also as the author of Geo::Coordinates tells us not to use his module (which is only a base class anyway).

    --
    I'd like to be able to assign to an luser

Re: convert from latitude and longitude to x-coord and y-coord
by Zaxo (Archbishop) on Nov 30, 2004 at 19:02 UTC

    There are an infinite number of ways to do that, all geographically inaccurate. What map projection do you prefer? Googling for "map projection" will inform you of some choices and tell you how to calculate them.

    Mathematically, it takes two flat charts to cover a sphere.

    After Compline,
    Zaxo

Re: convert from latitude and longitude to x-coord and y-coord
by traveler (Parson) on Nov 30, 2004 at 20:17 UTC
Re: convert from latitude and longitude to x-coord and y-coord
by Yendor (Pilgrim) on Nov 30, 2004 at 19:03 UTC