コード例 #1
0
        public override void addRelation(Relation relation)
        {
            TDRelation tdRelation = TDRelation.fromRelation(relation, this, this.preferredLanguages);

            if (tdRelation != null)
            {
                this.multipolygons.put(relation.Id, tdRelation);
            }
        }
コード例 #2
0
        protected internal override void handleAdditionalRelationTags(TDWay way, TDRelation relation)
        {
            IList <TDRelation> associatedRelations = this.additionalRelationTags.get(way.Id);

            if (associatedRelations == null)
            {
                associatedRelations = new List <>();
                this.additionalRelationTags.put(way.Id, associatedRelations);
            }
            associatedRelations.Add(relation);
        }
コード例 #3
0
        // TODO add accounting of average number of tiles per way
        public override void complete()
        {
            this.indexedNodeStore.complete();
            this.nodeIndexReader = this.indexedNodeStore.createReader();

            this.indexedWayStore.complete();
            this.wayIndexReader = this.indexedWayStore.createReader();

            // handle relations
            ReleasableIterator <Relation> relationReader = this.relationStore.iterate();
            RelationHandler relationHandler = new RelationHandler();

            while (relationReader.hasNext())
            {
                Relation   entry      = relationReader.next();
                TDRelation tdRelation = TDRelation.fromRelation(entry, this, this.preferredLanguages);
                relationHandler.execute(tdRelation);
            }

            // handle ways
            ReleasableIterator <Way> wayReader = this.wayStore.iterate();
            WayHandler wayHandler = new WayHandler();

            while (wayReader.hasNext())
            {
                Way   way   = wayReader.next();
                TDWay tdWay = TDWay.fromWay(way, this, this.preferredLanguages);
                if (tdWay == null)
                {
                    continue;
                }
                IList <TDRelation> associatedRelations = this.additionalRelationTags.get(tdWay.Id);
                if (associatedRelations != null)
                {
                    foreach (TDRelation tileDataRelation in associatedRelations)
                    {
                        tdWay.mergeRelationInformation(tileDataRelation);
                    }
                }

                wayHandler.execute(tdWay);
            }

            OSMTagMapping.Instance.optimizePoiOrdering(this.histogramPoiTags);
            OSMTagMapping.Instance.optimizeWayOrdering(this.histogramWayTags);
        }
コード例 #4
0
 protected internal abstract void handleAdditionalRelationTags(TDWay virtualWay, TDRelation relation);
コード例 #5
0
 protected internal override void handleAdditionalRelationTags(TDWay virtualWay, TDRelation relation)
 {
     // nothing to do here
 }