[mapserver-users] oraclespatial query issue

Yu-Hsin Chen ychen at yorktel.com
Wed Mar 27 16:25:31 EST 2002


Most likely Rod, or anyone else has experience with what I'm about to
describe.

I'm running mapserv from cgi-bin to call a map file on Mandrake Linux
8.0 running Oracle 8.1.7.  The layer from the map file related with
Oracle is at the end of this message.

In my database I have a zcta table which contains Oracle's SDO data.
Then I have a service_order table which contains my application data.
My goal is to display rooms from service_order on a map and when a room
is clicked I can display a page with more information about the room.

I displayed the rooms without any problem and I can even label them with
my room_id's.  When I try to query them I received the error which Rod
explained and provided solution on his Jan 11, 2002 message using php.
Unfortunately, I'm having problems getting PHP 4.0.6 up with Oracle
option.  I'm wondering since I retrieved room_id and service_no from the
database and displayed on the map, are they stored somewhere in a buffer
that I can refer to when I want to query the point on the map?  I've
been successful with data querying by passing the room_id into a perl
cgi program if my layer data is from a shp file.

LAYER
  NAME "room"
  CONNECTIONTYPE oraclespatial
  CONNECTION 'mdsys/pw at orcl'
  DATA "geometry from (select room_id, service_no, geometry from zcta z,
service_order s where z.zipcode=s.zip)
  TYPE POINT
  STATUS DEFAULT
  CLASSITEM "room_id"

  CLASS
    NAME "Completed"
    EXPRESSION /./
    SYMBOL 2
    SIZE 5
    COLOR 0 255 0
    LABEL
      SIZE SMALL
      COLOR 0 51 51
      FORCE TRUE
      OFFSET 10 10
    END
    TEMPLATE "oraclequery.html"
  END
  HEADER "oraclequery_header.html"
  FOOTER "oraclequery_footer.html"
END

Thanks.

Yu-Hsin Chen



More information about the mapserver-users mailing list