[postgis-users] FileGDB curves [SOLVED]
Andy Colson
andy at squeakycode.net
Wed Nov 12 11:32:51 PST 2014
On 11/12/2014 10:20 AM, Andy Colson wrote:
>
> Guess I'll try gdb -> shapefile again. Have had some luck with that in
> the past.
>
If I use ArcCatalog to convert GDB to Shapefile, then the shapefile
displays nicely in QGis, but its in some weird projection that ogr2ogr
cant seem to reproject correctly. It runs but then PostGIS has lots of
nans instead of numbers.
So I tried to use ArcCatalogs to re-project into EPSG:3857, and then use
ogr2ogr to import into PostGIS. Then I get this error:
ogr2ogr -f PostgreSQL -lco FID=gid -lco SPATIAL_INDEX=OFF -lco
GEOMETRY_NAME=the_geom -lco SCHEMA=washingtonmn -lco PRECISION=NO -lco
DIM=2 -t_srs EPSG:3857 -nlt MULTILINESTRING 'PG:dbname=gis'
DimensionLeader.shp
ERROR 6: No translation for Mercator_Auxiliary_Sphere to PROJ.4 format
is known.
Failed to create coordinate transformation between the
following coordinate systems. This may be because they
are not transformable, or because projection services
(PROJ.4 DLL/.so) could not be loaded.
Source:
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_84",6378137.0,298.257223563]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Mercator_Auxiliary_Sphere"],
PARAMETER["False_Easting",0.0],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",0.0],
PARAMETER["Standard_Parallel_1",0.0],
PARAMETER["Auxiliary_Sphere_Type",0.0],
UNIT["Meter",1.0]]
Target:
PROJCS["WGS 84 / Pseudo-Mercator",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4326"]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["X",EAST],
AXIS["Y",NORTH],
EXTENSION["PROJ4","+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
+no_defs"],
AUTHORITY["EPSG","3857"]]
ERROR 1: Terminating translation prematurely after failed
translation of layer DimensionLeader (use -skipfailures to skip errors)
Since the two didnt agree on what 3857 was, I tried 4326. Here are the
steps that finally got it to work.
In ArcCatalog:
reproject WCWebDataCC.gdb to 4326 and save as junk.gdb
batch convert junk.gdb to shapefile
ogr2ogr shapefiles to PostGIS ( includes -t_srs EPSG:3857)
Which gives us, finally:
http://testmaps.camavision.com/map/washingtonmn?pin=16.028.21.11.0039
-Andy
More information about the postgis-users
mailing list