0 Replies Latest reply: Jul 25, 2011 6:15 PM by 876907 RSS

    problem group by whith the x,y cordinate of oracle spatial

    876907
      hélo i am student it is the first time that i use orale spatial, i have a problem with this querie:

      i want to get number of accident in each road.

      i use a data warehouse which incident is the fact table and tab10 is table (dimension) which contain the information and geometry of the road.

      i try this querie:

      select sum(i.cause ) as total, i.idroute,
      SDO_GEOM.SDO_POINTONSURFACE(t.GEOMETRY,1).sdo_point.x as longitude,
      SDO_GEOM.SDO_POINTONSURFACE(t.GEOMETRY, 1).sdo_point.y as latitude

      from incident i, tab10 t

      where t.id= i.idroute

      group by i.idroute,
      SDO_GEOM.SDO_POINTONSURFACE(t.GEOMETRY,1).sdo_point.x ,
      SDO_GEOM.SDO_POINTONSURFACE(t.GEOMETRY,1).sdo_point.y;

      the result (total) is correct but i have the same langitude and latitude, i think the probem is in the group by

      please can you help me is very important for my project.

      ps: sory for my english, i don't speak english very well.