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
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ jobs:
# pinned : gdal-bin comes from the distribution (GDAL 3.12.2 on ubuntu 26.04, as in the Dockerfile)
runs-on: ubuntu-26.04

# 17 : minimum supported version (gpu-site), 25 : version of the Docker image
strategy:
fail-fast: false
matrix:
java: [ '17', '25' ]
name: build (java ${{ matrix.java }})

# PostGIS for the DGPR controls (skipped with SQLITE)
services:
postgis:
Expand All @@ -34,7 +41,7 @@ jobs:
- name: Set up java
uses: actions/setup-java@v5
with:
java-version: '25'
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: maven

Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# CHANGELOG

## 4.7.x

### v4.7.0 - Behavior changes

* v4.7.0 - **Breaking change** : Java 17 or above is required to run `validator-cli.jar` (compiled for Java 17 instead of Java 11, `UnsupportedClassVersionError` with Java 11). Docker image and CI already use Java 25.

### v4.7.0 - Dependencies and build

* v4.7.0 - Bump GeoTools from 27.5 to 35.2 : `org.opengis` replaced by `org.geotools.api`, `DirectPosition` by `Position`. No output change on the CNIG / PCRS / DGPR test datasets (`document-info.json`, `validation.jsonl`, normalized data, reprojections in the 26 supported projections, with Java 17 and Java 21)
* v4.7.0 - CI : build and tests with Java 17 (minimum supported version) and Java 25 (Docker image)
* v4.7.0 - `validator-cli.jar` : 24.4 Mo to 26.3 Mo (newer EPSG database, `tools.jackson.core` required by GeoTools), Eclipse ImageN (image processing, replaces JAI in GeoTools) excluded from the jar

## 4.6.x

### v4.6.0 - Behavior changes
Expand Down
2 changes: 1 addition & 1 deletion doc/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Pré-requis

* Exécutable java de OpenJDK 11 (`java --version` doit fonctionner et mentionner une version java 11 ou supérieure)
* Exécutable java de OpenJDK 17 (`java --version` doit fonctionner et mentionner une version java 17 ou supérieure)
* Exécutable [ogr2ogr de GDAL](dependencies/ogr2ogr.md) (`ogr2ogr --version` doit fonctionner et mentionner une version supportée)

## Installation du validateur
Expand Down
4 changes: 3 additions & 1 deletion doc/dependencies/geotools.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ So, `gt-epsg-hsql` is used as `java -Dorg.geotools.referencing.forceXY=true` may

## Relation to java version

As the validator requires Java 11, GeoTools 21.x and above is supported.
The validator requires Java 17, as GeoTools 34 and above (GeoTools 33.x is the last series supporting Java 11).

Since GeoTools 30, the `org.opengis` packages are replaced by `org.geotools.api` (ex : `org.geotools.api.referencing.crs.CoordinateReferenceSystem`), see [upgrade guide](https://docs.geotools.org/latest/userguide/welcome/upgrade.html).

See [Geotools - Java Install](http://docs.geotools.org/latest/userguide/build/install/jdk.html#) for more details.

Expand Down
2 changes: 1 addition & 1 deletion doc/developpement.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Ce document décrit l'installation des dépendances, la compilation du projet et

### Java

Le projet compile avec **Java 11** (voir `java.version` dans `pom.xml`). L'exécution du validateur requiert **Java 17 ou supérieur** (voir [README.md](../README.md)).
Le projet compile pour **Java 17** (voir `java.version` dans `pom.xml`) et requiert **Java 17 ou supérieur** pour l'exécution (voir [README.md](../README.md)). Un JDK (et non un JRE) est nécessaire pour compiler (paquet `openjdk-17-jdk-headless` ou supérieur).

```bash
java -version
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>fr.ign.validator</groupId>
<artifactId>validator</artifactId>
<packaging>pom</packaging>
<version>4.6.6-SNAPSHOT</version>
<version>4.7.0-SNAPSHOT</version>
<name>Validator</name>

<scm>
Expand All @@ -19,12 +19,12 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<java.version>17</java.version>
<!--
See following page for the required java version
http://docs.geotools.org/latest/userguide/build/install/jdk.html#
-->
<geotools.version>27.5</geotools.version>
<geotools.version>35.2</geotools.version>
<log4j.version>2.26.1</log4j.version>
<jackson.version>2.23.0</jackson.version>
<jackson.annotations.version>2.23</jackson.annotations.version>
Expand Down
6 changes: 3 additions & 3 deletions validator-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>fr.ign.validator</groupId>
<artifactId>validator</artifactId>
<version>4.6.6-SNAPSHOT</version>
<version>4.7.0-SNAPSHOT</version>
</parent>
<name>validator-cli</name>
<artifactId>validator-cli</artifactId>
Expand Down Expand Up @@ -59,10 +59,10 @@
</goals>
<configuration>
<!-- Invalid signature file digest for Manifest main attributes -->
<!-- GeoTools transitive dependencies not used by the validator (image processing, OGC XML models are excluded in the parent pom) -->
<!-- GeoTools transitive dependencies not used by the validator (image processing : Eclipse ImageN, formerly JAI ; OGC XML models are excluded in the parent pom) -->
<artifactSet>
<excludes>
<exclude>javax.media:jai_core</exclude>
<exclude>org.eclipse.imagen:*</exclude>
</excludes>
</artifactSet>
<filters>
Expand Down
2 changes: 1 addition & 1 deletion validator-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>fr.ign.validator</groupId>
<artifactId>validator</artifactId>
<version>4.6.6-SNAPSHOT</version>
<version>4.7.0-SNAPSHOT</version>
</parent>
<artifactId>validator-core</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import org.geotools.geometry.jts.JTS;
import org.geotools.referencing.CRS;
import org.locationtech.jts.geom.Geometry;
import org.opengis.geometry.MismatchedDimensionException;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.MathTransform;
import org.opengis.referencing.operation.TransformException;
import org.geotools.api.geometry.MismatchedDimensionException;
import org.geotools.api.referencing.FactoryException;
import org.geotools.api.referencing.crs.CoordinateReferenceSystem;
import org.geotools.api.referencing.operation.MathTransform;
import org.geotools.api.referencing.operation.TransformException;

import fr.ign.validator.model.Projection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import org.geotools.geometry.jts.JTS;
import org.geotools.referencing.CRS;
import org.opengis.geometry.MismatchedDimensionException;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.MathTransform;
import org.opengis.referencing.operation.TransformException;
import org.geotools.api.geometry.MismatchedDimensionException;
import org.geotools.api.referencing.FactoryException;
import org.geotools.api.referencing.crs.CoordinateReferenceSystem;
import org.geotools.api.referencing.operation.MathTransform;
import org.geotools.api.referencing.operation.TransformException;

import fr.ign.validator.exception.GeometryTransformException;
import fr.ign.validator.model.Projection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;
import org.locationtech.jts.geom.Envelope;
import org.opengis.geometry.MismatchedDimensionException;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.operation.TransformException;
import org.geotools.api.geometry.MismatchedDimensionException;
import org.geotools.api.referencing.FactoryException;
import org.geotools.api.referencing.operation.TransformException;

import fr.ign.validator.Context;
import fr.ign.validator.data.Document;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.apache.commons.lang3.StringUtils;
import org.geotools.referencing.CRS;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.geotools.api.referencing.crs.CoordinateReferenceSystem;

import com.fasterxml.jackson.annotation.JsonIgnore;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.Polygon;
import org.locationtech.jts.io.ParseException;
import org.opengis.geometry.MismatchedDimensionException;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.operation.TransformException;
import org.geotools.api.geometry.MismatchedDimensionException;
import org.geotools.api.referencing.FactoryException;
import org.geotools.api.referencing.operation.TransformException;

import fr.ign.validator.model.Projection;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package fr.ign.validator.geometry;

import org.geotools.geometry.DirectPosition2D;
import org.geotools.geometry.Position2D;
import org.geotools.referencing.CRS;
import org.junit.Assert;
import org.junit.Test;
import org.opengis.geometry.DirectPosition;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.MathTransform;
import org.geotools.api.geometry.Position;
import org.geotools.api.referencing.crs.CoordinateReferenceSystem;
import org.geotools.api.referencing.operation.MathTransform;

/**
* Test geotools behavior with lat,lon order for EPSG codes.
Expand All @@ -26,8 +26,8 @@ public void test4326toCRS84() throws Exception {
CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:4326");

MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS);
DirectPosition position = new DirectPosition2D(5.0, 45.0);
DirectPosition result = new DirectPosition2D();
Position position = new Position2D(5.0, 45.0);
Position result = new Position2D();
transform.transform(position, result);
Assert.assertEquals(45.0, result.getOrdinate(0), 0.1);
Assert.assertEquals(5.0, result.getOrdinate(1), 0.1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import static org.junit.Assert.assertEquals;

import org.junit.Test;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.NoSuchAuthorityCodeException;
import org.geotools.api.referencing.FactoryException;
import org.geotools.api.referencing.NoSuchAuthorityCodeException;

import org.locationtech.jts.geom.Geometry;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.NoSuchAuthorityCodeException;
import org.geotools.api.referencing.FactoryException;
import org.geotools.api.referencing.NoSuchAuthorityCodeException;

import fr.ign.validator.Context;
import fr.ign.validator.database.Database;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.locationtech.jts.geom.Geometry;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.NoSuchAuthorityCodeException;
import org.geotools.api.referencing.FactoryException;
import org.geotools.api.referencing.NoSuchAuthorityCodeException;

import fr.ign.validator.Context;
import fr.ign.validator.database.Database;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.NoSuchAuthorityCodeException;
import org.geotools.api.referencing.FactoryException;
import org.geotools.api.referencing.NoSuchAuthorityCodeException;

import fr.ign.validator.Context;
import fr.ign.validator.database.Database;
Expand Down
2 changes: 1 addition & 1 deletion validator-plugin-cnig/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>fr.ign.validator</groupId>
<artifactId>validator</artifactId>
<version>4.6.6-SNAPSHOT</version>
<version>4.7.0-SNAPSHOT</version>
</parent>
<name>validator-plugin-cnig</name>
<artifactId>validator-plugin-cnig</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion validator-plugin-dgpr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>fr.ign.validator</groupId>
<artifactId>validator</artifactId>
<version>4.6.6-SNAPSHOT</version>
<version>4.7.0-SNAPSHOT</version>
</parent>

<name>validator-plugin-dgpr</name>
Expand Down
2 changes: 1 addition & 1 deletion validator-plugin-pcrs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>fr.ign.validator</groupId>
<artifactId>validator</artifactId>
<version>4.6.6-SNAPSHOT</version>
<version>4.7.0-SNAPSHOT</version>
</parent>
<name>validator-plugin-pcrs</name>
<artifactId>validator-plugin-pcrs</artifactId>
Expand Down
Loading