Vous êtes sur la page 1sur 29

osLClS Wk1 8asLer.

An Cpen Source
alLernaLlve Lo Cracle Ceo8asLer
1
llrsL of all...
1 + 1 = 2
2
1 x 1 = 1
Cracle Ceo8asLer roadmap
10gR1 (2003) First version
Interleaving
Georeferencing
Pyramids
Raster loader, viewer and exporter
10gR2 (2005) Raster compression/decompression
GeoRaster objects in other schemas
Enhaced GeoRaster tools
11gR1 (2007) Automatic DML trigger creation
3
11gR1 (2007) Automatic DML trigger creation
SDO_GEOR_ADMIN
Bitmap masks
NODATA ranges
Empty raster blocks
Random blocking size
New functions, procedures and other features
11gR2 (2009) Java API
GCP Support
Raster reprojections
Optimized blocking
Grid interpolations
Polygon-based clipping in queries
New functions, procedures and other features
osLClS Wk1 8asLer roadmap
0.1.6d (Feb 2009) First version
Type definition
Canonical input/output
GiST index support
Raster loader (gdal2wktraster)
0.1.6k (Aug 2010) Get/Set raster properties
Intersect raster&geometries
Register out db rasters
Get metadata for raster and bands
Convert between world and raster coords.
Set and know true nodata values
4
Set and know true nodata values
Get/Set pixel values
GDAL r/o basic driver
0.2.4 (Pred. Nov 2010) Set raster rotation
Reproject rasters
Export raster to standard formats
Validate raster data
Topological operators
MapAlgebra, reclassify...
Edit raster data on db
Full GDAL driver
hLLp://Lrac.osgeo.org/posLgls/wlkl/Wk18asLer/lannlngAndlundlng
Maln characLerlsLlcs: uaLa Lype
Crac|e Geokaster: 2 relaLed daLa Lypes
S
ostGIS Wk1 kaster: 1 daLa Lype
Maln characLerlsLlcs: Ceoreferenclng
Crac|e Geokaster:
6
ostGIS Wk1 kaster:
Maln characLerlsLlcs: lndexlng
Crac|e Geokaster: CreaLes a spaLlal lndex (8-
1ree lndex) on Lhe spaLlal exLenL of Lhe
Ceo8asLer ob[ecL.
ostGIS Wk1 kaster: CreaLes a ClS1 lndex on Lhe
7
ostGIS Wk1 kaster: CreaLes a ClS1 lndex on Lhe
rasLer column, uslng convex hull.
Maln characLerlsLlcs: yramlds
Crac|e Geokaster: 8educed-resoluLlon verslons of
rasLers can be generaLed uslng 3 resampllng
Lechnlques. 1he pyramlds are sLored ln Lhe same
rasLer daLa Lable as Lhe Ceo8asLer ob[ecL, wlLh Lhe
same S8S Lhan Lhe orlglnal one.
8
same S8S Lhan Lhe orlglnal one.
ostGIS Wk1 kaster: CuAL-provlded pyramlds are
generaLed on loadlng Llme aL deslred levels. 1he
pyramlds are sLored ln dlfferenL Lables Lhan Lhe orlglnal
rasLer.
Maln characLerlsLlcs: MeLadaLa
Crac|e Geokaster: MeLadaLa are parL of Lhe
SuC_CLC8AS1L8 ob[ecL, and follow a xML
schema.
ostGIS Wk1 kaster: 1he meLadaLa ls packed
9
ostGIS Wk1 kaster: 1he meLadaLa ls packed
wlLh Lhe rasLer daLa, llke Lhe georeference
lnformaLlon. Cnly baslc meLadaLa ls sLored
(upper lefL corner, wldLh, helghL,
plxel slze, skew, srld and numbands)
Maln characLerlsLlcs: Cpen specs
Crac|e Geokaster: 1he specs for SuC_CLC8AS1L8 and
SuC_8AS1L8 ob[ecLs are open. 1hls ls really lmporLanL,
Lo allow Lhlrd parLy Lools Lo provlde capablllLles noL
lmplemenLed ln Lhe server, llke spaLlal analysls.
10
ostGIS Wk1 kaster: uses Wk1/Wk8 formaL for
represenLlng daLa. ls a open speclflcaLlon Loo.
8aslc CperaLlons: Loadlng daLa
Crac|e Geokaster. llrsL, ensure rasLer has accepLed formaL
or use qJol_ttooslote. 1hen:
L]SL AI: ckA1 1A8l, 5uO_COk.lolt,
5uO_COk.lmpottltom. noL very lnLulLlve. lew
formaLs accepLed (1lll, Cll, 8M, Ceo1lll, nC).
Iava |oader. lew formaLs accepLed (1lll, Ceo1lll,
11
Iava |oader. lew formaLs accepLed (1lll, Ceo1lll,
!LC, 8M, Cll, nC and !2 for lmages. LS8l World
llles, Ceo1lll and ulglLal Clobe 8C flles for georef)
GDAL Geokaster dr|ver (Ivan Lucena): 8eally slmple
meLhod
qJol_ttooslote -of lmoqe.tlf
qeot.oset/posswotJ/5lu,toble,tostet_colomo
8aslc CperaLlons: Loadlng daLa
ostGIS Wk1 kaster: All CuAL-accepLed
formaLs.
use pyLhon loader qJol2wkttostet
> qJol2wkttostet.py" -t c.\otcl_tot\*.tlf -t <toble> -s
<stlJ> -k 50x50 -l -o c.\otcl_tot\sttm.spl
12
<stlJ> -k 50x50 -l -o c.\otcl_tot\sttm.spl
> pspl -J <Jb> -f c.\otcl_tot\sttm.spl
lo tbe fotote. CuAl wk1 kostet Jtlvet (cotteotly,
ooly soppott wk1 kostet teoJloq).
8aslc CperaLlons: vlewlng daLa
Crac|e Geokaster:
Cfflclal vlewers: Ceovlewer (some bugs), Mapvlewer.
LoLs of SpaLlal arLners
(hLLp://www.oracle.com/Lechnology/producLs/spaLlal/spaLlal_parLners_sys_lnLeg.hLm)
1ools vla CuAL Ceo8asLer drlver (l.e.: CClS)
13
8aslc CperaLlons: vlewlng daLa
ostGIS Wk1 kaster: now, ls posslble Lo
vlsuallze Wk1 8asLer daLa uslng CpenIUM
and S1_lxelAsolygons funcLlon.
AparL from LhaL, Lhere are no Lools allowlng
Wk1 8asLer daLa vlsuallzaLlon. 8uL we have
14
Wk1 8asLer daLa vlsuallzaLlon. 8uL we have
plans for developlng supporL on:
gvSlC
CeoServer
?
8aslc CperaLlons: LxporLlng daLa
Crac|e Geokaster: As when loadlng daLa...
L]SL AI: 5uO_COk.expott1o. lew formaLs
accepLed (1lll, 8M, Ceo1lll, nC). LlmlLed daLa
slze on 1 operaLlon: 67 M8.
Iava: lew formaLs accepLed (L/SCL plus !LC
1S
Iava: lew formaLs accepLed (L/SCL plus !LC
and Cll). Memory problems wlLh daLa slze up Lo
67M8.
GDAL Geokaster dr|ver.
8aslc CperaLlons: LxporLlng daLa
ostGIS Wk1 kaster:
CuAL Wk1 8asLer drlver (all CuAL accepLed
formaLs)
lanned: dlrecLly from-db exporLlng Lo common
formaLs (LoLlff, Lo[peg...)
16
formaLs (LoLlff, Lo[peg...)
Slmple example wlLh Cracle Ceo8asLer (l)
Lxamp|e: Compute p|xe| va|ue stat|st|cs on areas de||m|ted by vector po|ygons
(http:]]g|s4free.wordpress.com]2010]09]01]orac|e-georaster-part-||]).
Step 1: Load vecLor daLa (polnLs dlsLrlbuLlon).
Cracle SpaLlal only accepL SuC formaL for lnpuL geomeLry daLa. We have Lo converL
our shapeflles Lo SuC formaL uslng sJo2sbp
1oo|s used: sdo2shp + sqlplus + sqlldr (posslble Lo use only oqt2oqt)
17
Slmple example wlLh Cracle Ceo8asLer (ll)
Step 2: Load rasLer daLa
1ools used: L/SCL Al
ou can use Iava |oader too, but you shou|d f|rst reformat and reb|ock data
gdal_LranslaLe -of C1lff -a_srs epsg:4326 -anodaLa -32768 -co 1lW=?LS" -co ln1L8LLAvL=lxLL"
-co 1lLLu=?LS" -co "8LCCkxSlZL=30" -co "8LCCk?SlZL=30" lmage.Llf lmage_new.Llf
Insert raster data
18
Insert raster data
uLCLA8L
geor SuC_CLC8AS1L8,
8LCln
lnSL81 ln1C spaln_lmages values( 1, 'Spaln_1lll_1', sdo_geor.lnlL('spaln_lmages_rdL') ),
SLLLC1 lmage ln1C geor l8CM spaln_lmages WPL8L lmage_ld = 1 lC8 uuA1L,
sdo_geor.lmporLlrom(geor, 'blockslze=(30,30) spaLlalLxLenL=18uL', '1lll', 'flle', 'C:\orcl_LuL\srLm_33_04_new.Llf',
'WC8LullLL', 'llLL', 'C:\orcl_LuL\srLm_33_04_new.Lfw'),
uuA1L spaln_lmages SL1 lmage = geor WPL8L lmage_ld = 1,
Lnu,
Slmple example wlLh Cracle Ceo8asLer (lll)
Step 3: CreaLe buffers around polnLs
1ools used: L/SCL Al
creaLe Lable carlboupolnL_buffers_wgs AS selecL L.ld, sdo_geom.sdo_mbr(sdo_geom.sdo_buffer(sdo_cs.Lransform(L.geom,
4326), 1000, 1)) geom from carlboupolnLs L,
19
Slmple example wlLh Cracle Ceo8asLer (lv)
Step 4: CreaLe lndexes
1ools used: L/SCL Al
I|rst, we must update metadata
uLLL1L l8CM user_sdo_geom_meLadaLa WPL8L Lable_name = 'spaln_lmages' Anu column_name = 'lMACL.SA1lALLx1Ln1',
lnSL81 ln1C user_sdo_geom_meLadaLa vALuLS ('spaln_lmages', 'lMACL.SA1lALLx1Ln1',
SuC_ulM_A88A?(SuC_ulM_LLLMLn1('x', -180, 180, .00000003), SuC_ulM_LLLMLn1('?', -90, 90, .00000003)), 4326),
Now, create the |ndex
20
Now, create the |ndex
u8C lnuLx spaln_lmages_sldx,
C8LA1L lnuLx spaln_lmages_sldx Cn spaln_lmages(lmage.spaLlalLxLenL) lnuLx1?L lS mdsys.spaLlal_lndex,
Same operat|on w|th vector buffers
uLLL1L l8CM user_sdo_geom_meLadaLa WPL8L Lable_name = 'carlboupolnL_buffers_wgs' Anu column_name = 'geom',
lnSL81 ln1C user_sdo_geom_meLadaLa vALuLS ('carlboupolnLs_buffers_wgs', 'geom', SuC_ulM_A88A?(SuC_ulM_LLLMLn1('x',
-180, 180, .00000003), SuC_ulM_LLLMLn1('?', -90, 90, .00000003)), 4326),
u8C lnuLx spaln_lmages_sldx,
C8LA1L lnuLx carlboupolnLs_buffers_wgs_gldx Cn carlboupolnLs_buffers_wgs(geom) lnuLx1?L lS mdsys.spaLlal_lndex,
Slmple example wlLh Cracle Ceo8asLer (v)
Step S: CompuLe sLaLlsLlcs. 1he mean elevaLlon of Lhe rasLer ln
areas lnLersecLed by vecLor buffers.
1ools used: L/SCL Al
1lme: AbouL 3 mlns.
1o avold a blg amounL of L/SCL
code, we remark Lhe lmporLanL
21
code, we remark Lhe lmporLanL
polnLs:
We use Lhe buffers Lo
lnLersecL Lhe rasLer daLa
exLenLs.
We compuLe rasLer
sLaLlsLlcs by
5uO_COk.qeoetote5tot
lstlcs, uslng as sampllng
wlndow Lhe lnLersecLlng
buffers.
Slmple example wlLh Cracle Ceo8asLer (vl)
Conc|us|ons
As we can only lnLersecL vecLor daLa wlLh M88 of rasLer daLa,
noL wlLh Lhe rasLer daLa lLself, we could compuLe sLaLlsLlcs ln
rasLer parLs wlLh no daLa.
1he lnLersecLlon process was really fasL, because we don'L
lnLersecL vecLor wlLh real daLa, buL wlLh M88 of Lhe daLa.
22
Why? 8ecause Cracle Ceo8asLer was creaLed prlmarlly for rasLer daLa
sLorage, noL for rasLer daLa analysls.
Slmple example wlLh osLClS Wk1 8asLer (l)
1he same example (hLLp://Lrac.osgeo.org/posLgls/wlkl/Wk18asLer1uLorlal01)
Step 1: Load vecLor daLa (polnLs dlsLrlbuLlon).
osLClS only accepL shapeflles as lnpuL daLa. We use Lhem
1ools used: shp2pgsql (posslble Lo use oqt2oqt)
23
Slmple example wlLh osLClS Wk1 8asLer (ll)
Step 2: Load rasLer daLa
1ools used: qJol2wkttostet, pspl
Step 3: CreaLe buffers around polnLs
24
Step 3: CreaLe buffers around polnLs
1ools used: gSCL Al
noLe: 1he buffers are round, noL recLangular. 1hls ls because
Cracle Ceo8asLer only accepLs recLangular sampllng wlndows.
8uL now, lL's noL necessary.
Slmple example wlLh osLClS Wk1 8asLer (lll)
Step 4: CreaLe lndexes
noL needed! CreaLed when loadlng daLa.
Step S: CompuLe sLaLlsLlcs. 1he mean elevaLlon of Lhe rasLer ln
areas lnLersecLed by vecLor buffers.
1ools used: pgSCL Al
2S
1lme: AbouL 10 mlns.
noLe: We really lnLersecL
rasLer daLa wlLh vecLor daLa.
And Lhe rasLer daLa ls flrsL
polygonlzed Lo be lnLersecLed
wlLh buffers.
Slmple example wlLh osLClS Wk1 8asLer (lv)
Conc|us|ons
now we can really lnLersecL vecLor daLa wlLh rasLer daLa, noL
wlLh Lhe rasLer M88. 1he lnLersecLlon funcLlon ls Lhe flrsL one of
a seL of spaLlal analysls funcLlons LhaL wlll work seamless wlLh
vecLor and rasLer daLa.
26
LvaluaLlon MaLrlx
Requirements Oracle GeoRaster PostGIS WKT Raster
Specific Data Type SDO_GEORASTER WKT Raster
Multidimensional
Support
Up to 3 Up to 3
Georeferencing Fullfilled Fullfilled
Image pyramids Fullfilled Fullfilled
Partitions Only regular Only regular
Raster compression Fullfilled Fullfilled
27
Raster compression Fullfilled Fullfilled
Scan order Not Fullfilled Not fullfilled
Analysis capability Not fullfilled Fullfilled (+ r&v)
Slicing Only get 1 layer Only get 1 layer,
planned
Subsetting Fullfilled Not Fullfilled
(planned)
Content-based
search
Using vector MBR Partially (topological
planned)
Spatial Indexing Fullfilled (over MBR) Fullfilled (over cells)
Open specification Fullfilled Fullfilled
CredlLs
Screenshots & tutor|a|: lerre 8aclne
Lva|uat|on Matr|x: uamon 8lga nokLula
(Server-based 8asLer CperaLlons for SpaLlo-
Lemporal AppllcaLlon ln
28
Lemporal AppllcaLlon ln
8asLer uaLabase uslng Cracle Ceo8asLer"),
based on eLer 8auman's & oLhers crlLerla.
1hanks!
hLLp://Lrac.osgeo.org/posLgls/wlkl/Wk18asLer
Boreal Avian
Modelling Project
29

Vous aimerez peut-être aussi