Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Compiled class file
*.class
target

# Log file
*.log
Expand Down
File renamed without changes.
96 changes: 94 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,94 @@
# sen2vm-snap-plugin
Sen2VM SNAP plugin that calls the sen2vm-core standalone jar
# Sen2VM-snap-plugin

Sen2VM SNAP plugin that calls the Sen2VM-Core standalone jar. For more details about the Sen2VM-Core, please refer to the following: https://github.com/sen2vm/sen2vm-core.

### *Prerequisites*

* build sen2vm-core
* create zip archive with the following structure
```
sen2vm.zip
src/main/resources/orekit-data/
sen2vm-core/
sen2vm-core/sen2vm-core-0.0.1-SNAPSHOT.jar
sen2vm-core/configuration_example.json
sen2vm-core/params.json
```

### Build from sources

* Build with maven and Java >11:

``mvn clean install``

### SNAP installation

The bundle installation is not provided for now. You can distribute the archive with Python http.server to serve the zip file on the default SNAP URL:


`` python3 -m http.server 8000 ``

Otherwise, you can choose local installation in the SNAP menu bundle installation.



* Install plugin from snap menu: **Tools → Plugins**

![img](doc/images/plugin_menu.png)





Continue by **Downloaded → Add Plugins** and search for the nbm file in:

sen2vm-snap-plugin/target/sen2vm-snap-plugin-1.0-SNAPSHOT.nbm



![img](doc/images/install_plugin.png)





![image-20250321112719642](doc/images/install_plugin_menu.png)

At the end of the plugin installation, choose to restart SNAP to apply the changes.



At this stage, only the plugin is installed. You need to install the installation bundle -> sen2vm.zip. At the first execution of the plugin, the installation bundle is proposed to the user. Otherwise, it is possible to install the bundle after the restart in the menu **Tools > Manage External Tools**

![img](doc/images/manager_ext_tools_menu.png)



Then, double click on **Sen2VM**

![image-20250321113130636](doc/images/manager_ext_tools_view.png)

Continue to **Bundled Binaries** and proceed to **Download and Install Now**. Then, click OK and exit from the **Manage External Tools**.

![image-20250318171300788](doc/images/install_bundle_menu.png)

![image-20250321113720087](doc/images/manager_ext_tools_view_green.png)

### How to use it

The sen2vm-snap-plugin is located in **Optical>Geometric>Sen2VM**

Console output can be enabled via Display execution output.

There are two ways to set the parameters.

* Specify the path to configuration files: Configuration file and Parameters File. These parameters override all others.
> [!IMPORTANT]
> **Do not set them if you want to use the others.**
* Set the parameters and choose the detectors and bands to process



![image-20250321114953248](doc/images/process.png)

More details are available at: https://github.com/sen2vm/sen2vm-core
Binary file added doc/images/install_bundle_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/install_plugin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/install_plugin_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/manager_ext_tools_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/manager_ext_tools_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/manager_ext_tools_view2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/manager_ext_tools_view_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/plugin_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/process.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added keystore/optical.ks
Binary file not shown.
192 changes: 122 additions & 70 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,75 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.esa</groupId>
<artifactId>sen2vm</artifactId>
<version>1.0-SNAPSHOT</version>
<description>Sentinel-2 Viewing Model tool goal is to compute and add geolocation information to L1B product images</description>
<name>sen2vm</name>
<url>https://github.com/sen2vm/sen2vm-snap-plugin</url>
<packaging>nbm</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<snap.version>11.0.0</snap.version>
<snap-help-system.version>1.0.0</snap-help-system.version>
<javahelp.version>2.0.05</javahelp.version>
</properties>
<repositories>
<repository>
<id>snap-repo-public</id>
<name>Public Maven Repository for SNAP</name>
<url>https://nexus.snap-ci.ovh/repository/snap-maven-public/</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>eu.esa.snap.netbeans</groupId>
<artifactId>snap-help-system</artifactId>
<version>${snap-help-system.version}</version>
</dependency>
<dependency>
<groupId>org.esa.snap</groupId>
<artifactId>snap-sta</artifactId>
<version>${snap.version}</version>
</dependency>
<dependency>
<groupId>org.esa.snap</groupId>
<artifactId>snap-sta-ui</artifactId>
<version>${snap.version}</version>
</dependency>
<dependency>
<groupId>org.esa.snap</groupId>
<artifactId>snap-rcp</artifactId>
<version>${snap.version}</version>
</dependency>
</dependencies>

<groupId>esa.sen2vm</groupId>
<artifactId>sen2vm-snap-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.0</version>
</plugin>
</plugins>
</pluginManagement>

<name>sen2vm-snap-plugin</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<plugins>
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>14.0</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>javax.help</groupId>
<artifactId>javahelp</artifactId>
<version>${javahelp.version}</version>
</dependency>
</dependencies>
<configuration>
<licenseName>GPL 3</licenseName>
<licenseFile>LICENSE.txt</licenseFile>
<keystore>keystore/optical.ks</keystore>
<keystorealias>snap</keystorealias>
<keystorepassword>snap-123</keystorepassword>
<requiresRestart>true</requiresRestart>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>11</source>
<target>11</target>
<debug>true</debug>
<encoding>UTF-8</encoding>
<excludes>
<exclude>.gitignore</exclude>
</excludes>
<includes>
<include>**/**</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
</project>
Loading