diff --git a/pom.xml b/pom.xml index 6ca4a20..7782ff8 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ UTF-8 - 4.2.4.RELEASE + 4.3.6.RELEASE 3.3.1 1.7.18 1.2.16 @@ -63,20 +63,55 @@ guava 23.0 + + net.sf.json-lib + json-lib + 2.4 + org.mybatis mybatis ${mybatis.version} - org.postgresql - postgresql - 42.1.0 + org.springframework + spring-beans + ${spring.version} - net.sf.json-lib - json-lib - 2.4 + org.springframework + spring-web + ${spring.version} + + + org.springframework + spring-oxm + ${spring.version} + + + org.springframework + spring-tx + ${spring.version} + + + org.springframework + spring-jdbc + ${spring.version} + + + org.springframework + spring-aop + ${spring.version} + + + org.springframework + spring-context-support + ${spring.version} + + + org.springframework + spring-test + ${spring.version} org.geotools diff --git a/src/main/java/com/gis3c/spatial/App.java b/src/main/java/com/gis3c/spatial/App.java new file mode 100644 index 0000000..eabb903 --- /dev/null +++ b/src/main/java/com/gis3c/spatial/App.java @@ -0,0 +1,17 @@ +package com.gis3c.spatial; + +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +/** + * Created by hukekuan on 2017/12/14. + */ +public class App { + public static ApplicationContext ApplicationInit(){ + return new ClassPathXmlApplicationContext("classpath:spring-config.xml"); + } + public static void main(String[] args) { + ApplicationContext context = ApplicationInit(); + System.out.println("OK"); + } +} diff --git a/src/main/resources/init.sql b/src/main/resources/init.sql new file mode 100644 index 0000000..ddcc40a --- /dev/null +++ b/src/main/resources/init.sql @@ -0,0 +1,135 @@ +--地图表 +create table c3gis_ol_map( + mapid varchar(50) not null PRIMARY KEY, + mapname varchar(50) not null, + view varchar(50) not null, + controls varchar(50) ARRAY, + pixelRatio integer, + interactions varchar(50) ARRAY,, + layers varchar(50) ARRAY, + logo boolean, + overlays varchar(50) ARRAY, + description varchar(50) +); + + +--样式类型枚举值 +CREATE TYPE c3gis_ol_vectorstyletype AS ENUM('entity', 'function'); + + +--矢量图层表 +create table c3gis_ol_layer_vector( + layerid varchar(50) not null PRIMARY KEY, + layername varchar(50) not null, + opacity real, + visible boolean, + extent decimal ARRAY[4], + zIndex integer, + minResolution decimal, + maxResolution decimal, + + source varchar(50) not null, + styletype c3gis_ol_vectorstyletype not null,, + stylevalue varchar(50) not null, + + description varchar(50) +); + + +--切片图层表 +create table c3gis_ol_layer_tile( + layerid varchar(50) not null PRIMARY KEY, + layername varchar(50) not null, + opacity real, + visible boolean, + extent decimal ARRAY[4], + minResolution decimal, + maxResolution decimal, + source varchar(50) not null, + description varchar(50) +); + +--ArcGIS切片服务 +create table c3gis_ol_source_tilearcgisrest( + sourceid varchar(50) not null PRIMARY KEY, + sourcename varchar(50) not null, + crossOrigin varchar(50), + projection varchar(20), + url varchar(100) not null, + wrapX boolean, + description varchar(50) +); + +--SuperMap切片服务 +create table c3gis_ol_source_tilesupermaprest( + sourceid varchar(50) not null PRIMARY KEY, + sourcename varchar(50) not null, + url varchar(100) not null, + wrapX boolean, + opaque boolean, + description varchar(50) +); + +--矢量数据 +create table c3gis_ol_source_tilearcgisrest( + sourceid varchar(50) not null PRIMARY KEY, + sourcename varchar(50) not null, + url varchar(50) not null, + wrapX boolean, + description varchar(50) +); + +--wmts服务 +create table c3gis_ol_source_wmts( + sourceid varchar(50) not null PRIMARY KEY, + sourcename varchar(50) not null, + url varchar(50) not null, + layer varchar(50) not null, + style varchar(50) not null, + format varchar(50) not null, + matrixSet varchar(50) not null, + description varchar(50) +); + +--样式表 +create table c3gis_ol_style_style( + styleid varchar(50) not null, + stylename varchar(50) not null, + fill varchar(50), + image varchar(50), + stroke varchar(50), + text varchar(50), + description varchar(50) +); + +--填充面样式 +create table c3gis_ol_style_fill( + styleid varchar(50) not null, + stylename varchar(50) not null, + color varchar(50) not null, + description varchar(50) +); + +--边框样式 +create table c3gis_ol_style_stroke( + styleid varchar(50) not null, + stylename varchar(50) not null, + color varchar(50) not null, + width integer, + lineCap varchar(50), + lineJoin varchar(50), + description varchar(50) +); + +--图标样式 +create table c3gis_ol_style_icon( + styleid varchar(50) not null, + stylename varchar(50) not null, + anchor real ARRAY, + anchorOrigin varchar(20), + anchorXUnits varchar(20), + anchorYUnits varchar(20), + color varchar(20), + crossOrigin real, + description varchar(50) +); \ No newline at end of file diff --git a/src/main/resources/resources.properties b/src/main/resources/resources.properties new file mode 100644 index 0000000..aa53626 --- /dev/null +++ b/src/main/resources/resources.properties @@ -0,0 +1,10 @@ +gis.driverClassName=oracle.jdbc.driver.OracleDriver +gis.url=jdbc:oracle:thin:@172.16.6.13:1521:orcl +gis.username=spatial +gis.password=spatial + + +postgis.driverClassName=org.postgresql.Driver +postgis.url=jdbc:postgresql://localhost:5432/gisdb +postgis.username=postgres +postgis.password=postgres \ No newline at end of file diff --git a/src/main/resources/spring-config.xml b/src/main/resources/spring-config.xml new file mode 100644 index 0000000..e56d7df --- /dev/null +++ b/src/main/resources/spring-config.xml @@ -0,0 +1,30 @@ + + + + + + + classpath:resources.properties + + + + + + + + \ No newline at end of file