Oracle Woes

Frank Warmerdam warmerdam at POBOX.COM
Thu Dec 22 16:55:06 EST 2005


On 12/22/05, Christopher Condit <condit at sdsc.edu> wrote:
> Ogrinfo does work, however, but I can't find any documentation on how to add
> the select statement to an OGR layer in the mapfile.  Does anyone have any
> idea how to accomplish this?

Christopher,

Do you need a select statement?  If you use your own
select statement, I believe you will defeat the spatial
query functionality.  SQL queries can be issued through
OGR by placing the SELECT statement in the DATA
keyword, as described in the "OGR In MapServer"
document. Search for "layer_definition".

But I think the better solution is to just use the table
name in the DATA field, and set your species name as
a filter with the FILTER keyword.

eg.

CONNECTIONTYPE OGR
CONNECTION "..."
DATA  "species"
FILTER "WHERE SCIENTIFICNAME ='Some name'"

Hmm, I see that how the FILTER works for OGR is not
noted in the OGR doc.  I have added a comment at
the bottom.

Of course, you may be better off to get the native oracle
support working.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list