PHPackages                             lowem/geoserver-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. lowem/geoserver-php

ActiveLibrary[API Development](/categories/api)

lowem/geoserver-php
===================

Wrapper for Geoserver API

v1.4.1(4y ago)137MITPHP

Since Aug 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Lowe-Man/geoserver-php)[ Packagist](https://packagist.org/packages/lowem/geoserver-php)[ RSS](/packages/lowem-geoserver-php/feed)WikiDiscussions main Synced 6d ago

READMEChangelogDependencies (2)Versions (16)Used By (0)

### Geoserver PHP

[](#geoserver-php)

![Status](https://camo.githubusercontent.com/f55bd03e6c71b3bcc9d66a3ce1dd9c6382bac70bad08d0e1e05b879921718d62/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d6163746976652d737563636573732e7376673f7374796c653d666c61742d737175617265)[![GitHub issues](https://camo.githubusercontent.com/3eaff4df24e172aea60e71bf6b2ad09b9cf765c49b33a87170793905fef214bc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4c6f77652d4d616e2f67656f7365727665722d7068703f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/3eaff4df24e172aea60e71bf6b2ad09b9cf765c49b33a87170793905fef214bc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4c6f77652d4d616e2f67656f7365727665722d7068703f7374796c653d666c61742d737175617265)[![GitHub pull requests](https://camo.githubusercontent.com/5aa374561e50fe8a3a40facb0e4ba8e0f0ba0fd11fca03e8c75227741fe6ae3e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f4c6f77652d4d616e2f67656f7365727665722d7068703f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/5aa374561e50fe8a3a40facb0e4ba8e0f0ba0fd11fca03e8c75227741fe6ae3e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f4c6f77652d4d616e2f67656f7365727665722d7068703f7374796c653d666c61742d737175617265)[![GitHub](https://camo.githubusercontent.com/4b252d9c75ef4436c5e697e7e7eecf3fc957dc06865c145a86fadb15a00baa47/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4c6f77652d4d616e2f67656f7365727665722d7068703f636f6c6f723d626c7565267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/4b252d9c75ef4436c5e697e7e7eecf3fc957dc06865c145a86fadb15a00baa47/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4c6f77652d4d616e2f67656f7365727665722d7068703f636f6c6f723d626c7565267374796c653d666c61742d737175617265)[![GitHub tag (latest SemVer)](https://camo.githubusercontent.com/dea18c219e09d97df65f4cf61015f9fae56fb9303d5e2d20f43e4093d8852dd5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f4c6f77652d4d616e2f67656f7365727665722d7068703f6c6162656c3d72656c65617365267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/dea18c219e09d97df65f4cf61015f9fae56fb9303d5e2d20f43e4093d8852dd5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f4c6f77652d4d616e2f67656f7365727665722d7068703f6c6162656c3d72656c65617365267374796c653d666c61742d737175617265)

---

 This is a PHP wrapper for Geoserver

📝 Table of Contents
-------------------

[](#-table-of-contents)

- [About](#about)
    - [Changelog](CHANGELOG.md)
- [Getting Started](#getting_started)
- [API Usage](#api_usage)
- [Authors](#authors)

🧐 About
-----------------------------------------

[](#-about-)

---

This project was created to help developers easily interact with the geoserver API.

🏁 Getting Started
-------------------------------------------------------------

[](#-getting-started-)

---

These instructions will get you a copy of Geoserver PHP up and running.

### Prerequisites

[](#prerequisites)

In order to install this package you have to install `composer` which can be done by following the steps based on your system [here](https://getcomposer.org/doc/00-intro.md).

If you have not done so already run `composer init` in the root of your project directory, do so now to start using composer. Just follow the prompts as they appear.

### Installing

[](#installing)

To install Geoserver PHP run the command below while in your project root.

```
composer require lowem/geoserver-php
```

Create a new PHP file and add the code below to the top of the file to automatically load in the package as well as any others you may have installed. The `use` statement prevents you from having to type in the full namespace of the package.

```
require_once "vendor/autoload.php";
use Lowem\GeoserverPHP\Workspaces;
use Lowem\GeoserverPHP\CoverageStores;
```

🎈 API Usage
-------------------------------------------------

[](#-api-usage-)

### Workspace `new Workspaces(baseURL)`

[](#workspace-new-workspacesbaseurl)

- `getAll()` - Returns a JSON object of all the workspaces available along with each one's attributes.
    - **Example:**```
        $workspace = new Workspaces("http://192.168.160.137:8080/geoserver");
        $workspace->setBasicAuth("admin", "geoserver");
        $result = "";
        try {
          $result = $workspace->getAll();
        } catch (HTTPRequestException $e) {
          echo $e->getCustomMessage();
        }
        print_r($result);
        ```
- `create(workspaceName)` - Creates a new workspace.
    - **Example:**```
        $workspace = new Workspaces("http://192.168.160.137:8080/geoserver");
        $workspace->setBasicAuth("admin", "geoserver");
        try {
          $workspace->create("Test1");
        } catch (HTTPRequestException $e) {
        echo $e->getCustomMessage();
        }
        ```
- `get(workspaceName)` - Returns the attributes of a specific workspace.
    - **Example:**```
        $workspace = new Workspaces("http://192.168.160.137:8080/geoserver");
        $workspace->setBasicAuth("admin", "geoserver");
        $result = "";
        try {
          $result = $workspace->get("Test1");
        } catch (HTTPRequestException $e) {
          echo $e->getCustomMessage();
        }
        print_r($result);
        ```
- `update(currentWorkspaceName, newWorkspaceName)` - Rename a specific workspace.
    - **Example:**```
        $workspace = new Workspaces("http://192.168.160.137:8080/geoserver");
        $workspace->setBasicAuth("admin", "geoserver");
        try {
          $workspace->update("Test1", "Test12");
        } catch (HTTPRequestException $e) {
          echo $e->getCustomMessage();
        }
        ```
- `delete(workspaceName, recurse)` - Deletes a specific workspace and has a boolean option (`recurse`) to delete all the stores within.
    - **Example:**```
        $workspace = new Workspaces("http://192.168.160.137:8080");
        $workspace->setBasicAuth("admin", "geoserver");
        try {
          $workspace->delete("Test12", TRUE);
        } catch (HTTPRequestException $e) {
          echo $e->getCustomMessage();
        }
        ```

### CoverageStores `new CoverageStores(baseUrl)`

[](#coveragestores-new-coveragestoresbaseurl)

- `getAll(workspaceName)` - Returns a JSON object of all stores available in a specific workspace.

    - **Example:**```
        $coverageStore = new CoverageStores("http://192.168.160.137:8080/geoserver");
        $coverageStore->setBasicAuth("admin", "geoserver");
        $result = "";
        try {
          $result = $coverageStore->getAll("World_Claim");
        } catch (HTTPRequestException $e) {
          echo $e->getCustomMessage();
        }
        print_r($result);
        ```
- `create(data)` - Create a new coverage store by inputting a key value pair array of attributes

    - **Example:**```
        $coverageStore = new CoverageStores("http://192.168.160.137:8080/geoserver");
        $coverageStore->setBasicAuth("admin", "geoserver");
        try {
          $coverageStore->create([
            "name" => "TestCoverStore2",
            "description" => "This is a test store",
            "workspace" => "Test1",
            "enabled" => "true",
            "type" => "GeoTIFF"
          ]);
        } catch (HTTPRequestException $e) {
          echo $e->getCustomMessage();
        }
        ```
- `get(workspaceName, store)` - Get a coverage store while outputting the result using JSON.

    - **Example:**```
        $coverageStore = new CoverageStores("http://192.168.160.137:8080/geoserver");
        $coverageStore->setBasicAuth("admin", "geoserver");
        $result = "";
        try {
          $result = $coverageStore->get("Test1", "TestCoverStore2");
        } catch (HTTPRequestException $e) {
          echo $e->getCustomMessage();
        }
        print_r($result);
        ```
- `update(workspaceName, store, data)` - Update a coverage store by inputting a key value pair array of attributes.

    **Note:** You only need to supply the fields that you would like to update.

    - **Example:**```
        $coverageStore = new CoverageStores("http://192.168.160.137:8080/geoserver");
        $coverageStore->setBasicAuth("admin", "geoserver");
        try {
          $coverageStore->update("Test1", "TestCoverStore2", [
            "name" => "TestCover"
          ]);
        } catch (HTTPRequestException $e) {
          echo $e->getCustomMessage();
        }
        ```
- `geoTiffUpload(workspaceName, store, absFilePath)` - Add geoTiff file to a store.

    - **Example:**```
        $coverageStore = new CoverageStores("http://192.168.160.137:8080/geoserver");
        $coverageStore->setBasicAuth("admin", "geoserver");
        try {
          $coverageStore->geoTiffUpload("Test1", "test10", "C:\Users\LoweM\Downloads\wc2.1_2.5m_prec_2010-2018\wc2.1_2.5m_prec_2010-03.tif");
        } catch (HTTPRequestException $e) {
          echo $e->getCustomMessage();
        }
        ```

### DataStores `new DataStores(baseUrl)`

[](#datastores-new-datastoresbaseurl)

- `shapeFileUpload($workspaceName, $store, $absFilePath)` - Uploads ShapeFile to a store
    - **Example:**```
        $dataStore = new DataStores($this->baseURL);
        $dataStore->setBasicAuth("admin", "geoserver");
        try {
          $dataStore->shapeFileUpload("acme", "nyc_roads5", "/Users/LoweM/Downloads/nyc_roads.zip");
        } catch (HTTPRequestException $e) {
          echo $e->getCustomMessage();
        }
        ```

✍️ Authors
----------------------------------------------

[](#️-authors-)

- [@Lowe-Man](https://github.com/Lowe-Man) - Idea &amp; Initial work

See also the list of [contributors](https://github.com/Lowe-Man/geoserver-php/contributors) who participated in this project.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

15

Last Release

1660d ago

Major Versions

v0.3.0 → v1.0.02021-08-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/94fcbe1fd36a946be8e4274ddda2bfcae0a19d66e0bbc584cf804b78315e06fb?d=identicon)[Lowe-Man](/maintainers/Lowe-Man)

---

Top Contributors

[![AlexsLaboratory](https://avatars.githubusercontent.com/u/12134329?v=4)](https://github.com/AlexsLaboratory "AlexsLaboratory (45 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lowem-geoserver-php/health.svg)

```
[![Health](https://phpackages.com/badges/lowem-geoserver-php/health.svg)](https://phpackages.com/packages/lowem-geoserver-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
