[postgis-users] POINT/MULTIPOINT EMPTY problem in dump

Jan Michálek godzilalalala at gmail.com
Sun May 22 23:25:11 PDT 2016


I will try.
Thanks.

2016-05-23 3:10 GMT+02:00 Paul Ramsey <pramsey at cleverelephant.ca>:

> Temporarily change column type of the table you're loading from
> Geometry(Point) to just plain Geometry, then you can load both types
> and then change the MULTIPOINT EMPTY to POINT EMPTY then change the
> type back to Geometry(Point)
>
> P
>
> On Sun, May 22, 2016 at 2:19 PM, Jan Michálek <godzilalalala at gmail.com>
> wrote:
> > I need to solve this problem
> >
> > I have in table column POINT, some of values ARE 'POINT EMPTY' (dont ask
> me
> > why, it is not my table).
> > MULTIPOINT EMPTY and POINT EMPTY has same representation
> > (010400000000000000).
> > If i try restore table from dump, it is problem because postgis read
> this as
> > multipoint empty, but the column has type POINT.
> > My version of postgis
> >
> > jelen=# select postgis_version();
> >             postgis_version
> > ---------------------------------------
> >  2.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
> > (1 row)
> >
> > Postgre is 9.3.
> >
> > Is there somebody who knows how to solve this problem?
> >
> > Thanks Je;
> >
> > ----------
> > jelen=# CREATE TABLE t3 (id serial primary key, geom geometry(POINT, 0));
> > CREATE TABLE
> > jelen=# insert into t3(geom) VALUES ('POINT EMPTY'::geometry);
> > INSERT 0 1
> > jelen=# SELECT geom from t3;
> >         geom
> > --------------------
> >  010400000000000000
> > (1 row)
> >
> > jelen=# SELECT ST_AsText('010400000000000000');
> >     st_astext
> > ------------------
> >  MULTIPOINT EMPTY
> > (1 row)
> >
> > jelen=# INSERT INTO t3(geom) values('010400000000000000');
> > ERROR:  Geometry type (MultiPoint) does not match column type (Point)
> > jelen=# insert into t3(geom) SELECT geom FROM t3;
> > INSERT 0 1
> > jelen=#
> > -------------------------------
> >
> >
> > --
> > Jelen
> > Starší čeledín datovýho chlíva
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users




-- 
Jelen
Starší čeledín datovýho chlíva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160523/bbbc293c/attachment.html>


More information about the postgis-users mailing list