Code not work - DESPERATE HELP :(

2008-10-30 Thread fx5900

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 :
File "C:\osm2gml.py, line 86, in 
xml.sax.parse 
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 
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: :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.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Code not work - DESPERATE HELP :(

2008-10-30 Thread fx5900

Hi,

   I just went to go and get a coffee when i noticed a email, thought it was
just usual spam. Read your message, and it worked. it was because i did not
put they 'python' keyword infront. How did u figure it out?

Although, cos i nver worked with python, things are bound to go wrong on the
first hurdles right?

Cheers :)


Bill McClain-4 wrote:
> 
> On 2008-10-30, fx5900 <[EMAIL PROTECTED]> wrote:
> 
>> 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:
> 
> Does this give any better results:
> 
> python osm2gml.py < map_01_data.osm > map_01_data.gml
> 
> -Bill
> -- 
> Sattre PressIn the Quarter
> http://sattre-press.com/ by Robert W. Chambers
> [EMAIL PROTECTED] http://sattre-press.com/itq.html
> --
> http://mail.python.org/mailman/listinfo/python-list
> 
> 

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

--
http://mail.python.org/mailman/listinfo/python-list