[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] POINT/MULTIPOINT EMPTY problem in dump
From:       Jan_Michálek <godzilalalala () gmail ! com>
Date:       2016-05-23 14:14:27
Message-ID: CAAYBy8bGaJVR0bHxMux+tWg0bV3N5S-Nv+DW4zJYhiPJoowhRQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@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@lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/postgis-users
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/postgis-users
>



-- 
Jelen
Starší čeledín datovýho chlíva

[Attachment #5 (text/html)]

<div dir="ltr"><div>My trick with EWKT doesn&#39;t help, but your advice help \
me.<br><br></div>Thanks Je;<br></div><div class="gmail_extra"><br><div \
class="gmail_quote">2016-05-23 13:22 GMT+02:00 Leknín Řepánek <span \
dir="ltr">&lt;<a href="mailto:godzilalalala@gmail.com" \
target="_blank">godzilalalala@gmail.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="im HOEnZb">Hm, maybe i can use EWKT notation \
instead of binary.<br> <br>
On Sun, May 22, 2016 at 06:10:46PM -0700, Paul Ramsey wrote:<br>
</span><div class="HOEnZb"><div class="h5">&gt; Temporarily change column type of the \
table you&#39;re loading from<br> &gt; Geometry(Point) to just plain Geometry, then \
you can load both types<br> &gt; and then change the MULTIPOINT EMPTY to POINT EMPTY \
then change the<br> &gt; type back to Geometry(Point)<br>
&gt;<br>
&gt; P<br>
&gt;<br>
&gt; On Sun, May 22, 2016 at 2:19 PM, Jan Michálek &lt;<a \
href="mailto:godzilalalala@gmail.com">godzilalalala@gmail.com</a>&gt; wrote:<br> &gt; \
&gt; I need to solve this problem<br> &gt; &gt;<br>
&gt; &gt; I have in table column POINT, some of values ARE &#39;POINT EMPTY&#39; \
(dont ask me<br> &gt; &gt; why, it is not my table).<br>
&gt; &gt; MULTIPOINT EMPTY and POINT EMPTY has same representation<br>
&gt; &gt; (010400000000000000).<br>
&gt; &gt; If i try restore table from dump, it is problem because postgis read this \
as<br> &gt; &gt; multipoint empty, but the column has type POINT.<br>
&gt; &gt; My version of postgis<br>
&gt; &gt;<br>
&gt; &gt; jelen=# select postgis_version();<br>
&gt; &gt;                    postgis_version<br>
&gt; &gt; ---------------------------------------<br>
&gt; &gt;   2.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1<br>
&gt; &gt; (1 row)<br>
&gt; &gt;<br>
&gt; &gt; Postgre is 9.3.<br>
&gt; &gt;<br>
&gt; &gt; Is there somebody who knows how to solve this problem?<br>
&gt; &gt;<br>
&gt; &gt; Thanks Je;<br>
&gt; &gt;<br>
&gt; &gt; ----------<br>
&gt; &gt; jelen=# CREATE TABLE t3 (id serial primary key, geom geometry(POINT, \
0));<br> &gt; &gt; CREATE TABLE<br>
&gt; &gt; jelen=# insert into t3(geom) VALUES (&#39;POINT EMPTY&#39;::geometry);<br>
&gt; &gt; INSERT 0 1<br>
&gt; &gt; jelen=# SELECT geom from t3;<br>
&gt; &gt;              geom<br>
&gt; &gt; --------------------<br>
&gt; &gt;   010400000000000000<br>
&gt; &gt; (1 row)<br>
&gt; &gt;<br>
&gt; &gt; jelen=# SELECT ST_AsText(&#39;010400000000000000&#39;);<br>
&gt; &gt;        st_astext<br>
&gt; &gt; ------------------<br>
&gt; &gt;   MULTIPOINT EMPTY<br>
&gt; &gt; (1 row)<br>
&gt; &gt;<br>
&gt; &gt; jelen=# INSERT INTO t3(geom) values(&#39;010400000000000000&#39;);<br>
&gt; &gt; ERROR:   Geometry type (MultiPoint) does not match column type (Point)<br>
&gt; &gt; jelen=# insert into t3(geom) SELECT geom FROM t3;<br>
&gt; &gt; INSERT 0 1<br>
&gt; &gt; jelen=#<br>
&gt; &gt; -------------------------------<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Jelen<br>
&gt; &gt; Starší čeledín datovýho chlíva<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; postgis-users mailing list<br>
&gt; &gt; <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
 &gt; &gt; <a href="http://lists.osgeo.org/mailman/listinfo/postgis-users" \
rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
 &gt; _______________________________________________<br>
&gt; postgis-users mailing list<br>
&gt; <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
 &gt; <a href="http://lists.osgeo.org/mailman/listinfo/postgis-users" \
rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
 </div></div></blockquote></div><br><br clear="all"><br>-- <br><div \
class="gmail_signature"><div dir="ltr"><div>Jelen<br></div>Starší čeledín \
datovýho chlíva<br></div></div> </div>


[Attachment #6 (text/plain)]

_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic