Skip to content

Instantly share code, notes, and snippets.

@matiskay
Last active August 29, 2015 14:07
Show Gist options
  • Save matiskay/3b6fe77cf38d1cd588c8 to your computer and use it in GitHub Desktop.
Save matiskay/3b6fe77cf38d1cd588c8 to your computer and use it in GitHub Desktop.
import binascii
f = open('bolivia-latest.osm.pbf', 'rb')
h = f.read(32)
print 'pbf file: ', h
h = f.read(32)
print h
f = open('data-peru/points.shp', 'rb')
h = f.read(32)
print 'shapefile: ', binascii.hexlify(h)
f = open('uruguay-latest.osm', 'rb')
h = f.read(32)
print 'osm file: ', h
f = open('uruguay-latest-bak.osm.bz2', 'rb')
h = f.read(32)
print 'bz2 file: ', h
pbf file:
OSMHeaderzuvx������6
N�H��a�X��w����s߶�bT��/�
shapefile: 0000270a00000000000000000000000000000000000000000008e172e8030000
osm file: <?xml version='1.0' encoding='UT
bz2 file: BZh11AY&SY�ӫ�n(߀@0P������
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment