From a4bf38967e92fb80985adac69eb494bd30e70fc4 Mon Sep 17 00:00:00 2001 From: gitee-bot Date: Fri, 13 Mar 2026 06:31:14 +0000 Subject: [PATCH] Update README.md --- README.md | 121 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 87 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 5cc3768..30a8ee9 100644 --- a/README.md +++ b/README.md @@ -1,78 +1,84 @@ + + # firms-java ## 💡 TIPS -如果你是中文用户,请从 [README-ZH.md](README-ZH.md) 获取帮助。 +If you are a Chinese user, please get help from [README-ZH.md](README-ZH.md). ## ❓ What is firms-java? -A Java client for satellite data from NASA's Fire Information for Resource Management System (FIRMS), designed to easily construct requests for satellite data from NASA FIRMS. It can be integrated into Java projects and SpringBoot projects. + +A Java client for satellite data from NASA's Fire Information for Resource Management System (FIRMS), designed to easily construct requests for satellite data from NASA FIRMS. It can be integrated into Java projects and Spring Boot projects. ## ❓ What is FIRMS? + The Fire Information for Resource Management System (FIRMS) distributes near real-time (NRT) active fire data from the Moderate Resolution Imaging Spectroradiometer (MODIS) aboard the Aqua and Terra satellites, as well as the Visible Infrared Imaging Radiometer Suite (VIIRS) aboard S-NPP, NOAA 20, and NOAA 21 (officially named JPSS-1 and JPSS-2). Official Website: [https://firms.modaps.eosdis.nasa.gov](https://firms.modaps.eosdis.nasa.gov/) ## 📦 Structure -1. satellite-core: The core package, containing the basic SatelliteClient and core methods. -2. satellite-spring: Adds auto-configuration with Spring dependencies, providing support for Spring and SpringBoot. -3. satellite-application: A demonstration of SpringBoot integration services. +| Module | Description | +|--------|-------------| +| **satellite-core** | The core package containing the basic SatelliteClient interface and core methods for API requests, data models, and utilities. | +| **satellite-spring** | Adds auto-configuration with Spring dependencies, providing seamless support for Spring and Spring Boot integration. | +| **satellite-application** | A demonstration Spring Boot application showing how to integrate and use the satellite client. | + +### Supported Satellites + +- **MODIS** (Terra and Aqua) +- **VIIRS** (S-NPP, NOAA 20, NOAA 21) ## 🔑 Obtaining the API Key -To access FIRMS satellite data, you need to obtain a MapKey from the official website. You can get it through the following two methods: +To access FIRMS satellite data, you need to obtain a MapKey from the official website. ### Method 1 -You can obtain the key by entering your email address in the dialog box on the official [API Key Acquisition](https://firms.modaps.eosdis.nasa.gov/api/map_key/) page. -![img.png](doc/2c37f5ed-e161-47dd-bf97-545251b01cde.png) + +Obtain the key by entering your email address in the dialog box on the official [API Key Acquisition](https://firms.modaps.eosdis.nasa.gov/api/map_key/) page. + +![API Key Acquisition](doc/2c37f5ed-e161-47dd-bf97-545251b01cde.png) ### Method 2 -If you are running a web project integrated with the Spring package via SpringBoot: + +If you are running a web project integrated with the Spring package via Spring Boot: + 1. After importing the dependencies and starting the project, access `http://127.0.0.1:[actual running port]/satellite.html` 2. Enter your email address and click "Send Email" to obtain the MapKey. - ![img.png](doc/67480640-2172-4854-aa93-7bb728c47faa.png) + +![Get MapKey](doc/67480640-2172-4854-aa93-7bb728c47faa.png) ## ⚙️ Spring Configuration File ```yaml nasa: # Obtained API key - map-key: 35ece758e7525ad595b401b65fa1c83b - # Latitude and longitude range + map-key: your_map_key_here + # Latitude and longitude range (minLon,minLat,maxLon,maxLat) area: 116.2,34.5,122,38 -```` +``` + ## ⭐ Examples +### Using with Spring Boot + ```java package com.nodcat.satellite; +import io.github.nodcat.interfaces.SatelliteClient; +import io.github.nodcat.models.SatelliteScanData; import io.github.nodcat.enums.Satellite; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; -/** - * @author nodcat - * @version 1.0 - * @since 24 Feb 2026 08:19 AM - */ @Service public class CustomSatelliteServiceImpl implements CustomSatelliteService { - - // When the configuration file is used, autowiring can be applied + // Autowire the satellite client when using configuration file @Autowired SatelliteClient satelliteClient; - - // Or - - // Customize client initialization -// static final SatelliteClient satelliteClient = new SatelliteClientImpl( -// new SatelliteClientProperties( -// "35ece758e7525ad595b401b65fa1c83b", // mapKey -// "116.2,34.5,122,38" // Area range (longitude/latitude) -// )); @Override public List getSatelliteData() { @@ -84,20 +90,49 @@ public class CustomSatelliteServiceImpl implements CustomSatelliteService { } } ``` -# ⬇️ Install -## Maven +### Using Without Spring -### Core +```java +// Customize client initialization +SatelliteClient satelliteClient = new SatelliteClientImpl( + new SatelliteClientProperties( + "your_map_key", // mapKey + "116.2,34.5,122,38" // Area range (longitude/latitude) + )); + +List data = satelliteClient.getSatelliteScanData( + Satellite.VIIRS_SNPP_NRT, + "5", + "2026-01-22"); ``` + +### Available Operations + +| Method | Description | +|--------|-------------| +| `getSatelliteScanData()` | Retrieve satellite scan data for specified satellite, date range, and area | +| `getSatelliteAvailability()` | Get available dates and data for a specific satellite | +| `getFireFootprints()` | Download fire footprints data in CSV format | +| `sendSatelliteMapKey()` | Send a request to obtain a MapKey via email | + +## ⬇️ Install + +### Maven + +#### Core Module + +```xml io.github.nodcat satellite-core 1.0.1 ``` -### Spring -``` + +#### Spring Module + +```xml io.github.nodcat satellite-spring @@ -105,8 +140,26 @@ public class CustomSatelliteServiceImpl implements CustomSatelliteService { ``` +## 🛠️ Building from Source + +```bash +# Clone the repository +git clone https://gitee.com/nodcat/firms-java.git +cd firms-java + +# Build all modules +mvn clean install + +# Build specific module +mvn clean install -pl satellite-core +``` + ## 🤝 Contributions and Feedback If you have any suggestions or find any bugs, please submit an Issue or Pull Request! If you found this project helpful, please give it a ⭐ Star! + +## 📄 License + +This project is licensed under the MIT License. \ No newline at end of file -- Gitee