org.openstreetmap.osmosis.core.domain.v0_6.Relation.getId()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中org.openstreetmap.osmosis.core.domain.v0_6.Relation.getId方法的一些代码示例,展示了Relation.getId的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Relation.getId方法的具体详情如下:
包路径:org.openstreetmap.osmosis.core.domain.v0_6.Relation
类名称:Relation
方法名:getId

Relation.getId介绍

暂无

代码示例

代码示例来源:origin: mapsforge/mapsforge

@Override
public void addRelation(Relation relation) {
  super.addRelation(relation);
  TDRelation tdRelation = TDRelation.fromRelation(relation, this, this.preferredLanguages);
  if (tdRelation != null) {
    this.multipolygons.put(relation.getId(), tdRelation);
  }
}

代码示例来源:origin: mapsforge/mapsforge

LOGGER.finest("relation is missing a member, rel-id: " + relation.getId() + " member id: "
        + relationMember.getMemberId());
    continue;
  LOGGER.finest("relation has no valid members: " + relation.getId());
  return null;
return new TDRelation(relation.getId(), ster.getLayer(), ster.getName(), ster.getHousenumber(), ster.getRef(),
    knownWayTags, wayMembers.toArray(new TDWay[wayMembers.size()]));

代码示例来源:origin: openstreetmap/osmosis

/**
 * {@inheritDoc}
 */
@Override
public int hashCode() {
  /*
   * As per the hashCode definition, this doesn't have to be unique it
   * just has to return the same value for any two objects that compare
   * equal. Using both id and version will provide a good distribution of
   * values but is simple to calculate.
   */
  return (int) getId() + getVersion();
}

代码示例来源:origin: matsim-org/matsim

@Override
public void process(RelationContainer relationContainer) {
  relationMap.put(relationContainer.getEntity().getId(), relationContainer);					
}

代码示例来源:origin: matsim-org/matsim

@Override
public void process(RelationContainer relationContainer) {
  relationMap.put(relationContainer.getEntity().getId(), relationContainer);					
}

代码示例来源:origin: matsim-org/matsim

@Override
public void process(RelationContainer relationContainer) {
  relationMap.put(relationContainer.getEntity().getId(), relationContainer);					
}

代码示例来源:origin: org.openstreetmap.osmosis/osmosis-core

/**
 * {@inheritDoc}
 */
@Override
public int hashCode() {
  /*
   * As per the hashCode definition, this doesn't have to be unique it
   * just has to return the same value for any two objects that compare
   * equal. Using both id and version will provide a good distribution of
   * values but is simple to calculate.
   */
  return (int) getId() + getVersion();
}

代码示例来源:origin: matsim-org/matsim

@Override
public void process(RelationContainer relationContainer) {
  relationMap.put(relationContainer.getEntity().getId(), relationContainer);					
}

代码示例来源:origin: openstreetmap/osmosis

/**
 * {@inheritDoc}
 */
@Override
public void modifyEntity(Relation entity) {
  long relationId;
  
  super.modifyEntity(entity);
  
  relationId = entity.getId();
  relationMemberDao.removeList(relationId);
  addMembers(entity.getId(), entity.getMembers());
}

代码示例来源:origin: openstreetmap/osmosis

/**
 * {@inheritDoc}
 */
@Override
public void modifyEntity(Relation entity) {
  long relationId;
  
  super.modifyEntity(entity);
  
  relationId = entity.getId();
  relationMemberDao.removeList(relationId);
  addMembers(entity.getId(), entity.getMembers());
}

代码示例来源:origin: openstreetmap/osmosis

/**
 * Process the relation tags.
 * 
 * @param relation
 *            The relation to be processed.
 */
private void addRelationTags(Relation relation) {
  for (Tag tag : relation.getTags()) {
    relationTagBuffer.add(new DbFeature<Tag>(relation.getId(), tag));
  }
  
  flushRelationTags(false);
}

代码示例来源:origin: openstreetmap/osmosis

/**
 * Process the relation members.
 * 
 * @param relation
 *            The relation to be processed.
 */
private void addRelationMembers(Relation relation) {
  int sequenceId;
  
  sequenceId = 0;
  for (RelationMember relationMember : relation.getMembers()) {
    relationMemberBuffer.add(
        new DbOrderedFeature<RelationMember>(relation.getId(), relationMember, sequenceId++));
  }
  
  flushRelationMembers(false);
}

代码示例来源:origin: openstreetmap/osmosis

/**
 * {@inheritDoc}
 */
@Override
public void addEntity(Relation entity) {
  super.addEntity(entity);
  
  addMembers(entity.getId(), entity.getMembers());
}

代码示例来源:origin: openstreetmap/osmosis

/**
 * {@inheritDoc}
 */
@Override
public void addEntity(Relation entity) {
  super.addEntity(entity);
  
  addMembers(entity.getId(), entity.getMembers());
}

代码示例来源:origin: org.openstreetmap.osmosis/osmosis-apidb

/**
   * Process the relation members.
   * 
   * @param relation The relation to be processed.
   */
  private void addRelationMembers(Relation relation) {
    List<RelationMember> memberReferenceList;

    memberReferenceList = relation.getMembers();

    for (int i = 0; i < memberReferenceList.size(); i++) {
      relationMemberBuffer.add(new DbFeatureHistory<DbOrderedFeature<RelationMember>>(
          new DbOrderedFeature<RelationMember>(relation.getId(), memberReferenceList.get(i), i + 1), relation
              .getVersion()));
    }

    flushRelationMembers(false);
  }
}

代码示例来源:origin: openstreetmap/osmosis

/**
   * Process the relation members.
   * 
   * @param relation The relation to be processed.
   */
  private void addRelationMembers(Relation relation) {
    List<RelationMember> memberReferenceList;

    memberReferenceList = relation.getMembers();

    for (int i = 0; i < memberReferenceList.size(); i++) {
      relationMemberBuffer.add(new DbFeatureHistory<DbOrderedFeature<RelationMember>>(
          new DbOrderedFeature<RelationMember>(relation.getId(), memberReferenceList.get(i), i + 1), relation
              .getVersion()));
    }

    flushRelationMembers(false);
  }
}

代码示例来源:origin: org.openstreetmap.osmosis/osmosis-apidb

/**
 * Process the relation tags.
 * 
 * @param relation The relation to be processed.
 */
private void addRelationTags(Relation relation) {
  for (Tag tag : relation.getTags()) {
    relationTagBuffer.add(new DbFeatureHistory<DbFeature<Tag>>(new DbFeature<Tag>(relation.getId(), tag),
        relation.getVersion()));
  }
  flushRelationTags(false);
}

代码示例来源:origin: openstreetmap/osmosis

/**
 * Process the relation tags.
 * 
 * @param relation The relation to be processed.
 */
private void addRelationTags(Relation relation) {
  for (Tag tag : relation.getTags()) {
    relationTagBuffer.add(new DbFeatureHistory<DbFeature<Tag>>(new DbFeature<Tag>(relation.getId(), tag),
        relation.getVersion()));
  }
  flushRelationTags(false);
}

代码示例来源:origin: openstreetmap/osmosis

private void pumpRelationsToSink() {
  try (ReleasableIterator<RelationContainer> i = allRelations.iterate()) {
    while (i.hasNext()) {
      RelationContainer relationContainer = i.next();
      if (availableRelations.get(relationContainer.getEntity().getId())) {
        emitRelation(relationContainer);
      }
    }
  }
}

代码示例来源:origin: org.openstreetmap.osmosis/osmosis-areafilter

private void pumpRelationsToSink() {
  try (ReleasableIterator<RelationContainer> i = allRelations.iterate()) {
    while (i.hasNext()) {
      RelationContainer relationContainer = i.next();
      if (availableRelations.get(relationContainer.getEntity().getId())) {
        emitRelation(relationContainer);
      }
    }
  }
}

相关文章