Skip to content

Commit

Permalink
Added polygon splitting to Cobalt
Browse files Browse the repository at this point in the history
  • Loading branch information
becker-al committed Jun 12, 2023
1 parent 8136958 commit 6a391bf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.aksw.limes.core.measures.mapper.pointsets.PropertyFetcher;
import org.aksw.limes.core.measures.mapper.topology.cobalt.matcher.ICobaltMatcher;
import org.aksw.limes.core.measures.mapper.topology.cobalt.splitting.CobaltSplitMatcher;
import org.aksw.limes.core.measures.mapper.topology.cobalt.splitting.CobaltSplitter;
import org.aksw.limes.core.measures.mapper.topology.cobalt.splitting.FittingSplitter;
import org.aksw.limes.core.util.LimesWktReader;
import org.locationtech.jts.geom.Envelope;
Expand All @@ -32,6 +33,7 @@
public class Cobalt {

private static final Logger logger = LoggerFactory.getLogger(Cobalt.class);
public static CobaltSplitter DEFAULT_SPLITTER = new FittingSplitter();

public static Map<String, Geometry> getGeometryMapFromCache(ACache c, String property) {
LimesWktReader wktReader = new LimesWktReader();
Expand Down Expand Up @@ -182,7 +184,7 @@ private static AMapping getMappingEnvelope(Map<String, Envelope> sourceData, Map

private static AMapping getMappingSplits(Map<String, Geometry> sourceData, Map<String, Geometry> targetData, String relation, ICobaltMatcher matcher, int splits) {
int numThreads = 1;
CobaltSplitMatcher splitMatcher = new CobaltSplitMatcher(splits, new FittingSplitter(), matcher);
CobaltSplitMatcher splitMatcher = new CobaltSplitMatcher(splits, DEFAULT_SPLITTER, matcher);
List<RTree.Entry> entries = new ArrayList<>(sourceData.size());
sourceData.forEach((s, geometry) -> {
entries.add(new RTree.Entry(s, geometry.getEnvelopeInternal(), geometry));
Expand Down

0 comments on commit 6a391bf

Please sign in to comment.