Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying GeoServer Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
GeoServer Cookbook

GeoServer Cookbook

By : Iacovella
4.8 (6)
close
close
GeoServer Cookbook

GeoServer Cookbook

4.8 (6)
By: Iacovella

Overview of this book

This book is ideal for GIS experts, developers, and system administrators who have had a first glance at GeoServer and who are eager to explore all its features in order to configure professional map servers. Basic knowledge of GIS and GeoServer is required.
Table of Contents (11 chapters)
close
close
10
Index

Managing layers with REST


In the previous recipe, you loaded a shapefile with REST. A data store and a layer were created and your data is now published on WMS. If you go to the layer preview page and select the ne_110m_coastline layer layer, you should see a map like this:

A style is applied to the data and all mandatory layer parameters were compiled by GeoServer when you issued the data store creation request.

While this is enough to get data properly configured on your server, in a real-world case your automation workflow should provide more control over data publication. The GeoServer REST interface gives you control over the layer item. In this recipe, you will see how to create a new layer and edit an existing one.

How to do it…

  1. Let's retrieve information from the ne_110m_coastline layer:

    $ curl -u admin:geoserver -XGET -H 'Accept: text/xml' http://localhost:8080/geoserver/rest/layers/ne_110m_coastline -o ne_110m_coastline.xml
    
  2. Now let's perform the same operation using Python:

    >&gt...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY