Hot answers tagged

11

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> ...


7

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/latest/en/user/styling/sld-reference/rules.html for more details on the ...


7

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 ...


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", ...


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

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 ...


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


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); ...


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

Not me but Adrian Walker has 'Using Ordnance Survey OpenData Street View Rasters With GeoServer' http://www.adrianwalker.org/2010/08/using-ordnance-survey-open-data-street.html Some good tips there (especially if on linux platform) Some python code is available at the bottom. Or are you looking for Vector examples? ...


4

Do you have the correct tile-origin set for your OpenLayers.Map as in GeoWebCache. Check how the TileOrigin is set in the GeoWebCache-demo of the layer and make sure you have the same TileOrigin on your OpenLayers.Map Constructor.


4

Update See responses to Radek's post in the GWC forum for actual cause and solution. I now understand why TileCache opted for displaying errors such as "Current x value -1311047.936977 is too far from tile corner x -1493907.560000" rather than passing back the "closest" tiles within an arbitary error range. Is your original data in EPSG 3857? If not ...


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

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

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

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.


3

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


3

Misalignment such as this is almost always a projection issue. Is the data stored in EPSG:3857? Check that the GeoWebCache layer is configured to output in EPSG:3857.


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

One option is create trigger into postgis table which uses "NOTIFY channel_name message" when something happens. Then create software which connects to postgresql and executes "LISTEN channel_name" and when something happens on channel it executes command which re-creates tiles. You can forward needed coordinates with in message


3

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 ...


3

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


3

Just set up GWC on a machine and point it to the loadbalancer that controls access to your GeoServers. Then each tile request will be sent to the next available GeoServer in exactly the same way as your users are currently. You should probably read this series of posts before going much further.


3

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


3

The same max render time is applied to any WMS request. When doing meta-tiling the internal GeoWebCache makes a single WMS request, which is subject to the max render time. So, if you want to render larger meta-tiles, you will have to increase the max render time accordingly.


2

http://docs.geoserver.org/stable/en/user/geowebcache/setup.html GeoWebCache does not work when multiple GeoServer instances are configured to use the same data directory. The H2 database crashes during initialization when the second instance is started. Two possible workarounds: Delete gwc*.jar in WEB-INF/lib and restart GeoServer. This disables ...


2

Have you tried clearing the cache?


2

Make sure you name the layer in geowebcache.xml with a different name to the one in GeoServer. Hand edit the file /workspaces////layer.xml and set the following metadata property: EPSG:4326,EPSG:900913,EPSG:27700


2

GWC doesn't do reprojection, so you need to download GeoServer 2.1 and set up your remote WMS as a cascading WMS, GeoServer will then reproject your remote WMS from 4326 to what ever projection you need. Then use the built in GWC to serve out tiles from the cascaded layer. This blog post ...



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