Q: Why are GeoJSON coordinates different exported from QGIS vs. ogr2ogr? I have a shapefile with a Google Mercator projection (900913) that I need converted to GeoJSON. I need to do this on a regular basis amongst other things so I wrote a shell script to do it using ogr2ogr. I am also converting this to a 4326 projection so the coordinates are more usable.
This is how I am using ogr2ogr to do that:
ogr2ogr -f "GeoJSON" -s_srs EPSG:900913 -t_srs EPSG:4326 output.geojson my-shapefile.shp -lco WRITE_BBOX=YES -lco COORDINATE_PRECISION=6 --debug on
For some reason all of my coordinate arrays have 3 values, the last one always being 0.0. Like so: 
    [ -122.633291, 48.628477, 0.0 ]
Where is the extra 0.0 coming from?? However, if I export from qgis the coordinates come out as expected.. 
    [ -122.633291, 48.819157 ]
I also notice that the longitude is slightly different between the two. Any ideas on how I could improve my ogr2ogr command? Or perhaps this is a bug? 
Pete
Here are some more details about the shapefile being converted.
Storage type of this layer:ESRI Shapefile
Geometry type of the features in this layer: Polygon
The number of features in this layer: 431
Editing capabilities of this layer: Add Features, Delete Features, Change Attribute Values, Add Attributes, Create Spatial Index, Fast Access to Features at ID, Change Geometries

In layer spatial reference system units : xMin,yMin -19951913.23,2139102.40 : xMax,yMax 20021888.10,11554793.57

+proj=merc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

A: This is possible explanation for the differences you're finding. In my version of QGIS the parameter string for EPSG:900913 is:
+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +over +no_defs
which looks about right to me (after all, it is Google Spherical Mercator). This is different from the string that ogr2ogr appears to be using. Nick.
