[postgis-users] problem with shp2pgsql / psql import

Michael Fuhr mike at fuhr.org
Thu Aug 2 03:29:53 PDT 2007


On Tue, Jul 31, 2007 at 11:58:32AM +0200, Stefan Zweig wrote:
> i have attached an excerpt of the _g2793.sql which creates the
> table and imports one geometry row. maybe anybody can try importing
> this in his/her postgis and see whether postgis gives as well a
> null geometry after
> 
> select id, name, astext(the_geom) from _g2793

Are you sure the geometry is null?  What does the following query
return?

SELECT id, name, the_geom IS NULL, length(astext(the_geom)), summary(the_geom) FROM _g2793;

I get this:

       id        |   name   | ?column? | length |             summary              
-----------------+----------+----------+--------+----------------------------------
 632760049010583 | Saarland | f        | 100818 | 
                                                : MultiPolygon[BS] with 1 elements
                                                :   Polygon[] with 1 rings
                                                :    ring 0 has 5294 points
                                                : 
(1 row)

What client are you using?  I see the astext() output in psql but
not in pgAdmin, perhaps because the value is too long.

> i have no idea what is wrong with the INSERT statement. is there
> something like a geometry/WKT-validator?

Nothing is wrong with the statement as far as I can tell.  Try psql
if you aren't using it already.

-- 
Michael Fuhr



More information about the postgis-users mailing list