I'm looking for projection functions to convert coordinates in 4326 to coordinates in 4258 and viceversa. Any suggestions?
[GIS] projection from epsg:4326 to epsg:4258
coordinate systemepsgprojwgs84
Related Solutions
The term 'projection' is often used as a synonym for the more correct term, coordinate reference system (CRS), which can include geographic and projected coordinate reference systems.
When a geographic CRS is displayed in two dimensions, its angular units are treated as if they are linear--they're just displayed. They are not displayed using a Mercator projection algorithm. The closest projection algorithm is Plate Carrée. Its forward equations are:
x (easting) = R*lambda (if the central meridian is zero)
y (northing) = R*phi
where
R = radius of the sphere (in your case the semimajor axis of WGS84 would be used)
lambda = longitude in radians
phi = latitude in radians
so you can see that true Plate Carrée coordinates are just scaled compared to displaying latitude-longitude values in degrees.
While the x equation is the same for the spherical Mercator equations, the y equation is different:
y = R ln tan (PI/4 + phi/2)
When you request data from an image-based web service like WMS, usually the layers have been cached (pre-built) in various CRS. The service then publishes which CRS are supported.
Note: Unfortunately, my company (Esri) is guilty of popularizing the usage of 'projection' instead of 'coordinate reference system'. I would just like to state that I started at Esri after that erroneous usage began.
According to spatilreference.org, your proj4 string is not correct. -a_srs defines the projection but does not modify the coordinates, so your output vrt file is likely to be incorrect (based on a sphere and not an ellipsoid, longitude of origin is 100 and intersection at parallel -70 instead of -60). Below is the proj4 string for EPSG:3412
+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs
If you are sure that your input data is in NSIDC Sea Ice Polar Stereographic South, you don't need the first line of code and you could write :
gdalwarp -overwrite -s_srs EPSG:3412 -t_srs EPSG:4326 -te -180 -90 180 90 input.tif projected.tif
EDIT: 1) in the proj4 string, you can read the parameters of the projection:
lat_0 is the latitude of origin, that is the summit of the cone in case of stereographic projection
lat_ts is the latitude of the parallel where the cone intersects the ellipsoid
lon_0 is the longitude of the origin of the projection
k is a scale factor
x_0 and y_0 are the shifts of the origin of the cartesian coordinate system (it is used to avoid negative coordinates with some projection)
a and b are the size (in m) of the semi-major axes of the ellipsoid (when they are the same, you have a sphere)
2) Your output pixel size will be in degrees and you can set it using -tr. An average pixel size could be your original pixel size in meter divided by 110000 (this is roughly the size in meter of one degree along a meridian). However, stereographic projection and WGS84 coordinates are very different. Therefore there will therefore be a large amount of resampling due to distortions, and you might have to optimize your pixel size for the location where your work is focused.
Best Answer
For proj.4 those two mean exactly the same and conversion from one system to another changes only the EPSG code. If you work with geodetic problems which require accurate ellipsoid model you will need some other tools.
The difference is rather small as written in the documentation of another conversion tool
http://www.ngs.noaa.gov/PC_PROD/Inv_Fwd/readme.htm