17 out

[Oracle] Criando índice espacial SIRGAS 2000

Segue a criação do índice espacial para SIRGAS 2000.

INSERT INTO mdsys.cs_srs 
(
    cs_name,
    srid,
    auth_srid,
    auth_name,
    wktext,
    cs_bounds,
    wktext3d
)
VALUES
( 
    'SIRGAS 2000 / UTM zone 22N',
    4674,
    4674,
    NULL,
    'PROJCS["SIRGAS 2000 / UTM zone 22N", GEOGCS [ "SIRGAS 2000", DATUM ["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000", SPHEROID ["GRS 1980", 6378137.0, 298.257222101]], PRIMEM [ "Greenwich", 0.000000 ], UNIT ["Decimal Degree", 0.01745329251994328]], PROJECTION ["UTM zone 22N (EPSG OP 16022)"], PARAMETER ["Latitude_Of_Origin", 0.0], PARAMETER ["Central_Meridian", -51.0], PARAMETER ["Scale_Factor", 0.9996], PARAMETER ["False_Easting", 500000.0], PARAMETER ["False_Northing", 10000000.0], UNIT ["Meter", 1.0]]',
    mdsys.sdo_geometry(NULL,NULL,mdsys.sdo_point_type(NULL,NULL,NULL),"MDSYS"."SDO_ELEM_INFO_ARRAY"(),"MDSYS"."SDO_ORDINATE_ARRAY"()),
    NULL
);
GRANT CREATE TABLE TO [SCHEMA];
GRANT CREATE SEQUENCE TO [SCHEMA];
INSERT INTO MDSYS.SDO_GEOM_METADATA_TABLE VALUES('[SCHEMA]','[TABELA]','[COLUNA]',MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('LONGITUDE',-180,180,100),MDSYS.SDO_DIM_ELEMENT('LATITUDE',-90,90,100)),4674);
 
CREATE INDEX [SCHEMA].IX_[TABELA] ON [SCHEMA].[TABELA] ([COLUNA]) INDEXTYPE IS MDSYS.SPATIAL_INDEX;

Referências:

  • http://blogdomariomartinez.blogspot.com.br/2014/05/oracle-spatial-projecoes-personalizadas.html
  • http://www.spatialreference.org/ref/sr-org/6687/