15

Below is an example of an SLD rule that places a label at the center of a feature's geometry. This uses the ogc:Function called "centroid" to place the label. You can read more about SLD functions in the GeoServer docs, and some examples are given here. <sld:Rule> <MaxScaleDenominator>5000</MaxScaleDenominator> <sld:...


12

The table gt_pk_metadata is an optional table that GeoTools (and GeoServer) use to work out what the primary key columns in a view are. It is needed to generate consistent feature IDs (FIDS) otherwise GeoTools will use the feature's java ID which will change from run to run. It is explained in this document. So you can ignore this error if you don't care ...


8

You need to specify a min/max scale denominator in your SLD files. Use the same figure in each style, that is the max in one is the min in the other, so that only one layer is drawn at any scale. Then combine the layers in a layer group and away you go. See http://docs.geoserver.org/stable/en/user/styling/sld/reference/rules.html#scale-selection for more ...


8

WMS-C is the best supported and most mature, but it's a bit of a kludge overlayed on top of WMS to support tiles and it incurs some extra overhead from having to use world coordinate bounding boxes rather than tile coordinates. TMS is fairly mature, and is specifically designed for tiles, but is not an official OGC spec. WMTS is an OGC spec that is meant ...


7

I had similar problem, adding pixelRatio: 1, to ol.Map section solved the problem. http://jsfiddle.net/jLmyo3gL/2/


6

You didn't include properties in the right place. Then again, you also didn't include working code, so perhaps this isn't your actual code, but the four args to WMS are: name URL Properties (sent to server) Options (used on the client) So your code should look something like this: var demolayer = new OpenLayers.Layer.WMS( "Eg", "http://localhost:8080/...


6

The GWC integrated with GeoServer automatically drops the tiles involved when doing a WFS-T transaction in GeoServer. If you are changing data directly in PostGIS you can look at publishing data change events using a GeoRSS feed: http://geowebcache.org/docs/current/configuration/layers/georss.html


6

What you have found is something in the OpenLayers sand box, which is an environment where OpenLayers contributors can add their own custom layers, controls, etc. Sometimes things created in the sand box work their way through to the core distribution. However, it is simple to take what has been created and add it to your OpenLayers build. First, you need ...


6

You can set up GeoWebCache to request WMS layers from any WMS server. This may be easiest with a standalone install of GWC but should be possible in the integrated version too. You need to edit the configuration file, see the manual for more detail. Alternatively you can use the GeoServer WMS datastores to cascade requests to the MapServer instance and the ...


5

There was a mention of a TileCache patch for this on the OSGeo mailing lists: http://www.osgeo.org/pipermail//tilecache/2009-June/001863.html Unfortunately the links to the patches no longer work. Apparently the patch involved a few changes to the code base, and would allow different caches to be used based on any URL argument. I have an old script (in ...


5

Tomcat and Geoserver need write permissions. You need to give tomcat7 ownership of /opt/gwc


5

The error message means that you are using a WMS-C tile service which does not support the pixel ratio of the mobile device you were trying. To fix this, just remove the serverType config option of your ol.source.TileWMS.


4

Support for translucency in PNG8 has been added in 2.2.x: http://geo-solutions.blogspot.it/2012/05/developers-corner-geoserver-stunning.html


4

Finally I am able to fetch LegendGraphic. from this post. All I had to do is loop through all my layers, and then set the legendURL. var layers; for(var i = 1; i < map.layers.length; i++) { layers = mapPanel.layers.getAt(i); layers.set("legendURL","http://my-ip-address/geoserver/wms?TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&...


4

The correct url for the legend graphic for each layer and style is embedded in the GetCapabilities response as the LegendURL element. To get it: fetch the capabilities xml document parse it (OpenLayers has a parser class) retrieve the LegendURL for each layer you're interested in Alternatively you can build a GetLegendGraphic request by following the ...


4

If you want to cache tiles in projections other than the two defaults (4326, 900913) then you need to define a custom gridset with the new projection so that tiles in that projection are created. The process is a little bit involved but is explained at http://geowebcache.org/docs/current/configuration/layers/projections.html


4

The idea behind GeoWebCache is that if a tile is available in the cache it will grab it and send it back to the client, it won't even bother making the round trip to your database. So it won't make a call to the SQL Server database unless the tile is not there. The trip to the SQL database is exactly what you are trying to cut out by using GeoWebCache, if it ...


4

A partial answer here. Have you seen the following resources? http://geowebcache.org/docs/current/introduction/whichgwc.html If you have one geoserver then use the integrated geowebcache otherwise use the standalone GWC to connect to multiple geoservers. http://opengeo.org/publications/geoserver-production/ OpenGeo certainly recommend using the latest ...


4

By default the tiles are in data_dir/gwc, if not maybe try fo find file geowebcache.xml - it should be placed in folder with tiles


4

I found the answer to the issue, although there is no available solution. It is a known bug where GeoWebCache stops forcefully. It looks like there is no current solution for bug # GEOS-6278: https://jira.codehaus.org/browse/GEOS-6278 If a solution is available in the future for GeoWebCache, I will update this post.


4

Another option is to create a plugin like so - L.GridLayer.GridDebug = L.GridLayer.extend({ createTile: function (coords) { const tile = document.createElement('div'); tile.style.outline = '1px solid green'; tile.style.fontWeight = 'bold'; tile.style.fontSize = '14pt'; tile.innerHTML = [coords.z, coords.x, coords.y].join('/'); ...


4

A quick google of Unsupported major.minor version 51.0 leads to How to fix: Unsupported major.minor version 51.0 error?. Basically you need Java 7 for recent versions of GeoWebCache (and GeoServer and other GeoTools based tools), you will need Java 8 for future releases.


4

You are probably mixing up a tutorial for the OpenGeo Suite with an official GeoServer (the suite contains a modified one, different style, extra non default plugins, don't know if there are other changes). It seems you are trying to get vector tiles going, in the official GeoServer that's an unsupported module that you can download from the nightly builds: ...


4

Use the standalone GeoWebCache then you have full control over when it's cleared. That said, unless you are pre-caching then it's probably not a good idea delaying the cache delete as any areas that weren't cached previously will render the tiles from the new data. End result, you'll have tiles from the old data and new data side by side.


4

The WMS image is rendered based on the BBOX (extent) for the entire image request. The labeling rules apply to the extent of the WMS image request. The GWC images are each rendered for either each individual tile, or for each metatile, depending on your configuration. Either way, the extent is different to that for which the WMS image is rendered. For ...


4

The web interface of GWC seems to use name "task" where it probably should be "thread". Task means a job that aims at seeding the area of the given bounding box and it can use one or more threads. Anyway, the documentation in http://geowebcache.org/docs/current/webinterface/seed.html and http://geowebcache.org/docs/current/webinterface/seed.html is ...


4

I know these GeoServer errors look incomprehensible, and that is very long, but here's the salient part: ServiceException: This request used more time than allowed and has been forcefully stopped. Max rendering time is 60.0s This means that rendering one of your tiles is taking more than 60 s, which is a really long time. Can you preview the layer? (Do ...


4

I notice that you are using leaflet v 0.7x. This is rather old and leaflet 1.x is recommended. The -y option is only available in leaflet 1.x. In the older version you need to use the option tms: true (see here): var county = L.tileLayer('http://localhost:9090/geoserver/gwc/service/tms/1.0.0/sf%3Aroads@EPSG%3A4326@png/{z}/{x}/{-y}.png', { tms: true })...


3

If I understood correct your problem is that it is impossible to determine the combination of layers with each request as users can select any of the 140 layers and the client is sending one request for all layers combined (ie not a request for each layer). In that case you could try fronting your WMS servers with a caching service like MapProxy or Mapcache ...


3

(B2) When you will try to request getCapabilities for the WMTS layer and layer name has same name in geowebcache.xml you will get the response which contains capabilities of two layers with the same name but different . If you are getting layers on client via OpenScales you'll notice that HashMap of my:Layer will be broken. Different names in geowebcache....


Only top voted, non community-wiki answers of a minimum length are eligible