[mapserver-users] World file creation

Jeff Lake admin at michiganwxsystem.com
Thu Jul 5 15:13:51 PDT 2012


Thanks for the reply ...
Lets ask this ..
I am setting up an open source weather mapping application (php)
I already know most of my target audience will not be able to install
MapServer and or proj4.
I have been trying to get a handle on various map projection's.
decided to use 3
Grid (or flat non-projected)
Mercator
and Lambert Conformal Conic

The first 2 was easy enough creating the needed Classes
to convert Lat/Long to screen pixel X/Y

Lambert has me lost ... every script I have found
be it C, perl, python, or php all return me  X/Y in meter's

but for the life of me .. I cannot or have not found the magic
formula to convert the meter's to screen X/Y

I have looked at gPoint, PHPproj4, but they all go no further
then meter's (or it at least seems like it)

-Jeff Lake
MichiganWxSystem.com
WeatherMichigan.net
TheWeatherCenter.net
GRLevelXStuff.com

On 7/4/2012 9:31, Brent Fraser wrote:
> Jeff,
>
>   World files use projected x/y coordinates.  Use the Proj4 library 
> functions (in Mapscript)  to project the upper left and lower right 
> spherical lon/lat coordinates to x/y, then use the image size (length, 
> width)  to calculate the values for the world file 
> (http://en.wikipedia.org/wiki/World_file)
>
> Best Regards,
> Brent Fraser
>
> On 7/3/2012 8:27 PM, Jeff Lake wrote:
>> Maybe I'm not searching on the correct terms.
>> But what is the magic formula for creating world files ??
>>
>> I have a map of the US with the following projection info
>> ullat=53.3638
>> ullon=-130.964
>> lrlat=18.2977
>> lrlon=-69.1058
>> sp1=0
>> sp2=39
>> cm=-95.5
>> rlat=36.5
>> width=640
>> height=480
>> projection=lambert
>>
>> now how on earth do you figure the meter per pixel??
>> prefer php, but guess I could convert
>>
>
>
>
>




More information about the mapserver-users mailing list