Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2007

    Unanswered: performing a spatial query


    I want to generate a spatial query using Oracle Locator and I do not have any clue how to solve this task. I have checked the Locator documentation but could not find much helpful information.

    I have three tables. One table defines a polygon. The other table contains point locations of vehicles and the the third table assigns vehicles to the defined Polygon. With a spatial query I should find out if and when a vehicle has left its assigned area.

    the tables are defined_area (defines the area where the vehicle shall work):

    da_id (ID of a polygon)
    da_date (date)
    da_shape (sdo_geometry of a polygon)

    vehicle_location (gives the information where and when which vehicle was):

    vl_id (ID of the vehicle)
    vl_date (datetime)
    vl_location (sdo_geometry of a point location)

    vehicle_coordination (a vehicle is assigned to an defined area):
    vc_vhid (ID of the vehicle)
    vc_date (date)
    da_id (defined area ID)

    OS: Windows XP
    Oralce Version: 10g Express Edition Release

    The query result shall contain the Vehicle ID and the datetime when a vehicle has left its assigned area.
    I am thankfull for every help I can get on that task!

    Last edited by el chifre; 08-06-07 at 11:52.

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    No Operating System name or version.
    No Oracle version to 4 decimal places.
    No code formatting (see #1 STICKY post above)
    No DDL.
    No error message.
    No help. [You're On Your Own (YOYO)!]
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Aug 2007
    OS: Windows XP
    Oralce Version: 10g Express Edition Release

    I have following statement that comes close to what I need. But in this case I am only able to derive the locations outside an defined area for each vehicle seperately. But I want to know all the postions from all vehicles outside the defined area at a certain day.

    SELECT b.vl_id cv_vhid, a.da_date vc_date, a.da_id
    FROM defined_area a, vehicle_location b
    WHERE a.da_date = TRUNC(b.vl_data)
    AND SDO_ANYINTERACT(a.da_shape, b.vl_location) != 'TRUE' AND (da_id) = 5 AND (b.vl_id) = 7;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts