7

I need to get WMS URL of my shapefiles published via Geoserver 2.11.1. What I did so far is to create a workspace called "MyTest" and upload some shapefiles. In the list of layers I can see shapefiles. Then I selected "MyTest" workspace and published it as WMS. I got no error messages, but when I go to "http://localhost:8080/geoserver/MyTest/wms" I see the message:

HTTP ERROR 404 Problem accessing /geoserver/MyTest/wms. Reason: Not Found.

I don't know at which moment I made a mistake...

My final goal is to plug the map into Kibana, but to do this I need WMS URL.

6

2 Answers 2

12

After logging into your geoserver web portal, just check the Layer Preview option.

enter image description here

This lists all layers configured in geoserver. You can search for your shapefile in this list. This will have a dropdown option at the last as shown below:

enter image description here

Your complete WMS url consists of a number of parameters as mentioned below:

  • SERVICE: Its value is WMS.
  • VERSION: It can be 1.0.0, 1.1.0 or 1.3.0.
  • REQUEST: GetMap, GetCapabilities or GetFeatureInfo.
  • LAYERS: It is decided by the client which layers to display.
  • TRANSPARENT: True or False. Whether we want to make the blank space left by the image to be transparent or opaque (Optional).
  • STYLES: It defines the style in the displayed layers. This can be blank if displaying only raster images (Optional).
  • FORMAT: This can be image/png, image/jpg or image/gif. Generally image/png is used.
  • SRS: It represents the Spatial Reference system of the viewer. Generally its value is EPSG:4326.
  • CRS: It represents the Coordinate Reference System. This is mandatory in version 1.3.0. Generally its value is CRS:84.
  • BBOX: It represents the boundary box of the requested image. Its format is xmin,ymin,xmax,ymax.
  • WIDTH: It is the width of the requested image in pixels. Generally, it value is 256.
  • HEIGHT: It is the height of the requested image in pixels. Generally, it value is 256.
  • DPI: It represents dots per inch. Its value is client-dependent. Generally its value is 96 (Optional).
  • BGCOLOR: It represents the color to be used as the background (non-data) pixels of the map represented in hexadecimal prefixed by 0x (Optional).

You can click on JPEG from this dropdown and see the url (for JPEG format). It will look something like

http://localhost:8080/geoserver/MyTest/wms?service=WMS&version=1.1.0&request=GetMap&layers=storename:layername&styles=&bbox=-180.0,-90.0,180.0,90.0&width=256&height=256&srs=EPSG:4326&format=image%2Fjpeg

You need to change the store name, layer name and bbox option above.

1
  • It does not need to be a full GetMap query, the one in the question should return an answer which is an exception report because of missing parameters (ows:ExceptionReport).
    – user30184
    Jul 25, 2017 at 15:16
3

This is the standard wms URL on geoserver 2: http://localhost:8080/geoserver/wms

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.