Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ public GEOKanteMetadata getGeoKanteAt(final TOP_Kante topKante,
final TOP_Knoten topKnoten, final BigDecimal distance) {
final List<GEOKanteMetadata> geoMetadatas = getGeoKanteMetadatas(
topKante, topKnoten);

final Optional<GEOKanteMetadata> result = geoMetadatas.stream()
.filter(md -> md.getStart().compareTo(distance) <= 0
&& md.getEnd().compareTo(distance) >= 0)
.filter(md -> md.isIntersection(distance))
.findFirst();
return result.orElse(null);
}
Expand Down Expand Up @@ -644,7 +644,6 @@ private Pair<GEOKanteMetadata, Coordinate> getClosestProjection(
private List<GEOKanteMetadata> getGeoKantenMetadata(
final Basis_Objekt geoArt, final GEO_Knoten startKnoten,
final List<Bereich_Objekt> bereichObjekte) {

final BigDecimal distanceScalingFactor = BasisObjektExtensions
.getGeoArtScalingFactor(geoArt);
BigDecimal distance = BigDecimal.ZERO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.List;
import java.util.function.Function;

import org.eclipse.set.basis.constants.ToolboxConstants;
import org.eclipse.set.model.planpro.Basisobjekte.Bereich_Objekt;
import org.eclipse.set.model.planpro.Geodaten.ENUMGEOKoordinatensystem;
import org.eclipse.set.model.planpro.Geodaten.GEO_Kante;
Expand Down Expand Up @@ -329,4 +330,27 @@ public GEOKanteSegment getContainingSegment(final BigDecimal distance) {
.findFirst()
.orElse(null);
}

/**
* @param pointDistance
* topological position
* @return true, if the point lie on the GEO_Kante
*/
public boolean isIntersection(final BigDecimal pointDistance) {
final BigDecimal tolerant = BigDecimal
.valueOf(ToolboxConstants.TOP_GEO_LENGTH_TOLERANCE);
final BigDecimal distanceToStart = pointDistance.subtract(start);

if (distanceToStart.compareTo(tolerant) < 0) {
return false;
}

final BigDecimal distanceToEnd = getEnd().subtract(pointDistance);

if (distanceToEnd.compareTo(tolerant) < 0) {
return false;
}

return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class LayoutTransformator {
val layoutInfo = SiteplanFactory.eINSTANCE.createLayoutinfo
layoutInfo.guid = identitaet?.wert
layoutInfo.label = bezeichnung?.bezeichnungLageplan?.wert
IDLageplanBlattschnitt.forEach [
layoutInfo.sheetsCut.add(value.transformSheetCut)
IDLageplanBlattschnitt.map[value].filterNull.forEach [
layoutInfo.sheetsCut.add(transformSheetCut)
]
siteplan.layoutInfo.add(layoutInfo)
]
Expand All @@ -64,9 +64,9 @@ class LayoutTransformator {
result.label = sheetCut?.bezeichnung?.bezLageplanBlattschnitt?.wert?.
toString
result.polygonDirection.addAll(
sheetCut.polygonzugAusrichtung?.wert?.transformCoordinate)
sheetCut?.polygonzugAusrichtung?.wert?.transformCoordinate)
result.polygon.addAll(
sheetCut.polygonzugBlattschnitt?.wert?.transformCoordinate)
sheetCut?.polygonzugBlattschnitt?.wert?.transformCoordinate)
return result
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class BasisObjektExtensions extends UrObjectExtensions {
if (geoLength <= BigDecimal.ZERO || geoArtLength <= BigDecimal.ZERO) {
return BigDecimal.ONE
}

val scale = geoLength.divide(geoArtLength,
ToolboxConstants.ROUNDING_TO_PLACE, RoundingMode.HALF_UP)
return scale > BigDecimal.ZERO ? scale : BigDecimal.ONE
Expand Down
Loading