本文整理汇总了Java中org.mapsforge.map.writer.model.TDNode.getHouseNumber方法的典型用法代码示例。如果您正苦于以下问题:Java TDNode.getHouseNumber方法的具体用法?Java TDNode.getHouseNumber怎么用?Java TDNode.getHouseNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mapsforge.map.writer.model.TDNode
的用法示例。
在下文中一共展示了TDNode.getHouseNumber方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processPOI
import org.mapsforge.map.writer.model.TDNode; //导入方法依赖的package包/类
static void processPOI(TDNode poi, int currentTileLat, int currentTileLon, boolean debugStrings,
ByteBuffer poiBuffer) {
if (debugStrings) {
StringBuilder sb = new StringBuilder();
sb.append(DEBUG_STRING_POI_HEAD).append(poi.getId()).append(DEBUG_STRING_POI_TAIL);
poiBuffer.put(sb.toString().getBytes(UTF8_CHARSET));
// append whitespaces so that block has 32 bytes
appendWhitespace(DEBUG_BLOCK_SIZE - sb.toString().getBytes(UTF8_CHARSET).length, poiBuffer);
}
// write poi features to the file
poiBuffer.put(Serializer.getVariableByteSigned(poi.getLatitude() - currentTileLat));
poiBuffer.put(Serializer.getVariableByteSigned(poi.getLongitude() - currentTileLon));
// write byte with layer and tag amount info
poiBuffer.put(infoBytePoiLayerAndTagAmount(poi));
// write tag ids to the file
if (poi.getTags() != null) {
for (short tagID : poi.getTags()) {
poiBuffer.put(Serializer.getVariableByteUnsigned(OSMTagMapping.getInstance().getOptimizedPoiIds()
.get(Short.valueOf(tagID)).intValue()));
}
}
// write byte with bits set to 1 if the poi has a
// name, an elevation
// or a housenumber
poiBuffer.put(infoBytePOIFeatures(poi.getName(), poi.getElevation(), poi.getHouseNumber()));
if (poi.getName() != null && !poi.getName().isEmpty()) {
writeUTF8(poi.getName(), poiBuffer);
}
if (poi.getHouseNumber() != null && !poi.getHouseNumber().isEmpty()) {
writeUTF8(poi.getHouseNumber(), poiBuffer);
}
if (poi.getElevation() != 0) {
poiBuffer.put(Serializer.getVariableByteSigned(poi.getElevation()));
}
}