Upload
minpa-lee
View
1.329
Download
3
Embed Size (px)
Citation preview
www.mangosystem.com
01 공간정보분석과 시각화02 오픈소스 GIS 와 OGC 표준
목차
- 일러두기 -• 본 자료는 모두 Creative Commons License CC-BY-NC 을 따릅니다 .
03 오픈소스 기반 GIS R&D
04 사례 1: 국토환경성평가지도 서비스05 사례 2: 통합적 역학조사 분석시스템06 사례 3: Web Processing Service 데모07 데모 프로그램 설치08 Advanced Web Processing Service
www.mangosystem.com
공간정보분석과 시각화- 활용 패턴 -
- 일러두기 -• 본 자료는 모두 Creative Commons License CC-BY-NC 을 따릅니다 .
www.mangosystem.com
GIS 기반 공간분석 방법론 ?• 김영표 . 임은선 . 2003. GIS 기반 공간분석방법론 개발 연구 . 경기 : 국토연구원
www.mangosystem.com
공간분석기법을 지원하는 GIS 소프트웨어
Desktop Server + Web
RPython
Java
C++
www.mangosystem.com
Workflow for Map Visualization
대상 레이어Text Geocoding
Visualization Processing Processing
Visualization
참조 레이어
Visualization
12
3
4
• 단순한 심볼 표현에서부터 1 차 , 2 차 , 3 차 가공을 통한 시각화 과정
Map
www.mangosystem.com
Single Layer – Visualization
Symbolization
LinePoint Polygon
Simple GraduatedSymbol
GraduatedColor
Equal Interval
Natural Breaks Quantile Standard
Deviation
UniqueValues
Classification
UserDefined
ColorBrewer
Flow Map
Point - type
Line - pattern
Polygon - pattern
Label - buffer, shadow…
ChartSymbol
Feat
ure
Type Raster
www.mangosystem.com
Single Layer – Vector Analysis
Vector Analysis
LinePoint Polygon
BufferWindRose Maps
MultipleRing Buffer
HexagonPolar Grids
CalculationMinimumBoundingGeometry
Circle
XYLengthAreaExpression…
Dissolve
Feat
ure
Type
Fishnet
Network Analy-sis
Shortest PathService Area…
Ring Maps
Grids
EnvelopeCircleConvex Hull…Aggregation
Thiessen Polygon
DelaunayTrangulation
www.mangosystem.com
Single Layer – Spatial Statistics
Spatial Statistics Analysis
Autocorrelation
Clustering Distribution
LinePoint Polygon
Central Feature
Standard De-viational El-
lipse
Standard Dis-tance
Mean Center
Median CenterLinear Direc-
tional Mean
G-Statistics
Moran’s I
Spatial LQ
K-Means
Patterns - Global
G-Statistics Moran’s I
Spatio-Temporal Clustering
Nearest Neighbor K-function
Knox Statistics
Spatial Scan Statistics
Feat
ure
Type
www.mangosystem.com
Single Layer – Raster Analysis
Raster Analysis
LinePoint Polygon
Density DistanceInterpolationHeatMap
IDWSplineKriging…
Point
Kernel
Line
Raster
Surface
SlopeAspectHillshadeContour…
Feat
ure
Type
Hydro…..
DistanceDirectionAllocation
www.mangosystem.com
Two or more Layers : Vector Analysis
Vector Analysis
PointLine
PointPoint
PointPolygon
PointStatistics Overlay
LinePolygon
PolygonPolygon
Spider Map
Line Statistics
ArealInterpolation
Dasymetric Mapping
Count
SumMeanMinMaxStd. Dev.Var…
Sum Length
UnionIntersectSymmetrical DifferenceIdentityEraseClip…
DistanceCalculation
Attribute
Distance
Feat
ure
Type
www.mangosystem.com
Two or more Layers : Raster Analysis
Raster Analysis
LineRaster
PointRaster
PolygonRaster
ValueExtraction OverlayZonal
Statistics
RasterRaster
Feat
ure
Type
SumMeanMinMaxStd. Dev.Var…
Calculation
Modeling
www.mangosystem.com
Graduated Color• 인구밀도처럼 숫자필드의 값으로 급간을 구분하여 색상으로 시각화
www.mangosystem.com
Graduated Symbol• 숫자필드의 값으로 급간을 구분하여 심볼의 색상 및 크기로 시각화
www.mangosystem.com
Chart Symbol• 하나 이상의 숫자필드의 값으로 차트 심볼을 이용하여 시각화
www.mangosystem.com
Flow Map Rendering• 인구이동 등 두 지점간의 값을 화살표 및 굵기로 시각화
출처 : http://www.onspatial.com/2011/04/cartographyflow-map-renderer.html
www.mangosystem.com
오픈소스 GIS 와 OGC표준- 공간분석기법과 시각화 기술 개발 -
- 일러두기 -• 본 자료는 모두 Creative Commons License CC-BY-NC 을 따릅니다 .
www.mangosystem.com
Open Geospatial Consortium (OGC) Standards
• 전세계 520 여개 이상 정부 기관과 기업 , 대학들이 참여하고 있는 세계 최대 공간정보산업 표준화 추진기구– 데이터 포맷 (KML, GML 등 ) 에서부터 OGC Web Service(WMS, WFS, WCS,
CSW 등 ) 에 이르는 다양한 표준 제정 및 인증– 사이트 : http://www.opengeospatial.org
• 주요 참여 기관– 해외 : 미국 국토안보부 , NASA, 마이크로소프트 , 구글 , 오라클 , ESRI, 오토데스크 등– 국내 : 국토교통부 , 공간정보산업진흥원 , 공간정보연구원 , 한국건설기술연구원 ,
ETRI, 국토연구원 , 부산대학교 , 서울대학교 , 안양대학교 , 한국외국어대학교 , 삼성 SDS, 현대 MN 소프트 등
www.mangosystem.com
OGC Web Service• Web 을 통해 WMS( 지도 , 범례 ), WFS( 벡터 , 공간쿼리 , 편집 ), WCS( 래스터 , Sub-
set, Resampling, Reprojection), WPS( 공간분석 및 처리 ), CSW( 메타데이터 카탈로그 ) 등의 서비스를 활용하는 체계 – OGC 표준 기반 , GIS 사업 발주시 기본 요구사항
www.mangosystem.com
OWS 활용 패턴
• WMS(WMTS, OSGeo TMS), WFS(WFS-T), WCS, WPS, WCS…
WMS + TMS
WFS
WPS
WCS ???
www.mangosystem.com
WPS 지원 서버
• Java, Python, C(C++) 등 다양
http://geoserver.org
http://www.deegree.org
http://52north.org
http://pywps.org
http://zoo-project.org
http://www.esri.com
www.mangosystem.com
WPS – Process Chaining• 여러 Process 들을 엮어서 새로운 Process 생성 / 활용
도시내부 건물노후불량률 분석 예
www.mangosystem.com
오픈소스 기반 GIS R&D- 공간분석기법과 시각화 기술 개발 -
- 일러두기 -• 본 자료는 모두 Creative Commons License CC-BY-NC 을 따릅니다 .
www.mangosystem.com
R&D: 오픈소스기반 공간분석 및 시각화 기술 개발
• 목표 : Java 엔터프라이즈 기반 공간 ( 통계 ) 분석 패키지 개발• GeoTools 기반의 공간 ( 통계 ) 분석 라이브러리• GeoServer OGC WPS 지원 공간분석 서비스 서버 패키지• uDig 기반의 공간분석 툴박스 데스크톱 플러그인
Java + JTS + JAI + Apache + …
Eclipse RCPSpring Framework + Wicket UI
① GeoToolsSpatial Analysis
Libraries
② GeoServer WPS Extension
③ uDig DesktopProcessing Toolbox Plugin
uDig Desktop
www.mangosystem.com
• GeoTools(OSGeo), GeoServer(OSGeo), uDig(LocationTech)• GeoTools 를 이용하는 모든 프로젝트 적용 가능
기반 오픈소스 GIS
LibrariesServer GIS
Desktop GIS
GeoTools
OpenMap
GeoServer JTS Topology Suite(Geometry Engine)
JUMP and …
uDig
deegree
gvSIG GeoAPI OGC Stan-dards
GEOS: C
NTS: .NET
JSTS: JS
World Wind
shapely: Python
www.mangosystem.com
• 현재 100 여개 이상 공간분석 알고리즘 탑재• GitHub
• Member(17), Commit(350), Fork(23)• https://github.com/mapplus/spatial_statistics_for_geotools_udig
• Transifex Localization• 언어지원 (3), 번역자 (7), 문자열 (1,428)• https://www.transifex.com/mangosystem/ss-rd/dashboard
• SourceForge 배포• https://sourceforge.net/projects/mango-spatialstatistics
• uDig 2.0.0-SNAPSHOT Plugin Repository 운영• http://www.mangosystem.com:8080/s2toolbox_updates
• 소스코드 공개 , 지역화 , 배포 사이트 현황R&D: 오픈소스기반 공간분석 및 시각화 기술 개발
www.mangosystem.com
구현 기능
StorageStyler
Transformation
I18n Resources
Vector Operation Raster Operation
Spatial Statistics Operation
ProcessFactory & Process
Process Parameter IO
Repository
I18n Resources
Graph & Utilities
Widget & Dialog
Procesing Toolbox
④
Scripting & Modeler
www.mangosystem.com
R&D: 오픈소스기반 공간분석 및 시각화 기술 개발
구분 대분류 중분류 현황 비고
GeoTools
Descriptive StatisticsDescriptive 5
공간통계 분석기법 및 시각화Distributions 6Density 1
Spatial Pattern AnalysisPoint Pattern Analysis 4Global Spatial Auto-correlation 9Local Spatial Auto-correlation 9
Spatial Clustering AMOEBA 1Spatial Modeling Spatial Multivariate 1Spatial Interpolation Deterministic 2Graphic Visualization Graph & Visualization 7
Vector GeoProcessing
Spatial Weight Matrix 1Spatial Unit Creation 9
벡터 분석 및 처리Calculation 7Aggregation 8Conversion 3Proximity 5Overlay 6Extract 6Generalization 5Feature Tools 21
Raster GeoProcessing
Conversion 5
래스터 분석 및 처리 (2017 년 중점 )
Density 1Descriptive 2Distance 1Classification 2Extraction 5Zonal Statistics 1Overlay & Math 3
Feature Transformation 28 + @ 실시간 분석 및 처리GeoServer Proces Parameter IO Custom XML 10 + @
OGC WPS 지원Format 3 + @
uDigWidget Parameters 20 + @
데스크톱 기반 위젯 및 그래프 지원Internal Dialog 5
Tools Custom Tools 4Graph Tools 5
www.mangosystem.com
사례 1: 국토환경성평가지도 서비스- 환경부 -
- 일러두기 -• 본 자료는 모두 Creative Commons License CC-BY-NC 을 따릅니다 .
www.mangosystem.com
아키텍처
User Application ServerApache Tomcat
HTTPGET/POST Request
Response
HTTPGET/POST Request
JSON, XML
UI ClientWeb Browser
• Internet Explorer 8+
• Chrome 27+
• Firefox 19+
Web Service Client
• REST or SOAP
User Interface
UI
MAP
Service Framework SpringMVC
Database Access MyBatis
Database Server PostgreSQL / PostGIS
GIS Server
OBJECT, XML
Service Type
WMS - Map, Legend
WFS - Vector, Spatial Query
WPS - Analysis Processing
DataS-toreJDBC
HTTPGET/POST Request
ImageXMLGML
GeoJSONKML
Object-Rela-tional Map-ping (ORM)
JDBC
: 적용기술
: 세부 적용기술
: 서비스 영역
: 데이터 및 처리방향OBJECT
BASEMAP – V-World
• Raster File + PostGIS + GeoServer + OpenLayers 2
www.mangosystem.com
환경부 국토환경성평가지도 서비스
• 국토환경성평가지도의 관심지역 분석에 래스터 분석 기법 활용• http://ecvam.kei.re.kr
www.mangosystem.com
사례 2: 통합적 역학조사 분석시스템- 농림축산검역본부 R&D -
- 일러두기 -• 본 자료는 모두 Creative Commons License CC-BY-NC 을 따릅니다 .
www.mangosystem.com
통합적 역학조사 분석시스템 (2015.8 ~ 2017.8)• 농림축산검역본부 R&D 중 1 과제• 구제역 발생현황 및 축산시설 방문차량을 이용한 역학조사 분석 활용
www.mangosystem.com
통합적 역학조사 분석시스템 (2015.8 ~ 2017.8)• 차량방문정보 ( 약 1 억건 ), 축산농가 및 시설 ( 약 40 만건 ), • 구제역발생현황 2014 년 (183 건 ) 테이블로 구성
차량방문정보차량번호방문일자농가번호방문목적……
축산농가정보위치 (Point)농가번호사육두수….
FMD 발생현황위치 (Point)농가번호발생일…
월별 차량 방문정보view
시도 , 시군구 , 읍면동 행정경계
www.mangosystem.com
아키텍터
User Application ServerApache Tomcat
HTTPGET/POST Request
Response
HTTPGET/POST Request
JSON, XML
UI ClientWeb Browser
• Internet Explorer 8+
• Chrome 27+
• Firefox 19+
Web Service Client
• REST or SOAP
User Interface
UI
MAP
Service Framework SpringMVC
Database Access MyBatis
Database Server PostgreSQL / PostGIS
GIS Server
OBJECT, XML
Service Type
WMS - Map, Legend
WFS - Vector, Spatial Query
WPS - Analysis Processing
DataS-toreJDBC
HTTPGET/POST Request
ImageXMLGML
GeoJSONKML
Object-Rela-tional Map-ping (ORM)
JDBC
: 적용기술
: 세부 적용기술
: 서비스 영역
: 데이터 및 처리방향OBJECT
BASEMAP – V-World
• PostGIS + GeoServer + Spring Framework + OpenLayers 3
www.mangosystem.com
Demo: 통합적 역학조사 분석시스템
• FMD 발생자료를 이용한 Pin Map: 발생현황• HeatMap/Kernel Density: WMS Rendering Transformation
www.mangosystem.com
Demo: 통합적 역학조사 분석시스템
• FMD 발생자료를 이용한 시도 / 시군구 / 읍면동별 단계구분도• 실시간 Point in Polygon Overlay 분석 후 지도화
www.mangosystem.com
Demo: 통합적 역학조사 분석시스템
• FMD 발생자료를 이용한 Point Cluster Map• WMS Rendering Transformation
www.mangosystem.com
Demo: 통합적 역학조사 분석시스템
• FMD 발생자료를 이용한 Spatial Clump Map (5km)• k-Nearest Neighbor Map(1 ~ n 차 )
www.mangosystem.com
Demo: 통합적 역학조사 분석시스템
• FMD 발생자료를 이용한 Wind Rose Map: 확산 Pattern 분석
www.mangosystem.com
Demo: 통합적 역학조사 분석시스템
• FMD 발생자료를 이용한 시계열 애니메이션
www.mangosystem.com
Demo: 통합적 역학조사 분석시스템
• FMD 발생자료와 차량방문정보를 이용한 사회연결망그래프• 특정발생농가에서 최근 21 일 내에 방문한 모든 차량과 차량이 방문한 모든 농가 확인
www.mangosystem.com
사례 3: Web Processing Service 데모- 오픈소스기반 공간분석기법 개발 R&D -
- 일러두기 -• 본 자료는 모두 Creative Commons License CC-BY-NC 을 따릅니다 .
www.mangosystem.com
아키텍처
User Application ServerApache Tomcat
HTTPGET/POST Request
Response
HTTPGET/POST Request
JSON, XML
UI ClientWeb Browser
• Internet Explorer 8+
• Chrome 27+
• Firefox 19+
Web Service Client
• REST or SOAP
User Interface
UI
MAP
Database Server PostgreSQL / PostGIS
GIS Server
Service Type
WMS - Map, Legend
WFS - Vector, Spatial Query
WPS - Analysis Processing
DataS-toreJDBC
HTTPGET/POST Request
ImageXMLGML
GeoJSONKML
: 적용기술
: 세부 적용기술
: 서비스 영역
: 데이터 및 처리방향
OBJECT
BASEMAP – V-World
• PostGIS + GeoServer + OpenLayers3
www.mangosystem.com
HeatMap – WMS Rendering Transformation
• 2014.12 ~ 2015 년 4 월 FMD 발생자료
www.mangosystem.com
Point Cluster Map – WMS Rendering Transforma-tion• 2014.12 ~ 2015 년 4 월 FMD 발생자료
www.mangosystem.com
Binning – WMS Rendering Transformation
• Hexagonal, Circular, Rectangular Binning
www.mangosystem.com
O-D Flow Map – WMS Rendering Transformation
• 2014.12 ~ 2015 년 4 월 FMD 발생자료
www.mangosystem.com
시계열 데이터를 이용한 Ring Map• 서울시 구별 2000~2005 년 인구자연증가율
www.mangosystem.com
Wind Rose Map• 서울시청을 기준으로 아파트 분포 패턴
www.mangosystem.com
Spatial Clump Map – WMS Rendering Transfor-mation• 2014.12 ~ 2015 년 4 월 FMD 발생자료
www.mangosystem.com
Thiessen Polygons + Hub Lines• 서울시 구청과 가장 가까운 아파트와의 관계
www.mangosystem.com
Summarize Nearby• 학교와 반경 300 미터 이내의 주유소
www.mangosystem.com
Standard Deviational Ellipse• 서울시 아파트의 구별 Standard Deviational Ellipse
www.mangosystem.com
Process Chaining• Hexagon – Point Aggregation – Local Moran’s I
www.mangosystem.com
Raster Surface Profile• DEM 을 이용한 두 지점간의 Profile 및 그래프 확인
www.mangosystem.com
Radial Line of Sight• 남산에서 반경 5km 이내의 LOS
www.mangosystem.com
Raster Conditional Evaluation -> Raster To Polygon
• 서울시 표고 250m 이하의 지역을 추출 후 폴리곤으로 변환
www.mangosystem.com
Find the highest and lowest points• 현재 영역에서의 최고 / 최저값 지역을 포인트로 추출
www.mangosystem.com
Military Analysis - Helicopter Landing Zone• 경사 , 토양 , 식생 , 장애물 등
www.mangosystem.com
Military Analysis - Helicopter Landing Zone• 사례연구
Reference: JONG-KOOK PARK, 2014, Geospatial Analysis Research for Helicopter Rescue Optimal Planning System, Soongsil University https://gis.e-education.psu.edu/sites/default/files/capstone/Miller_Geog596A_20120926.pptx
www.mangosystem.com
Military Analysis - Helicopter Landing Zone• Ex> HLZ Analysis Workflow – Process Chaining
DataVariablesServiceProcess
SlopeLandCoverSoilType
WCSWFSWFS
RasterConditional
RasterToVector
AOI
IntersectIntersect Dissolve
Output
Minimum Area
SelectCalculate AreaTo Singlepart
1
2
3
4 5 6 7 8
Obstructions
Buffer
WFS
Difference
www.mangosystem.com
Military Analysis - Helicopter Landing Zone• 8 개의 Process 를 연결하여 하나의 분석 Flow 생성
www.mangosystem.com
WPS Builder• Web 에서 WPS Process 를 Modeler 처럼 사용
www.mangosystem.com
uDig Desktop Toolbox• uDig Desktop 플러그인
www.mangosystem.com
데모 프로그램 설치- 오픈소스기반 공간분석기법 개발 R&D -
- 일러두기 -• 본 자료는 모두 Creative Commons License CC-BY-NC 을 따릅니다 .
www.mangosystem.com
설치 과정
• Tomcat 기반Oracle JRE 7 or OpenJDK 7
• GeoServer & Version• Java 8 - GeoServer 2.9.x and above• Java 7 - GeoServer 2.6.x to 2.8.x• Java 6 - GeoServer 2.3.x to 2.5.x• Java 5 - GeoServer 2.2.x and earlier
Apache Tomcat 7 ~ 8
GeoServer 2.8.x Web Archive
GeoServer WPS Extension
OpenGDA Analysis
Service Configuration
PostgreSQL + PostGIS(2.x)
www.mangosystem.com
아키텍처
User Application ServerApache Tomcat
HTTPGET/POST Request
Response
HTTPGET/POST Request
JSON, XML
UI ClientWeb Browser
• Internet Explorer 8+
• Chrome 27+
• Firefox 19+
Web Service Client
• REST or SOAP
User Interface
UI
MAP
Database Server PostgreSQL / PostGIS
GIS Server
Service Type
WMS - Map, Legend
WFS - Vector, Spatial Query
WPS - Analysis Processing
DataS-toreJDBC
HTTPGET/POST Request
ImageXMLGML
GeoJSONKML
: 적용기술
: 세부 적용기술
: 서비스 영역
: 데이터 및 처리방향
OBJECT
BASEMAP – V-World
• PostGIS + GeoServer + OpenLayers3
www.mangosystem.com
GeoServer WPS Extension 확인
• Service Capabilities
www.mangosystem.com
WPS Request Builder• WPS Request XML 생성 및 실행
www.mangosystem.com
WPS Security• Process 활성화 , Input Parameter 의 최대 크기 등 설정
www.mangosystem.com
Advanced Web Processing Service
- Reference
- 일러두기 -• 본 자료는 모두 Creative Commons License CC-BY-NC 을 따릅니다 .
www.mangosystem.com
WPS Operation: GetCapabilities• 서버에서 제공하는 Process 목록 및 기타 기능 지원에 대한 메타데이터 제공
http://127.0.0.1:8080/geoserver/ows?service=wps&version=1.0.0&request=GetCapabilities
http://127.0.0.1:8080/geoserver/ows? service=wps& version=1.0.0& request=GetCapabilities
www.mangosystem.com
WPS Operation: DescribeProcess• 각각의 프로세스에 대한 Input/Output 파라미터 메타데이터 제공
http://127.0.0.1:8080/geoserver/ows?service=wps&version=1.0.0&request=DescribeProcess&Identifier=statistics:BufferFeatures
http://127.0.0.1:8080/geoserver/ows? service=wps& version=1.0.0& request=DescribeProcess& Identifier=statistics:BufferFeatures
www.mangosystem.com
WPS Operation: Execute• 프로세스 실행 , 일반적으로 HTTP POST
http://127.0.0.1:8080/geoserver/ows?service=wps&version=1.0.0&request=DescribeProcess&Identifier=statistics:BufferFeatures
1. http://127.0.0.1:8080/geoserver/ows? service=wps& version=1.0.0& request=Execute
2. Request XML
www.mangosystem.com
WPS Parameter Type• Literal, BoundingBox, Complex 로 구분
WPS Parameter
Data Inputs Process Outputs
ComplexData ComplexOutput
LiteralData
BoundingBoxData
LiteralOutput
BoundingBoxOutput
www.mangosystem.com
WPS Parameter Type• Literal, BoundingBox, Complex 로 구분
1. Literal
2. BoundingBox
3. Complex Custom XML
GridCoverage
XML
BinaryFeature GML
Zip-binary
Native Type: byte, short, int, long, float, double, String….
Extent
SLD
Filter Encoding
CDataGeoJSON
WKT …
www.mangosystem.com
WPS Parameter Type• Mime Type 구분 , 확장 가능
Category Data source Format Mime type
Geometry &
Feature Collection
Custom Features
WFSShapefile
Cad Dataset
GML2.1GML3.1GML3.2
GeoJSONKML2.1KML2.2GeoRSS2.0 SimpleGeoRSS2.0 GMLZip-shapefileWktWkb
text/xml; subtype=gml/2.1.2text/xml; subtype=gml/3.1.1text/xml; subtype=gml/3.2.1
application/jsontext/xml; subtype=kml/2.1 (vnd.google-earth.kml+xml)text/xml; subtype=kml/2.2text/xml; subtype=rss_simple/2.0 (rss+xml)text/xml; subtype=rss_gml/2.0application/zipapplication/wkt(geometry)application/wkb(geometry)
GridCoverage WCS GeoTiff image/tiff, image/geotiff
SLD User XML text/xml; subtype=sld/1.0.0text/xml; subtype=sld/1.1.0
Filter User XML text/xml; subtype=filter/1.1XML User XML text/xml
Literal User - -
www.mangosystem.com
WPS Request XML<?xml version="1.0" encoding="utf-8"?><wps:Execute version="1.0.0" service="WPS" ……………………………………..> <ows:Identifier>statistics:KernelDensity</ows:Identifier> <wps:DataInputs> <wps:Input> <ows:Identifier>inputFeatures</ows:Identifier> <wps:Reference mimeType="text/xml; subtype=gml/3.1.1" xlink:href="http://wps_server/wfs" method="POST"> <wps:Body> <wfs:GetFeature service="WFS" version="1.1.0" outputFormat="text/xml; subtype=gml/3.1.1"> <wfs:Query typeName=“cite:stations" srsName="EPSG:5181"> <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:PropertyName>sgg_cd</ogc:PropertyName> <ogc:Literal>27110</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> </wfs:Query> </wfs:GetFeature> </wps:Body> </wps:Reference> </wps:Input> <wps:Input> <ows:Identifier>searchRadius</ows:Identifier> <wps:Data> <wps:LiteralData>2500</wps:LiteralData> </wps:Data> </wps:Input> ………………………….. </wps:DataInputs> <wps:ResponseForm> <wps:ResponseDocument storeExecuteResponse="false"> <wps:Output mimeType="image/tiff" asReference="true"> <ows:Identifier>result</ows:Identifier> </wps:Output> </wps:ResponseDocument> </wps:ResponseForm></wps:Execute>
<wps:ResponseForm> <wps:RawDataOutput mimeType=“application/json"> <ows:Identifier>result</ows:Identifier> </wps:RawDataOutput> </wps:ResponseForm>
<wps:ResponseForm> <wps:RawDataOutput mimeType="text/xml; subtype=kml/2.2"> <ows:Identifier>result</ows:Identifier> </wps:RawDataOutput> </wps:ResponseForm>
<wps:ResponseForm> <wps:RawDataOutput mimeType="text/xml; subtype=gml/3.2.1"> <ows:Identifier>result</ows:Identifier> </wps:RawDataOutput> </wps:ResponseForm>
Custom Type
www.mangosystem.com
WPS Request XML• Process Identifier
<?xml version="1.0" encoding="utf-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"> <ows:Identifier>geo:centroid</ows:Identifier> <wps:DataInputs> <wps:Input> <ows:Identifier>geom</ows:Identifier> <wps:Data> <wps:ComplexData mimeType="text/xml; subtype=gml/3.1.1"> <gml:LineString srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"> <gml:posList>-290.0 60.0 -240.0 150.0 20.0 130.0 100.0 90.0 180.0 60.0 260.0 -70.0</gml:posList> </gml:LineString> </wps:ComplexData> </wps:Data> </wps:Input> </wps:DataInputs> <wps:ResponseForm> <wps:RawDataOutput mimeType="text/xml; subtype=gml/3.1.1"> <ows:Identifier>result</ows:Identifier> </wps:RawDataOutput> </wps:ResponseForm></wps:Execute>
www.mangosystem.com
WPS Request XML• Parameter as Reference POST<?xml version="1.0" encoding="utf-8"?><wps:Execute version="1.0.0" service="WPS" .. xmlns:wfs="http://www.opengis.net/wfs" > <ows:Identifier>statistics:BufferFeatures</ows:Identifier> <wps:DataInputs> <wps:Input> <ows:Identifier>inputFeatures</ows:Identifier> <wps:Reference mimeType="text/xml; subtype=gml/3.1.1" xlink:href="http://geoserver/wfs" method="POST"> <wps:Body> <wfs:GetFeature service="WFS" version="1.1.0" outputFormat="text/xml; subtype=gml/3.1.1"> <wfs:Query typeName=“cite:subway" srsName="EPSG:5181" /> </wfs:GetFeature> </wps:Body> </wps:Reference> </wps:Input> <wps:Input> <ows:Identifier>distance</ows:Identifier> <wps:Data> <wps:LiteralData>100</wps:LiteralData> </wps:Data> </wps:Input> </wps:DataInputs> <wps:ResponseForm> <wps:RawDataOutput mimeType="text/xml; subtype=gml/3.1.1"> <ows:Identifier>result</ows:Identifier> </wps:RawDataOutput> </wps:ResponseForm></wps:Execute>
ex) wfs, wcs, gml, filter, sld … complex type
www.mangosystem.com
WPS Request XML• Parameter as Reference GET<?xml version="1.0" encoding="utf-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"> <ows:Identifier>statistics:BufferFeatures</ows:Identifier> <wps:DataInputs> <wps:Input> <ows:Identifier>inputFeatures</ows:Identifier> <wps:Reference mimeType="text/xml; subtype=gml/3.1.1" xlink:href="http://server/temp/api_data/areaFeatures.xml" method="GET" /> </wps:Input> <wps:Input> <ows:Identifier>distance</ows:Identifier> <wps:Data> <wps:LiteralData>100</wps:LiteralData> </wps:Data> </wps:Input> </wps:DataInputs> <wps:ResponseForm> <wps:RawDataOutput mimeType="text/xml; subtype=gml/3.1.1"> <ows:Identifier>result</ows:Identifier> </wps:RawDataOutput> </wps:ResponseForm></wps:Execute>
ex) wps process result(asReference=true), external resource(dxf…)..
www.mangosystem.com
WPS Request XML• Parameter as CDATA<?xml version="1.0" encoding="utf-8"?><wps:Execute version="1.0.0" service="WPS" ...> <ows:Identifier>ras:contour</ows:Identifier> <wps:DataInputs> <wps:Input> <ows:Identifier>data</ows:Identifier> <wps:Reference mimeType="image/tiff" xlink:href="http://geoserver/wcs" method="POST"> <wps:Body><![CDATA[<?xml version="1.0" encoding="UTF-8"?><GetCoverage version="1.1.1" service="WCS" xmlns="http://www.opengis.net/wcs/1.1.1" ...> <ows:Identifier>cite:dem</ows:Identifier> <DomainSubset> <ows:BoundingBox crs="urn:ogc:def:crs:EPSG::2096"> <ows:LowerCorner>249126.90643187007 366434.5230430386</ows:LowerCorner> <ows:UpperCorner>260621.90643187007 377144.5230430386</ows:UpperCorner> </ows:BoundingBox> </DomainSubset> <Output store="true" format="image/geotiff"> <GridCRS> <GridBaseCRS>urn:ogc:def:crs:EPSG::2096</GridBaseCRS> <GridType>urn:ogc:def:method:WCS:1.1:2dSimpleGrid</GridType> <GridOffsets>5.0 -5.0</GridOffsets> <GridCS>urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS</GridCS> </GridCRS> </Output></GetCoverage>]]></wps:Body> </wps:Reference> </wps:Input>
www.mangosystem.com
WPS Request XML• WFS 효율적으로 사용하기• SELECT * FROM sgg;• Select gid, geom, pop_den FROM sgg WHERE geom && ST_MakeEnvelope(14147434, 4509613, 14148345, 4524017, 3857);
<wps:Input> <ows:Identifier>inputFeatures</ows:Identifier> <wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wfs" method="POST"> <wps:Body> <wfs:GetFeature service="WFS" version="1.1.0" outputFormat="GML3" xmlns:foss="http://www.opengeospatial.net/foss"> <wfs:Query typeName="foss:sgg"> <wfs:PropertyName>gid</wfs:PropertyName> <wfs:PropertyName>geom</wfs:PropertyName> <wfs:PropertyName>pop_den</wfs:PropertyName> <ogc:Filter> <ogc:BBOX> <ogc:PropertyName>geom</ogc:PropertyName> <gml:Envelope srsName="http://www.opengis.net/gml/srs/epsg.xml#3857"> <gml:lowerCorner>14147434 4509613</gml:lowerCorner> <gml:upperCorner>14148345 4524017</gml:upperCorner> </gml:Envelope> </ogc:BBOX> </ogc:Filter> </wfs:Query> </wfs:GetFeature> </wps:Body> </wps:Reference></wps:Input>
www.mangosystem.com
WPS Request XML• WCS 효율적으로 사용하기
• Subset(BoundingBox), Resample(GridOffsets), Reproject(GridBaseCRS)
<?xml version="1.0" encoding="UTF-8"?><GetCoverage version="1.1.1" service="WCS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wcs/1.1.1" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/wcs/1.1.1 http://schemas.opengis.net/wcs/1.1.1/wcsAll.xsd"> <ows:Identifier>foss:seoul_dem30</ows:Identifier> <DomainSubset> <ows:BoundingBox crs="urn:ogc:def:crs:EPSG::5181"> <ows:LowerCorner>179171.39881047895 436569.3290600816</ows:LowerCorner> <ows:UpperCorner>216221.0981287582 466869.08315843146</ows:UpperCorner> </ows:BoundingBox> </DomainSubset> <Output store=“false" format="image/tiff"> <GridCRS> <GridBaseCRS>urn:ogc:def:crs:EPSG::3857</GridBaseCRS> <GridType>urn:ogc:def:method:WCS:1.1:2dSimpleGrid</GridType> <GridOffsets>50.0 -50.0</GridOffsets> <GridCS>urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS</GridCS> </GridCRS> </Output></GetCoverage>
www.mangosystem.com
WPS Output: RessponseForm• RawDataOutput 과 ResponseDocument 로 구분
1. RawDataOutput
2. ResponseDocument
Document + Result URL
Status & ID
asReference
storeExecuteResponse
Document + RawData
GML, GeoJSON, GridCovearge… as raw data
www.mangosystem.com
WPS Output: RessponseForm• RawDataOutput
<?xml version="1.0" encoding="utf-8"?><wps:Execute version="1.0.0" service="WPS" …………………… </wps:DataInputs> <wps:ResponseForm> <wps:RawDataOutput mimeType="text/xml"> <ows:Identifier>result</ows:Identifier> </wps:RawDataOutput> </wps:ResponseForm></wps:Execute>
<?xml version="1.0" encoding="utf-8"?><NearestNeighborIndex> <TypeName>apartment</TypeName> <Observed_Point_Count>4052</Observed_Point_Count> <Study_Area>1.047557075141607E9</Study_Area> <Observed_Mean_Distance>200.00446</Observed_Mean_Distance> <Expected_Mean_Distance>254.22844</Expected_Mean_Distance> <Nearest_Neighbor_Ratio>0.786712</Nearest_Neighbor_Ratio> <Z_Score>-25.973484</Z_Score> <P_Value>0.0</P_Value> <Standard_Error>2.087667</Standard_Error></NearestNeighborIndex>
Literal, BoundingBox, Complex(Custom XML 등 ) 등 요청 후 클라이언트에서 직접 사용하는 경우
www.mangosystem.com
WPS Output: RessponseForm• RawDataOutput
<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"> <ows:Identifier>statistics:FeatureToPoint</ows:Identifier> <wps:DataInputs> <wps:Input> <ows:Identifier>inputFeatures</ows:Identifier> <wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wfs" method="POST"> <wps:Body> <wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2" xmlns:foss="http://www.opengeospatial.net/foss"> <wfs:Query typeName="foss:randomsgg"/> </wfs:GetFeature> </wps:Body> </wps:Reference> </wps:Input> </wps:DataInputs> <wps:ResponseForm> <wps:RawDataOutput mimeType="application/json"> <ows:Identifier>result</ows:Identifier> </wps:RawDataOutput> </wps:ResponseForm></wps:Execute>
www.mangosystem.com
WPS Output: RessponseForm• ResponseDocument
<wps:Execute version="1.0.0" service="WPS" ............ </wps:DataInputs> <wps:ResponseForm> <wps:ResponseDocument storeExecuteResponse="false"> <wps:Output mimeType="image/tiff" asReference="true"> <ows:Identifier>result</ows:Identifier> </wps:Output> </wps:ResponseDocument> </wps:ResponseForm></wps:Execute>
<wps:ExecuteResponse service="WPS" version="1.0.0" ……….> ……… <wps:ProcessOutputs> <wps:Output> <ows:Identifier>result</ows:Identifier> <wps:Reference href="http://server/temp/gridcoverage/result_230_2123fds.tif" mimeType="image/tiff" /> </wps:Output> </wps:ProcessOutputs></wps:ExecuteResponse>
asReference=true 한번 요청 후 클라이언트에서 재사용 Tiff 와 같이 클라이언트에서 처리하기
어려운 포맷인 경우 서버에서 처리 대용량의 데이터인 경우
www.mangosystem.com
WPS Output: RessponseForm• ResponseDocument<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"> <ows:Identifier>statistics:WindRoseMap</ows:Identifier> <wps:DataInputs> <wps:Input> <ows:Identifier>inputFeatures</ows:Identifier> <wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wfs" method="POST"> <wps:Body> <wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2" xmlns:foss="http://www.opengeospatial.net/foss"> <wfs:Query typeName="foss:apartment"/> </wfs:GetFeature> </wps:Body> </wps:Reference> </wps:Input> </wps:DataInputs> <wps:ResponseForm> <wps:ResponseDocument storeExecuteResponse="false"> <wps:Output asReference="true" mimeType="application/json"> <ows:Identifier>anchor</ows:Identifier> </wps:Output> <wps:Output asReference="true" mimeType="application/json"> <ows:Identifier>windRose</ows:Identifier> </wps:Output> </wps:ResponseDocument> </wps:ResponseForm></wps:Execute>
Output 이 여러 개인 경우
www.mangosystem.com
WPS Output: RessponseForm• ResponseDocument: 현재 처리 상태를 알고 싶을때<wps:Execute version="1.0.0" service="WPS" ............ </wps:DataInputs> <wps:ResponseForm> <wps:ResponseDocument storeExecuteResponse=“true"> <wps:Output mimeType="image/tiff" asReference="true"> <ows:Identifier>result</ows:Identifier> </wps:Output> </wps:ResponseDocument> </wps:ResponseForm></wps:Execute>
<?xml version="1.0" encoding="utf-8"?><wps:ExecuteResponse xml:lang="en" service="WPS" serviceInstance="http://localhost:8090/geoserver/ows?" statusLocation="http://localhost:8090/geoserver/ows?service=WPS&version=1.0.0&request=GetExecutionStatus&executionId=142e4b6c-44e1-4aba-b8a2-6da8f0793198" version="1.0.0" ……..> <wps:Process wps:processVersion="1.0.0"> <ows:Identifier>statistics:KernelDensity</ows:Identifier> ……….. </wps:Process> <wps:Status creationTime="2016-01-08T05:41:45.198Z"> <wps:ProcessAccepted>Process accepted.</wps:ProcessAccepted> </wps:Status></wps:ExecuteResponse>http://server/ows?service=WPS&version=1.0.0&request=GetExecutionResult&executionId=142e4b6c-44e1-4aba-b8a2-6da8f0793198&outputId=result.tiff&mimetype=image%2Ftiff
storeExecuteResponse=true
www.mangosystem.com
Q & A감사합니다 .