On Thu, Aug 7, 2008 at 12:23 PM, D <[EMAIL PROTECTED]> wrote: > Hi, > > I have a question about the usage of OGR2OGR in defining an ESRI Shapefile > output name. I am exporting Spatial data from Oracle Spatial (11g) from a > single table to an ESRI Shapefile and would like to get the following naming > syntax for my Shapefile: > > > [select distinct FIELD1 from SHEMA.TABLE][select distinct FIELD2 from > SHEMA.TABLE][fixed value -> 01] > > .. the output would look like > > 50000002806200701.shp > 50000002806200701.shx > 50000002806200701.dbf > > The naming parts/chunks that are concatenated here are actually queries in > the source database (Oracle). > > Any examples (sample scripts, procedures) or hints on how to implement > this, would be very helpful. > > Thanks! > > Best regards, > Dejan > > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev >
Hi Dejan, I don't think it is possible using ogr2ogr.exe, you will need to write a small programme to do so. Sorry I have not written any script yet on such a issue. But you could what you could do is. Open a recordset and from the desired name in select statement select [select distinct FIELD1 from SHEMA.TABLE] || [select distinct FIELD2 from SHEMA.TABLE] || 01 from DUAL and then pass this into the command line parameter as string to from ogr2ogr.exe -f "ESRI Shapefile" <string from database result>.shp "OCI:xxxxxxx/[EMAIL PROTECTED]" -sql <select queries that you want the output from > and execute this thru shell or command prompt. Hope this helps...!!! Rgds. Abhay.
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
