Mercator projection
Posted: Sat May 16, 2015 3:19 am
Hello, for one of my projects I need a map projected on a point that has Decimal geometric coordinates. The card that I use has a Mercator projection.
Here is the card used:

Here the limits of the map:
North: 52
West: -5.5
East: 10
South: 40.9166
There a few years I found on a forum such procedures:
Here are the coordinates of the point I cerche to project on the map:
Latitude: 48.6833
Longitude: 6.2
Only I do not know how to use its procedures to project a point on the map, which is why I need your help. Thank you in advance.
Here is the card used:

Here the limits of the map:
North: 52
West: -5.5
East: 10
South: 40.9166
There a few years I found on a forum such procedures:
Code: Select all
Procedure.d mercator_proj(b.d)
ProcedureReturn(Log(Tan(#PI/4.0+b*#PI/360.0)))
EndProcedure
Macro rad(_deg_)
((_deg_)*0.017453292519943295) ; _deg_ * #PI / 180
EndMacro
Procedure.d scale_factor()
ProcedureReturn(IMAGE_XSIZE/(rad(image_east_longitude)-rad(image_west_longitude)))
EndProcedure
Procedure.d mercator_y(b.d) ; using Latitude
ProcedureReturn((scale_factor()*(mercator_proj(image_north_latitude)-mercator_proj(b))))
EndProcedure
Procedure.d mercator_x(l.d) ; using Longitude
ProcedureReturn((scale_factor()*(rad(l)-rad(image_west_longitude))))
EndProcedure
Latitude: 48.6833
Longitude: 6.2
Only I do not know how to use its procedures to project a point on the map, which is why I need your help. Thank you in advance.