Skip to content

Commit

Permalink
[citygml export] surface data objects without targets are exported ag…
Browse files Browse the repository at this point in the history
…ain to avoid invalid xlinks
  • Loading branch information
clausnagel committed Apr 21, 2015
1 parent 58a9a9d commit c80ec7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,11 @@ private void addSurfaceData(Appearance appearance, ResultSet rs, GlobalAppearanc
surfaceData.setId(gmlId);
}

// retrieve targets. if there are no targets we suppress this surface data object
boolean hasTargets = globalAppResolver == null ? textureParamExporter.read(surfaceData, surfaceDataId) :
// retrieve targets
if (globalAppResolver == null)
textureParamExporter.read(surfaceData, surfaceDataId);
else
textureParamExporter.read(surfaceData, surfaceDataId, globalAppResolver.getSurfaceDataTarget(surfaceDataId));
if (!hasTargets)
return;

String gmlName = rs.getString(10);
String gmlNameCodespace = rs.getString(11);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private void init() throws SQLException {
}
}

public boolean read(AbstractSurfaceData surfaceData, long surfaceDataId) throws SQLException {
public void read(AbstractSurfaceData surfaceData, long surfaceDataId) throws SQLException {
ResultSet rs = null;

try {
Expand All @@ -95,15 +95,13 @@ public boolean read(AbstractSurfaceData surfaceData, long surfaceDataId) throws

fillTextureParam(surfaceData, worldToTexture, texCoordsObj, target, isReverse);
}

return surfaceData.hasLocalProperty("hasTargets");
} finally {
if (rs != null)
rs.close();
}
}

public boolean read(AbstractSurfaceData surfaceData, long surfaceDataId, SurfaceDataTarget target) throws SQLException {
public void read(AbstractSurfaceData surfaceData, long surfaceDataId, SurfaceDataTarget target) throws SQLException {
PreparedStatement stmt = null;
ResultSet rs = null;

Expand All @@ -124,8 +122,6 @@ public boolean read(AbstractSurfaceData surfaceData, long surfaceDataId, Surface

fillTextureParam(surfaceData, worldToTexture, texCoordsObj, geometry.getGmlId(), geometry.isReverse());
}

return surfaceData.hasLocalProperty("hasTargets");
} finally {
if (rs != null) {
try {
Expand Down Expand Up @@ -226,8 +222,6 @@ else if (worldToTexture != null) {
}
}
}

surfaceData.setLocalProperty("hasTargets", true);
}

@Override
Expand Down

0 comments on commit c80ec7e

Please sign in to comment.