variable length tag descriptions (first shot)

This commit is contained in:
Arndt 2014-05-18 19:17:05 +02:00
parent 6768a197ba
commit a145230e0f
23 changed files with 860 additions and 124 deletions

View file

@ -13,7 +13,7 @@ import btools.util.LongList;
public class WayData extends MapCreatorBase
{
public long wid;
public long description;
public byte[] description;
public LongList nodes;
public WayData( long id )
@ -32,7 +32,7 @@ public class WayData extends MapCreatorBase
{
nodes = new LongList( 16 );
wid = readId( di) ;
description = di.readLong();
int dlen = di.readByte(); description = new byte[dlen]; di.readFully( description );
for (;;)
{
long nid = readId( di );
@ -44,7 +44,7 @@ public class WayData extends MapCreatorBase
public void writeTo( DataOutputStream dos ) throws Exception
{
writeId( dos, wid );
dos.writeLong( description );
dos.writeByte( description.length ); dos.write( description );
int size = nodes.size();
for( int i=0; i < size; i++ )
{