Error: osm-file is not valid

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Error: osm-file is not valid

tobs
Hi,
I'm late, I know. At first, I want to say, great work! Thanks! I use the script osm2nds_arcgis_10.0_console_1.1.1.jar and get everytime an Error

"ERROR: org.n52.osm2nds.reader.ReaderException: The reading process of the file 'C:\...map.osm' failed:
        The file 'C:\...map.osm' could not be unmarshalled. Maybe the file isn't valid."

I don't know why, because I use the file osm-file from geofabrik. Which files du you use and where from or have somebody else an idea about my mistake?

Thanks and Greets
tobs
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

peterseva
Hi!

Could you please post the link to the OSM file and send the entire error message?

Best wishes,
Eva
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

tobs
I get the file from here and choose the osm.bz2 (unpack with winrar)

Or from where I get "betther" files?
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

peterseva
Hi!

As I don't have the entire error message, I can't exactly say what's the cause of the problem.

OSM files from Geofabrik are good files. Sometimes, you have to delete an attribute such as in the following case:

http://osm2nds.forum.52north.org/unmarshal-error-while-running-the-OSM2NDS-td4639462.html

Please tell us if this is the problem.

Best wishes,
Eva
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

tobs
I had to remove the attribute "timestamp" and the error is away ;)

But it deosn't work, I get this message

2013-06-18 09:34:43 INFO: 0% finished.
2013-06-18 09:34:43 INFO: *************************************************
2013-06-18 09:34:43 INFO: OSM2NetworkDataset:
2013-06-18 09:34:43 INFO: Converting an OSM file into a file geodatabase for the
 usage in the ArcGIS Network Analyst...
2013-06-18 09:34:43 INFO: The follwing geodatabase structure will be created:
2013-06-18 09:34:43 INFO:       C:\OSM2NDS\output\logfile.txt [Geodatabase]
2013-06-18 09:34:43 INFO:          C:\OSM2NDS\output\logfile.txt [Feature Datase
t]
2013-06-18 09:34:43 INFO:             barriers [Feature Class]
2013-06-18 09:34:43 INFO:             C:\OSM2NDS\output\logfile.txt_ND [Network
Dataset]
2013-06-18 09:34:43 INFO:             C:\OSM2NDS\output\logfile.txt_ND_Junctions
 [Feature Class]
2013-06-18 09:34:43 INFO:             pois [Feature Class]
2013-06-18 09:34:43 INFO:             roads [Feature Class]
2013-06-18 09:34:43 INFO:             turns [Feature Class]
2013-06-18 09:34:43 INFO: Start time:   2013-06-18 09:34:43
2013-06-18 09:34:43 INFO: *************************************************
2013-06-18 09:35:32 INFO: ArcInfo license used.
2013-06-18 09:35:32 INFO: Network Analyst extension used.
2013-06-18 09:35:32 INFO: Reading the XML parameters 'C:\OSM2NDS\motorcar.xml'..
.
2013-06-18 09:35:32 INFO: XML parameter 'slowDown_barrier_restrictions': The har
d-coded else value is 'yes'.
2013-06-18 09:35:32 INFO: XML parameter 'access_barrier_restrictions': The hard-
coded else value is 'unknown'.
2013-06-18 09:35:32 INFO: XML parameter 'access_highway_restrictions': The hard-
coded else value is 'unknown'.
2013-06-18 09:35:32 INFO: XML parameter 'oneway_highway_implications': The hard-
coded else value is 'no'.
2013-06-18 09:35:32 INFO: XML parameter 'access_barrier_restrictions_interpretat
ion': The default else value is 'no'.
2013-06-18 09:35:32 INFO: XML parameter 'access_highway_restrictions_interpretat
ion': The default else value is 'yes'.
2013-06-18 09:35:32 INFO: XML parameter 'access_highway_tracktype_restrictions':
 The default else value is 'yes'.
2013-06-18 09:35:32 INFO: XML parameter 'driveTimeFactors_highway_tracktype': Th
e default else value is '1.0'.
2013-06-18 09:35:32 INFO: XML parameter 'access_highway_surface_restrictions': T
he default else value is 'yes'.
2013-06-18 09:35:32 INFO: XML parameter 'driveTimeFactors_highway_surface': The
default else value is '1.0'.
2013-06-18 09:35:32 INFO: XML parameter 'access_highway_smoothness_restrictions'
: The default else value is 'yes'.
2013-06-18 09:35:32 INFO: XML parameter 'driveTimeFactors_highway_smoothness': T
he default else value is '1.0'.
2013-06-18 09:35:32 INFO: XML parameter 'maxspeed_highway_implications': The def
ault else value is 'null'.
2013-06-18 09:35:32 INFO: XML parameter 'maxspeed_highway_implications': The def
ault else value is 'null'.
2013-06-18 09:35:32 INFO: XML parameter 'maxspeed_highway_implications': The def
ault else value is 'null'.
2013-06-18 09:35:32 INFO: XML parameter 'avspeed_highway_implications': The defa
ult else value is '50'.
2013-06-18 09:35:32 INFO: 5% finished.
2013-06-18 09:35:32 INFO: Reading the OSM file 'C:\OSM2NDS\berlin-latest.osm'...

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at com.sun.xml.internal.bind.v2.ClassFactory.create0(Unknown Source)
        at com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.createInstance
(Unknown Source)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContex
t.createInstance(Unknown Source)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StructureLoader.sta
rtElement(Unknown Source)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.ProxyLoader.startEl
ement(Unknown Source)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContex
t._startElement(Unknown Source)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContex
t.startElement(Unknown Source)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.ValidatingUnmarshal
ler.startElement(Unknown Source)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startE
lement(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startEle
ment(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.
emptyElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scan
StartElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l$FragmentContentDriver.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(U
nknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next
(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown So
urce)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Un
known Source)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
arse(Unknown Source)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.un
marshal0(Unknown Source)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.un
marshal(Unknown Source)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Sou
rce)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Sou
rce)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Sou
rce)
        at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Sou
rce)
        at org.n52.osm2nds.reader.OSMReader.readAsOsm(OSMReader.java:155)
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

peterseva
Hi!

Your OSM file seems to be too big. Please refer to this thread:

http://osm2nds.forum.52north.org/New-version-for-big-OSM-files-td4545779.html

Best wishes,
Eva
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

tobs
Hi,

sorry for the high number of posts...

I reduced my OSM-File und now it seems to work till 11% and send me this massage

2013-06-18 12:58:01 INFO: 5% finished.
2013-06-18 12:58:01 INFO: Reading the OSM file 'C:\OSM2NDS\berlin-latest_tight.o
sm'...
2013-06-18 12:58:58 INFO: 11% finished.
2013-06-18 12:58:58 INFO: Writing file geodatabase (C:\OSM2NDS\output\logfile.log.gdb)...
2013-06-18 12:59:01 ERROR: The workspace could not be generated: AutomationExcep
tion: Unspecified error IOException: Therefore the process is canceled.
2013-06-18 12:59:01 INFO: End time:     2013-06-18 12:59:01
2013-06-18 12:59:01 INFO: ******************* Summarize *******************
2013-06-18 12:59:01 INFO: Start time:   2013-06-18 12:57:55
2013-06-18 12:59:01 INFO: End time:     2013-06-18 12:59:01
2013-06-18 12:59:01 INFO: Duration [HH:mm:ss]:  00:01:05
2013-06-18 12:59:01 INFO: *************************************************
2013-06-18 12:59:01 INFO: Number of errors: 1
2013-06-18 12:59:01 INFO: *************************************************


What could it be? I start the batchfile as Administrator.
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

peterseva
Hi!

Don't worry about the number of your posts.

Your log file says:

Writing file geodatabase (C:\OSM2NDS\output\logfile.log.gdb)...

Is "C:\OSM2NDS\output\logfile.log.gdb" your region name?!? The characters "\", ":", and "." are not accepted for the name of a feature dataset.

So, please choose another region name.

Best wishes,
Eva
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

maho
Hello Forum!

I have a problem with running the OSM2NDS tool. I hope you can help me, cause I'm despairing...

Here are the problems:

-First of all I'm an absolute beginner in using arcgis :)
-the second problem is that I'm trying to create a reachabiltiy-analysis and after reading some articles I got to the point to solve this with arcgis and osm2nds. therefore I created a .osm file of the region I want to investigate. With this file I want to create the network dataset. But after running the osm2nds_arcgis_10.0_gui_1.1.1(as showed in the instructions) it throws an error. Here is the complete log file:

C:\Program Files (x86)\ArcGIS\Desktop10.1\java\lib>"C:\Program Files (x86)\Java\
jre6\bin\java" -Xmx1024m -cp "C:\Program Files (x86)\ArcGIS\Desktop10.1\java\lib
\arcobjects.jar";"C:\Program Files (x86)\ArcGIS\Desktop10.1\java\lib\osm2nds_arc
gis_10.0_console_1.1.1.jar" org.n52.osm2nds.core.userinterface.console.Main "C:\
Program Files (x86)\ArcGIS\Desktop10.1\java\lib\Ludwigshafen.osm" "C:\Program Fi
les (x86)\ArcGIS\Desktop10.1\java\lib\Parameters_Foot_v1.1.xml" "C:\Benutzer\Hoi
sm\Desktop\ArcGIS" Ludwigshafen "C:\Benutzer\Hoism\Desktop\ArcGIS\log.log"
2013-06-27 09:23:11 INFO: 0% finished.
2013-06-27 09:23:11 INFO: *************************************************
2013-06-27 09:23:11 INFO: OSM2NetworkDataset:
2013-06-27 09:23:11 INFO: Converting an OSM file into a file geodatabase for the
 usage in the ArcGIS Network Analyst...
2013-06-27 09:23:11 INFO: The follwing geodatabase structure will be created:
2013-06-27 09:23:11 INFO:       Ludwigshafen [Geodatabase]
2013-06-27 09:23:11 INFO:          Ludwigshafen [Feature Dataset]
2013-06-27 09:23:11 INFO:             barriers [Feature Class]
2013-06-27 09:23:11 INFO:             Ludwigshafen_ND [Network Dataset]
2013-06-27 09:23:11 INFO:             Ludwigshafen_ND_Junctions [Feature Class]
2013-06-27 09:23:11 INFO:             pois [Feature Class]
2013-06-27 09:23:11 INFO:             roads [Feature Class]
2013-06-27 09:23:11 INFO:             turns [Feature Class]
2013-06-27 09:23:11 INFO: Start time:   2013-06-27 09:23:11
2013-06-27 09:23:11 INFO: *************************************************
2013-06-27 09:23:13 INFO: ArcInfo license used.
2013-06-27 09:23:13 INFO: Network Analyst extension used.
2013-06-27 09:23:13 INFO: Reading the XML parameters 'C:\Program Files (x86)\Arc
GIS\Desktop10.1\java\lib\Parameters_Foot_v1.1.xml'...
2013-06-27 09:23:13 INFO: XML parameter 'slowDown_barrier_restrictions': The har
d-coded else value is 'yes'.
2013-06-27 09:23:13 INFO: XML parameter 'access_barrier_restrictions': The hard-
coded else value is 'unknown'.
2013-06-27 09:23:13 INFO: XML parameter 'access_highway_restrictions': The hard-
coded else value is 'unknown'.
2013-06-27 09:23:13 INFO: XML parameter 'oneway_highway_implications': The hard-
coded else value is 'no'.
2013-06-27 09:23:13 INFO: XML parameter 'access_barrier_restrictions_interpretat
ion': The default else value is 'no'.
2013-06-27 09:23:13 INFO: XML parameter 'access_highway_restrictions_interpretat
ion': The default else value is 'yes'.
2013-06-27 09:23:13 INFO: XML parameter 'access_highway_tracktype_restrictions':
 The default else value is 'yes'.
2013-06-27 09:23:13 INFO: XML parameter 'driveTimeFactors_highway_tracktype': Th
e default else value is '1.0'.
2013-06-27 09:23:13 INFO: XML parameter 'access_highway_surface_restrictions': T
he default else value is 'yes'.
2013-06-27 09:23:13 INFO: XML parameter 'driveTimeFactors_highway_surface': The
default else value is '1.0'.
2013-06-27 09:23:13 INFO: XML parameter 'access_highway_smoothness_restrictions'
: The default else value is 'yes'.
2013-06-27 09:23:13 INFO: XML parameter 'driveTimeFactors_highway_smoothness': T
he default else value is '1.0'.
2013-06-27 09:23:13 INFO: XML parameter 'maxspeed_highway_implications': The def
ault else value is 'null'.
2013-06-27 09:23:13 INFO: XML parameter 'maxspeed_highway_implications': The def
ault else value is 'null'.
2013-06-27 09:23:13 INFO: XML parameter 'maxspeed_highway_implications': The def
ault else value is 'null'.
2013-06-27 09:23:13 WARN: XML parameter 'avspeed_highway_implications': The defa
ult else value is overwritten by the else value '3.6'.
2013-06-27 09:23:13 INFO: 5% finished.
2013-06-27 09:23:13 INFO: Reading the OSM file 'C:\Program Files (x86)\ArcGIS\De
sktop10.1\java\lib\Ludwigshafen.osm'...
2013-06-27 09:23:13 ERROR: org.n52.osm2nds.reader.ReaderException: The reading p
rocess of the file 'C:\Program Files (x86)\ArcGIS\Desktop10.1\java\lib\Ludwigsha
fen.osm' failed:
        The file 'C:\Program Files (x86)\ArcGIS\Desktop10.1\java\lib\Ludwigshafe
n.osm' could not be unmarshalled. Maybe the file isn't valid.
        javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'timestamp' is
 not allowed to appear in element 'osm'.] ReaderException: Therefore the process
 is canceled.
2013-06-27 09:23:13 INFO: End time:     2013-06-27 09:23:13
2013-06-27 09:23:13 INFO: ******************* Summarize *******************
2013-06-27 09:23:13 INFO: Start time:   2013-06-27 09:23:11
2013-06-27 09:23:13 INFO: End time:     2013-06-27 09:23:13
2013-06-27 09:23:13 INFO: Duration [HH:mm:ss]:  00:00:02
2013-06-27 09:23:13 INFO: *************************************************
2013-06-27 09:23:13 INFO: Number of warnings: 1
2013-06-27 09:23:13 INFO: Number of errors: 1
2013-06-27 09:23:13 INFO: *************************************************

C:\Program Files (x86)\ArcGIS\Desktop10.1\java\lib>PAUSE
Drücken Sie eine beliebige Taste . . .

Maybe somebody out there can help me. Thanks in advance,
maho
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

peterseva
Hello Maho,

this is a well-known error. Please refer to this:

http://osm2nds.forum.52north.org/unmarshal-error-while-running-the-OSM2NDS-tp4639462p4639464.html

Best wishes
Eva
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

maho
Thanks for the quick reply!

Yeah I got this way of removing the rejected attributes... but for 500.000 lines? Or is there a way to remove them all in once?

Thanks maho
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

peterseva
Hello Maho,

your error message is this: "Attribute 'timestamp' is not allowed to appear in element 'osm'.". This means that the attribute 'timestamp' is in the root tag 'osm'. This should be in the second line of the OSM file. All other attributes with the name 'timestamp' should be accepted.

Best wishes,
Eva
Reply | Threaded
Open this post in threaded view
|

Re: Error: osm-file is not valid

maho
It worked!!!
Thank you so much. Sometimes being dumb hurts really... :)