[gdal-dev] Issue with OCI driver

jratike80 jukka.rahkonen at maanmittauslaitos.fi
Wed Feb 6 04:42:35 PST 2019


Hi,

I believe that OCI driver does not honour the -t_srs parameter of ogr2ogr.
Use the driver specific layer creation option -lco SRID=4326 instead when
saving data into Oracle https://gdal.org/drv_oci.html. 

You asked if it is possible to convert data into EPSG:4326 without knowing
the reference system used in source . I ask How could it be possible? With a
good guess perhaps, sometimes, but generally not. If GDAL cannot the SRS
automatically from the data source then user must give it with -s_srs.

-Jukka Rahkonen-




san619 wrote
> i tried to extract shapefile data table from oracle to shapefile.
> But im getting error : 
> 
> *Can't transform coordinates, source layer has no
> coordinate system.  Use -s_srs to set one.
> ERROR 1: Terminating translation prematurely after failed
> translation from sql statement.*
> 
> I tried exporting using command 
> *ogr2ogr -f OCI OCI:user/password at ip/servicename -a_srs EPSG:2180
> "C:Downloads\pas_ochronny\pas ochronny.shp"*
> 
> The file got uploaded successfully.But when im trying to extract the table
> to shapefile im getting error.
> I used the command 
> *
> ogr2ogr -f "GEOJSON" "PRO.json" OCI:user/password at ip/servicename   -t_srs
> EPSG:4326  -sql "SELECT * FROM  PAS_OCHRONNY"*
> but im getting the error Can't transform coordinates, source layer has no
> coordinate system.  Use -s_srs to set one.
> ERROR 1: Terminating translation prematurely after failed
> translation from sql statement.
>  But when is used the command 
> *ogr2ogr -f "GEOJSON" "PROPERTYs.json"  OCI:user/password at ip/servicename
> -s_srs EPSG:2180 -t_srs EPSG:4326  -sql "SELECT *  FROM PAS_OCHRONNY"*
> 
> Translation got successful.Why like this.
> How to set the source layer coordinates while uploading.
> Is there any way to reproject any source datum to EPSG:4326 without
> knowing
> source.





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list