1
May 25, 2015
1
<Insert Picture Here>
S005 GeoPortal Application Development
Building ADF GIS Applications
Carlos Vicens
Oracle Sales Consultant
The following is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into any
contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decisions.
3
relied upon in making purchasing decisions.
The development, release, and timing of any
features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.
<Insert Picture Here>
Outline
• Preparar datos espaciales
• Crear una nueva capa con mapbuilder
• Crear una aplicación ADF GIS
4
Preparar datos espaciales
5
Preparar datos espaciales
Crear tablas
-- Create table for customer information.CREATE TABLE MY2_CUSTOMERS (
customer_id NUMBER,last_name VARCHAR2(30),first_name VARCHAR2(30),street_address VARCHAR2(40),city VARCHAR2(30),state_province_code VARCHAR2(2),postal_code VARCHAR2(9),cust_geo_location SDO_GEOMETRY);
6
-- Create table for store information.CREATE TABLE MY2_STORES (
store_id NUMBER,description VARCHAR2(100),street_address VARCHAR2(40),city VARCHAR2(30),state_province_code VARCHAR2(2),postal_code VARCHAR2(9),store_geo_location SDO_GEOMETRY);
Insertamos datos de test
-- Insert customer data.INSERT INTO MY2_CUSTOMERS VALUES
(1001,'Nichols', 'Alexandra', '17 Maple Drive', 'Nashua', 'NH','03062',SDO_GEOMETRY(2001, 8307,
SDO_POINT_TYPE (-71.48923,42.72347,NULL), NULL, NULL));
-- Insert stores data.INSERT INTO MY2_STORES VALUES
7
INSERT INTO MY2_STORES VALUES(101,'Nashua megastore', '123 Commercial Way', 'Nashua', 'NH','03062',SDO_GEOMETRY(2001, 8307,
SDO_POINT_TYPE (-71.49074,42.7229,NULL),NULL,NULL));
Agregamos metadatos espaciales…
-- Add metadata to spatial view USER_SDO_GEOM_METADATA.
INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
VALUES ('MY2_CUSTOMERS', 'CUST_GEO_LOCATION', SDO_DIM_ARRAY
(SDO_DIM_ELEMENT('LONG', -180.0, 180.0, 0.5), SDO_DIM_ELEMENT('LAT', -90.0, 90.0, 0.5)),
8307);
8
INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
VALUES ('MY2_STORES', 'STORE_GEO_LOCATION', SDO_DIM_ARRAY
(SDO_DIM_ELEMENT('LONG', -180.0, 180.0, 0.5), SDO_DIM_ELEMENT('LAT', -90.0, 90.0, 0.5)),
8307);
Creamos índices espaciales…
-- Create spatial indexes.
CREATE INDEX my2_customers_sidx ON my2_customers(cust_geo_location)INDEXTYPE IS mdsys.spatial_index;
CREATE INDEX my2_stores_sidx ON my2_stores(store_geo_location)INDEXTYPE IS mdsys.spatial_index;
9
Crear una nueva capa con mapbuilder
10
Crear una nueva capa con mapbuilder
Crear nueva capa
11
Crear nueva capa
12
Crear nueva capa
13
Crear nueva capa
14
Crear nueva capa
15
Crear nueva capa
16
Crear una aplicación ADF GIS
17
Crear una aplicación ADF GIS
Creamos una aplicacion de tipo Fusion Web Application
18
Creamos un servicio GIS basado en JPA
public class Customer implements Serializable {...@Convert(value="JGeometry")@StructConverter(name="JGeometry", converter="JGEOMETRY")private JGeometry location;...}
public class CustomerServiceFacade {
19
public class CustomerServiceFacade {private EntityManagerFactory emf = ...
...}
Creamos un Data Control a partir del servicio
20
Aplicación terminada
21
Aplicación basada en servicios web geoespaciales
22
Aplicación basada en servicios web geoespaciales
23
24