BinaryInspector: output to osm v0.6
This commit is contained in:
parent
e550ba10d2
commit
92ece464da
1 changed files with 5 additions and 5 deletions
|
@ -952,7 +952,7 @@ public class BinaryInspector {
|
||||||
if(point) {
|
if(point) {
|
||||||
float lon= (float) MapUtils.get31LongitudeX(obj.getPoint31XTile(0));
|
float lon= (float) MapUtils.get31LongitudeX(obj.getPoint31XTile(0));
|
||||||
float lat = (float) MapUtils.get31LatitudeY(obj.getPoint31YTile(0));
|
float lat = (float) MapUtils.get31LatitudeY(obj.getPoint31YTile(0));
|
||||||
b.append("<node id = '" + OSM_ID++ + "' lat='" +lat+"' lon='"+lon+"' >\n" );
|
b.append("<node id = '" + OSM_ID++ + "' version='1' lat='" +lat+"' lon='"+lon+"' >\n" );
|
||||||
b.append(tags);
|
b.append(tags);
|
||||||
b.append("</node>\n");
|
b.append("</node>\n");
|
||||||
} else {
|
} else {
|
||||||
|
@ -962,7 +962,7 @@ public class BinaryInspector {
|
||||||
float lon = (float) MapUtils.get31LongitudeX(obj.getPoint31XTile(i));
|
float lon = (float) MapUtils.get31LongitudeX(obj.getPoint31XTile(i));
|
||||||
float lat = (float) MapUtils.get31LatitudeY(obj.getPoint31YTile(i));
|
float lat = (float) MapUtils.get31LatitudeY(obj.getPoint31YTile(i));
|
||||||
int id = OSM_ID++;
|
int id = OSM_ID++;
|
||||||
b.append("\t<node id = '" + id + "' lat='" +lat+"' lon='"+lon+"' />\n" );
|
b.append("\t<node id = '" + id + "' version='1' lat='" +lat+"' lon='"+lon+"' />\n" );
|
||||||
ids.add(id);
|
ids.add(id);
|
||||||
}
|
}
|
||||||
long outerId = printWay(ids, b, multipolygon ? null : tags);
|
long outerId = printWay(ids, b, multipolygon ? null : tags);
|
||||||
|
@ -974,13 +974,13 @@ public class BinaryInspector {
|
||||||
float lon = (float) MapUtils.get31LongitudeX(polygonInnerCoordinates[j][i]);
|
float lon = (float) MapUtils.get31LongitudeX(polygonInnerCoordinates[j][i]);
|
||||||
float lat = (float) MapUtils.get31LatitudeY(polygonInnerCoordinates[j][i + 1]);
|
float lat = (float) MapUtils.get31LatitudeY(polygonInnerCoordinates[j][i + 1]);
|
||||||
int id = OSM_ID++;
|
int id = OSM_ID++;
|
||||||
b.append("<node id = '" + id + "' lat='" + lat + "' lon='" + lon + "' />\n");
|
b.append("<node id = '" + id + "' version='1' lat='" + lat + "' lon='" + lon + "' />\n");
|
||||||
ids.add(id);
|
ids.add(id);
|
||||||
}
|
}
|
||||||
innerIds.add(printWay(ids, b, null));
|
innerIds.add(printWay(ids, b, null));
|
||||||
}
|
}
|
||||||
int id = OSM_ID++;
|
int id = OSM_ID++;
|
||||||
b.append("<relation id = '" + id + "'>\n" );
|
b.append("<relation id = '" + id + "' version='1'>\n" );
|
||||||
b.append(tags);
|
b.append(tags);
|
||||||
b.append("\t<member type='way' role='outer' ref= '" + outerId + "'/>\n" );
|
b.append("\t<member type='way' role='outer' ref= '" + outerId + "'/>\n" );
|
||||||
TLongIterator it = innerIds.iterator();
|
TLongIterator it = innerIds.iterator();
|
||||||
|
@ -995,7 +995,7 @@ public class BinaryInspector {
|
||||||
|
|
||||||
private long printWay(TLongArrayList ids, StringBuilder b , StringBuilder tags){
|
private long printWay(TLongArrayList ids, StringBuilder b , StringBuilder tags){
|
||||||
int id = OSM_ID++;
|
int id = OSM_ID++;
|
||||||
b.append("<way id = '" + id + "'>\n" );
|
b.append("<way id = '" + id + "' version='1'>\n" );
|
||||||
if(tags != null) {
|
if(tags != null) {
|
||||||
b.append(tags);
|
b.append(tags);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue