代码不起作用 - 绝望帮助:( [英] Code not work - DESPERATE HELP :(
问题描述
i我试图将.osm(openstreetmap)文件转换成gml格式并且
最后到给出此维基信息的shapefile
http://wiki.openstreetmap.org /index.php/GML 。我正在使用Windows,当我用
输入以下命令osm2gml.py< map_01_data.osm>
map_01_data.gml在我的dos提示符下我收到了一些错误,其中一些是b / b
如下:
跟踪<最近一次通话最后一次>:
文件" C:\\\ emm2gml.py,第86行,< module>
xml.sax .parse< sys.stdin,osmParser>
IOError:[Errono 9]坏的描述符
i设法将其转换为gml格式,但很明显不成功因为
的错误,它是1kb。
我想补充的另一点是使用PythonWin运行文件
(ActiveState) )使用map_01_data.osm作为参数,然后点击确定,
然后取消我得到
Traceback(最近一次调用最后一次):
文件
" C:\Python25 \Lib\site-packages \ pythonwin \ pywin \ framework \scriptutils.py" ,$ / b $ b行310,在RunScript中
exec codeObject在__main __.__ dict__
文件C:\\\mm2gml.py,第86行,在< module>
xml.sax.parse(sys.stdin,osmParser)
文件" C:\Python25 \lib \ xml \ sax\__init __。py",第33行,在解析中
parser.parse(source)
文件" C:\Python25 \lib \ xml \\ \\ sax \expatreader.py",第107行,解析
xmlreader.IncrementalParser.parse(self,source)
文件" C:\Python25 \ lib\xml\sax\xmlreader.py",第123行,在解析中
self.feed(缓冲区)
文件C:\Python25 \\ \\ lib \ xml \sax \expatreader.py",第211行,在Feed中
self._err_handler.fatalError(exc)
文件C:\\ \\ python25 \lib \ xml \sax \handler.py",第38行,在fatalError中
引发异常
SAXParseException:< stdin>:1: 0 :语法错误
请有人介意如何使用dos命令中的python文件将我的osm文件转换为
..gml格式或使用pythonwin。
干杯
-
在上下文中查看此消息: http://www.nabble.com/Code-not -work -... p20253039.html
从Nabble.com的Python-python-list邮件列表存档发送。
2008-10-30,fx5900< lu ******* @ hotmail.comwrote:
i我试图将.osm(openstreetmap)文件转换为gml格式,并且
最后给出shapefile此维基信息
http:// wik i.openstreetmap.org/index.php/GML 。我正在使用Windows,当我用
输入以下命令osm2gml.py< map_01_data.osm>
map_01_data.gml在我的dos提示符下我收到了一些错误,其中一些是b / b
这是否会带来更好的结果:
python osm2gml.py< map_01_data.osm map_01_data.gml
-Bill
-
Sattre Press in the Quarter
http://sattre-press.com/ 作者:Robert W. Chambers
** ** @ sattre-press.com http://sattre-press.com/itq.html
当我注意到一封电子邮件时,我才去喝咖啡,认为这只是垃圾邮件。阅读你的信息,它有效。这是因为我没有把他们''python''关键字放在前面。你是怎么想出来的?
虽然,我使用过python,但是第一道障碍对你来说肯定会出错?
干杯:)
Bill McClain-4写道:
>
2008-10-30,fx5900< lu ******* @ hotmail.comwrote:
>
>我试图将.osm(openstreetmap)文件转换为gml格式
和
最后给shapefile给出这个wiki信息
http://wiki.openstreetmap.org/index.php/GML 。我正在使用Windows,当我输入以下命令时osm2gml.py< map_01_data.osm>
map_01_data.gml在我的dos提示符下我收到了一些错误,其中一些错误如下:
这会给出更好的结果:
python osm2gml.py< map_01_data.osm map_01_data.gml
-Bill
-
Sattre Press in the Quarter
http://sattre-press.com/ 作者:Robert W. Chambers
** ** @ sattre-press.com http://sattre-press.com/itq.html
-
http://mail.python.org/mailman/listinfo/python-list
-
在上下文中查看此消息: http://www.nabble.com/Code-not-work-...p20255455.html
从Nabble.com的Python-python-list邮件列表存档发送。
2008-10-30,fx5900< lu ******* @ hotmail.comwrote:
我只是当我注意到一封电子邮件时,他去喝咖啡,认为这只是通常的垃圾邮件。阅读你的信息,它有效。这是因为我没有把他们''python''关键字放在前面。你是怎么想出来的?
Windows上的DOS框有些问题。我相信标准输入
和输出会以某种方式丢失。我自己就是遇到过的。在其他平台上不需要使用python
命令 - 例如Linux。
如果有人有更优雅的解决方案我想要听到它。我讨厌
记录这种方式在Windows上,另一种方式在其他地方......
-Bill
- -
Sattre Press in the Quarter
http:// sattre -With.com/ by Robert W. Chambers
in**@sattre-press.com < a rel =nofollowhref =http://sattre-press.com/itq.htmltarget =_ blank> http://sattre-press.com/itq.html
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-...p20253039.html
Sent from the Python - python-list mailing list archive at Nabble.com.
解决方案On 2008-10-30, fx5900 <lu*******@hotmail.comwrote:
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 Press In the Quarter
http://sattre-press.com/ by Robert W. Chambers
in**@sattre-press.com http://sattre-press.com/itq.html
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 <lu*******@hotmail.comwrote:
>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 Press In the Quarter
http://sattre-press.com/ by Robert W. Chambers
in**@sattre-press.com 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-...p20255455.html
Sent from the Python - python-list mailing list archive at Nabble.com.
On 2008-10-30, fx5900 <lu*******@hotmail.comwrote:
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?It is some problem with the DOS box on Windows. I believe the standard input
and output get lost somehow. I just encountered it myself. Using the "python"
command is not required on other platforms--Linux, for example.
If anyone has a more elegant solution I would like to hear it. I hate
documenting "this way on Windows, another way everywhere else..."
-Bill
--
Sattre Press In the Quarter
http://sattre-press.com/ by Robert W. Chambers
in**@sattre-press.com http://sattre-press.com/itq.html
这篇关于代码不起作用 - 绝望帮助:(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!