Commit 1745865f authored by Riegel's avatar Riegel
Browse files

Code cleaning Ref #69

parent 5a6f4b46
...@@ -32,7 +32,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Vertex; ...@@ -32,7 +32,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
*/ */
public class MovedRing { public class MovedRing {
private List<Vector3d> vertices; private final List<Vector3d> vertices;
private LinearRing original; private LinearRing original;
public static MovedRing ofRing(LinearRing ring, Vector3d movedBy) { public static MovedRing ofRing(LinearRing ring, Vector3d movedBy) {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
package de.hft.stuttgart.citydoctor2.math; package de.hft.stuttgart.citydoctor2.math;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -35,13 +36,14 @@ import de.hft.stuttgart.citydoctor2.math.PlaneSegmentIntersection.Type; ...@@ -35,13 +36,14 @@ import de.hft.stuttgart.citydoctor2.math.PlaneSegmentIntersection.Type;
*/ */
public class Plane implements Serializable { public class Plane implements Serializable {
@Serial
private static final long serialVersionUID = 1602547402497943364L; private static final long serialVersionUID = 1602547402497943364L;
private static final double EPSILON = 0.0001; private static final double EPSILON = 0.0001;
private UnitVector3d normal; private final UnitVector3d normal;
private Vector3d point; private final Vector3d point;
private double d; private final double d;
/** /**
* Constructs a new plane from a normal vector and a reference point. * Constructs a new plane from a normal vector and a reference point.
...@@ -51,12 +53,14 @@ public class Plane implements Serializable { ...@@ -51,12 +53,14 @@ public class Plane implements Serializable {
*/ */
public Plane(Vector3d normal, Vector3d p) { public Plane(Vector3d normal, Vector3d p) {
point = p; point = p;
this.normal = normal.normalize(); UnitVector3d normalVector = normal.normalize();
d = this.normal.dot(point); double dot = normalVector.dot(point);
if (d < 0) { if (dot < 0) {
this.normal = this.normal.invert(); normalVector = normalVector.invert();
d = -d; dot = -dot;
} }
this.d = dot;
this.normal = normalVector;
} }
public PlaneSegmentIntersection intersects(Segment3d s) { public PlaneSegmentIntersection intersects(Segment3d s) {
...@@ -89,9 +93,7 @@ public class Plane implements Serializable { ...@@ -89,9 +93,7 @@ public class Plane implements Serializable {
// intersection in segment // intersection in segment
// calculate intersection point // calculate intersection point
Vector3d intersection = s.getPointA().plus(dir.mult(si)); Vector3d intersection = s.getPointA().plus(dir.mult(si));
PlaneSegmentIntersection psi = new PlaneSegmentIntersection(Type.INTERSECTION_POINT); return new PlaneSegmentIntersection(Type.INTERSECTION_POINT, intersection);
psi.setPoint(intersection);
return psi;
} }
/** /**
......
...@@ -30,21 +30,28 @@ public class PlaneSegmentIntersection { ...@@ -30,21 +30,28 @@ public class PlaneSegmentIntersection {
NO_INTERSECTION, IN_PLANE, INTERSECTION_POINT NO_INTERSECTION, IN_PLANE, INTERSECTION_POINT
} }
private Type type; private final Type type;
private Vector3d point; private final Vector3d point;
public PlaneSegmentIntersection(Type type) { public PlaneSegmentIntersection(Type type, Vector3d point) {
super(); super();
this.type = type; this.type = type;
this.point = point;
}
public PlaneSegmentIntersection(Type type){
if (type == Type.INTERSECTION_POINT){
throw new IllegalStateException("Tried creating a PlaneSegmentIntersection of type INTERSECTION_POINT" +
"without an intersection-point vector");
}
this.type = type;
this.point = null;
} }
public Vector3d getPoint() { public Vector3d getPoint() {
return point; return point;
} }
public void setPoint(Vector3d point) {
this.point = point;
}
public Type getType() { public Type getType() {
return type; return type;
......
...@@ -33,8 +33,8 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon; ...@@ -33,8 +33,8 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
*/ */
public class Polygon2d { public class Polygon2d {
private Ring2d exterior; private final Ring2d exterior;
private List<Ring2d> innerRings; private final List<Ring2d> innerRings;
public static Polygon2d withProjection(Polygon poly) { public static Polygon2d withProjection(Polygon poly) {
ProjectionAxis axis = ProjectionAxis.of(poly); ProjectionAxis axis = ProjectionAxis.of(poly);
......
...@@ -37,7 +37,7 @@ public class ProjectionAxis { ...@@ -37,7 +37,7 @@ public class ProjectionAxis {
private static final String DIVISOR_IS_0 = "Divisor is 0"; private static final String DIVISOR_IS_0 = "Divisor is 0";
private int[] axis; private final int[] axis;
public static ProjectionAxis of(Polygon p) { public static ProjectionAxis of(Polygon p) {
return getProjectionAxis(p.calculateNormal()); return getProjectionAxis(p.calculateNormal());
......
...@@ -33,8 +33,8 @@ public class Ray { ...@@ -33,8 +33,8 @@ public class Ray {
public static final double EPSILON = 0.0001; public static final double EPSILON = 0.0001;
private Vector3d origin; private final Vector3d origin;
private UnitVector3d direction; private final UnitVector3d direction;
public Ray(Vector3d origin, Vector3d direction) { public Ray(Vector3d origin, Vector3d direction) {
this.origin = origin; this.origin = origin;
......
...@@ -32,8 +32,8 @@ import de.hft.stuttgart.citydoctor2.datastructure.Vertex; ...@@ -32,8 +32,8 @@ import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
*/ */
public class Ring2d { public class Ring2d {
private List<Vector2d> ringVertices; private final List<Vector2d> ringVertices;
private LinearRing original; private final LinearRing original;
public static Ring2d of(MovedRing movedRing) { public static Ring2d of(MovedRing movedRing) {
return of(movedRing, ProjectionAxis.of(movedRing)); return of(movedRing, ProjectionAxis.of(movedRing));
......
...@@ -21,15 +21,15 @@ package de.hft.stuttgart.citydoctor2.math; ...@@ -21,15 +21,15 @@ package de.hft.stuttgart.citydoctor2.math;
/** /**
* This class represents a line from a point to another point, it can be used to * This class represents a line from a point to another point, it can be used to
* calculate the intersection of two edges * calculate the intersection of two edges
* *
* @author Matthias Betz * @author Matthias Betz
* *
*/ */
public class Segment2d { public class Segment2d {
private static final double EPSILON = 0.01; private static final double EPSILON = 0.01;
private Vector2d p1; private final Vector2d p1;
private Vector2d p2; private final Vector2d p2;
public Segment2d(Vector2d p1, Vector2d p2) { public Segment2d(Vector2d p1, Vector2d p2) {
this.p1 = p1; this.p1 = p1;
...@@ -51,7 +51,7 @@ public class Segment2d { ...@@ -51,7 +51,7 @@ public class Segment2d {
double numeratora = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3); double numeratora = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3);
double numeratorb = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3); double numeratorb = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);
if (Math.abs(denominator) < EPSILON) { if (Math.abs(denominator) < EPSILON) {
denominator = 0.0; denominator = 0.0;
} }
...@@ -71,7 +71,7 @@ public class Segment2d { ...@@ -71,7 +71,7 @@ public class Segment2d {
return ua > EPSILON && ua < (1 - EPSILON) && ub > EPSILON && ub < (1 - EPSILON); return ua > EPSILON && ua < (1 - EPSILON) && ub > EPSILON && ub < (1 - EPSILON);
} }
} }
public boolean intersectsWithoutColinearity(Segment2d other) { public boolean intersectsWithoutColinearity(Segment2d other) {
double x1 = p1.getX(); double x1 = p1.getX();
double x2 = p2.getX(); double x2 = p2.getX();
...@@ -89,7 +89,7 @@ public class Segment2d { ...@@ -89,7 +89,7 @@ public class Segment2d {
if (Math.abs(denominator) < EPSILON) { if (Math.abs(denominator) < EPSILON) {
denominator = 0.0; denominator = 0.0;
} }
if (denominator == 0) { if (denominator == 0) {
// both numerators == 0 means, lines are coincident, otherwise parallel // both numerators == 0 means, lines are coincident, otherwise parallel
// parallel lines are not intersecting // parallel lines are not intersecting
...@@ -103,7 +103,7 @@ public class Segment2d { ...@@ -103,7 +103,7 @@ public class Segment2d {
} }
} }
public Vector2d intersectionPoint(Segment2d other) { public Vector2d intersectionPoint(Segment2d other) {
IntersectionPoint2d inter = calculateIntersection(other); IntersectionPoint2d inter = calculateIntersection(other);
if (inter == null) { if (inter == null) {
...@@ -111,7 +111,7 @@ public class Segment2d { ...@@ -111,7 +111,7 @@ public class Segment2d {
} }
return inter.getIntersectionPoint(); return inter.getIntersectionPoint();
} }
public IntersectionPoint2d calculateIntersection(Segment2d other) { public IntersectionPoint2d calculateIntersection(Segment2d other) {
double x1 = p1.getX(); double x1 = p1.getX();
double x2 = p2.getX(); double x2 = p2.getX();
...@@ -122,14 +122,14 @@ public class Segment2d { ...@@ -122,14 +122,14 @@ public class Segment2d {
double y2 = p2.getY(); double y2 = p2.getY();
double y3 = other.getP1().getY(); double y3 = other.getP1().getY();
double y4 = other.getP2().getY(); double y4 = other.getP2().getY();
double a1 = x2 - x1; double a1 = x2 - x1;
double b1 = x4 - x3; double b1 = x4 - x3;
double c1 = x3 - x1; double c1 = x3 - x1;
double a2 = y2 - y1; double a2 = y2 - y1;
double b2 = y4 - y3; double b2 = y4 - y3;
double c2 = y3 - y1; double c2 = y3 - y1;
double detA = b1 * a2 - a1 * b2; double detA = b1 * a2 - a1 * b2;
double detA1 = b1 * c2 - c1 * b2; double detA1 = b1 * c2 - c1 * b2;
double detA2 = a1 * c2 - c1 * a2; double detA2 = a1 * c2 - c1 * a2;
...@@ -143,15 +143,13 @@ public class Segment2d { ...@@ -143,15 +143,13 @@ public class Segment2d {
if (containsPoint(other.p2)) { if (containsPoint(other.p2)) {
return new IntersectionPoint2d(new Line2d(other.p2, new Vector2d()), 0); return new IntersectionPoint2d(new Line2d(other.p2, new Vector2d()), 0);
} }
return null; }
} else { // parallel
// parallel return null;
return null; }
}
}
double s = detA1 / detA; double s = detA1 / detA;
double t = detA2 / detA; double t = detA2 / detA;
if (s < 0 || s > 1 || t < 0 || t > 1) { if (s < 0 || s > 1 || t < 0 || t > 1) {
// intersection on line but not on segment // intersection on line but not on segment
return null; return null;
...@@ -160,7 +158,7 @@ public class Segment2d { ...@@ -160,7 +158,7 @@ public class Segment2d {
Vector2d start = new Vector2d(x1, y1); Vector2d start = new Vector2d(x1, y1);
return new IntersectionPoint2d(new Line2d(start, dir), s); return new IntersectionPoint2d(new Line2d(start, dir), s);
} }
public boolean containsPoint(Vector2d p) { public boolean containsPoint(Vector2d p) {
double xDir = p2.getX() - p1.getX(); double xDir = p2.getX() - p1.getX();
if (xDir == 0) { if (xDir == 0) {
......
...@@ -18,16 +18,18 @@ ...@@ -18,16 +18,18 @@
*/ */
package de.hft.stuttgart.citydoctor2.math; package de.hft.stuttgart.citydoctor2.math;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
* A bounded line between two points * A bounded line between two points
* *
* @author Matthias Betz * @author Matthias Betz
* *
*/ */
public class Segment3d implements Serializable { public class Segment3d implements Serializable {
@Serial
private static final long serialVersionUID = -506306945169934099L; private static final long serialVersionUID = -506306945169934099L;
private static final double PRECISION = 0.00000001; private static final double PRECISION = 0.00000001;
...@@ -44,7 +46,7 @@ public class Segment3d implements Serializable { ...@@ -44,7 +46,7 @@ public class Segment3d implements Serializable {
/** /**
* calculates the distance from this segment to the other segment * calculates the distance from this segment to the other segment
* *
* @param otherSeg the other segment * @param otherSeg the other segment
* @return the distance * @return the distance
*/ */
......
...@@ -20,15 +20,15 @@ package de.hft.stuttgart.citydoctor2.math; ...@@ -20,15 +20,15 @@ package de.hft.stuttgart.citydoctor2.math;
/** /**
* A two dimensional triangle * A two dimensional triangle
* *
* @author Matthias Betz * @author Matthias Betz
* *
*/ */
public class Triangle2d { public class Triangle2d {
private Vector2d p1; private final Vector2d p1;
private Vector2d p2; private final Vector2d p2;
private Vector2d p3; private final Vector2d p3;
private static final double EPSILON = 0; private static final double EPSILON = 0;
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
package de.hft.stuttgart.citydoctor2.math; package de.hft.stuttgart.citydoctor2.math;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import de.hft.stuttgart.citydoctor2.tesselation.TesselatedPolygon; import de.hft.stuttgart.citydoctor2.tesselation.TesselatedPolygon;
...@@ -30,12 +31,13 @@ import de.hft.stuttgart.citydoctor2.tesselation.TesselatedPolygon; ...@@ -30,12 +31,13 @@ import de.hft.stuttgart.citydoctor2.tesselation.TesselatedPolygon;
*/ */
public class Triangle3d implements Serializable { public class Triangle3d implements Serializable {
@Serial
private static final long serialVersionUID = -6907333357794272435L; private static final long serialVersionUID = -6907333357794272435L;
private static final double EPSILON = 0.0001; private static final double EPSILON = 0.0001;
private Vector3d p1; private final Vector3d p1;
private Vector3d p2; private final Vector3d p2;
private Vector3d p3; private final Vector3d p3;
private TesselatedPolygon partOf; private TesselatedPolygon partOf;
...@@ -154,8 +156,7 @@ public class Triangle3d implements Serializable { ...@@ -154,8 +156,7 @@ public class Triangle3d implements Serializable {
Vector3d a = p1; Vector3d a = p1;
Vector3d b = p2; Vector3d b = p2;
Vector3d c = p3; Vector3d c = p3;
Vector3d p = point; return sameSide(point, a, b, c) && sameSide(point, b, a, c) && sameSide(point, c, a, b);
return sameSide(p, a, b, c) && sameSide(p, b, a, c) && sameSide(p, c, a, b);
} }
private boolean sameSide(Vector3d p1, Vector3d p2, Vector3d a, Vector3d b) { private boolean sameSide(Vector3d p1, Vector3d p2, Vector3d a, Vector3d b) {
...@@ -248,14 +249,9 @@ public class Triangle3d implements Serializable { ...@@ -248,14 +249,9 @@ public class Triangle3d implements Serializable {
return false; return false;
} }
if (p3 == null) { if (p3 == null) {
if (other.p3 != null) { return other.p3 == null;
return false; } else return p3.equals(other.p3);
} }
} else if (!p3.equals(other.p3)) {
return false;
}
return true;
}
@Override @Override
public String toString() { public String toString() {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
package de.hft.stuttgart.citydoctor2.math; package de.hft.stuttgart.citydoctor2.math;
import java.io.Serial;
import java.util.Arrays; import java.util.Arrays;
/** /**
...@@ -29,6 +30,7 @@ public class UnitVector3d extends Vector3d { ...@@ -29,6 +30,7 @@ public class UnitVector3d extends Vector3d {
private static final String UNIT_VECTOR_IS_IMMUTABLE = "Unit vector is immutable"; private static final String UNIT_VECTOR_IS_IMMUTABLE = "Unit vector is immutable";
@Serial
private static final long serialVersionUID = -374685263673211587L; private static final long serialVersionUID = -374685263673211587L;
public static final UnitVector3d X_AXIS = new UnitVector3d(1, 0, 0); public static final UnitVector3d X_AXIS = new UnitVector3d(1, 0, 0);
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
package de.hft.stuttgart.citydoctor2.math; package de.hft.stuttgart.citydoctor2.math;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.util.Arrays; import java.util.Arrays;
...@@ -29,6 +30,7 @@ import java.util.Arrays; ...@@ -29,6 +30,7 @@ import java.util.Arrays;
*/ */
public class Vector3d implements Serializable { public class Vector3d implements Serializable {
@Serial
private static final long serialVersionUID = 3495650092142761365L; private static final long serialVersionUID = 3495650092142761365L;
private static final Vector3d ORIGIN = new Vector3d(); private static final Vector3d ORIGIN = new Vector3d();
......
...@@ -44,7 +44,7 @@ public class CycleNode { ...@@ -44,7 +44,7 @@ public class CycleNode {
private boolean visited = false; private boolean visited = false;
private Set<CycleNode> children; private final Set<CycleNode> children;
public CycleNode(LinearRing value) { public CycleNode(LinearRing value) {
children = new HashSet<>(); children = new HashSet<>();
...@@ -92,7 +92,7 @@ public class CycleNode { ...@@ -92,7 +92,7 @@ public class CycleNode {
if (lowlink == index) { if (lowlink == index) {
List<LinearRing> comps = new LinkedList<>(); List<LinearRing> comps = new LinkedList<>();
CycleNode w = null; CycleNode w;
do { do {
w = s.pop(); w = s.pop();
w.onStack = false; w.onStack = false;
......
...@@ -35,7 +35,7 @@ public class KDTree { ...@@ -35,7 +35,7 @@ public class KDTree {
private static final int K = 3; private static final int K = 3;
private Vertex location; private Vertex location;
private int axis; private final int axis;
private KDTree left; private KDTree left;
private KDTree right; private KDTree right;
......
...@@ -38,21 +38,14 @@ import de.hft.stuttgart.citydoctor2.datastructure.Vertex; ...@@ -38,21 +38,14 @@ import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
*/ */
public class PolygonGraph { public class PolygonGraph {
private Map<Polygon, PolygonNode> nodeMap; private final Map<Polygon, PolygonNode> nodeMap;
public PolygonGraph() { public PolygonGraph() {
nodeMap = new HashMap<>(); nodeMap = new HashMap<>();
} }
private PolygonNode createOrGetNode(Polygon p) { private PolygonNode createOrGetNode(Polygon p) {
PolygonNode node = nodeMap.get(p); return nodeMap.computeIfAbsent(p, PolygonNode::new);
if (node != null) {
return node;
} else {
node = new PolygonNode(p);
nodeMap.put(p, node);
return node;
}
} }
public void addPolygonConnectionsFromVertex(Vertex v, Geometry geom) { public void addPolygonConnectionsFromVertex(Vertex v, Geometry geom) {
...@@ -92,7 +85,7 @@ public class PolygonGraph { ...@@ -92,7 +85,7 @@ public class PolygonGraph {
List<List<Polygon>> components = new ArrayList<>(); List<List<Polygon>> components = new ArrayList<>();
for (PolygonNode node : nodeMap.values()) { for (PolygonNode node : nodeMap.values()) {
if (!node.visited()) { if (node.isUnvisited()) {
List<Polygon> component = new ArrayList<>(); List<Polygon> component = new ArrayList<>();
Deque<PolygonNode> stack = new LinkedList<>(); Deque<PolygonNode> stack = new LinkedList<>();
stack.push(node); stack.push(node);
...@@ -109,7 +102,7 @@ public class PolygonGraph { ...@@ -109,7 +102,7 @@ public class PolygonGraph {
node.setVisited(true); node.setVisited(true);
component.add(node.getContent()); component.add(node.getContent());
for (PolygonNode child : node.getChildren()) { for (PolygonNode child : node.getChildren()) {
if (!child.visited()) { if (child.isUnvisited()) {
child.setVisited(true); child.setVisited(true);
stack.push(child); stack.push(child);
} }
......
...@@ -31,8 +31,8 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon; ...@@ -31,8 +31,8 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
*/ */
public class PolygonNode { public class PolygonNode {
private Polygon content; private final Polygon content;
private Set<PolygonNode> children; private final Set<PolygonNode> children;
private boolean visited = false; private boolean visited = false;
public PolygonNode(Polygon p) { public PolygonNode(Polygon p) {
...@@ -56,8 +56,8 @@ public class PolygonNode { ...@@ -56,8 +56,8 @@ public class PolygonNode {
this.visited = b; this.visited = b;
} }
public boolean visited() { public boolean isUnvisited() {
return visited; return !visited;
} }
/* /*
...@@ -88,13 +88,9 @@ public class PolygonNode { ...@@ -88,13 +88,9 @@ public class PolygonNode {
return false; return false;
PolygonNode other = (PolygonNode) obj; PolygonNode other = (PolygonNode) obj;
if (content == null) { if (content == null) {
if (other.content != null) return other.content == null;
return false; } else return content.equals(other.content);
} else if (!content.equals(other.content)) { }
return false;
}
return true;
}
@Override @Override
public String toString() { public String toString() {
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
*/ */
package de.hft.stuttgart.citydoctor2.parser; package de.hft.stuttgart.citydoctor2.parser;
import java.io.Serial;
/** /**
* Exception when something went wrong while parsing the CityGML file. * Exception when something went wrong while parsing the CityGML file.
* *
...@@ -26,6 +28,7 @@ package de.hft.stuttgart.citydoctor2.parser; ...@@ -26,6 +28,7 @@ package de.hft.stuttgart.citydoctor2.parser;
*/ */
public class CityGmlParseException extends Exception { public class CityGmlParseException extends Exception {
@Serial
private static final long serialVersionUID = 8602390540552748135L; private static final long serialVersionUID = 8602390540552748135L;
public CityGmlParseException() { public CityGmlParseException() {
......
...@@ -501,20 +501,14 @@ public class CityGmlParser { ...@@ -501,20 +501,14 @@ public class CityGmlParser {
Matcher mURN = P_URN.matcher(srsName); Matcher mURN = P_URN.matcher(srsName);
// NOTE: Could use a HashMap if the switch/case becomes too long. // NOTE: Could use a HashMap if the switch/case becomes too long.
if (mURN.find()) { if (mURN.find()) {
switch (mURN.group(1)) { return switch (mURN.group(1)) {
case "DE_DHDN_3GK2": case "DE_DHDN_3GK2" -> CRS_FACTORY.createFromName("EPSG:31466");
return CRS_FACTORY.createFromName("EPSG:31466"); case "DE_DHDN_3GK3" -> CRS_FACTORY.createFromName("EPSG:31467");
case "DE_DHDN_3GK3": case "DE_DHDN_3GK4" -> CRS_FACTORY.createFromName("EPSG:31468");
return CRS_FACTORY.createFromName("EPSG:31467"); case "DE_DHDN_3GK5" -> CRS_FACTORY.createFromName("EPSG:31469");
case "DE_DHDN_3GK4": case "ETRS89_UTM32" -> CRS_FACTORY.createFromName("EPSG:25832");
return CRS_FACTORY.createFromName("EPSG:31468"); default -> null;
case "DE_DHDN_3GK5": };
return CRS_FACTORY.createFromName("EPSG:31469");
case "ETRS89_UTM32":
return CRS_FACTORY.createFromName("EPSG:25832");
default:
return null;
}
} }
if (srsName.equals("http://www.opengis.net/def/crs/EPSG/0/6697")) { if (srsName.equals("http://www.opengis.net/def/crs/EPSG/0/6697")) {
return CRS_FACTORY.createFromParameters("EPSG:6697", "+proj=longlat +ellps=GRS80 +no_defs +axis=neu"); return CRS_FACTORY.createFromParameters("EPSG:6697", "+proj=longlat +ellps=GRS80 +no_defs +axis=neu");
......
...@@ -20,6 +20,8 @@ package de.hft.stuttgart.citydoctor2.parser; ...@@ -20,6 +20,8 @@ package de.hft.stuttgart.citydoctor2.parser;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import java.io.Serial;
/** /**
* To stop the SAXParser from further parsing when the relevant section has * To stop the SAXParser from further parsing when the relevant section has
* already been found. * already been found.
...@@ -29,6 +31,7 @@ import org.xml.sax.SAXException; ...@@ -29,6 +31,7 @@ import org.xml.sax.SAXException;
*/ */
public class EnvelopeFoundException extends SAXException { public class EnvelopeFoundException extends SAXException {
@Serial
private static final long serialVersionUID = -9188617211115043815L; private static final long serialVersionUID = -9188617211115043815L;
public EnvelopeFoundException() { public EnvelopeFoundException() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment