[postgis-users] Numeric overflow when inserting large polygons

strk strk at keybit.net
Tue Dec 23 01:14:22 PST 2003


Would you send me the "offending" shapefile (actually the dbf is enough)
so that I can make the loader nicer with it ?

--strk;

tschaun wrote:
> Thanks so much for the hint, which was dead on. I had considered this
> possibility for a moment, but had quickly discarded it as too much of a
> coincidence. In retrospect, the error message was perfectly clear and there
> wasn't any coincidence at all: the offending fields were area and
> circumference measurements of the shapes and large polygons tend to have
> large areas and circumferences. The loader apparently does not scan the
> values to make sure the columns of the new table are properly dimensioned
> for all the data items.
> 
> I'm glad this problem had an easy fix. I like PostGIS quite a bit, but
> difficulties with large geometries would have been a serious problem for my
> applications.
> 
> Thanks again for your help, it is greatly appreciated.
> 
> Happy holidays,
> Hartmut
> 
> Hartmut Tschauner
> Dept. of Anthropology
> Harvard University
> Peabody Museum
> 11 Divinity Ave.
> Cambridge, MA 02138
> ph. (617) 384-9803
> fax (617) 496-8041
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: strk [mailto:strk at keybit.net] 
> Sent: Monday, December 22, 2003 9:26 AM
> To: PostGIS Users Discussion
> Cc: tschaun at fas.harvard.edu
> Subject: Re: [postgis-users] Numeric overflow when inserting large polygons
> 
> tschaun wrote:
> > Dear listers,
> > 
> > I have just finished installing PostgreSQL 7.4 and PostGIS 0.8 on a RedHat
> 9
> > machine. The installation seems to have gone fine and everything usually
> > works as expected. However, I'm having trouble with a few very large
> > polygons in my test layers that cause a numeric overflow error when I try
> to
> > enter them into PostGIS tables using SQL code generated by shp2pgsql.
> > "ERROR: numeric field overflow. DETAIL: The absolute value is greater than
> > or equal to 10^8 for field with precision 19, scale 11."
> 
> I think this has nothing to do with the geometry field, but rather with
> one of the associated values (attributes in the .dbf file).
> Open the output of shp2pgsql and see how numeric fields are defined in
> the CREATE TABLE statement.
> 
> --strk;
> 
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list