I am trying to create a spatial network from a shapefile (representing street centerlines) imported into Oracle DB with FME Desktop. The CENTRELINES feature contains a GEOM column that I would like to use as a basis for network analysis to distribute ambulances (points) among nursing homes (points) based on the distance of the route as a cost attribute. Any recommendations on the methodology for solving this painful problem in Oracle Spatial could be welcomed, but the main problem is that I'm starting in SQL. I used the Oracle documentation to compile the following SQL statement:
-- create an LRS geometry network EXEC SDO_NET.CREATE_LRS_NETWORK( 'LRS_net', -- network name 'CENTRELINES', -- LRS geometry table name 'GEOM', -- LRS geometry column name 1, -- number of hierarchy levels FALSE, -- directed link? TRUE -- node with cost? );
The script outputs the following:
Error starting at line 2 in command: EXEC SDO_NET.CREATE_LRS_NETWORK( Error report: ORA-06550: line 1, column 34: PLS-00103: Encountered the symbol ";" when expecting one of the following: ( ) - + case mod new not null <an identifier> <a double-quoted delimited-identifier> <a bind variable> table continue avg count current exists max min prior sql stddev sum variance execute multiset the both leading trailing forall merge year month day hour minute second timezone_hour timezone_minute timezone_region timezone_abbr time timestamp interval date <a string literal with character set specification> 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action: ... Error starting at line 9 in command: ) Error report: Unknown Command
I understand that line 2 causes an error:
PLS-00103: Encountered the symbol ";" when expecting one of the following...
Given that half-columns are needed to complete the SQL query, why is this a problem?
EDIT: the following script created a network by adding a start / end:
begin SDO_NET.CREATE_LRS_NETWORK( 'LRS_net', 'CENTRELINES', 'GEOM', 1, FALSE, TRUE); end;
Thank you for your help!
sql oracle networking spatial oracle-spatial
user2109092 Mar 26 '13 at 23:56 2013-03-26 23:56
source share