OracleSpatial attribute queries
Hallgren Johan E
jhhal at WMDATA.COM
Sun Sep 17 14:57:24 EDT 2006
Do you mean that I should switch the data string from
DATA "shape FROM fastighetsytor USING UNIQUE OBJECTID VERSION 10g"
to something like
DATA "shape FROM fastighetsytor USING NONE OBJECTID VERSION 10g"
and then turn it back to what it was before?
Doesn't that mean that it don't return spatial data at all? I think I
tried it and it ended up with an empty map. What I want is to return
only those records that meets my criteria and render the map with those
only (just to clarify things).
Related to MapServes way of handeling queries like this I can't see the
reason why there isn't a virtual function for each related function in
MapScript. In that case it whould be up to actual driver to use the same
call to the database or to have different calls dependent on what
function the database could supply. Is it looks now, MapServer can't use
all facileties in the database becaus of how MapServer works (let me
know if I'm wrong).
/Johan
___________________________________
Johan Hallgren
WM-data
Pelle Bergs backe 3
Box 1938, 791 19 Falun
Tel (och mobil): 023-547 46 (int: +46-2354746)
johan.e.hallgren at wmdata.com
http://www.wmdata.se
-----Original Message-----
From: Fernando Simon [mailto:fsimon at univali.br]
Sent: den 14 september 2006 15:12
To: Hallgren Johan E
Cc: MAPSERVER-DEV at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-DEV] OracleSpatial attribute queries
Hi Johan,
It's relate with the way how Mapserver do the query. It's need to work
with many kind of sources, and sometimes cannot be the better way for
databases.
For Oracle you can define a token in you data definition to force the
Mapserver Oracle driver to don't the extents (bbox) in the query. You
just need to define the NONE in your data, as example:
data "geom from table USING NONE"
You can see more about this in this page:
http://mapserver.gis.umn.edu/docs/howto/oracle_spatial_howto
So, you can change the data parameter before apply the query and test
the results.
Best regards.
------------------------------------------------------------------------
Fernando Simon
Mapserver and Oracle Spatial developer
G10 - Laboratorio de Computacao Aplicada - Brazil
http://www.univali.br/g10 - UNIVALI/CTTMAR
------------------------------------------------------------------------
Hallgren Johan E wrote:
>
> This is an old question but still the problem remains.
>
> I use MapServer/MapScript/csharp.
>
> I use the OracleSpatial built in support in MapServer.
>
> I want to show a selected bunch of features on the map. The selection
> is made only by an attribute query (postcode = 123).
>
> By turning logging on I can se that even if I do an attribute query
> the query sent to Oracle include both the envelope and the actual
query.
>
> I can catch that query and run it in SQLPlus and I will see it takes
> looonnngg time to perform. If I remove the envelope it's much faster.
> I have created index on both the geometry and the attribute column,
> but as I can understand it's not possible to create index on shape and
> the attribute column in combination.
>
> So my question is: why must the geometry be part of the query when I
> don't need it?
>
> /Johan
>
>
> *___________________________________*
>
>
> *Johan Hallgren*
>
> WM-data
>
> Pelle Bergs backe 3
>
> Box 1938, 791 19 Falun
>
> Tel (och mobil): 023-547 46 (int: +46-2354746)
>
> _johan.e.hallgren_ at wmdata.com
> <BLOCKED::mailto:johan.e.hallgren at wmdata.com>
>
> http://www.wmdata.se
> <BLOCKED::/exchweb/bin/redir.asp?URL=http://www.wmdata.se/>
>
More information about the mapserver-dev
mailing list