You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE SERVER svr_osm FOREIGN DATA WRAPPER ogr_fdw
OPTIONS (
datasource '/fdw_data/belarus-latest.osm.pbf',
config_options 'OGR_INTERLEAVED_READING=YES',
format 'OSM'
);
But then the tables all come up empty.
I also tried INTERLEAVED_READING=YES but it said option not available.
In GDAL 3.1 I can use ogr2ogr without specifying this option as it's turned on by default I guess since GDAL 2.2
SELECT ogr_fdw_version();
outputs:
OGR_FDW="1.1" GDAL="3.2.1"
So not sure why I can't get it to work. Can you try it. Way easier than trying to fumble with ogr2ogr if I can get it to work.
The points table doesn't come up empty. But I get the same issues otherwise. All other tables empty if the option is provided, and an error message if it is left off.
DROP SERVER svr_osm CASCADE;
CREATE SERVER svr_osm FOREIGN DATA WRAPPER ogr_fdw
OPTIONS (
datasource '/tmp/belarus-latest.osm.pbf',
-- open_options 'INTERLEAVED_READING=YES',
config_options 'OGR_INTERLEAVED_READING=YES CPL_DEBUG=YES',
format 'OSM'
);
DROPSCHEMA IF EXISTS osm CASCADE;
CREATESCHEMAosm;
SET search_path = public,osm;
IMPORT FOREIGN SCHEMA ogr_all FROM SERVER svr_osm INTO osm;
SELECTcount(*) FROM lines;
SELECTcount(*) FROM points;
I was trying to link this file using ogr_fdw and got slapped with the turn on INTERLEAVE notice.
https://download.geofabrik.de/europe/belarus-latest.osm.pbf
I tried this:
But then the tables all come up empty.
I also tried INTERLEAVED_READING=YES but it said option not available.
In GDAL 3.1 I can use ogr2ogr without specifying this option as it's turned on by default I guess since GDAL 2.2
SELECT ogr_fdw_version();
outputs:
OGR_FDW="1.1" GDAL="3.2.1"
So not sure why I can't get it to work. Can you try it. Way easier than trying to fumble with ogr2ogr if I can get it to work.
Using QGIS GDAL 3.1.4
I can load fine with this command:
ogr2ogr -f "PostgreSQL" PG:"dbname=gisdb" -lco SCHEMA=staging -lco GEOMETRY_NAME=geom belarus-latest.osm.pbf
The text was updated successfully, but these errors were encountered: