Exemplo n.º 1
0
        public OsmWay ToWay(XElement element)
        {
            var result = new OsmWay
            {
                Children = element.Elements("nd").Select(ne => GetLong(ne,"ref")).ToArray()
            };

            return ReadEntity(element, result) ? result : null;
        }
Exemplo n.º 2
0
        private IEnumerable<OsmNode> GetChildNodes(OsmWay way)
        {
            var result = database.GetCollection<OsmNode, OsmNodeCollection>().AsQueryable().Where(n => n.Id.In(way.Children)).ToArray();
        
            if ( result.Length < way.Children.Count())
            {
                log.Warn("Unable to find all child nodes for {0}",way);
            }

            return result;
        }