ericariyanto/laravel-geonode-client
最新稳定版本:0.0.7
Composer 安装命令:
composer require ericariyanto/laravel-geonode-client
包简介
Modern Laravel client for GeoNode API v2+ (datasets, layers, styles, metadata).
README 文档
README
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.
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-02