Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bc2pg failing on railways layer #71

Closed
smnorris opened this issue Jan 30, 2020 · 2 comments
Closed

bc2pg failing on railways layer #71

smnorris opened this issue Jan 30, 2020 · 2 comments

Comments

@smnorris
Copy link
Owner

Not sure yet if this is a bcdata problem but this fails after installing bcdata on a new computer:

$ bcdata bc2pg WHSE_BASEMAPPING.GBA_RAILWAY_TRACKS_SP
ogr2ogr -lco OVERWRITE=YES -lco SCHEMA=whse_basemapping -lco GEOMETRY_NAME=geom -f PostgreSQL PG:host=localhost user=postgres dbname=postgis password=postgres -t_srs EPSG:3005 -nln gba_railway_tracks_sp http://openmaps.gov.bc.ca/geo/pub/wfs?service=WFS&version=2.0.0&request=GetFeature&typeName=WHSE_BASEMAPPING.GBA_RAILWAY_TRACKS_SP&outputFormat=json&SRSNAME=epsg%3A4326
ERROR 1: ERROR:  column s.consrc does not exist
LINE 1: ...nrelid = c.oid AND a.attnum = ANY (s.conkey) AND (s.consrc L...
                                                             ^
HINT:  Perhaps you meant to reference the column "s.conkey" or the column "s.conbin".

ERROR 1: ERROR:  column s.consrc does not exist
LINE 1: ...nrelid = c.oid AND a.attnum = ANY (s.conkey) AND (s.consrc L...
                                                             ^
HINT:  Perhaps you meant to reference the column "s.conkey" or the column "s.conbin".

ERROR 1: ERROR:  current transaction is aborted, commands ignored until end of transaction block

ERROR 1: ERROR:  current transaction is aborted, commands ignored until end of transaction block

ERROR 1: ERROR:  current transaction is aborted, commands ignored until end of transaction block

ERROR 1: ERROR:  current transaction is aborted, commands ignored until end of transaction block

ERROR 1: ERROR:  current transaction is aborted, commands ignored until end of transaction block

ERROR 1: CREATE TABLE "whse_basemapping"."gba_railway_tracks_sp" ( "ogc_fid" SERIAL, PRIMARY KEY ("ogc_fid"), "id" VARCHAR, "railway_track_id" INTEGER, "nid" VARCHAR, "track_segment_id" VARCHAR, "track_name" VARCHAR, "track_classification" VARCHAR, "regulator" VARCHAR, "transport_type" VARCHAR, "use_type" VARCHAR, "gauge" VARCHAR, "number_of_tracks" INTEGER, "electrification" VARCHAR, "status" VARCHAR, "design_speed_freight" INTEGER, "design_speed_passenger" INTEGER, "source_id" VARCHAR, "operator_english_name" VARCHAR, "operator_subdiv_portion_start" FLOAT8, "operator_subdiv_portion_end" FLOAT8, "owner_name" VARCHAR, "track_user1_english_name" VARCHAR, "track_user2_english_name" VARCHAR, "track_user3_english_name" VARCHAR, "track_user4_english_name" VARCHAR, "subdivision1_nid" VARCHAR, "subdivision1_name" VARCHAR, "subdivision1_start" FLOAT8, "subdivision1_end" FLOAT8, "subdivision2_nid" VARCHAR, "subdivision2_name" VARCHAR, "subdivision2_start" FLOAT8, "subdivision2_end" FLOAT8, "administrative_area" VARCHAR, "standards_version" VARCHAR, "security_classification" VARCHAR, "geometry_creation_date" date, "geometry_revision_date" VARCHAR, "geometry_acquisition_technque" VARCHAR, "geometry_planimetric_accuracy" INTEGER, "geometry_provider" VARCHAR, "attribute_creation_date" date, "attribute_revision_date" VARCHAR, "attribute_acquisition_technque" VARCHAR, "attribute_provider" VARCHAR, "objectid" INTEGER, "se_anno_cad_data" VARCHAR, "feature_length_m" FLOAT8, "geom" geometry(LINESTRING,1) )
ERROR:  current transaction is aborted, commands ignored until end of transaction block

ERROR 1: Unable to write feature 0 from layer OGRGeoJSON.
ERROR 1: Terminating translation prematurely after failed
translation of layer OGRGeoJSON (use -skipfailures to skip errors)
Load of WHSE_BASEMAPPING.GBA_RAILWAY_TRACKS_SP to whse_basemapping.gba_railway_tracks_sp in postgresql://postgres:postgres@localhost:5432/postgis complete
@smnorris
Copy link
Owner Author

smnorris commented Jan 30, 2020

bc2pg fails on all layers, pretty sure this is a db setup issue.

OS is Mac 10.15.3

$ ogrinfo --version
GDAL 2.4.2, released 2019/06/28

snorris at Matchlee in ~
$ psql
psql (12.1)
Type "help" for help.

postgis=# select postgis_full_version();
                                                                                    postgis_full_version
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 POSTGIS="3.0.0 r17983" [EXTENSION] PGSQL="120" GEOS="3.8.0-CAPI-1.13.1 " SFCGAL="1.3.7" PROJ="6.3.0" LIBXML="2.9.10" LIBJSON="0.13.1" LIBPROTOBUF="1.3.2" WAGYU="0.4.3 (Internal)" TOPOLOGY
(1 row)

@smnorris
Copy link
Owner Author

Issue is that the gdal 2.4.2 being used for the ogr2ogr command isn't compatible with postgres 12.
OSGeo/gdal#1692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant