Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

For questions about GeoServer's REST API

1
vote
1answer
25 views

Unable to Upload shapefile using GeoServer REST API using Java

I am trying to upload shapefiles through GeoServer REST API's. I am not able to create new layer with this following snippet of code. However Create Workspace and style method works fine using this ...
2
votes
1answer
17 views

Geoserver - PostGIS : WFS-Transaction update exception error-Parsing failed for Point:

I tried to perform a transaction update, but it failed with this exception message: <owsExceptionReport.xsd"> <ows:Exception exceptionCode="NoApplicableCode"> <ows:...
1
vote
1answer
21 views

Enable tile caching for a layer

I published around 1000 layers in geoserver without enabling tile caching for layer.How to check a cache is enabled for a layer or not and How to enable tile caching (check box) for a layer under ...
1
vote
0answers
16 views

How do I secure a specific workspace in Geoserver REST API?

I want Geoserver rest security setup so that only a specific role can access everything under a specific workspace. This is what my /datadir/security/rest.properties file looks like: /**;GET=ADMIN /*...
0
votes
1answer
26 views

How to get the geometry type of a layer in GeoServer?

I need to programmatically know the geometry type (lines, polygons or points) of a layer in GeoServer. I'm trying to do this using the REST API but can't seem to find a way. Any clues?
0
votes
0answers
5 views

Post GeoJSON feature to Geoserver via REST API [duplicate]

Here is a post with the same question, but asked 3 years ago. I wonder if anything might have changed? I want to use REST to add features to a map. I would send a post with the GeoJSON of the feature,...
0
votes
1answer
46 views

How to properly post style to geoserver

I'm trying to post a new SLD style to geoserver and associate it to an existing layer, but keep getting errors. I'm doing the following: curl -v -u XXXX:xxxxx -X POST "http://localhost/geoserver/rest/...
0
votes
0answers
23 views

Publishing PostGIS Tables via Geoserver REST API returns Schema does not exist until I have to ReSave the workspace from Admin UI

I have used the geoserver REST API to Create Workspace/Namespace ->> the Create datastore (Postgis) and now trying to publish a layer via REST still. I get an error when I try to publish the Postgis ...
3
votes
0answers
57 views

Geoserver+postgis: how to complete creating database via REST API?

I'm using geoserver 2.13.1 with postgres 9.5 and postgis 2.4.2. I am trying to use REST api to create workspace (works) and in it a datastore of postgis type. I have already prepared a template ...
2
votes
1answer
33 views

GeoServer: Creating a datastore with spaces in the path

I am using the GeoServer REST API to create a datastore. The path that I am using has a space in it. This does not seem to work well in GeoServer 2.11.2 since it generates an "Input type is not ...
0
votes
0answers
11 views

How to add point to layer in geoserver(REST)? [duplicate]

How to add point to layer (REST in postman)in geoserver? My workspace is test. My layer is zyx. What should proper request look like?
0
votes
1answer
42 views

GeoServerRestApi:System.Net.WebException: The remote server returned an error: (406) Not Acceptable

I am using the GeoServer REST API(gsrcc) to add the following SLD XML string to GeoServer 2.13.0: <StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis....
0
votes
1answer
37 views

How to add a GeoWebCache gridset to all layers in GeoServer

I have 300+ layers in my GeoServer layer library, I have just created a custom gridset I would like to use for all of my layers. I don't want to go through my whole library adding the gridset manually ...
1
vote
1answer
28 views

Which default formats does GeoServer REST API datasource PUT endpoint accepts?

I'm using the following endpoint to create datasources in Geoserver: PUT /workspaces/{workspaceName}/datastores/{storeName}/{method}.{format} I have been able to create vector datastores from an ...
1
vote
1answer
112 views

Http 500 error when creating workspace using GeoServer REST-API

Trying to create a new wokspace at GeoServer 2.12 via REST-API I'm getting Http 500 error. I tried this advise but it didn't work. Request: :~> curl -v -u admin:geoserver -X POST -H "accept: ...
1
vote
0answers
54 views

Automate publishing of WMS or WFS Layer in GeoServer using OpenLayers 3? [closed]

How to automate publishing of a WMS or WFS Layer in Geoserver given any data source (vector/shape-files/GeoJson...) using OpenLayers 3 script There is a possibility to automate Geoserver operations ...
0
votes
0answers
39 views

Geoserver Load layer Netcdf files by api

everything good. I'm trying to create a script that automatically uploads NetCDF images to my Geoserver 2.12.x. I'm using a rest api, but I can not get the final stage of generating the layer. I ...
0
votes
0answers
55 views

Get QuadTree/RTree from GeoServer

I have a client which connects to the server once in 1 month or so. The client is a very low powered device. It just sends lat and long to the server and expects from the server the nearby information ...
0
votes
1answer
58 views

How to animate a single raster layer with variable substitution SLD Geoserver?

I was trying to animate a single raster layer with a variable substitution in SLD. I've followed the Geoserver documentation http://docs.geoserver.org/stable/en/user/styling/sld/extensions/...
3
votes
1answer
134 views

Difference between outcome of REST query through browser and through cURL

I am working with the geoserver rest interface to automate the config of all layers, stores etc. One thing I noticed was that when using a browser and navigating to a layer the outcome is something ...
1
vote
1answer
53 views

GeoServer REST API: how to create an MBTiles datastore

I want to create an MBTiles datastore using the REST API of GeoServer. I was able to create a datastore for a shapefile using: curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "...
1
vote
0answers
57 views

Geoserver REST not showing coverages

I'm using the Geoserver REST Service and I want to know the coverages a particular workspace has. If authenticated, everything is working as expected, I can access the endpoint: MY_GEOSERVER/...
2
votes
2answers
699 views

405 Method not Allowed on uploading a shapefile via REST API on GeoServer

I'm using PHP cURL to upload a Shapefile to GeoServer. It works fine in a development server. But when I deploy to Stage server and I try the same I get: 405 Method Not Allowed The requested ...
1
vote
1answer
196 views

How to delete a Datastore (and its content) with GeoServer REST API?

I need to delete a Datastore (as well as all its content) using GeoServer's REST API. I'm trying: curl -u usr:pwd -XDELETE http://example.com/geoserver/rest/workspaces/ws/datastores/my_datastore.xml ...
3
votes
2answers
157 views

REST GeoServer services for anonymous users gives me 404 status

I am trying to access to a REST service by an anonymous user on GeoServer 2.9.4. I modified my resp.properties file to allow anonymous role free access to GET: /**;GET=IS_AUTHENTICATED_ANONYMOUSLY ...
2
votes
0answers
236 views

Geoserver REST API - Change styles on the fly

I'm uploading user-defined rasters to geoserver through its REST API, using the Python requests library. I would like to classify and style the rasters based on users' choices, so the styles should ...
3
votes
1answer
57 views

Geoserver gwc rest api - how can I edit config

Is there a way to change geoserver gwc-gs.xml through a rest interface? I want to be able to set cacheLayersByDefault to false.
3
votes
1answer
79 views

Unable to set remote store for geoserver

I can not set remote store for my geoserver. Technically, I have two servers. Geoserver is installed on one server and data (rasters) is stored on another server. Data itself is reachable through url. ...
0
votes
1answer
54 views

Adding marks to GeoServer WMS via API?

I'm building an application that stores locations with other data associated with those points. I'd like to be able to query an API which responds with a map with those points plotted out. (tangent) ...
3
votes
1answer
170 views

Geoserver - How to set up a workspace when creating a new image mosaic using gsconfig?

I want to automate the process of creating workspaces and image mosaics by using gsconfig. First I defined the list of new work spaces to be created. f_workspace = list(set(lst_fold).difference(set(...
2
votes
1answer
57 views

Why Geoserver GWC REST put tiles into strange folders?

I make a GWC layer, and cache it using web interface. It puts the generated tiles in folders like: gwc\temp3_layer_013D0001B7ED\EPSG_900913_11 After I want to reseed this layer using Geoserver REST ...
2
votes
1answer
44 views

Geoserver feature type details duplicate Oracle DB users

I have two users in a Oracle DB user_1 and user_2. This issue occurs when I create a two tables by user_1 its show one table as user_1.table_1 and the second table as user_2.table_2. I'm not sure why ...
3
votes
2answers
529 views

Creating new GeoServer user through rest api?

I've tried posting this xml: <user> <userName>Jim</userName> <password>password</password> <enabled>true</enabled> </user> to these ...
2
votes
0answers
195 views

Geoserver: How to enable REST Authentication filter chain to allow PUT/POST calls

As a followup of this question I am wondering how to enable a certain user to be able to place HTTP PUT/POST calls to /geoserver/rest/styles/ without granting the user admin rights or disabling chain ...
3
votes
1answer
248 views

Geoserver REST: Change/create style via PUT/POST only possible when user is assigned admin role

I am fairly new to Geoserver REST API and security settings, so please excuse me if I am missing the absolute obvious here. I am running Geoserver 2.11.2 running on Tomcat 7 on a Win7 64bit system. I ...
3
votes
1answer
163 views

GeoServer Rest does not load band definitions for Coverage

I am running into the a problem with creating a coverage with GeoServer REST API. Somehow when creating the coverage it does not load the band definitions. I tried several thing but so far nothing ...
1
vote
1answer
72 views

Modify the Geoserver REST response href values to use domain name instead of IP address

Currently, the Geoserver REST API responds with objects that look like such: { "layers": { "layer": [ { "name": "layername1", "href": "http://...
0
votes
2answers
331 views

Unable to publish a GeoTiff file in GeoServer with curl tool

I have a workspace in GeoServer with many shapefiles and postgis tables. Now I'm writing a script that will publish GeoTiff files in that workspace using curl tool. I'm trying to succeed that in two ...
1
vote
0answers
73 views

One single cURL command to delete a GeoServer raster layer (coverage) from a coveragestore via REST

I have published a GeoTIFF image to a GeoServer coveragestore as a layer. In order to delete the layer I had to run the following two cURL commands: curl -v -u admin:geoserver -XDELETE http://...
1
vote
0answers
130 views

Create a Shapefile datastore in GeoServer using REST API [closed]

I am trying to create a datastore for shapefile in GeoServer using REST API but I am unable to create a datastore for shapefile. http://localhost:8080/geoserver/rest/workspaces/cite/datastores <...
1
vote
0answers
154 views

Provided shape has duplicate consecutive coordinates at: (-87.2576, 90.0, NaN) [closed]

I get the following error when I send POST request to GeoServer. This error occurs only with particular layer. Other layers work fine. <?xml version="1.0"?> <ServiceExceptionReport version="...
0
votes
1answer
43 views

Defining refresh interval of map in GeoServer?

Is it possible to define the map refresh interval on the server-side (GeoServer 2.11)? The issue is the following. I send GetMap requests to GeoServer from Kibana (client-side). Once the response is ...
0
votes
1answer
1k views

line 15: cvc-complex-type.2.4.a: Invalid content was found starting with element 'Filter'

I have defined the following SLD rule for my layer. It says that if the property Weekday is greater than or equal to 0 and less than or equal to 3, then the color of a polygon must be #680000. <?...
1
vote
1answer
94 views

Changing Declared SRS

I am using PostGIS with geoserver. I have been able to publish a shapefile.zip as a layer. The problem is, even though there is a .prj in the zip file, the Declared SRS in Geoserver is EPSG:404000 I ...
1
vote
2answers
257 views

Web request to upload shapefile to GeoServer

I have been trying to publish a zipped up shapefile to GeoServer. For background, I am using DotSpatial to create a Line shapefile based on uploaded points. Once I have created the shapefile, I ...
0
votes
1answer
91 views

Is it possible to retrieve the data directory path via the REST API?

I'm writing a client for the GeoServer REST API and I want to create a data store for a directory of shapefiles. Since the REST API does not offer this functionality (only stand-alone shapefiles can ...
1
vote
0answers
100 views

How to detect when GeoServer contents changed (eg, layer added)?

I'm trying to automate the process of reproducing an existing GeoServer instance in an 'infrastructure as code' scenario. Ideally I'd like the ability to re-publish the contents of an existing ...
5
votes
1answer
533 views

Is there a way to import GeoJSON into GeoServer using some extension without using PostGIS?

Is there a way to import GeoJSON into GeoServer using some extension. I do not want to import to PostGIS, or intermediately convert to shapefiles because that looses the styles but may be that is ...
3
votes
1answer
882 views

Creating Workspace, Data Store and Layer via GeoServer REST API?

I'm trying to automate the process of setting up a Workspace, PostGIS Data Store and Layer in GeoServer using the GeoServer REST API. Using the excellent answer in Create a Layer in GeoServer using ...
1
vote
0answers
292 views

Keeping a GeoServer image mosaic layer current as new geoTIFFs are added to the filesystem

I have an ImageMosaic layer with the time dimension enabled in GeoServer 2.8.x using postgres/postgis as the index store. The system is running CentOS 7, and both GeoServer (jetty variant) and the ...