Skip to content

Commit

Permalink
[bugfix] Set GmlTransformer options
Browse files Browse the repository at this point in the history
  • Loading branch information
adamretter committed Sep 4, 2023
1 parent 63204d8 commit b61f0d3
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
import javax.xml.transform.TransformerException;
import java.io.IOException;
import java.io.StringReader;
import java.nio.charset.StandardCharsets;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
Expand Down Expand Up @@ -111,7 +112,7 @@ public abstract class AbstractGMLJDBCIndexWorker implements IndexWorker {
protected TreeMap<String, MathTransform> transformations = new TreeMap<>();
protected boolean useLenientMode = false;
protected GeometryCoordinateSequenceTransformer coordinateTransformer = new GeometryCoordinateSequenceTransformer();
protected GeometryTransformer gmlTransformer = new GeometryTransformer();
protected final GeometryTransformer gmlTransformer;
protected WKBWriter wkbWriter = new WKBWriter();
protected WKBReader wkbReader = new WKBReader();
protected WKTWriter wktWriter = new WKTWriter();
Expand All @@ -120,6 +121,11 @@ public abstract class AbstractGMLJDBCIndexWorker implements IndexWorker {
public AbstractGMLJDBCIndexWorker(AbstractGMLJDBCIndex index, DBBroker broker) {
this.index = index;
this.broker = broker;
this.gmlTransformer = new GeometryTransformer();
gmlTransformer.setEncoding(StandardCharsets.UTF_8);
gmlTransformer.setIndentation(4);
gmlTransformer.setNamespaceDeclarationEnabled(true);
gmlTransformer.setOmitXMLDeclaration(false);
}

protected DBBroker getBroker() {
Expand Down

0 comments on commit b61f0d3

Please sign in to comment.