Quantcast
Channel: Question and Answer » gdal
Viewing all articles
Browse latest Browse all 397

Ogr2ogr trying to import and convert shapefile to EPSG:3857

$
0
0

I’m attempting to import a shapefile (along with .prj file) to MySQL using Ogr2ogr and using the t_srs option set to EPSG:3857 (the default for Leaflet and Google Maps) but I’m getting odd results, eg:

POLYGON((-11368056.30134075 7311108.362629404,-11373244.15325952 7311276.412255973,-11372957.24394724 7313966.399114295,-11367933.92414896 7312806.137997068,-11368056.30134075 7311108.362629404)),1

the command I’m using is:

ogr2ogr -f MySQL MySQL:db,host=host,user=user,password=pass sourceDir -nln destTable -t_srs EPSG:3857 -update -overwrite -lco engine=MYISAM

the .prj in the sourceDir is

PROJCS["NAD_1983_UTM_Zone_13N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-105.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

Any suggestions as to the problem?


Viewing all articles
Browse latest Browse all 397

Trending Articles