Skip to content

Commit

Permalink
Removed dependency on deprecated EPSG objects (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilbrand authored Oct 3, 2022
1 parent ff578e7 commit ac16b85
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

<imaer.version>4.0.2-2</imaer.version>
<imaer.version>5.1.0-1-SNAPSHOT</imaer.version>
<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>

<aerius.gwt-client-common.version>1.5.0-SNAPSHOT</aerius.gwt-client-common.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package nl.aerius.search.tasks;

import nl.overheid.aerius.geo.shared.BBox;
import nl.overheid.aerius.geo.shared.BNGrid;
import nl.overheid.aerius.shared.domain.geo.ReceptorGridSettings;
import nl.overheid.aerius.shared.geo.EPSG;

public final class BNGConstants {
// NOTE Both of the below values are not yet guaranteed to be as constant as the
Expand All @@ -30,6 +30,6 @@ public final class BNGConstants {
private BNGConstants() {}

public static ReceptorGridSettings create() {
return ReceptorUtils.createReceptorUtil(BNGrid.SRID, BNGConstants.MIN_ZL_SURFACE_AREA, BNGConstants.HEX_HOR, BNGConstants.BOUNDS);
return ReceptorUtils.createReceptorUtil(EPSG.BNG, BNGConstants.MIN_ZL_SURFACE_AREA, BNGConstants.HEX_HOR, BNGConstants.BOUNDS);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package nl.aerius.search.tasks;

import nl.overheid.aerius.geo.shared.BBox;
import nl.overheid.aerius.geo.shared.RDNew;
import nl.overheid.aerius.shared.domain.geo.ReceptorGridSettings;
import nl.overheid.aerius.shared.geo.EPSG;

public final class RDNewConstants {
public static final int MIN_ZL_SURFACE_AREA = 10_000;
Expand All @@ -28,6 +28,6 @@ public final class RDNewConstants {
private RDNewConstants() {}

public static ReceptorGridSettings create() {
return ReceptorUtils.createReceptorUtil(RDNew.SRID, MIN_ZL_SURFACE_AREA, HEX_HOR, BOUNDS);
return ReceptorUtils.createReceptorUtil(EPSG.RDNEW, MIN_ZL_SURFACE_AREA, HEX_HOR, BOUNDS);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@
import nl.aerius.search.domain.SearchSuggestionType;
import nl.aerius.search.domain.SearchTaskResult;
import nl.overheid.aerius.geo.shared.BBox;
import nl.overheid.aerius.geo.shared.EPSG;
import nl.overheid.aerius.geo.shared.EPSGProxy;
import nl.overheid.aerius.shared.domain.geo.HexagonUtil;
import nl.overheid.aerius.shared.domain.geo.HexagonZoomLevel;
import nl.overheid.aerius.shared.domain.geo.ReceptorGridSettings;
import nl.overheid.aerius.shared.domain.v2.geojson.Point;
import nl.overheid.aerius.shared.domain.v2.geojson.Polygon;
import nl.overheid.aerius.shared.geo.EPSG;
import nl.overheid.aerius.shared.geometry.ReceptorUtil;

public final class ReceptorUtils {
Expand All @@ -42,8 +41,7 @@ public final class ReceptorUtils {

private ReceptorUtils() {}

public static ReceptorGridSettings createReceptorUtil(final int srid, final int minSurfaceArea, final int hexHor, final BBox bounds) {
final EPSG epsg = EPSGProxy.getEPSG(srid);
public static ReceptorGridSettings createReceptorUtil(final EPSG epsg, final int minSurfaceArea, final int hexHor, final BBox bounds) {
final ArrayList<HexagonZoomLevel> zoomLevels = new ArrayList<>();
for (int i = 1; i <= ZOOM_LEVEL_NUM; i++) {
zoomLevels.add(new HexagonZoomLevel(i, minSurfaceArea));
Expand Down

0 comments on commit ac16b85

Please sign in to comment.