Skip to content

Commit

Permalink
Merge pull request #1397 from ebocher/h2gis_patch
Browse files Browse the repository at this point in the history
Forgot to declare FGB driver as function
  • Loading branch information
ebocher authored Sep 18, 2024
2 parents caabc77 + f8da26c commit f061b37
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
## Changelog for v2.2.3

- Forgot to declare FGB driver(W/R) as function
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.h2gis.functions.io.asc.AscRead;
import org.h2gis.functions.io.dbf.DBFRead;
import org.h2gis.functions.io.dbf.DBFWrite;
import org.h2gis.functions.io.fgb.FGBRead;
import org.h2gis.functions.io.fgb.FGBWrite;
import org.h2gis.functions.io.geojson.GeoJsonRead;
import org.h2gis.functions.io.geojson.GeoJsonWrite;
import org.h2gis.functions.io.geojson.ST_AsGeoJSON;
Expand Down Expand Up @@ -343,7 +345,9 @@ public static Function[] getBuiltInsFunctions() {
new ST_SnapToGrid(),
new ST_SnapToSelf(),
new ST_CoveredBy(),
new ST_CoverageUnion()
new ST_CoverageUnion(),
new FGBRead(),
new FGBWrite()
};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,30 @@
package org.h2gis.functions.io.fgb;

import com.google.common.io.LittleEndianDataInputStream;
import org.h2.index.Cursor;
import org.h2.value.Value;
import org.h2.value.ValueVarchar;
import org.h2gis.functions.factory.H2GISDBFactory;
import org.h2gis.functions.factory.H2GISFunctions;
import org.h2gis.functions.io.fgb.fileTable.FGBDriver;
import org.h2gis.utilities.JDBCUtilities;
import org.h2gis.utilities.SpatialResultSet;
import org.h2gis.utilities.URIUtilities;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.locationtech.jts.geom.Envelope;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.io.WKTReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.wololo.flatgeobuf.ColumnMeta;
import org.wololo.flatgeobuf.HeaderMeta;
import org.wololo.flatgeobuf.NodeItem;
import org.wololo.flatgeobuf.PackedRTree;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.TreeSet;
import java.util.function.Function;
import java.util.stream.Collectors;

Expand All @@ -58,8 +46,6 @@ public class FGBImportExportTest {
public static void tearUp() throws Exception {
// Keep a connection alive to not close the DataBase on each unit test
connection = JDBCUtilities.wrapConnection(H2GISDBFactory.createSpatialDataBase(DB_NAME));
H2GISFunctions.registerFunction(connection.createStatement(), new FGBWrite(), "");
H2GISFunctions.registerFunction(connection.createStatement(), new FGBRead(), "");
}

@AfterAll
Expand Down

0 comments on commit f061b37

Please sign in to comment.