Home » Server Options » Spatial » Spatial data retrival(Querying) using locator_within_distance
Spatial data retrival(Querying) using locator_within_distance [message #364158] Tue, 21 November 2000 00:35
Raju Desai
Messages: 2
Registered: November 2000
Junior Member
I have created a table having a object relation approach,the txt file is as below

Question : i am not able to get results using Locator Within_distance Operator, please get it done for me and guide me

create table rd_loc2( name varchar2(25),aoi varchar2(25),
shape mdsys.sdo_geometry)
/

INSERT INTO USER_SDO_GEOM_METADATA VALUES('rd_loc2', 'SHAPE',
mdsys.sdo_dim_array(mdsys.sdo_dim_element('X', -100, 100, 0.005),
mdsys.sdo_dim_element('Y', -100, 100, 0.005)),1)
/

insert into rd_loc2
values('AJANKYA','HOTEL',MDSYS.SDO_GEOMETRY(1,NULL,
MDSYS.SDO_POINT_TYPE(30000,30000,0),NULL,NULL))
/

insert into rd_loc2
values('SAI RAM','HOTEL',MDSYS.SDO_GEOMETRY(1,NULL,
MDSYS.SDO_POINT_TYPE(35000,35000,0),NULL,NULL))
/
insert into rd_loc2
values('HP','PETROL PUMP',MDSYS.SDO_GEOMETRY(1,NULL,
MDSYS.SDO_POINT_TYPE(40000,40000,0),NULL,NULL))
/
insert into rd_loc2
values('SWAR GATE','PETROL PUMP',MDSYS.SDO_GEOMETRY(1,NULL,
MDSYS.SDO_POINT_TYPE(45000,45000,0),NULL,NULL))
/
insert into rd_loc2
values('RAMANAND','HOTEL',MDSYS.SDO_GEOMETRY(1,NULL,
MDSYS.SDO_POINT_TYPE(50000,50000,0),NULL,NULL))
/
insert into rd_loc2
values('KASHIBEN','HOSPITAL',MDSYS.SDO_GEOMETRY(1,NULL,
MDSYS.SDO_POINT_TYPE(55000,55000,0),NULL,NULL))
/
insert into rd_loc2
values('JB','HOSPITAL',MDSYS.SDO_GEOMETRY(1,NULL,
MDSYS.SDO_POINT_TYPE(60000,60000,0),NULL,NULL))
/

insert into rd_loc2
values('TAJ','HOTEL',MDSYS.SDO_GEOMETRY(1,NULL,
MDSYS.SDO_POINT_TYPE(67500,67500,0),NULL,NULL))
/
insert into rd_loc2
values('BHARAT PETRO','PETROL PUMP',MDSYS.SDO_GEOMETRY(1,NULL,
MDSYS.SDO_POINT_TYPE(65000,65000,0),NULL,NULL))
/

CREATE INDEX rd_loc2_idx on rd_loc2(shape) indextype is mdsys.spatial_index parameters('sdo_level=5 sdo_numtiles=6')
/

N.B something is wrong with the query Or any thing else ????????

SELECT A.NAME,A.AOI FROM rd_loc2 A WHERE LOCATOR_WITHIN_DISTANCE
(A.shape,:mdsys.sdo_point_type(47500,47500,0),'distance = 100') = 'TRUE' ;
/
Previous Topic: object type tables
Next Topic: Error using locator_Within_distance Operator
Goto Forum:
  


Current Time: Sun Jul 12 06:09:31 CDT 2020