Does geometry field type have a size limit?

View: New views
7 Messages — Rating Filter:   Alert me  

Does geometry field type have a size limit?

by davidj2k :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am trying to convert several of my .shp files to the PostGIS database and when it inserts some of the larger polygons it fails to insert the geometry field value.
I tried it using the shp2pgsql and I tried it using my own code in C# and I have even tried executing the SQL in the pgAdmin III Query function and all three have the exact same results the record gets inserted but the geometry field is null and it only happens on those records that have a lot of points that make up the polygon, I created several test to try and determine how many points were too much for it and I hit upon 1365 seemed to be the amount that was too many.
Does anybody know if there is a limitation to the geometry field and if there is how can I increase it?

Thank You

Re: Does geometry field type have a size limit?

by Paul Ramsey-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There is no limit to the geometry field size (well, no practical limit
http://www.postgresql.org/about/, 1Gb) .

Send me your shape file to confirm if your problem is repeatable.

P.

On 3/12/08, davidj2k <davidj2k@...> wrote:

>
>  I am trying to convert several of my .shp files to the PostGIS database and
>  when it inserts some of the larger polygons it fails to insert the geometry
>  field value.
>  I tried it using the shp2pgsql and I tried it using my own code in C# and I
>  have even tried executing the SQL in the pgAdmin III Query function and all
>  three have the exact same results the record gets inserted but the geometry
>  field is null and it only happens on those records that have a lot of points
>  that make up the polygon, I created several test to try and determine how
>  many points were too much for it and I hit upon 1365 seemed to be the amount
>  that was too many.
>  Does anybody know if there is a limitation to the geometry field and if
>  there is how can I increase it?
>
>  Thank You
>
> --
>  View this message in context: http://www.nabble.com/Does-geometry-field-type-have-a-size-limit--tp16006438p16006438.html
>  Sent from the PostGIS - User mailing list archive at Nabble.com.
>
>  _______________________________________________
>  postgis-users mailing list
>  postgis-users@...
>  http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

RE: Does geometry field type have a size limit?

by Rob Tester :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is it that the geometry is actually null?

Don't rely on pgadmin and the data view to believe the field is null. For
large geometries when viewing with pgadmin, they can appear to be null
because of the way strings are handled in the extensions and not show a
value in the pgadmin data view.

Does "select * where wkb_geometry is NULL;" Return the records that you
believe are null from the insert?

I have geometries with more than 1400 points stored without any problems,
but I use ogr2ogr to import geometry files.

Rob.

-----Original Message-----
From: postgis-users-bounces@...
[mailto:postgis-users-bounces@...] On Behalf Of Paul
Ramsey
Sent: Wednesday, March 12, 2008 10:14 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Does geometry field type have a size limit?

There is no limit to the geometry field size (well, no practical limit
http://www.postgresql.org/about/, 1Gb) .

Send me your shape file to confirm if your problem is repeatable.

P.

On 3/12/08, davidj2k <davidj2k@...> wrote:
>
>  I am trying to convert several of my .shp files to the PostGIS database
and
>  when it inserts some of the larger polygons it fails to insert the
geometry
>  field value.
>  I tried it using the shp2pgsql and I tried it using my own code in C# and
I
>  have even tried executing the SQL in the pgAdmin III Query function and
all
>  three have the exact same results the record gets inserted but the
geometry
>  field is null and it only happens on those records that have a lot of
points
>  that make up the polygon, I created several test to try and determine how
>  many points were too much for it and I hit upon 1365 seemed to be the
amount
>  that was too many.
>  Does anybody know if there is a limitation to the geometry field and if
>  there is how can I increase it?
>
>  Thank You
>
> --
>  View this message in context:
http://www.nabble.com/Does-geometry-field-type-have-a-size-limit--tp16006438
p16006438.html
>  Sent from the PostGIS - User mailing list archive at Nabble.com.
>
>  _______________________________________________
>  postgis-users mailing list
>  postgis-users@...
>  http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

RE: Does geometry field type have a size limit?

by Tom Glancy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I agree with Rob - pgadmin can hide the geometry.
 
Try:
select char_length(asText(the_geom)) from <TABLE> where gid = <MISSING_GEOM_GID>;
On a test here, the select returned 137999 even though pgadmin looked blank.
 
Or double-click the "missing" the_geom cell in pgadmin.
 
Regards,
Tom
 

>>> "Rob Tester" <robtester@...> 3/12/2008 12:32 PM >>>
Is it that the geometry is actually null?

Don't rely on pgadmin and the data view to believe the field is null. For
large geometries when viewing with pgadmin, they can appear to be null
because of the way strings are handled in the extensions and not show a
value in the pgadmin data view.

Does "select * where wkb_geometry is NULL;" Return the records that you
believe are null from the insert?

I have geometries with more than 1400 points stored without any problems,
but I use ogr2ogr to import geometry files.

Rob.

-----Original Message-----
From: postgis-users-bounces@...
[mailto:postgis-users-bounces@...] On Behalf Of Paul
Ramsey
Sent: Wednesday, March 12, 2008 10:14 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Does geometry field type have a size limit?

There is no limit to the geometry field size (well, no practical limit
http://www.postgresql.org/about/, 1Gb) .

Send me your shape file to confirm if your problem is repeatable.

P.

On 3/12/08, davidj2k <davidj2k@...> wrote:
>
>  I am trying to convert several of my .shp files to the PostGIS database
and
>  when it inserts some of the larger polygons it fails to insert the
geometry
>  field value.
>  I tried it using the shp2pgsql and I tried it using my own code in C# and
I
>  have even tried executing the SQL in the pgAdmin III Query function and
all
>  three have the exact same results the record gets inserted but the
geometry
>  field is null and it only happens on those records that have a lot of
points
>  that make up the polygon, I created several test to try and determine how
>  many points were too much for it and I hit upon 1365 seemed to be the
amount
>  that was too many.
>  Does anybody know if there is a limitation to the geometry field and if
>  there is how can I increase it?
>
>  Thank You
>
> --
>  View this message in context:
http://www.nabble.com/Does-geometry-field-type-have-a-size-limit--tp16006438
p16006438.html
>  Sent from the PostGIS - User mailing list archive at Nabble.com.
>
>  _______________________________________________
>  postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Does geometry field type have a size limit?

by davidj2k :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Paul Ramsey <pramsey@...> wrote:
There is no limit to the geometry field size (well, no practical limit
http://www.postgresql.org/about/, 1Gb) .

Send me your shape file to confirm if your problem is repeatable.

P.

On 3/12/08, davidj2k wrote:

>
> I am trying to convert several of my .shp files to the PostGIS database and
> when it inserts some of the larger polygons it fails to insert the geometry
> field value.
> I tried it using the shp2pgsql and I tried it using my own code in C# and I
> have even tried executing the SQL in the pgAdmin III Query function and all
> three have the exact same results the record gets inserted but the geometry
> field is null and it only happens on those records that have a lot of points
> that make up the polygon, I created several test to try and determine how
> many points were too much for it and I hit upon 1365 seemed to be the amount
> that was too many.
> Does anybody know if there is a limitation to the geometry field and if
> there is how can I increase it?
>
> Thank You
>
> --
> View this message in context: http://www.nabble.com/Does-geometry-field-type-have-a-size-limit--tp16006438p16006438.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@...
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users


Never miss a thing. Make Yahoo your homepage.

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Cntry05t.zip (3M) Download Attachment

Re: Does geometry field type have a size limit?

by davidj2k :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That was it, the value was actually there but when I looked at it in pgAdmin III it just did not draw the text.  Thank you very much.

davidj2k wrote:
I am trying to convert several of my .shp files to the PostGIS database and when it inserts some of the larger polygons it fails to insert the geometry field value.
I tried it using the shp2pgsql and I tried it using my own code in C# and I have even tried executing the SQL in the pgAdmin III Query function and all three have the exact same results the record gets inserted but the geometry field is null and it only happens on those records that have a lot of points that make up the polygon, I created several test to try and determine how many points were too much for it and I hit upon 1365 seemed to be the amount that was too many.
Does anybody know if there is a limitation to the geometry field and if there is how can I increase it?

Thank You

RE: Does geometry field type have a size limit?

by Obe, Regina DND\MIS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How are you determining that the geometry field is null

are you actually doing a

SELECT * FROM blah where the_geom is NULL

If you are looking at it from say PgAdminIII, it may look blank.  That's
just a limitation in PgAdminIII - not in PostGIS.  

If you do a

SELECT ST_NumGeometries(the_geom)
from blah

on those blank ones - if it returns a number you should be fine.

-----Original Message-----
From: postgis-users-bounces@...
[mailto:postgis-users-bounces@...] On Behalf Of
davidj2k
Sent: Wednesday, March 12, 2008 12:50 PM
To: postgis-users@...
Subject: [postgis-users] Does geometry field type have a size limit?


I am trying to convert several of my .shp files to the PostGIS database
and
when it inserts some of the larger polygons it fails to insert the
geometry
field value.
I tried it using the shp2pgsql and I tried it using my own code in C#
and I
have even tried executing the SQL in the pgAdmin III Query function and
all
three have the exact same results the record gets inserted but the
geometry
field is null and it only happens on those records that have a lot of
points
that make up the polygon, I created several test to try and determine
how
many points were too much for it and I hit upon 1365 seemed to be the
amount
that was too many.
Does anybody know if there is a limitation to the geometry field and if
there is how can I increase it?

Thank You
--
View this message in context:
http://www.nabble.com/Does-geometry-field-type-have-a-size-limit--tp1600
6438p16006438.html
Sent from the PostGIS - User mailing list archive at Nabble.com.

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users
LightInTheBox - Buy quality products at wholesale price!