I have problems to filter the information of a layer stored in Oracle Spatial

Frank Warmerdam warmerdam at POBOX.COM
Thu Oct 20 09:19:11 EDT 2005


On 10/19/05, Fernando Javier Luyo Zegarra <fluyoz at hotmail.com> wrote:
> I have problems to filter the information of a layer stored in Oracle Spatial
>
> I have followed all the recommendations of mapfile reference but I have not obtained satisfactory results

Fernando,

Can you be more specific about what was unsatisfactory with
your results?

> I use connection OCI/OGR
>
> the syntax of mapfile is:
>
> *** layers departamentos***
> *
> CONNECTION "OCI:system/password at ORCL_192.168.1.199"
> CONNECTIONTYPE OGR
> DATA "scott.r_localidad"......# ¿As filter DATA for field "Tipo"?
>  *
> *** End Layers

The above looks ok to get all features (in the spatial area) from
the scott.r_localidad table.  Did you want to do some sort of
filtering on the field Tipo?  There are different ways to filter
data, including using the FILTER keyword in the layer definition.
If the text of the argument to the FILTER keyword starts with
"WHERE" then it is assumed to be an SQL WHERE clause that
should be passed on to Oracle.

eg.
CONNECTION "OCI:system/password at ORCL_192.168.1.199"
CONNECTIONTYPE OGR
DATA "scott.r_localidad"
FILTER "WHERE Tipo = 702"

Note that there is also a "direct" oracle driver for mapserver available
as opposed to going through OGR.  The direct driver is likely to have
better performance, but uses different configuration details.

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