[postgis-users] import large multipolygon

Jean David TECHER david.techer at davidgis.fr
Mon Jul 7 10:24:03 PDT 2008


No problem for mee to

cat testtable |psql osmgis

then in psql

osmgis=# select summary(the_geom) from testtable;
              summary
---------------------------------

  MultiPolygon[B] with 1 elements
    Polygon[] with 1 rings
     ring 0 has 8655 points

strange?

Quoting Kevin Neufeld <kneufeld at refractions.net>:

> No, I think astext() is returing the geometry, but i think you're
> seeing a large wrap around as postgres tries to add the column title to
> your resultset.
>
> If you're using psql, try this.
>
> postgis=# \t
> Showing only tuples.
>
> postgis=# SELECT ST_AsText(the_geom) FROM testtable;
>  MULTIPOLYGON(((-80.1547175872617 42.7394116625306,...
>
> Cheers,
> Kevin
>
>
> sub3 wrote:
>> Interesting, I run the same query & get your same results... so that shows
>> the object is there.  So why would astext(the_geom) return nothing?  Maybe
>> it doesn't return something when the size is too large?
>>
>> Thanks!
>>
>>
>> Kevin Neufeld wrote:
>>> I don't have any problems loading your sql file into my database   
>>> (running PG8.3.3, PGIS 1.3.3)
>>>
>>> postgis=# \i testtable.sql
>>> psql:testtable.sql:3: NOTICE:  CREATE TABLE will create implicit   
>>> sequence "testtable_gid_seq" for serial column "testtable.gid"
>>> psql:testtable.sql:3: NOTICE:  CREATE TABLE / PRIMARY KEY will   
>>> create implicit index "testtable_pkey" for table "testtable"
>>> CREATE TABLE
>>>                       addgeometrycolumn
>>> --------------------------------------------------------------
>>>  kneufeld.testtable.the_geom SRID:-1 TYPE:MULTIPOLYGON DIMS:2
>>>
>>> (1 row)
>>>
>>>
>>> postgis=# select ST_GeometryType(the_geom), ST_IsValid(the_geom),   
>>> ST_NPoints(the_geom) from testtable;
>>>  st_geometrytype | st_isvalid | st_npoints
>>> -----------------+------------+------------
>>>  ST_MultiPolygon | t          |       8655
>>> (1 row)
>>>
>>>
>>> -- Kevin
>>>
>>> sub3 wrote:
>>>> Hi,
>>>>
>>>> I am having a problem.  I convert a shp file using shp2pgsql.  One of the
>>>> multipolgons is very large (line is about 277k characters long).  After I
>>>> import into postgresql, this geometry is empty.
>>>> No error from postgis.
>>>> No error from postgresql.
>>>>
>>>> I am only making a guess that it is the line size, I am not sure.  Is
>>>> there
>>>> a setting which would fix this?
>>>>
>>>> Thanks for any help.
>>>>
>>>> ---
>>>> Attached is the .sql script.
>>>> http://www.nabble.com/file/p18285042/testtable.sql testtable.sql
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>>
>>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



===================
Jean David TECHER
06 60 46 85 05
04 99 77 17 87
===================




More information about the postgis-users mailing list