Shapefile is being imported to Oracle DB. Is there a tool to export this spatial data as a shapefile without writing any SQL (like you have to do with SQL Developer and GeoRaptor)?
EDIT: from all your answers I understand that there is no way for me to do action: import shapefile X to my database and later use some tool to export same shapefile X without using SQL or SQL like filtering… Unless I want to export whole layer which is not my interest.
Best Answer
GDAL - specifically ogr2ogr is the proper way to go. The base syntax for exporting one table is like this:
where
localhost:1521/orcl122
is your database connection string. Note that you do not actually need to specify the output file format (as OGR assumes you want a shapefile by default):There are many things you can do in addition.
Select the rows to export:
Select the columns to export. Notice you can rename them.
Even use some pseudo-SQL syntax:
Finally, you can also export multiple tables:
In this case,
us_data
is the name of a directory that will be created if it does not exist yet, and each table becomes a shapefile in that directory:And not specifying any table name will export all (spatial) tables from the schema you connect as:
EDIT:
Forgot to mention that you can use the same selection techniques (columns, rows, pseudo-sql) also when you import from shapefile (or from any other format).