Yeah oracle spatial support has not really been maintained well on the
oracle end of things (table names must be unique across schemas and I have
run into some case sensitive issues).
Thanks for the detailed email, I have bundled up your email as an issue
report (see https://jira.codehaus.org/browse/GEOT-4966 ) but I am not aware
of a volunteer in position to act. You may wish to prepare a pull request
if you are in position to do so.
Jody
--
Jody Garnett
On 18 December 2014 at 02:44, Andreas Mogensen <ad.mogen...@gmail.com>
wrote:
> Hello List,
>
>
>
> After having tried out the Oracle GeoRaster Plugin example (
> http://docs.geotools.org/stable/userguide/library/coverage/oracle.html) I
> came across some minor quirks in the SQL. The following edits and remarks
> are applicable for Oracle 11g:
>
>
> CREATE TABLE RASTER (NAME VARCHAR(64) , IMAGE SDO_GEORASTER);
>
>
> --As far as I can tell the following statement (call) isn’t needed as
> oracle creates this trigger automatically when you create the SDO_GEORASTER
> field (in this case the IMAGE field).
> CALL sdo_geor_utl.createDMLTrigger('RASTER', 'IMAGE');
>
>
> CREATE TABLE RASTER_RDT OF SDO_RASTER
> (PRIMARY KEY (rasterID, pyramidLevel, bandBlockNumber,
> rowBlockNumber, columnBlockNumber))
> LOB(rasterBlock) STORE AS rdt_1_rbseg
> (
> CHUNK 8192
> CACHE READS
> NOLOGGING
> PCTVERSION 0
> STORAGE (PCTINCREASE
> );
>
>
> INSERT INTO RASTER VALUES ('oek', sdo_geor.init('RASTER_RDT'));
>
>
> DECLARE
> geor SDO_GEORASTER;
> BEGIN
> -- Import the TIFF image and world file
> SELECT IMAGE INTO geor from RASTER
> where NAME = 'oek' FOR UPDATE;
> sdo_geor.importFrom(geor, NULL, 'TIFF', 'file',
> '/georaster/data/oek.tif',
> 'WORLDFILE','FILE','/georaster/data/oek.wld');
> UPDATE RASTER SET IMAGE= geor where NAME = 'oek';
> COMMIT;
> END;
>
> DECLARE
> gr mdsys.sdo_georaster;
> BEGIN
> select IMAGE into gr from RASTER
> where NAME = 'oek' for update;
> sdo_geor.generatePyramid(gr, 'rLevel=2 resampling=NN');
> update RASTER set IMAGE = gr where NAME='oek';
> COMMIT;
> END;
>
>
>
> In addition you’ll need to grant java.io.FilePermission to your own user
> (schema) and to the MDSYS-schema for both the .tif-file and the .wld-file
> with following statements:
>
> dbms_java.grant_permission( 'YOUR_USER', 'SYS:java.io.FilePermission',
> '/georaster/data/oek.tif ', 'read' )
> dbms_java.grant_permission( 'YOUR_USER', 'SYS:java.io.FilePermission',
> '/georaster/data/oek.wld ', 'read' )
> dbms_java.grant_permission( 'MDSYS', 'SYS:java.io.FilePermission',
> '/georaster/data/oek.tif ', 'read' )
> dbms_java.grant_permission( 'MDSYS', 'SYS:java.io.FilePermission',
> '/georaster/data/oek.wld ', 'read' )
>
>
>
> Finally it’s worth mentioning that (apparently) the table names must be
> unique across all schemas in the database. I.e. you’re not allowed to name
> a table RASTER in the schema, USER_1, if a table with the same name already
> exists in schema, USER_2.
>
>
>
> Merry X-Mas
>
>
>
> Andreas
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users