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

Jan Michálek godzilalalala at gmail.com
Mon May 23 07:14:27 PDT 2016


My trick with EWKT doesn't help, but your advice help me.

Thanks Je;

2016-05-23 13:22 GMT+02:00 Leknín Řepánek <godzilalalala at gmail.com>:

> Hm, maybe i can use EWKT notation instead of binary.
>
> On Sun, May 22, 2016 at 06:10:46PM -0700, Paul Ramsey wrote:
> > 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/6272bf22/attachment.html>


More information about the postgis-users mailing list