Skip to content

Commit

Permalink
build: GeoTools update
Browse files Browse the repository at this point in the history
Update GeoTools from 21.0 to 29.1
Update gradle from 7.5.1 to 8.4

ING-4083
  • Loading branch information
emanuelaepure10 committed Dec 7, 2023
1 parent b84790c commit 163138e
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 6 deletions.
16 changes: 10 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ dependencies {
implementation 'org.apache.commons:commons-lang3:3.12.0' // Apache 2.0

// GeoTools (LGPL 2.1)
implementation 'org.geotools:geotools:21.0'
implementation 'org.geotools:gt-epsg-hsql:21.0'
implementation 'org.geotools:gt-opengis:21.0'
implementation 'org.geotools:gt-geometry:21.0'
implementation 'org.geotools:gt-referencing:21.0'
implementation 'org.geotools:geotools:29.1'
implementation 'org.geotools:gt-epsg-hsql:29.1'
implementation 'org.geotools:gt-opengis:29.1'
implementation 'org.geotools:gt-geometry:24.2'
implementation 'org.geotools:gt-referencing:29.1'

implementation 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'com.sun.xml.bind:jaxb-core:2.3.0.1'
implementation 'com.sun.xml.bind:jaxb-impl:2.3.1'

testImplementation 'junit:junit:4.13'
}

Expand Down Expand Up @@ -70,6 +74,6 @@ publishing {
}

wrapper {
gradleVersion = '7.5.1'
gradleVersion = '8.4'
distributionType = Wrapper.DistributionType.ALL
}
Binary file added data/example.dbf
Binary file not shown.
Binary file added data/example.shp
Binary file not shown.
49 changes: 49 additions & 0 deletions unittest/testShpToTopojson.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import static org.junit.Assert.*;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.List;

import javax.imageio.ImageIO;

import json.converter.csv.CSVReader;
import json.converter.shp.ShpFileReader;
import json.geojson.FeatureCollection;
import json.graphic.Display;
import json.tools.Compress;
import json.tools.Toolbox;
import json.topojson.algorithm.ArcMap;
import json.topojson.api.TopojsonApi;
import json.topojson.geom.sub.Entity;
import json.topojson.topology.Topology;

import org.junit.Test;

import com.google.gson.Gson;

import org.geotools.referencing.CRS;
import org.junit.Ignore;

import org.opengis.referencing.FactoryException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;

import java.nio.charset.Charset;


public class testTopojson {

@Test
public void test() throws IOException {

TopojsonApi.shpToTopojsonFile("./data/example.shp", "EPSG:4326",
"./web/topojson_hale.json",
"topology",
0,
4,
false);
}


}

0 comments on commit 163138e

Please sign in to comment.