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@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@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@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 _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev