public void ProcessNode(Node node, int tagCount)
        {
            // happens in pbf processing
            if (_nodes.ContainsKey(node.Id))
            {
                return;
            }

            IndexStatistic.IncrementTotal(ElementType.Node);
            if (node.Id < 0)
            {
                IndexStatistic.Skip(node.Id, ElementType.Node);
                return;
            }

            _nodes.Add(node.Id, new ScaledGeoCoordinate(node.Coordinate));

            if (tagCount > 0)
            {
                if (node.Tags.Any(tag => Settings.Spatial.Include.Nodes.Contains(tag.Key)))
                {
                    var offset = Store.Insert(node);
                    Tree.Insert(offset, new PointEnvelop(node.Coordinate));
                    IndexStatistic.Increment(ElementType.Node);
                }
                else
                {
                    IndexStatistic.Skip(node.Id, ElementType.Node);
                }
            }
        }
 /// <inheritdoc />
 public override void VisitNode(Node node)
 {
     if (node.Tags != null)
     {
         ModelLoader.LoadNode(Tile, new Core.Tiling.Models.Node
         {
             Id    = node.Id,
             Point = node.Coordinate,
             Tags  = node.Tags
         });
     }
 }
Exemple #3
0
        /// <summary> Adds node model to to element source and scene. </summary>
        private void AddNodeModel(long id, Vector2d point, TagCollection tags)
        {
            EnsureElementSource(point);
            var nullPoint = _tileController.CurrentTile.RelativeNullPoint;

            var node = new Node()
            {
                Id         = id,
                Tags       = tags,
                Coordinate = GeoProjection.ToGeoCoordinate(nullPoint, point)
            };

            _elementSourceEditor.Add(node);
            node.Accept(new NodeVisitor(_tileController.CurrentTile, _modelLoader, _objectPool));
        }
Exemple #4
0
 /// <inheritdoc />
 public virtual void VisitNode(Node node) { }