вторник, 1 февраля 2011 г.

Parse OpenStreetMap data

Task:
Parse http://planet.openstreetmap.org/planet-110112.osm.bz2 and put data into DB
Technologies:
C#, SevenZipSharp, XML, XSD
Design:
Create data types with xsd.exe
Read data with SevenZipExtractor to WindowedStream (SharpDevelop ring buffer)
Mix DOM and SAX xml processing:
  • Read elements with XmlReader
  • Parse them with XmlSerializer
  • Put result in DB with BlToolkit