[gdal-dev] ogr2ogr Shap to OCI ora-01438 value larger...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] ogr2ogr Shap to OCI ora-01438 value larger...

Rémy Gourrat
This post was updated on .
Hi,

When i try to import a Shape with ogr2ogr and OCI  and this command line :

Before, i execute this command line to keep the accents:

SET NLS_LANG=American_America.UTF8

And just after :

ogr2ogr -f OCI OCI:****/****@****:ZZ_SHP_DOC_URBA "G:\temp\shp\shape_L93CC44\40243_DOC_URBA_L93CC44.shp" -nln ZZ_SHP_DOC_URBA -overwrite

I have this error message "ERROR 1: ORA-01438: value larger than specified precision allowed for this column"

So I modify like this ignoring  the SHAPE_AREA field :

ogr2ogr -f OCI OCI:****/****@****:ZZ_SHP_ZONE_URBA -select TEX2,INSEE,IDURBA,DATAPPRO,DATVALID,TYPEDOC,DATEFIN,INTERCO,SIREN,ETAT,NOMREG,URLREG,NOMPLAN,URLPLAN,SITEWEB,TYPEREF,DATEREF "G:\temp\shp\shape_L93CC44\40243_ZONE_URBA_L93CC44.shp" -nln ZZ_SHP_DOC_URBA -overwrite

So i can identify the field problem cause  : "SHAPE_AREA"

In the shape via Qgis, i see the property field : double - real - 19 - 11, in oracle I see also  SHAPE_AREA NUMBER(19,11)

in Qgis the shape Area value is : 117839075.90299999714 (9 + 11 = 20 caracters)

I think it is a problem with the decimal character

and UTF-8 but I thought to resolve it with SET NLS_LANG=American_America.UTF8

but no...

thanks for your help.

Rémy


_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
AG-Carto - Bayonne
Reply | Threaded
Open this post in threaded view
|

Re: ogr2ogr Shap to OCI ora-01438 value larger...

Even Rouault-2
Le lundi 27 octobre 2014 16:09:52, vous avez écrit :

> Hi,
>
> When i try to import a Shape with ogr2ogr and OCI  and this command line :
>
> Before, i execute this command line to keep the accents:
>
> SET NLS_LANG=American_America.UTF8
>
> And just after :
>
> ogr2ogr -f OCI OCI:****/****@****:ZZ_SHP_DOC_URBA
> "G:\temp\shp\shape_L93CC44\40243_DOC_URBA_L93CC44.shp" -nln
> ZZ_SHP_DOC_URBA -overwrite
>
> I have this error message "ERROR 1: ORA-01438: value larger than specified
> precision allowed for this column"
>
> So I modify like this ignoring  the SHAPE_AREA field :
>
> ogr2ogr -f OCI OCI:ORA_PLU20/3717grade@Ag_GeoPLU:ZZ_SHP_ZONE_URBA -select
> TEX2,INSEE,IDURBA,DATAPPRO,DATVALID,TYPEDOC,DATEFIN,INTERCO,SIREN,ETAT,NOM
> REG,URLREG,NOMPLAN,URLPLAN,SITEWEB,TYPEREF,DATEREF
> "G:\temp\shp\shape_L93CC44\40243_ZONE_URBA_L93CC44.shp" -nln
> ZZ_SHP_DOC_URBA -nlt PROMOTE_TO_MULTI -overwrite
>
> So i can identify the field problem cause  : "SHAPE_AREA"
>
> In the shape via Qgis, i see the property field : double - real - 19 - 11,
> in oracle I see also  SHAPE_AREA NUMBER(19,11)
>
> in Qgis the shape Area value is : 117839075.90299999714 (9 + 11 = 20
> caracters)
>
> I think it is a problem with the decimal character
>
> and UTF-8 but I thought to resolve it with SET
> NLS_LANG=American_America.UTF8

Rémi,

This looks like http://trac.osgeo.org/gdal/ticket/2667

Can perhaps be workarounded by adding -lco PRECISION=NO

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev