簡介:本文的記錄學習GeoServer遇到的問題,如果已有答案將會附上。
1.GeoServer介紹?,功能?
GeoServer 是 OpenGIS Web 服務器規范的 J2EE 實現,利用 GeoServer 可以方便的發布地圖數據,允許用戶對特征數據進行更新、刪除、插入操作,通過 GeoServer 可以比較容易的在用戶之間迅速共享空間地理信息。
具有一下特征:
兼容WMS和WFS特性
支持PostGIS、Shapefile、ArcSDE、Oracle、VPF、MySQL、MapInfo
支持上百種投影
能夠將網絡地圖輸出為JPEG、GIF、PNG、SVG、KML等格式
能夠運行在任何基於J2EE/Servlet容器之上
2.GeoServer如何部署?
參考下面博客部署,GeoServer的war部署方式類似普通java開發的web服務,但是要注意jdk版本問題。
https://www.cnblogs.com/kkyyhh96/p/6379515.html
3.GeoServer數據源介紹?
- s矢量數據源
Directory of spatial files (shapefiles) - Takes a directory of shapefiles and exposes it as a data store,文件夾下所有shp文件
GeoPackage - GeoPackage數據庫文件SQLite,文件的擴展名為“.gpkg”
PostGIS - PostGIS Database
PostGIS (JNDI) - PostGIS Database (JNDI)
Properties - Allows access to Java Property files containing Feature information
Shapefile - ESRI(tm) Shapefiles (*.shp),單個shp文件
Web Feature Server (NG) - Provides access to the Features published a Web Feature Service, and the ability to perform transactions on the server (when supported / allowed). - 柵格數據源
ArcGrid - ARC/INFO ASCII GRID Coverage Format
GeoPackage (mosaic) - GeoPackage mosaic plugin
GeoTIFF - Tagged Image File Format with Geographic information,單個tif文件
ImageMosaic - Image mosaicking plugin,可以選擇擁有多個tif文件的文件夾,會生成一個shp文件
WorldImage - A raster file accompanied by a spatial data file - 其他數據源
WMS - 懸掛一個遠程網站地圖服務
WMTS - Cascades a remote Web Map Tile Service
4.three.js介紹?
three.js是一個3D JavaScript 庫,Three.js 封裝了底層的圖形接口,使得程序員能夠在無需掌握繁冗的圖形學知識的情況下,也能用簡單的代碼實現三維場景的渲染。
5.cesium介紹?
Cesium是國外一個基於JavaScript編寫的使用WebGL的地圖引擎。Cesium支持3D,2D,2.5D形式的地圖展示,可以自行繪制圖形,高亮區域,並提供良好的觸摸支持,且支持絕大多數的瀏覽器和mobile。
6.mapbox介紹?
7.矢量瓦片與柵格瓦片概念?
珊格瓦片是預先在Server端繪制好固定的PNG和JPG圖片集合。
矢量瓦片是將矢量數據通過不同的描述文件來組織和定義,在客戶端實時解析數據和完成繪制。
8.openlayers介紹?
OpenLayers 是一個專為Web GIS 客戶端開發提供的JavaScript 類庫包,用於實現標准格式發布的地圖數據訪問。2D。
9.使用openlayers調用geoserver的wms服務
參考:https://www.cnblogs.com/kkyyhh96/p/6379515.html
文章中附有github的鏈接,運行實例。
工作區設置
再次在Layer Preview查看圖層組的url及其參數
注意url與圖層name
10.WMS服務
柵格
11.WFS服務
矢量
12.WCS服務
?
13.WMFS服務
柵格瓦片
14.如何使用PostgreSQL數據源
15.如何使用Oracle數據源
geoserver安裝oracle數據源插件
https://www.jianshu.com/p/08afbdc63848
查看oracle是否支持空間數據庫
oracle11g默認支持空間數據庫,參考下面博客,用sql測試一下
https://blog.csdn.net/wyp_666/article/details/72775714
將shp文件導入oracle數據庫中
https://www.cnblogs.com/naaoveGIS/p/4199006.html
16.如何使用SQLite數據源
17.shp2sdo使用?
參考15
18.cesium與geoserver有什么關系?
geoserver提供服務,cesium調用服務。
19.cesium調用geoserver服務存在跨域問題解決方法?
說明:使用tomcat自行構建參考下面博客,直接安裝使用的是jetty解決跨域發送不同。
https://www.jianshu.com/p/2585d75acdd5
20.使用oracle數據源出現的問題?
未設置空間索引出現以下問題:ora-13226:在沒有空間索引的情況下不支持此界面
按照https://blog.csdn.net/wyp_666/article/details/72775714寫的內容設置oracle會報錯:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13249: internal error in Spatial index: [mdidxrbd]
ORA-13249: Error in Spatial index: index build failed
ORA-13249: Error in spatial index: [mdrcrtxfergm]
ORA-13249: Error in spatial index: [mdpridxtxfergm]
ORA-13200: internal error [ROWID:AAAVwJAAEAAAAJjAAA] in spatial indexing.
ORA-13206: internal error [] while creating the spatial index
ORA-13375: the layer is of type [2003] while geometry inserted has type [2002]
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
意思是圖層類型不一致,需要將POLYGON換成LINE如下圖:
參考:https://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_index_query.htm#SPATL584
21.如何發布影像地圖