I use shp2pgsql to import an .shp ESRI shapefile into PostgreSQL database. I use brew installed shp2pgsql. I used this command first:
shp2pgsql -I -s 4326 /path/to/shape_file.shp public.os_gb | psql -U postgres -d postgres
It shows this message on terminal:
It imports data into database but PostgreSQL Geometry Viewer says that it is not able to render "3D" shapes.
Then I tried this command:
shp2pgsql -I -t 2D -s 4326 /path/to/shape_file.shp public.os_gb | psql -U postgres -d postgres
Geometry Viewer shows 1 geom like this:
So forcing in 2D did not work. Could you please help me with this and tell me what's wrong here.
Edit:
Here is the result of "ogrinfo -so -al my_shape_file.shp":
INFO: Open of `GB_GreenspaceSite.shp'
using driver `ESRI Shapefile' successful.
Layer name: GB_GreenspaceSite
Metadata:
DBF_DATE_LAST_UPDATE=2018-09-24
Geometry: 3D Polygon
Feature Count: 143822
Extent: (9819.840000, 8274.570000) - (655230.650000, 1214133.190000)
Layer SRS WKT:
PROJCS["OSGB 1936 / British National Grid",
GEOGCS["OSGB 1936",
DATUM["OSGB_1936",
SPHEROID["Airy 1830",6377563.396,299.3249646,
AUTHORITY["EPSG","7001"]],
TOWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489],
AUTHORITY["EPSG","6277"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4277"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",49],
PARAMETER["central_meridian",-2],
PARAMETER["scale_factor",0.9996012717],
PARAMETER["false_easting",400000],
PARAMETER["false_northing",-100000],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["Easting",EAST],
AXIS["Northing",NORTH],
AUTHORITY["EPSG","27700"]]
id: String (38.0)
function: String (40.0)
distName1: String (254.0)
distName2: String (254.0)
distName3: String (254.0)
distName4: String (254.0)