Code not work - DESPERATE HELP :(

fx5900 luong8201 at hotmail.com
Thu Oct 30 19:48:57 CET 2008


Hi,

   i am trying to convert an .osm (openstreetmap) file into gml format  and
finally to shapefile given this wiki info 
http://wiki.openstreetmap.org/index.php/GML. I'm using windows and when i
entered the following commands osm2gml.py < map_01_data.osm >
map_01_data.gml  on my dos prompt i get a number of errors, some of which
are bellow:

Traceback <most recent call last>:
File "C:\osm2gml.py, line 86, in <module>
xml.sax.parse <sys.stdin, osmParser >
IOError : [Errono 9] bad discriptor

i did manage to convert it to gml format but was clearly unsuccesful because
of the error and it was 1kb. 
Another point i would like to add is that ran the file using PythonWin
(ActiveState) with map_01_data.osm as the argument and after hitting ok,
then cancel i got
 
Traceback (most recent call last):
  File
"C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
line 310, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\osm2gml.py", line 86, in <module>
    xml.sax.parse( sys.stdin, osmParser )
  File "C:\Python25\lib\xml\sax\__init__.py", line 33, in parse
    parser.parse(source)
  File "C:\Python25\lib\xml\sax\expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "C:\Python25\lib\xml\sax\xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "C:\Python25\lib\xml\sax\expatreader.py", line 211, in feed
    self._err_handler.fatalError(exc)
  File "C:\Python25\lib\xml\sax\handler.py", line 38, in fatalError
    raise exception
SAXParseException: <stdin>:1:0: syntax error

Please would somebody mind telling how i can covert my osm file into the
.gml format using the python file on the dos command or using pythonwin.

Cheers
-- 
View this message in context: http://www.nabble.com/Code-not-work---DESPERATE-HELP-%3A%28-tp20253039p20253039.html
Sent from the Python - python-list mailing list archive at Nabble.com.




More information about the Python-list mailing list