Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am working with GPX files from OpenStreetMap to render the public transportation lines of Berlin. I converted them to GeoJSON using the togeojson script. For some reason some of the lines are rendered as a "circle". The first and the last point are connected for some reason. The effect can be seen at the GitHub project I linked.

What am I doing wrong?

share|improve this question
    
Which of the 20+ geojson files are we meant to look at to see the problem? –  BradHards Feb 8 at 23:56
    
@BradHards U5 for example. –  JJD Feb 9 at 1:06
    
The data is probably what the GPS receiver recorded, but because the U-Bahn doesn't provide very good GPS environment, the receiver goes into dead-reckoning mode. Its hard to say without looking at the source data and knowing exactly how it was recorded. –  BradHards Feb 9 at 1:21
    
@BradHards I linked the data source. It is OpenStreetMap. I took the GPX files. –  JJD Feb 9 at 2:33

1 Answer 1

up vote 1 down vote accepted

The gpx files made of Openstreetmap data only have limited use. All way segments are simply concatenated in the sequence of the way IDs. That does not make much sense.

There is not yet any tool that puts the segments together in a logical way.

The workaround I use is to load the original data (the XML link) into JOSM editor, and join the way elements to a single line, and export that. Beware not to upload on leaving JOSM!!!

share|improve this answer
    
How exactly can I open the XML link in JOSM (which menu item)? I have the server running on port 8011 so the application reacts when I click the JOSM link. However nothing shows up. Sry, I just did my first steps using JOSM. –  JJD Feb 9 at 12:10
1  
File -> Open is the usual way. I never use the JOSM link. Alternatively you can copy the relation ID to clipboard, then File -> Download Object with Object Type Relation. If you see nothing, have a look at the Relation window. You might have to reload the relation elements. –  Andre Joost Feb 9 at 13:09
    
That works good very good with Join Node to Way. Can you tell if there is a way how I can exclude the station names and just export the line itself? –  JJD Feb 9 at 14:00
    
File - New Layer, then go back to your first Layer, select the line and Edit -> Merge selection. –  Andre Joost Feb 9 at 15:07
    
Merge selection requires to Select All before. This also selects the points. How can I select just the line which I created before in the join step? –  JJD Feb 9 at 15:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.