Feb 152013
 

I received some files with only coordinates, which had to be loaded into Oracle. It’s not super difficult, but I thought I’d share it anyway. The files contain some comment lines first, easily recognized the the hash (#) as the first character. The rest of the lines are x, y and z separated by spaces, like this:

#[MetadataBegin]
#[OrderNumber]2013001
#[Measured by]Piet
#[MeasureDate]30-1-2013
#[MetadataEnd]
 58392.50 439762.50 -0.01
 58397.50 439762.50 -0.03
 58402.50 439762.50 -0.03
 58407.50 439762.50 -0.03

The control file should be like this (change the filename etc):

OPTIONS (DIRECT=TRUE,MULTITHREADING=TRUE)
LOAD DATA
INTO TABLE DEPTHDATA
WHEN 1-1<>'#'
FIELDS TERMINATED BY ' '
(ID SEQUENCE(1,1),
 GEOMETRY COLUMN OBJECT
 (
  SDO_GTYPE CONSTANT "3001",
  SDO_POINT COLUMN OBJECT
   (X FLOAT EXTERNAL TERMINATED BY ' ' ,
    Y FLOAT EXTERNAL TERMINATED BY ' ' ,
    Z FLOAT EXTERNAL TERMINATED BY ' ' )
   )
)

Aug 052010
 

Dear Oracle spatial experts,

When I don’t license Oracle spatial, but only want to use Locator (as described in Appendix B of the Spatial User Guide), is it allowed to load the SDO Java classes into the database ($/md/admin/sdoloadj.sql)? Or does loading the Java classes mean that one switches to using Oracle Spatial, and thus requiring a valid license?

Comments are greatly appreciated. Perhaps Simon is reading this?