geometalab / osmaxx

OpenStreetMap Arbitrary Excerpt Export - Get the OpenStreetMap data you want in the file format you need

Home Page:http://osmaxx.hsr.ch/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GIS export of Haiti failing

das-g opened this issue · comments

osmaxx/conversion/converters/converter_gis/bootstrap/sql/filter/building/010_building.sql is causing

sqlalchemy.exc.DataError: (psycopg2.DataError) Geometry type (MultiLineString) does not match column type (MultiPolygon)

https://sentry.njo.ch/geometalab/osmaxxprod/issues/306/

I've imported the PBF from https://osmaxx.hsr.ch/media/osmaxx/outputfiles/c3209bb7-f594-4d75-8ff5-def9d80f6b14/haiti_wgs-84_2017-03-24_pbf_full-detail.zip with osm2pgsql 0.88.1 (installed with apt on Ubuntu 16.04) as follows:

osm2pgsql --create --extra-attributes --slim --latlon \
--host localhost --database osm_haiti --prefix osm \
--style osmaxx/conversion/converters/converter_gis/bootstrap/styles/terminal.style \
--tag-transform-script osmaxx/conversion/converters/converter_gis/bootstrap/styles/style.lua\
--number-processes 8 --username postgres --hstore-all \
--input-reader pbf ~/Downloads/pbf/Haiti.pbf

and the Query

SELECT count(*)
FROM osm_polygon
WHERE ST_GeometryType(ST_Multi(way)) != 'ST_MultiPolygon';

resulted in 0.

Confirmed fixed on https://osmaxx.hsr.ch: The affected building (way 392328412) is now exported correctly as an area.

Using osm2pgsql from tag 0.92.0 instead of from branch master (5f28a4f) has done the trick.