Opened 9 years ago

Closed 9 years ago

#448 closed defect (fixed)

OGR2OGR Cannot Open Shapefile in to SQL Server 2014

Reported by: nrakich Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords:



Ogr2ogr does not seem able to open shapefiles with SQL Server 2014 drivers (for loading, reprojecting to the database). Are there any patches that can be applied that would resolve this? I am able to successfully load them to SQL Server 2012.

Syntax [removed server and database name] ogr2ogr -f "MSSQLSpatial" "MSSQL:server=[SERVERNAME];database=[DBNAME];trusted_connection=yes" "cb_2013_55_tract_500k.shp" -s_srs "EPSG:4269" -t_srs "EPSG:4326" -overwrite -lco "GEOM_TYPE=geography" -lco "GEOM_NAME=geog4326" -nln "ShapeWiCensusTract"

Reply "Unable to open datasource 'cb_2015_55_tract.shp' with the following drivers". (then list of about 45 drivers, including MSSQLSpatial, which is specified in the command line.

Best Regards, Nick

Change History (1)

comment:1 by nrakich, 9 years ago

Resolution: fixed
Status: newclosed

Hello - I just noticed that this is a PEBCAK (Problem Exists Between Keyboard and Chair). I was calling the wrong shape file. Corrected code and there is no problem loading the file.

Note: See TracTickets for help on using tickets.