[Gdal-dev] ogrinfo and oracle spatial

Mateusz Loskot mateusz at loskot.net
Fri Jun 9 05:16:49 EDT 2006


Daniel Goetz wrote:
> I am new here. And I have a problem. I want to show geodata lying in 
> an oracle spatial database via mapserver and I want to do this by 
> using the OGR interface. My previous attempts to do so failed the 
> mapserver telling me: "msOracleSpatialLayerOpen(): OracleSpatial 
> error. OracleSpatial is not supported "


Daniel,

Sorry, I can't help you with MapServer stuff.
Please, ask on the MS lists.


> I downloaded FWTools and launched the setfw.bat. for testing purpose 
> I launched the command "ogrinfo c:\ms4w\apache\htdocs\test" where I 
> have some Shapefiles lying. ogrinfo told me that there are two 
> shapefiles what is the truth.


FYI, note that OGR in FWTools may vary from OGR build in MS4W package in
what drivers are built-in and what are excluded.
To see drivers built into FWTools you installed, run:

ogrinfo --formats

> but now I don't know the command to test my database. I tried the 
> following command: "ogrinfo oci:ggs_brwk2004_umn/umn at gds1prod". But 
> ogrinfo told me that it was unable to open the datasource.
> 
> Can anybody help me, please? Might it be that I have installed the 
> oracle client on the "wrong" drive?

Have you checked this webpage:
http://www.gdal.org/ogr/drv_oci.html

There are all OCI options described in details.
You can also find there usage examples.
Generally, the OCI data source definition should follow this format:

OCI:userid/password at database_instance:table,table

List of tables is optional, but if present, note there should be no
spaces between colon, commas and table names.

So, in your example, try to run:

ogrinfo OCI:ggs_brwk2004_umn/umn at gds1prod

where:
ggs_brwk2004_umn - userid
umn - password
gds1prod - database instance


If this command will fail, please give all ogrinfo output with error
message.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list