geoserver 栅格数据 oracle georaster

1,准备数据

 

CREATE TABLE RASTER (NAME VARCHAR(64) ,  
IMAGE SDO_GEORASTER);
 
call sdo_geor_utl.createDMLTrigger('RASTER', 'IMAGE');
 
CREATE TABLE RASTER_RDT OF SDO_RASTER
(PRIMARY KEY (rasterID, pyramidLevel, bandBlockNumber
 wBlockNumber, columnBlockNumber))
 LOB(rasterBlock) STORE AS rdt_1_rbseg
     
(
     
CHUNK 8192
     
CACHE READS
     
NOLOGGING
     
PCTVERSION 0
     
STORAGE (PCTINCREASE 0)
     
);
 

Now insert a record for a coverage named oek

, the raster- and
pyramid tiles are stored in a table called RASTER_RDT

.

INSERT INTO RASTER VALUES ('oek', sdo_geor.init('RASTER_RDT'));

Import the image. Look here in case of problems Oracle
Georaster Import

DECLARE   

   
geor SDO_GEORASTER;
BEGIN  

-- Import the TIFF image and world file 
SELECT georaster 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.tfw');  

UPDATE RASTER SET georaster = geor where NAME = 'oek';  

COMMIT;
END;

Create the pyramids

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;

 

2,配置geoserver

<!– [if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning/>
<w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:SpaceForUL/>
<w:BalanceSingleByteDoubleByteWidth/>
<w:DoNotLeaveBackslashAlone/>
<w:ULTrailSpace/>
<w:DoNotExpandShiftReturn/>
<w:AdjustLineHeightInTable/>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]–><!– [if gte mso 9]><xml>
<w:LatentStyles DefLockedState=”false” LatentStyleCount=”156″>
</w:LatentStyles>
</xml><![endif]–><!– [if !mso]><span class=”mceItemObject”
classid=”clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D” id=ieooui></span>
<style>
st1\:*{behavior:url(#ieooui) }
</style>
<![endif]–><!– [if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:””;
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:”Times New Roman”;
mso-fareast-font-family:”Times New Roman”;
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]–>

 

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no”?>
<config version=”1.0″>
     <coverageName name=”oek”/>
     <coordsys name=”EPSG:4326″/>
     <!– interpolation 1 = nearest neighbour, 2 = bipolar, 3 = bicubic –>
     <scaleop interpolation=”1″/>
   
     <!– &mapping; –>
     <spatialExtension name=”georaster”/>       
     <mapping>       
         <masterTable name=”RASTER_TEST” >
             <geoRasterAttribute name=”IMAGE”/>
             <coverageNameAttribute name=”NAME”/>
         </masterTable>
     </mapping>

     <!– &connect; –>
     <connect>
         <!– value DBCP or JNDI –>       
         <dstype value=”DBCP”/>               
     <!–<jndiReferenceName value=””/>–>

         <username value=”mdsys” />
         <password value=”123456″ />       
       
         <jdbcUrl value=”jdbc:oracle:thin:@10.87.59.193:1521:orcl” />
           <driverClassName value=”oracle.jdbc.OracleDriver”/>
         <maxActive value=”10″/>
         <maxIdle value=”0″/>       
     </connect>
</config>

 

 

 

转载自:https://blog.csdn.net/sunzexing123/article/details/83950060

You may also like...