ericariyanto/laravel-geonode-client

Modern Laravel client for GeoNode API v2+ (datasets, layers, styles, metadata).

Installs: 27

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/ericariyanto/laravel-geonode-client

0.0.7 2025-12-11 05:45 UTC

This package is auto-updated.

Last update: 2026-01-11 05:56:24 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This Library provides a clean, modern Laravel package for interacting with GeoNode API v2+

Support us

[](https://spatie.be/github-ad-click/Laravel GeoNode Client)

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install the package via composer:

composer require ericariyanto/laravel-geonode-client

You can publish the config file with:

php artisan vendor:publish --tag="laravel-geonode-client-config"

This is the contents of the published config file:

return [
];

Usage

$laravelGeoNodeClient = new EricAriyanto\LaravelGeoNodeClient();
echo $laravelGeoNodeClient->echoPhrase('Hello, EricAriyanto!');
use EricAriyanto\LaravelGeoNodeClient\Facades\LaravelGeoNodeClient;

// List datasets
$datasets = LaravelGeoNodeClient::datasets()->list(['page_size' => 50]);

// Upload shapefile zip
$res = LaravelGeoNodeClient::datasets()->uploadFile(storage_path('tmp/parcel.zip'));

// Update keywords
LaravelGeoNodeClient::metadata()->updateTags(123, ['jalan','batas']);
// Auto-detect & upload
LaravelGeoNodeClient::upload()->upload(storage_path('maps/jalan.zip'), [
    'title' => 'Peta Jalan Kalbar',
    'abstract' => 'Data jalan terbaru',
    'regions' => [1, 5],
    'keywords' => ['jalan','kalbar'],
]);

// Async upload
$task = LaravelGeoNodeClient::upload()->uploadAsync(storage_path('tmp/lahan.geojson'));
$status = LaravelGeoNodeClient::upload()->checkTask($task['task_id']);

Styles Service (SLD)

// List styles
$styles = LaravelGeoNodeClient::styles()->list();

// Get raw SLD
$sld = LaravelGeoNodeClient::styles()->getSld('peta_jalan_style');

// Upload/replace style
LaravelGeoNodeClient::styles()->upload('peta_jalan_style', $sld, true);

// Assign style to layer
LaravelGeoNodeClient::styles()->assignToLayer('layers:jalan_kota', 'peta_jalan_style');

// Sync to GeoServer (if GeoNode supports it)
LaravelGeoNodeClient::styles()->syncToGeoServer('peta_jalan_style');

Advanced Metadata

// Update bbox
LaravelGeoNodeClient::advancedMetadata()->updateBbox(123, [106.6, -6.5, 107.1, -6.0]);

// Update temporal extent
LaravelGeoNodeClient::advancedMetadata()->updateTemporal(123, ['start' => '2020-01-01', 'end' => '2023-12-31']);

// Update license
LaravelGeoNodeClient::advancedMetadata()->updateLicense(123, ['id' => 'cc-by', 'url' => 'https://creativecommons.org/licenses/by/4.0/']);

// Update contact
LaravelGeoNodeClient::advancedMetadata()->updateContact(123, ['name' => 'Dinas Peta', 'email' => 'peta@example.go.id']);

// Update attribution
LaravelGeoNodeClient::advancedMetadata()->updateAttribution(123, ['text' => 'Dinas Peta Kalbar', 'url' => 'https://kalbar.example.gov']);

// Full update
LaravelGeoNodeClient::advancedMetadata()->updateAll(123, [
    'bbox' => [106.6, -6.5, 107.1, -6.0],
    'temporal_extent' => ['start' => '2020-01-01', 'end' => '2023-12-31'],
    'license' => ['id' => 'cc-by'],
    'contact' => ['name' => 'Dinas Peta'],
]);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.