GeoServer

GeoServer中使用SLD样式

余生颓废 提交于 2020-01-20 04:41:44
1 背景 我们在ArcMap中可以直接通过symbol功能对图层进行定制化配图。但是,如果我们将配好图的shp图层在GeoServer中发布时,会发现图层样式完全丢失了。其实原因很简单,用ArcMap配好的图层,其样式文件并不是保存在shp中,而是保存在mxd或者msd中。 那么如何才能让GeoServer发布的图层也能达到定制化配图的效果呢? 2 SLD简介 SLD是风格化图层描述器(Styled Layer Descriptor)的简称,是2005年OGC提出的一个标准,这个标准在一定条件下允许WMS服务器对地图可视化的表现形式进行扩展。在没有SLD之前,只能使用一些已经在服务器上规定好的样式来对地图进行可视化。而当使用了实现了SLD标准之后,它允许我们从客户端来对地图进行定义自己的样式,分级显示等操作,极大的扩展了地图可视化的灵活性。 该SLD-规范是采用XML定义地图显示样式,通过自定义SLD来配置地图图层渲染的可视化风格,可以设置过滤器,自定义图例等。 rule 是SLD最重要的一个元素,因为她允许根据给定的某个参数(使用过滤器)对数据集进行分类,所有的与分类有关的重要参数都必须在rule元素中设置。 对于使用SLD来进行地图的自定义样式,则必须结合使用 SE (Symbology Encoding)这个标准。SE是OGC的另一个标准,这个也是基于XML模式定义的

PostGIS - convert multipolygon to single polygon

假如想象 提交于 2020-01-11 22:49:01
问题 Is it possible to import a shape file containing multipolygons into single polygon in PostGIS? Whenever I try importing a shape file of a polygon, it is stored as a multipolygon (as opposed to a single polygon) in a geom column. Thus, I am unable to extract it as a single polygon value from the multipolygon. All helpful suggestions much appreciated 回答1: You can use ST_GeometryN together with ST_NumGeometries and the generate_series function to obtain what you need. Let's assume you have the

OpenLayers, Geoserver: TileWMS are displaying wrong

☆樱花仙子☆ 提交于 2020-01-07 04:08:05
问题 I'm trying to display some WMS with tiles, but at every zoom (in or out) the images are displaying wrong, with wrong proportions. This is how I'm creating the tile: var map = this.state.map; var layers = new ol.layer.Tile({ source: new ol.source.TileWMS({ url: 'http://XX.XX.XX:8080/geoserver/cite/wms', params: {'LAYERS': 'cite:clientes_ex', 'TILED': true, 'VERSION': '1.3.0', 'FORMAT': 'image/png8', 'WIDTH': 256, 'HEIGHT': 256, 'CRS': 'EPSG:3857'}, serverType: 'geoserver' }) }) map.addLayer

Geoserver - elasticsearch layer is not created

旧街凉风 提交于 2020-01-07 02:15:13
问题 I am very new to geoserver. Recently we have setup geoserver with elasticgeo plugin. Now I can see Elasticsearch option in Vector data sources while creating a new datastore. Used below Rest API calls to create a workspace & data store. scurl -v -k -u admin:geoserver -XPOST "https://localhost:6443/geoserver/rest/namespaces" -H "Content-type: text/xml" -d "<namespace><prefix>test</prefix><uri>http://test.com</uri></namespace>" scurl -v -k -u admin:geoserver -XPOST "https://localhost:6443

Display multiple WFS layers with popup

心不动则不痛 提交于 2020-01-05 05:36:25
问题 I want to display multiple WFS layers and display popup only for top layer. I wan't to disable all the base layer popup. Or if i wan't to display one features from all the layer (combine all layer features in one popup ).I have done some code but i don't understand how to add popup for one layer or popup for all layer but display only selected feature in one popup.This is my code , document.addEventListener('DOMContentLoaded',function(){ var container = document.getElementById('popup'); var

openlayers3 wfs-t save drawing

流过昼夜 提交于 2020-01-04 08:07:10
问题 I'm workin on an OL3 app, where the user will be able to draw, modify and delete polygons and save the changes to GeoServer via WFS-T. For starting point I've used the solution from here: wfs-t example app I've changed the code a little bit to use a polygon layer from my GeoServer. The draw, modify and delete polygon functions are working great, if I modify or delete a polygon it's also saved, but the new polygon creation is not saved and I can not figure out why. The original app is working

Grib2 to PostGIS raster — anyone get this to work?

↘锁芯ラ 提交于 2020-01-02 07:28:33
问题 I have an application for which I need to import U.S. National Weather Service surface analyses, which are distributed as grib2 files. I want to pull those into PostGIS 2.0 rasters, do some calculations and modeling, and display the data and model results in GeoServer. Since grib2 is a GDAL-supported format, the supplied raster2pgsql utility should be able to slurp a grib2 right into PostGIS-compatible SQL, and once it's there, GeoServer ought to be able to handle it. However, I'm running

Vector tiles buffer

陌路散爱 提交于 2020-01-02 07:25:13
问题 I have issue setting up an Openlayers map with vector tiles served from Geoserver. The lines gets screwed up along the edges of the tiles. It looks like the lines are first clipped and then styled instead of the opposite. This makes wide lines look ugly. Changing the renderBuffer in the OL client doesnt make any difference. I have similar issues with labels and perhaps the solution is pretty much the same in both cases. EDIT: The geojson in QGIS shows that there is a buffer around the tiles:

Using getTileURL in Android Application with GeoServer

我只是一个虾纸丫 提交于 2020-01-01 09:24:59
问题 We are just starting to work with Google Maps on Android and have a GeoServer set up to provide tiles which we would like to add as overlay on the map. So far, I have followed a few tutorials and references to get started. For getting MyLocation Setting up WMS on Android WMS Reference The problem : While the url that I am generating in the getTileUrl function in the TileProviderFactory does indeed return a png image when I set a breakpoint and copy and paste the url into a browser, it does

How do I set the opacity of a WMS requested layer in Android Google Maps API

让人想犯罪 __ 提交于 2019-12-29 10:06:29
问题 Hi I've followed the instructions on this page: http://www.azavea.com/blogs/labs/2013/01/wms-on-android/ to overlay an image using WMS request to Google Maps from Geoserver. It's working already. The problem is I want the layer/image to be a little less visible (more transparent) so that the map can be seen more. Been searching for days but I can't seem to find solutions using Java Android. Please help. Thank you very much! 回答1: The best way to do this is to edit that particular image/layer