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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ env:
# Markdown template of the artifact download extra information
# {0}: Artifact download URL
ARTIFACT_DOWNLOAD_TEMPLATE: |
📦 **Download artifact**: [Generator.jar]({0})
📦 **Download artifact**: [voxatile.jar]({0})
# Markdown template of the build logs extra information
# {0}: Build logs
BUILD_LOGS_TEMPLATE: |
Expand Down Expand Up @@ -86,12 +86,12 @@ jobs:
} >> "$GITHUB_OUTPUT"
echo "date=$(TZ=Europe/Paris date +'%Y-%m-%dT%H:%M:%S (%Z)')" >> "$GITHUB_OUTPUT"
exit $code
- name: Upload Generator.jar as build artifact
- name: Upload voxatile.jar as build artifact
uses: actions/upload-artifact@v4
id: upload-artifact
with:
name: Generator.jar
path: target/Generator.jar
name: voxatile.jar
path: target/voxatile.jar
if-no-files-found: error
- name: Find PR with commit
id: find-pr
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/parameters-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
mvn --batch-mode --no-transfer-progress --update-snapshots -Dmaven.test.skip=true package

- name: Run generator to validate example parameters
- name: Run Voxatile to validate example parameters
run: |
FORMATS=$(./generate.sh -l formats)
PLACES=$(./generate.sh -l places)
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ EOF

# Pick results from builder
WORKDIR /app
COPY --from=builder /root/target/Generator.jar Generator.jar
COPY --from=builder /root/target/voxatile.jar voxatile.jar

# Run as user and group
USER ${USER}:${GROUP}

# Generator as entrypoint
ENTRYPOINT ["java", "-jar", "/app/Generator.jar"]
# Voxatile as entrypoint
ENTRYPOINT ["java", "-jar", "/app/voxatile.jar"]
# Output directory default value
CMD ["/output"]
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@

Voxatile is a geo-voxelizer. It can turn geographical data into voxels (small cubes).

> [!WARNING]
> Before the opening, the project was named "Minalac generator".
> It is being renamed to "Voxatile".
> You may find both names in code and documentation, keep in mind that they both refer to the same thing.
> Old name occurrences will be progressively replaced, starting with the package name.

## Project status

The tool is available in very early alpha version. It is still being actively developed, and many changes will occur in parameters syntax, along with new features being added.
Expand Down
8 changes: 4 additions & 4 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@
<!-- See https://checkstyle.org/config_imports.html -->
<module name="AvoidStarImport">
<property name="excludes" value="org.junit.jupiter.api.Assertions"/>
<property name="excludes" value="com.ignfab.minalac.generator.utils.iterator.IteratorTester"/>
<property name="excludes" value="com.ignfab.minalac.generator.parameters.tasks.ScheduleParamsTester"/>
<property name="excludes" value="com.ignfab.minalac.generator.models.values.ModelValueTester"/>
<property name="excludes" value="fr.ign.voxatile.core.utils.iterator.IteratorTester"/>
<property name="excludes" value="fr.ign.voxatile.core.parameters.tasks.ScheduleParamsTester"/>
<property name="excludes" value="fr.ign.voxatile.core.models.values.ModelValueTester"/>
</module>
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="ImportOrder">
<property name="groups" value="/javax?/,*,com.ignfab.minalac.generator"/>
<property name="groups" value="/javax?/,*,fr.ign.voxatile"/>
<property name="ordered" value="true"/>
<property name="separated" value="true"/>
<property name="separatedStaticGroups" value="true"/>
Expand Down
5 changes: 3 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This folder contains additional documentation on various topics. Technical code
## Quick links

You may find useful the following links:
- [`usage/Run.md`](usage/Run.md): How to run the generator?
- [`usage/Run.md`](usage/Run.md): How to run Voxatile?
- [`tools/Maven.md`](tools/Maven.md): How to use Maven?
- [Online Javadoc](https://ignfab.github.io/voxatile), automatically deployed on GitHub Pages.

Expand All @@ -14,8 +14,9 @@ If none of the above helped you, consider searching through the complete documen
## Overview

- `/`: Important and generic documentation.
- `usage`: How to use Voxatile, without looking at the code.
- `tools`: You can find explanation about the dev tools used.
- `usage`: How to use the generator, without looking at the code.
- `dev`: Developer-oriented documentation to understand the code and create modules.

## Redaction

Expand Down
24 changes: 12 additions & 12 deletions docs/dev/Modules.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Module development

Generator features can be extended with modules. Typical usage of modules is adding new task types (see [Generator.md](../usage/Generator.md#modules)).
Voxatile features can be extended with modules. Typical usage of modules is adding new task types (see [Voxatile.md](../usage/Voxatile.md#modules)).

## Set up development environment

Module project must have a dependency to `Generator.jar`. This file could be copied locally but it's preferable to tell `maven` where to fetch it from.
Module project must have a dependency to `voxatile.jar`. This file could be copied locally, but it's preferable to tell `maven` where to fetch it from.

In `pom.xml`, add following dependency:
```xml
<dependency>
<groupId>com.ignfab</groupId>
<groupId>fr.ign</groupId>
<artifactId>voxatile</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```

Don't forget the `<scope>provided</scope>` to avoid shading the generator classes into the module's JAR file!
Don't forget the `<scope>provided</scope>` to avoid shading Voxatile classes into the module's JAR file!

Add eventual corresponding `repository`.

If you use a `Generator.jar` from a GitHub repository, you should create a personal access token (classic) with `read:package` permission and modify your `~/.m2/settings.xml` according to [GitHub instructions](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-with-a-personal-access-token).
If you use a `voxatile.jar` from a GitHub repository, you should create a personal access token (classic) with `read:package` permission and modify your `~/.m2/settings.xml` according to [GitHub instructions](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-with-a-personal-access-token).

## Minimal module

Expand All @@ -31,9 +31,9 @@ Minimal module consists of two files:
Example of `HelloWorldModule` subclass:

```java
package com.ignfab.minalac.helloworld;
package fr.ign.voxatile.modules.helloworld;

import com.ignfab.minalac.generator.Module;
import fr.ign.voxatile.core.utils.modules.Module;

public class HelloWorldModule extends Module {
public HelloWorldModule() {
Expand All @@ -42,21 +42,21 @@ public class HelloWorldModule extends Module {
}
```

This class **must** have a public no-argument constructor that will be used by the generator to instantiate it!
This class **must** have a public no-argument constructor that will be used by Voxatile to instantiate it!

Example of corresponding `module.properties`:

```properties
class=com.ignfab.minalac.helloworld.HelloWorldModule
class=fr.ign.voxatile.modules.helloworld.HelloWorldModule
```

Now, a module Jar file has to be created from these two files. This is achieved with usual build tools like [Maven](https://maven.apache.org/) or [Gradle](https://gradle.org/). The only specific need is that `Generator.jar` should be added as a compile-only dependency (and not included in final module Jar).
Now, a module Jar file has to be created from these two files. This is achieved with usual build tools like [Maven](https://maven.apache.org/) or [Gradle](https://gradle.org/). The only specific need is that `voxatile.jar` should be added as a compile-only dependency (and not included in final module Jar).

Once Jar created, put it in the appropriate module directory and you are done!

## Go further

`Module` subclass is the module entrypoint. In that class, it is possible to add new capabilities to Generator by making it able to understand new parameters.
`Module` subclass is the module entrypoint. In that class, it is possible to add new capabilities to Voxatile by making it able to understand new parameters.

Override `registerParams` method to add, for example, new tasks:
```java
Expand All @@ -66,6 +66,6 @@ public void registerParams(ParamsParser parser) {
}
```

Of course, `MyOperationTaskParams` class and probably other classes have to be defined in the module project. Classes from the Generator jar may also be used.
Of course, `MyOperationTaskParams` class and probably other classes have to be defined in the module project. Classes from Voxatile jar may also be used.

Refer to [parameters](Parameters.md) documentation for further information.
4 changes: 2 additions & 2 deletions docs/dev/TileTasks.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tile tasks cookbook

Tile tasks are tasks performed on each map tile. They are described by classes extending `TileTask` or `ModelTask` if they process models one by one. All work in generator is done by different tasks.
Tile tasks are tasks performed on each map tile. They are described by classes extending `TileTask` or `ModelTask` if they process models one by one. All work in Voxatile is done by different tasks.

## Deserialization from Yaml/Json

Expand All @@ -21,7 +21,7 @@ Optional `validate()` method can perform some more checks that *Jackson* could n

*Example of parameter class implementation:*
```java
package com.ignfab.minalac.generator.parameters.tasks;
package fr.ign.voxatile.core.parameters.tasks;
...

public class FooTaskParams extends TileTaskParam {
Expand Down
4 changes: 2 additions & 2 deletions docs/legacy/QuickStart.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Overview

<!-- TODO Move interesting content to docs/usage/Examples.md and rewrite a more accurate quick start -->
<!-- TODO Delete this file when adding "How To" guides -->

> [!WARNING]
> This document is not completely up-to-date! It should be reviewed / rewritten and then moved out of the `legacy` folder.
> This document is completely out-of-date! It should be removed and replaced by "How To" guides.

The generator has three main interfaces:
- `VoxelWorld`: Its two main methods are:
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/GitHub-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ It consists of a first job, [building the JAR](Maven.md#create-an-executable-jar

If the project fails to build (compilation failure, missing dependency, packaging issue...), the workflow will fail, but the status will still be reported, with the build logs to help troubleshooting the problem.

Otherwise, the workflow will upload the `Generator.jar` file as an artifact, and include the download URL in the report message. You can [download and run the JAR](../usage/Run.md#download-workflow-artifact) to test it locally.
Otherwise, the workflow will upload the `voxatile.jar` file as an artifact, and include the download URL in the report message. You can [download and run the JAR](../usage/Voxatile.md#download-workflow-artifact) to test it locally.

### checkstyle

Expand Down
2 changes: 1 addition & 1 deletion docs/tools/Maven.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ mvn -Dtest="my.package.MyClassTest#testMyMethod" clean test

### Create an executable JAR

To build the project into a dependency-shaded, executable JAR (to [execute it](../usage/Run.md) locally, for example), you can run the `package` phase. It will compile the source and bundle all the dependencies into a single JAR (`target/Generator.jar`).
To build the project into a dependency-shaded, executable JAR (to [execute it](../usage/Run.md) locally, for example), you can run the `package` phase. It will compile the source and bundle all the dependencies into a single JAR (`target/voxatile.jar`).

Because this phase is after the `test` one, they will be executed as well. If you want to speed up the process, you can explicitly ignore them using `-DskipTests=true`.

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/Run.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Run only (from repository root):

## generate.sh

`generate.sh` scripts creates yaml configuration from configuration fragments and passes it to `Generator.jar`.
`generate.sh` scripts creates yaml configuration from configuration fragments and passes it to `voxatile.jar`.

It mimics a simple behavior of future `voxatile-configurator` and is only intended to be used for testing purpose.

Expand Down
14 changes: 7 additions & 7 deletions docs/usage/Generator.md → docs/usage/Voxatile.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> [!IMPORTANT]
> Don't forget to configure your [proxy](../Proxy.md) if needed!

This page is about different methods for building and running Generator. They are provided for informational purpose. If you just want to run the generator, please refer to [Run.md](Run.md).
This page is about different methods for building and running Voxatile. They are provided for informational purpose. If you just want to run Voxatile, please refer to [Run.md](Run.md).

## Generation parameters

Expand All @@ -16,7 +16,7 @@ To avoid useless efforts building a parameter file, you can use provided `genera
## Command line arguments
Usage:
```
java -jar Generator.jar [OPTIONS] <outputPath>
java -jar voxatile.jar [OPTIONS] <outputPath>
```

Options:
Expand Down Expand Up @@ -49,7 +49,7 @@ Path to modules directory (see [modules](#modules)).

If you have cloned the project repository, you can [build the JAR using Maven](../tools/Maven.md#create-an-executable-jar) and run it:
```shell
mvn -Dmaven.test.skip=true clean package && java -jar target/Generator.jar -p parameters.yaml $HOME/.minetest/worlds/voxatile
mvn -Dmaven.test.skip=true clean package && java -jar target/voxatile.jar -p parameters.yaml $HOME/.minetest/worlds/voxatile
```

## Download workflow artifact
Expand All @@ -59,9 +59,9 @@ mvn -Dmaven.test.skip=true clean package && java -jar target/Generator.jar -p pa

If you just want to test the JAR from a different branch (e.g. to validate a PR), you can just download the [JAR built by the GitHub workflow](../tools/GitHub-workflows.md#build-jar), available as an artifact. You can find the link in the PR discussion or in the commit comments if no PR is open for the desired branch.

Once you downloaded (and extracted) the artifact, you should have the `Generator.jar` file and will be able to run it:
Once you downloaded (and extracted) the artifact, you should have the `voxatile.jar` file and will be able to run it:
```shell
java -jar Generator.jar -p parameters.yaml $HOME/.minetest/worlds/voxatile
java -jar voxatile.jar -p parameters.yaml $HOME/.minetest/worlds/voxatile
```

## Run using Maven
Expand All @@ -70,13 +70,13 @@ If, for some reason, you don't want to build the JAR, you can run the [`exec:jav
```shell
mvn clean compile exec:java \
-Dexec.cleanupDaemonThreads=false \
-Dexec.mainClass="com.ignfab.minalac.generator.Voxatile" \
-Dexec.mainClass="fr.ign.voxatile.core.Voxatile" \
-Dexec.args="-p parameters.yaml $HOME/.minetest/worlds/voxatile"
```

# Modules

Modules are Jar files adding features to generator (output formats, source types, task types, ...).
Modules are Jar files adding features to Voxatile (output formats, source types, task types, ...).

They should be placed in a directory specified either by `--modules-path` command line option or `VOXATILE_MODULES_PATH` environment variable. If command line option is set, environment variable is ignored. If none set, no modules will be loaded.

Expand Down
6 changes: 3 additions & 3 deletions docs/usage/parameters/Parameters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generation parameters

Generator makes a heavy use of parameters. Generation is described in Yaml (or Json).
Voxatile makes a heavy use of parameters. Generation is described in Yaml (or Json).

## Table of contents

Expand Down Expand Up @@ -96,7 +96,7 @@ forEachTile:

## Fields description

- `worldName`: World name (text, default `Minalac`)
- `worldName`: World name (text, default `Voxatile`)
- `references`: Ignored field where references (or other content) can be put in
- `area`: Area to be rendered
- `center`: Coordinates of the area's center point, expressed in the commonly used coordinate system (EPSG:4326)
Expand Down Expand Up @@ -125,4 +125,4 @@ forEachTile:

## References

YAML references are processed by the generator. They can be defined anywhere in parameters. A `references` field is available at root to put references not going anywhere else.
YAML references are processed by Voxatile. They can be defined anywhere in parameters. A `references` field is available at root to put references not going anywhere else.
10 changes: 5 additions & 5 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cd "$SCRIPT_DIR" || exit

# Check if JAVA_CMD is set, if not, set it to java
JAVA_CMD=${JAVA_CMD:-java}
JAR_PATH=./target/Generator.jar
JAR_PATH=./target/voxatile.jar
PARAMS_DIR=./examples
FORMATS_DIR=$PARAMS_DIR/formats
PROCESSES_DIR=$PARAMS_DIR/processes
Expand All @@ -32,17 +32,17 @@ usage() {
}

output_dir_needed=1
generator_opt=""
voxatile_opt=""

while [[ "$1" == "-"* ]]; do
opt=$1
shift
case $opt in
-g)
generator_opt="$generator_opt --generation-disabled"
voxatile_opt="$voxatile_opt --generation-disabled"
;;
-s)
generator_opt="$generator_opt --save-disabled"
voxatile_opt="$voxatile_opt --save-disabled"
unset output_dir_needed
;;
-y)
Expand Down Expand Up @@ -136,4 +136,4 @@ if [ "$display_only" ]; then
exit 0
fi

VOXATILE_PARAMS=$params VOXATILE_MODULES_PATH=modules $JAVA_CMD -jar $JAR_PATH $generator_opt "$output_dir"
VOXATILE_PARAMS=$params VOXATILE_MODULES_PATH=modules $JAVA_CMD -jar $JAR_PATH $voxatile_opt "$output_dir"
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
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>com.ignfab</groupId>
<groupId>fr.ign</groupId>
<artifactId>voxatile</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Voxatile</name>
<description>Minecraft/Minetest world generator from real world geographic data</description>
<url>https://www.ign.fr/minecraft</url>
<description>Voxel world generator from real world geographic data</description>
<url>https://github.com/ignfab/voxatile</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -225,8 +225,8 @@
</dependencies>

<build>
<!-- Final JAR will be named Generator.jar -->
<finalName>Generator</finalName>
<!-- Final JAR will be named voxatile.jar -->
<finalName>voxatile</finalName>
<pluginManagement>
<plugins>
<plugin>
Expand Down Expand Up @@ -280,7 +280,7 @@
<!-- Ensures the JAR comes with a proper MANIFEST.MF file -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<!-- With at least an entry "Main-Class: ..." to make it executable -->
<mainClass>com.ignfab.minalac.generator.Voxatile</mainClass>
<mainClass>fr.ign.voxatile.core.Voxatile</mainClass>
</transformer>
<!-- Properly shades all resources, required for GeoTools HSQL embedded databases and GeoTIFF module -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
Expand Down

This file was deleted.

Loading
Loading