[postgis-devel] loadling gml data in to post gis with different geometry types

Dave Potts dave.potts at pinan.co.uk
Thu Jun 20 04:59:01 PDT 2013


Hi,

I am trying to load some gml data into a post gis database, the problem 
being that the gml data has linesstrings and points defined in it.

The problem being that postgis requires you to predefine the type of a 
geomtry field

What I would like to be able to do get a data table which has a shared 
geomtry column, failing that.  I like to have a data table with two 
geomtry columns in it

I have tried things like


ogr2ogr -append  -where "OGR_GEOMETRY='Point'" -f PostgreSQL "PG: 
dbname='${DB_NAME}'" -lco  GEOMETRY_NAME=point_geom  ${GML_FILE}


ogr2ogr -append  -where "OGR_GEOMETRY='LineString'" -f PostgreSQL "PG: 
dbname='${DB_NAME}'" -lco  GEOMETRY_NAME=line_geom  ${GML_FILE}
But I get a volley of errors from ogr2ogr
  Layer creation options ignored since an existing layer is  being 
appended to.

Any suggestions ?

Dave.




More information about the postgis-devel mailing list