From: Francois-Xavier P. <fra...@ca...> - 2008-10-30 08:03:21
|
Hi, I've been playing with JOSM SAXParser in SpatialDataIntegrator and made 2 components to read nodes, ways and openstreetmap tags. Then you can process OSM data in your process and output in all formats available (Shapefile, MIF/MID, Postgis, ...) and also filter, define mapping, ... More details here : http://www.talendforge.org/wiki/doku.php?id=sdi:r_d:osm It's only available in SVN for now but see how to install section for test. Ciao. Francois On mer, 2008-10-29 at 16:47 -0700, fx5900 wrote: > I'm not sure how you are with python but when reading this wiki, > http://wiki.openstreetmap.org/index.php/GML, python section, but when i use > this on the command prompt osm2gml.py < map_01_data.osm > map_01_data.gml it > manages to covert my osm data into gml format but not very succesfful as i > get errors like > > Traceback <most recent call last>: > File "C:\osm2gml.py, line 86, in <module> > xml.sax.parse <sys.stdin, osmParser > > IOError : [Errono 9] bad discriptor > which means the conversion was not a great success. Does anybody know if i > need to edit the file in some way because i took out the htlm headers . > > 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 > > this leads me to belive their might be something wrong with the file or > something wrong i'm doing but can't seem to figure out what? > > Cheers |