@@ -171,9 +171,10 @@ G osm2ttl::osm::GeometryHandler<W>::simplifyGeometry(const G& g) {
171
171
G geom;
172
172
auto perimeter_or_length =
173
173
std::max (boost::geometry::perimeter (g), boost::geometry::length (g));
174
- boost::geometry::simplify (g, geom,
175
- osm2ttl::osm::constants::BASE_SIMPLIFICATION_FACTOR * perimeter_or_length *
176
- _config.simplifyGeometries );
174
+ boost::geometry::simplify (
175
+ g, geom,
176
+ osm2ttl::osm::constants::BASE_SIMPLIFICATION_FACTOR *
177
+ perimeter_or_length * _config.simplifyGeometries );
177
178
if (!boost::geometry::is_valid (geom)) {
178
179
return g;
179
180
}
@@ -419,17 +420,13 @@ void osm2ttl::osm::GeometryHandler<W>::dumpNamedAreaRelations() {
419
420
progressBar.update (entryCount);
420
421
std::vector<osm2ttl::util::DirectedGraph<osm2ttl::osm::Area::id_t >::entry_t >
421
422
vertices = _directedAreaGraph.getVertices ();
422
- #pragma omp parallel for shared( \
423
- vertices, osm2ttl::ttl::constants::NAMESPACE__OSM_WAY, \
424
- osm2ttl::ttl::constants::NAMESPACE__OSM_RELATION, \
425
- osm2ttl::ttl::constants::IRI__OGC_CONTAINS, \
426
- osm2ttl::ttl::constants::IRI__OGC_CONTAINED_BY, \
427
- osm2ttl::ttl::constants::IRI__OGC_CONTAINS_AREA, \
428
- osm2ttl::ttl::constants::IRI__OGC_CONTAINED_BY_AREA, \
429
- osm2ttl::ttl::constants::IRI__OGC_INTERSECTS, \
430
- osm2ttl::ttl::constants::IRI__OGC_INTERSECTED_BY, \
431
- osm2ttl::ttl::constants::IRI__OGC_INTERSECTS_AREA, \
432
- osm2ttl::ttl::constants::IRI__OGC_INTERSECTED_BY_AREA, progressBar, \
423
+ #pragma omp parallel for shared( \
424
+ vertices, osm2ttl::ttl::constants::NAMESPACE__OSM_WAY, \
425
+ osm2ttl::ttl::constants::NAMESPACE__OSM_RELATION, \
426
+ osm2ttl::ttl::constants::IRI__OGC_CONTAINS_AREA, \
427
+ osm2ttl::ttl::constants::IRI__OGC_CONTAINS_NONAREA, \
428
+ osm2ttl::ttl::constants::IRI__OGC_INTERSECTS_AREA, \
429
+ osm2ttl::ttl::constants::IRI__OGC_INTERSECTS_NONAREA, progressBar, \
433
430
entryCount) default (none) schedule (static )
434
431
for (size_t i = 0 ; i < vertices.size (); i++) {
435
432
const auto id = vertices[i];
@@ -454,14 +451,6 @@ void osm2ttl::osm::GeometryHandler<W>::dumpNamedAreaRelations() {
454
451
areaIRI, osm2ttl::ttl::constants::IRI__OGC_CONTAINS_AREA, entryIRI);
455
452
_writer->writeTriple (
456
453
areaIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTS_AREA, entryIRI);
457
- if (_config.addInverseRelationDirection ) {
458
- _writer->writeTriple (
459
- entryIRI, osm2ttl::ttl::constants::IRI__OGC_CONTAINED_BY_AREA,
460
- areaIRI);
461
- _writer->writeTriple (
462
- entryIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTED_BY_AREA,
463
- areaIRI);
464
- }
465
454
}
466
455
#pragma omp critical(progress)
467
456
progressBar.update (entryCount++);
@@ -508,16 +497,14 @@ void osm2ttl::osm::GeometryHandler<W>::dumpUnnamedAreaRelations() {
508
497
size_t containsSkippedByDAG = 0 ;
509
498
size_t containsOkEnvelope = 0 ;
510
499
progressBar.update (entryCount);
511
- #pragma omp parallel for shared( \
512
- osm2ttl::ttl::constants::NAMESPACE__OSM_WAY, \
513
- osm2ttl::ttl::constants::NAMESPACE__OSM_RELATION, \
514
- osm2ttl::ttl::constants::IRI__OGC_INTERSECTS, \
515
- osm2ttl::ttl::constants::IRI__OGC_INTERSECTED_BY, \
516
- osm2ttl::ttl::constants::IRI__OGC_CONTAINS, \
517
- osm2ttl::ttl::constants::IRI__OGC_CONTAINED_BY, \
500
+ #pragma omp parallel for shared( \
501
+ osm2ttl::ttl::constants::NAMESPACE__OSM_WAY, \
502
+ osm2ttl::ttl::constants::NAMESPACE__OSM_RELATION, \
503
+ osm2ttl::ttl::constants::IRI__OGC_INTERSECTS_NONAREA, \
504
+ osm2ttl::ttl::constants::IRI__OGC_CONTAINS_NONAREA, \
518
505
progressBar, entryCount, ia) reduction (+:areas,intersectsSkippedByDAG, \
519
- containsSkippedByDAG, intersectsChecks, intersectsOk, containsChecks, containsOk, \
520
- containsOkEnvelope) \
506
+ containsSkippedByDAG, intersectsChecks, intersectsOk, containsChecks, \
507
+ containsOk, containsOkEnvelope) \
521
508
default (none) schedule (dynamic)
522
509
for (size_t i = 0 ; i < _numUnnamedAreas; i++) {
523
510
SpatialAreaValue entry;
@@ -591,12 +578,8 @@ void osm2ttl::osm::GeometryHandler<W>::dumpUnnamedAreaRelations() {
591
578
skipIntersects.insert (newSkip);
592
579
}
593
580
_writer->writeTriple (
594
- areaIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTS, entryIRI);
595
- if (_config.addInverseRelationDirection ) {
596
- _writer->writeTriple (
597
- entryIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTED_BY,
598
- areaIRI);
599
- }
581
+ areaIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTS_NONAREA,
582
+ entryIRI);
600
583
}
601
584
602
585
if (!doesIntersect) {
@@ -646,12 +629,8 @@ void osm2ttl::osm::GeometryHandler<W>::dumpUnnamedAreaRelations() {
646
629
skipContains.insert (newSkip);
647
630
}
648
631
_writer->writeTriple (
649
- areaIRI, osm2ttl::ttl::constants::IRI__OGC_CONTAINS, entryIRI);
650
- if (_config.addInverseRelationDirection ) {
651
- _writer->writeTriple (entryIRI,
652
- osm2ttl::ttl::constants::IRI__OGC_CONTAINED_BY,
653
- areaIRI);
654
- }
632
+ areaIRI, osm2ttl::ttl::constants::IRI__OGC_CONTAINS_NONAREA,
633
+ entryIRI);
655
634
}
656
635
}
657
636
#pragma omp critical(progress)
@@ -710,15 +689,13 @@ osm2ttl::osm::GeometryHandler<W>::dumpNodeRelations() {
710
689
size_t containsOk = 0 ;
711
690
size_t skippedByDAG = 0 ;
712
691
progressBar.update (entryCount);
713
- #pragma omp parallel for shared( \
692
+ #pragma omp parallel for shared( \
714
693
osm2ttl::ttl::constants::NAMESPACE__OSM_NODE, \
715
- osm2ttl::ttl::constants::NAMESPACE__OSM_WAY, \
716
- osm2ttl::ttl::constants::NAMESPACE__OSM_RELATION, \
717
- osm2ttl::ttl::constants::IRI__OGC_CONTAINS, \
718
- osm2ttl::ttl::constants::IRI__OGC_CONTAINED_BY, \
719
- osm2ttl::ttl::constants::IRI__OGC_INTERSECTS, \
720
- osm2ttl::ttl::constants::IRI__OGC_INTERSECTED_BY, nodeData, \
721
- progressBar, entryCount, ia) reduction (+:checks, \
694
+ osm2ttl::ttl::constants::NAMESPACE__OSM_WAY, \
695
+ osm2ttl::ttl::constants::NAMESPACE__OSM_RELATION,\
696
+ osm2ttl::ttl::constants::IRI__OGC_CONTAINS_NONAREA, \
697
+ osm2ttl::ttl::constants::IRI__OGC_INTERSECTS_NONAREA, nodeData, \
698
+ progressBar, entryCount, ia) reduction (+:checks, \
722
699
skippedByDAG, contains, containsOk) default (none) schedule (dynamic)
723
700
for (size_t i = 0 ; i < _numNodes; i++) {
724
701
SpatialNodeValue node;
@@ -779,16 +756,11 @@ osm2ttl::osm::GeometryHandler<W>::dumpNodeRelations() {
779
756
: osm2ttl::ttl::constants::NAMESPACE__OSM_RELATION,
780
757
areaObjId);
781
758
_writer->writeTriple (
782
- areaIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTS, nodeIRI);
783
- _writer->writeTriple (
784
- areaIRI, osm2ttl::ttl::constants::IRI__OGC_CONTAINS, nodeIRI);
785
- if (_config.addInverseRelationDirection ) {
786
- _writer->writeTriple (nodeIRI,
787
- osm2ttl::ttl::constants::IRI__OGC_INTERSECTED_BY,
788
- areaIRI);
789
- _writer->writeTriple (
790
- nodeIRI, osm2ttl::ttl::constants::IRI__OGC_CONTAINED_BY, areaIRI);
791
- }
759
+ areaIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTS_NONAREA,
760
+ nodeIRI);
761
+ _writer->writeTriple (areaIRI,
762
+ osm2ttl::ttl::constants::IRI__OGC_CONTAINS_NONAREA,
763
+ nodeIRI);
792
764
}
793
765
#pragma omp critical(nodeDataChange)
794
766
std::copy (skip.begin (), skip.end (), std::back_inserter (nodeData[nodeId]));
@@ -844,13 +816,11 @@ void osm2ttl::osm::GeometryHandler<W>::dumpWayRelations(
844
816
size_t containsSkippedByDAG = 0 ;
845
817
size_t skippedInDAG = 0 ;
846
818
progressBar.update (entryCount);
847
- #pragma omp parallel for shared( \
848
- osm2ttl::ttl::constants::NAMESPACE__OSM_WAY, nodeData, \
849
- osm2ttl::ttl::constants::NAMESPACE__OSM_RELATION, \
850
- osm2ttl::ttl::constants::IRI__OGC_INTERSECTS, \
851
- osm2ttl::ttl::constants::IRI__OGC_INTERSECTED_BY, \
852
- osm2ttl::ttl::constants::IRI__OGC_CONTAINS, \
853
- osm2ttl::ttl::constants::IRI__OGC_CONTAINED_BY, \
819
+ #pragma omp parallel for shared( \
820
+ osm2ttl::ttl::constants::NAMESPACE__OSM_WAY, nodeData, \
821
+ osm2ttl::ttl::constants::NAMESPACE__OSM_RELATION, \
822
+ osm2ttl::ttl::constants::IRI__OGC_INTERSECTS_NONAREA, \
823
+ osm2ttl::ttl::constants::IRI__OGC_CONTAINS_NONAREA, \
854
824
progressBar, entryCount, ia) reduction (+:areas,intersectsSkippedByDAG, containsSkippedByDAG, skippedInDAG, \
855
825
intersectsByNodeInfo, intersectsChecks, intersectsOk, containsChecks, containsOk, containsOkEnvelope) \
856
826
default (none) schedule (dynamic)
@@ -928,12 +898,8 @@ void osm2ttl::osm::GeometryHandler<W>::dumpWayRelations(
928
898
skipIntersects.insert (newSkip);
929
899
}
930
900
_writer->writeTriple (
931
- areaIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTS, wayIRI);
932
- if (_config.addInverseRelationDirection ) {
933
- _writer->writeTriple (
934
- wayIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTED_BY,
935
- areaIRI);
936
- }
901
+ areaIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTS_NONAREA,
902
+ wayIRI);
937
903
} else {
938
904
intersectsChecks++;
939
905
#ifdef ENABLE_GEOMETRY_STATISTIC
@@ -958,12 +924,8 @@ void osm2ttl::osm::GeometryHandler<W>::dumpWayRelations(
958
924
skipIntersects.insert (newSkip);
959
925
}
960
926
_writer->writeTriple (
961
- areaIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTS, wayIRI);
962
- if (_config.addInverseRelationDirection ) {
963
- _writer->writeTriple (
964
- wayIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTED_BY,
965
- areaIRI);
966
- }
927
+ areaIRI, osm2ttl::ttl::constants::IRI__OGC_INTERSECTS_NONAREA,
928
+ wayIRI);
967
929
}
968
930
if (!doesIntersect) {
969
931
continue ;
@@ -1012,12 +974,8 @@ void osm2ttl::osm::GeometryHandler<W>::dumpWayRelations(
1012
974
skipContains.insert (newSkip);
1013
975
}
1014
976
_writer->writeTriple (
1015
- areaIRI, osm2ttl::ttl::constants::IRI__OGC_CONTAINS, wayIRI);
1016
- if (_config.addInverseRelationDirection ) {
1017
- _writer->writeTriple (wayIRI,
1018
- osm2ttl::ttl::constants::IRI__OGC_CONTAINED_BY,
1019
- areaIRI);
1020
- }
977
+ areaIRI, osm2ttl::ttl::constants::IRI__OGC_CONTAINS_NONAREA,
978
+ wayIRI);
1021
979
}
1022
980
}
1023
981
#pragma omp critical(progress)
0 commit comments