[postgis-users] Overflow on length field during insert

Tyler Mitchell TMitchell at lignum.com
Mon Feb 9 14:01:54 PST 2004


I'm inserting some shapes using ogr2ogr and getting an interesting error. 
Here's my syntax and error message:

--------
$ ogr2ogr -f "PostgreSQL" PG:dbname=geos_test ttrn_roads.shp -lco 
LAUNDER=YES -nln trim_trn_roads ttrn_roads OVERWRITE=YES

ERROR 1: INSERT command for new feature failed.
ERROR:  overflow on numeric ABS(value) >= 10^2 for field with precision 13 
scale 11

ERROR 1: Terminating translation prematurely after failed
translation of layer ttrn_roads
---------

>From looking at the structure of the fields in this file I assume the 
problem is with my "length" field.  This is a hangover from the original 
ArcInfo coverage source.  Is data type of Real(13.11) valid?


Here's the details from ogrinfo:

----------

$ ogrinfo -summary ttrn_roads.shp ttrn_roads
INFO: Open of `ttrn_roads.shp'
using driver `ESRI Shapefile' successful.

Layer name: ttrn_roads
Geometry: Line String
Feature Count: 78476
Extent: (418178.000000, 5650301.000000) - (623456.000000, 5862439.000000)
Layer SRS WKT:
<snip>
LENGTH: Real (13.11)
<snip>


----------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20040209/0ac628a8/attachment.html>


More information about the postgis-users mailing list