How to reproject a shapefile from WGS 84 to Spherical/Web Mercator projection.
- by samkea
Definitions:
You will need to know the meaning of these terms below. I have given a small description to the acronyms but you can google and know more about them.
#1:WGS-84- World Geodetic Systems (1984)- is a standard reference coordinate system used for Cartography, Geodesy and Navigation.
#2: EPGS-European Petroleum Survey Group-was a scientific organization with ties to the European petroleum industry consisting of specialists working in applied geodesy, surveying, and cartography related to oil exploration.
EPSG::4326 is a common coordinate reference system that refers to WGS84 as (latitude, longitude) pair coordinates in degrees with Greenwich as the central meridian. Any degree representation (e.g., decimal or DMSH: degrees minutes seconds hemisphere) may be used. Which degree representation is used must be declared for the user by the supplier of data.
So, the Spherical/Web Mercator projection is referred to as EPGS::3785 which is renamed to EPSG:900913 by google for use in googlemaps. The associated CRS(Coordinate Reference System) for this is the "Popular Visualisation CRS / Mercator ". This is the kind of projection that is used by GoogleMaps, BingMaps,OSM,Virtual Earth, Deep Earth excetra...to show interactive maps over the web with thier nearly precise coordinates.
Reprojection:
After reading alot about reprojecting my coordinates from the deepearth project on Codeplex, i still could not do it. After some help from a colleague, i got my ball rolling.This is how i did it.
#1 You need to download and open your shapefile using Q-GIS; its the one with the biggest number of coordinate reference systems/ projections.
#2 Use the plugins menu, and enable ftools and the WFS plugin.
#3 Use the Vector menu--> Data Management Tools and choose define current projection. Enable, use predefined reference system and choose WGS 84 coodinate system. I am personally in zone 36, so i chose WGS84-UTM Zone 36N under ( Projected Coordinate Systems--> Universal Transverse Mercator) and click ok.
#4 Now use the Vector menu--> Data Management Tools and choose export to new projection. The same dialog will pop-up. Now choose WGS 84 EPGS::4326 under Geodetic Coordinate Systems.
My Input user Defined Spatial Reference System should looks like this:
+proj=tmerc +lat_0=0 +lon_0=33 +k=0.9996 +x_0=500000 +y_0=200000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs
Your Output user Defined Spatial Reference System should look like this:
+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
Browse for the place where the shapefile is going to be and give the shapefile a name(like origna_reprojected). If it prompts you to add the projected layer to the TOC, accept.
There, you have your re-projected map with latitude and longitude pair of coordinates.
#5 Now, this is not the actual Spherical/Web Mercator projection, but dont worry, this is where you have to stop.
All the other custom web-mapping portals will pick this projection and transform it into EPGS::3785 or EPSG:900913 but the coordinates will still remain as the LatLon pair of the projected shapefile.
If you want to test, a particular know point, Q-GIS has a lot of room for that. Go ahead and test it.