Jukka, Rahkonen Jukka wrote:
%< Snip
The correct work flow with OCI driver, if old table should be overwritten, seems to be: - drop table "TABLE" - delete from USER_SDO_GEOM_METADATA where table_name='TABLE' - run ogr2ogr
Agreed - indeed, substitute ogr2ogr for any program using the OGR library. I do not use ogr2ogr so much as use the ogr library as io for my work in novel spatial analysis methodology ...
In SQL, one could do a purge and retain the schema - maybe that is what overwrite is intended to do, but I do not remember seeing any such code in the oci driver; it would have to rewrite the SDO_GEOM_METADATA entry and there is a warning somewhere in either the code or the documentation that this is not done.
Whilst on the topic, are you specifying the SRS/SRID? This is an area that apparently changed between Oracle 8 & 9 and I have currently given up on this in OGR because only the SDO_GEOM_METADATA entry seems to get set and not the table and object entries - I found setting SRS in OGR generated a set of ORA errors concerning inconsistent SRS settings. I suspect (but do not know) that OGR's oci was built around the Oracle 8 requirements: I meant to wade through the code to try to be sure, but it is currently too low a priority. I fear this area is a minefield, as I have on the wall a notice from ESRI concerning a need to delete and rebuild the spatial index around any SRS/SRID manipulation.
-Jukka-
Best wishes, Peter -------------------------------------------------------------------------------- Peter J Halls, GIS Advisor, University of York Telephone: 01904 433806 Fax: 01904 433740 Snail mail: Computing Service, University of York, Heslington, York YO10 5DD This message has the status of a private and personal communication -------------------------------------------------------------------------------- _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
