You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2011-11-10 18:44:13

Landon O
Member
Registered: 2011-11-10
Posts: 1

Java OpenGL rendering of streets

Hi,

OpenStreetMap newbie here! I am tasked with rendering the streets found in the OpenStreetMap data on a globe using Java OpenGL (JOGL).

I am trying to wrap my head around Osmosis, JOSM, and osm2poly. The last on that list being important because the polygon format is very friendly for drawing the streets.

My approach is to use Osmosis to strip out the specific types of streets I want (ie highway, local streets, etc.), use osm2poly to create polygon files for these streets, and then read these files in Java and draw them on the globe. Is this approach feasible and correct?

If so...

1) I am having trouble using Osmosis to rip out the streets with the tags that I want. For example, I am using the following commands:
"osmosis --read-xml Albuquerque.osm --way-key-value keyValueList="waterway" --used-node --write-xml Albuquerque.waterway.osm"
"osmosis --read-xml Albuquerque.osm --way-key-value keyValueList="highway" --used-node --write-xml Albuquerque.highway.osm"

They both create identical files! What am I doing wrong?

2) Osm2poly is returning errors no matter what OSM file I use. The error usually reads, "Cannot process tag 'highway'....". What does this mean?

Offline

#2 2011-11-10 19:22:01

stephan75
Member
Registered: 2008-05-28
Posts: 2,918

Re: Java OpenGL rendering of streets

According to point 1)

You can also try http://wiki.openstreetmap.org/wiki/Osmfilter

Offline

#3 2011-11-10 21:36:23

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,840
Website

Re: Java OpenGL rendering of streets

Landon O wrote:

1) I am having trouble using Osmosis to rip out the streets with the tags that I want. For example, I am using the following commands:
"osmosis --read-xml Albuquerque.osm --way-key-value keyValueList="waterway" --used-node --write-xml Albuquerque.waterway.osm"
"osmosis --read-xml Albuquerque.osm --way-key-value keyValueList="highway" --used-node --write-xml Albuquerque.highway.osm"

They both create identical files! What am I doing wrong?

You are using --way-key-value keyValueList="...", but you specify only keys for the filter, no values.
Try using --way-key keyList="highway" instead.

I don't know anything about Osm2poly, though.


OSM in 3D: OSM2World

Offline

Board footer

Powered by FluxBB