Geography Reference
In-Depth Information
to find this—additional ways include querying the spatial_ref_sys table in
PostGIS and using the projection search feature in the QGIS projection
dialog box. If you like, you can download all the EPSG codes in several
database formats from OGP. 5 Another handy reference for coordinate
systems is the Spatial Reference website, which provides an interac-
tive web interface that allows you to find and display spatial reference
information. 6
Let's convert the cities shapefile to the U.S. National Atlas Equal Area
projection (EPSG:2163) and check the result:
$ ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:2163 cities_2163.shp cities.shp
$ ogrinfo -so -al cities_2163.shp
INFO: Open of `cities_2163.shp'
using driver `ESRI Shapefile' successful.
Layer name: cities_2163
Geometry: Point
Feature Count: 606
Extent: (-11983157.793768, -9388276.306186) - (11909182.755140, 11453696.678979)
Layer SRS WKT:
PROJCS["US National Atlas Equal Area",
GEOGCS["Unspecified datum based upon the Clarke 1866 Authalic Sphere",
DATUM["Mean_Sea_Level",
SPHEROID["Clarke_1866_Authalic_Sphere",6370997,0]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Lambert_Azimuthal_Equal_Area"],
PARAMETER["latitude_of_center",45],
PARAMETER["longitude_of_center",-100],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["Meter",1]]
NAME: String (40.0)
COUNTRY: String (12.0)
POPULATION: Real (11.0)
CAPITAL: String (1.0)
A couple of things to note about the coordinate conversion: First, we
didn't do a format conversion—the output is a shapefile, just like the
input. Second, we used -t_srs to transform the coordinates to the desired
projection. When we look at the results using ogrinfo , we see that indeed
the coordinate system was changed to U.S. National Atlas Equal Area.
When would coordinate conversion from the command line be useful?
Apart from the reasons we've listed at the beginning of this section,
5.
http://www.epsg.org
 
 
 
Search WWH ::




Custom Search