mercredi 25 mars 2015

Mixing POINT and MULTIPOINT in PostGIS table


I'm trying to load a bunch of GeoJSON files into one PostGIS table. I get this kind of error:



Geometry to be inserted is of type Point, whereas the layer geometry type is Multi Point.


I've resolved this kind of issue previously with lines and polygons before using the -PROMOTE_TO_MULTI flag, but this doesn't seem to work for POINT/MULTIPOINT.


My first input looks like:



ogr2ogr -f "PostgreSQL" -lco GEOMETRY_NAME=the_geom -lco FID=gid PG:"dbname=trees" melbourne.vrt -nln trees1 -nlt MULTIPOINT


Is there any workaround?





Aucun commentaire:

Enregistrer un commentaire