I've decided to just get some work done rather than focus on the Oracle issues. Fortunately, the code I write with OGR using Shapefiles should work seamlessly with Oracle (or relatively seamlessly).<div><br></div><div>
But now I have a new problem. I am getting the following error when I call exportToGML():</div><div><br></div><div><div>Traceback (most recent call last):</div><div> File "shp2n3.py", line 178, in <module></div>
<div> write_triples()</div><div> File "shp2n3.py", line 137, in write_triples</div><div> gml = geom.exportToGML()</div><div> File "C:\Python26\lib\site-packages\osgeo\ogr.py", line 2672, in <lambda></div>
<div> __getattr__ = lambda self, name: _swig_getattr(self, Geometry, name)</div><div> File "C:\Python26\lib\site-packages\osgeo\ogr.py", line 34, in _swig_getattr</div><div> raise AttributeError,name</div>
<div>AttributeError: exportToGML</div><div><br></div><div>The bit of code looks like </div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>geom = feat.GetGeometryRef()</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>if geom is not None:</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>gml = geom.exportToGML()</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>outs = ' :hasGML ' + gml + '^^gmlr:string '</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>outs += ".\n"</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>outFp.write(outs)</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>else:</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>print "Can't get geometry!"</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>print "GDAL Error: " + gdal.GetLastErrorMsg()</div><div><br></div><div>geom is not None. I get the same results with Python 2.5.5.7 + GDAL 1.5.2 and Python 2.6.4.10 + GDAL 1.6.1.</div>
<div><br></div><div>-Eric</div></div><div><br></div>-=--=---=----=----=---=--=-=--=---=----=---=--=-=-<br>Eric B. Wolf New! 720-334-7734<br>USGS Geographer<br>Center of Excellence in GIScience<br>PhD Student <br>
CU-Boulder - Geography<br><br>GPG Public Key: <a href="http://www.h4h.net/ebwolf.public.key.txt">http://www.h4h.net/ebwolf.public.key.txt</a><br>
</div>