data (#23) - New OSM-Converter (#335) - Message List
Hey folks,
here's another one. It's rather experimental but works even with larger sets like Germany. It's purely written in Java without any dependencies to other libraries. The focus of this converter is on reduction of data, not on pulling each info piece into DB. The result is a single SQL file, you can push into your routing db.
Feedback welcome.
Here is the link:
http://rapidshare.com/files/353030545/osm2pgr-0.8.zip.html
Password is "osm"
Rapidshare says 10 downloads are the limit. So contact me, if the bag is empty.
Greetings.
Carsten. Germany.
PS.
Sorry, the program is under CC-BY-NC-ND.
-
Message #1385
Here is another link
pimapper02/20/10 07:23:10 (9 months ago) -
Message #1428
New version with some major bug fixes.
http://www.load.to/YNqRHuB89X/osm2pgr-0.8.3.zip
Fixes:
1) Now ST_ - works correctly.
2) Backslash-Problem when importing great-britain.osm
3) Accoustic signal for phase 1 - 3 (beep, beep, beep)
4) handles new boundings tag from extracted osm files.
New experimental features:
1) Crop-Mode
2) Merge-Mode
Future:
1) Creating directed graph for e.g. shooting*
some people asked for a short How-To ...
Precondition: Java 1.6 and above
java -Xmx128m -jar osm2pgr-0.8.3.jar 0 hh hamburg.osm
If you have more memory available you can speed up things a lot
java -Xmx1280m -jar osm2pgr-0.8.3.jar 0 de germany.osm tileGrid=3x3
The latter uses more memory cache but fewer cache files.
On a 2-Gig/2-Gig-Windows-Home-Box this takes about 75 minutes to create the sql file and another 45 minutes to push it into db via psql.
you can also run the phases separately.
java -Xmx1024m -jar osm2pgr-0.8.3.jar 1 de germany.osm tileGrid=2x2 java -Xmx1024m -jar osm2pgr-0.8.3.jar 2 de tileGrid=2x2 java -Xmx1024m -jar osm2pgr-0.8.3.jar 3 de tileGrid=2x2
If you extract the config.properties from the jar you can also use a call like this:
java -Xmx128m -jar osm2pgr-0.8.3.jar 0 hb bremen.osm config=my.properties
Every parameter is overridable on the command line with the pattern:
property=value (no spaces!)
Some successful tests:
germany.osm (from geofabrik) great-britain.osm (from geofabrik) africa.osm (from geofabrik) new-york.osm (from claudmade) south of europe.osm (from geofabrik)
Regards
Carsten
pimapper03/14/10 04:32:06 (8 months ago)-
Message #1455
+ Great work
- I'm a newbie in routing
To my Problems: I'm trying to understand the tutorial from http://pgrouting.postlbs.org/wiki/WorkshopOL2.7andOSM
The result of using your tool is a table os_topo (with the osnabrueck.osm file from the tutorial). But there are not tables like classes, nodes, types, vertices_tmp. If I understand the tutorial right then it is mandatory to have those tables.
My table os_topo looks similar to the table ways from the tutorial except that it has no "gid" column. Is your "id" column identical to the "gid" from the tutorial?
The result of the tutorial is always an alert box "wrong" if I start a route calculation (if ignoring the missing tables and using id as gid). So I need a little help to figure out how to work around the missing data to match the requirements of the tutorial. Or is there a more Windows friendly guide available?
Any help, hints, tutorials?
Thanks and Regards, R.L.
LongRed04/07/10 10:18:51 (8 months ago)-
Message #1456
Hey LongRed?,
all you need is this single table.
assigning vertices etc. is already processed by the converter.
To get a first impression just test a simple dijkstra.
e.g. From Vertex 4711 to 4712 you would call:SELECT * FROM Shortest_path('select * from os_topo', 4711, 4712, false, true);
Shortest_Path expects an id, not a gid. I don't remember the example exactly but in most tutorials the gid is aliased for id. Sth. like "SELECT gid AS id ..."
If you'd like to print the street names in one shot plus having the ability to visualize it in QuantumGIS:
CREATE OR REPLACE VIEW my_route AS SELECT topo.id, topo.osm_name, topo.geom_way AS edge FROM Shortest_Path('SELECT * FROM os_topo', 217188, 354000, false, true) AS path, os_topo AS topo WHERE path.edge_id = topo.id;
By the way. There are some other columns in this table. Most of them I use in QuantumGIS where you can visualize your route and topo very nicely.
Regards,
Carsten
pimapper04/08/10 04:55:33 (8 months ago)
-
-
-
Message #1475
Hey guys.. The links you 've posted don't work.....Please post valid links.. Thanks!!
agagelis04/22/10 03:54:51 (7 months ago)-
Message #1476
Hi pimapper,
pgRouting is going to move website, mailing lists and subversion to OSGeo servers. We can also provide space for file downloads ( http://download.osgeo.org/pgrouting). You're welcome to put your files there if you like.
Just contact me so we can see how that works with server access (daniel at georepublic dot de)
daniel04/22/10 09:29:37 (7 months ago)-
Message #1477
Ups !!!
Load.to killed that file.
Hey Daniel, can you give me an account and an own folder under binaries?
Thanks,
PIMapper.
Additional info:
New features of the next version:
- Bidirected graph creation
- Interface for implementing your own writer
- Cropping and Merging of tiles
- Parallel converting with more than one machine
pimapper04/22/10 16:46:40 (7 months ago)-
Message #1478
Hi PIMapper,
I'm trying to understand the OSGeo wiki page about the download server and the reponse of Frank Warmerdam in my ticket to create a download directory for pgRouting. Maybe it's too early to understand ;-)
http://wiki.osgeo.org/wiki/Download_Server#Management
http://trac.osgeo.org/osgeo/ticket/558#comment:2So far I can login or upload files but don't really get what means "so anyone from the pgrouting team should be able to write" ... who is pgRouting team? ;-)
Maybe I need to ask Frank. Though do you have an OSGeo ID already?
daniel04/23/10 10:47:54 (7 months ago)-
Message #1480
Hmmm...
sounds comlicated ;-(
Until everything is more clear I will be waiting. In the meantime I'm going on bothering load.to with my jar. Maybe you can help me at this point, download it and put it on a stable download server. I don't know how long it will survive this time but imform me if it's down again. Here is the new Link:
http://www.load.to/AjSwi1Gmq2/osm2pgr-0.8.3.zip
I'm still working on the next version. But I don't want to release it now because there are some professional things I want to integrate first. Things like versioning, comprehensive documentation, reference and tutorial. The tutorial will be written in german but I hope there is s.o. out there who can translate it one day. Ring Ring!!! - Is there anyone who can do this for me?
Regards,
Carsten, alias PIMapper.
pimapper04/24/10 18:09:32 (7 months ago)-
Message #1481
Thank you! I put the file on the OSGeo download server:
http://download.osgeo.org/pgrouting/osm2pgr/
I think once you made an account for OSGeo (whether it's for the Drupal website or their TRAC it's all the same) you might be able to upload files yourself or at least I can ask to add you to the list)
Since we also want to move this TRAC to OSGeo servers (will be the last step though), I'm thinking now to cleanup the wiki and organize it better. It would be nice to also have the tools around pgRouting around, so users can find them easily. We can also share the Subversion repository (needs some better structure as well).
pgRouting is also looking for contributors and I think most important to achieve this is to make it easy for everyone to participate. I might be able to translate your tutorial. I might also make use of your import tool in the pgRouting workshop at FOSS4G in Barcelona.daniel04/24/10 20:23:58 (7 months ago)-
Message #1482
Thank you!
But I hope it's ok that this tool is under CC-BY-NC-ND?
OSGEO is a pure OpenSource?-Place, isn't it?
Regards,
Carsten.
pimapper04/25/10 04:24:00 (7 months ago)-
Message #1485
Hi Carsten,
Thanks for the hint! ;-) Sorry, I actually didn't check the license in detail and missinterpreted the meaning of "NC-ND".
Just out of curiousity: do you have a particular reason to chose this license type? It is not so common one and I'm afraid it might retain people to use your software or contribute.
I don't think OSGeo has such a policy regarding their download server and assume it's OK. It would be not OK probably if you would like to become an OSGeo project.
Personally your license choice would make it impossible to use osm2pgr for projects of my company (Georepublic), so I would prefer alternative tools then.
daniel04/26/10 18:57:31 (7 months ago)-
Message #1486
Sorry, I haven't found an appropriate licence, yet. So I've chosen a quite strict one. May be I will open the results even for commercial use. I've written an interface for implementing your own writer. So at least the ND doesn't make sense anymore. But I don't want s.o. messing around in the sources. As a consequence "OpenSource?" is not the right choice for me. Do you know another licence model for my purpose?
pimapper04/26/10 21:54:07 (7 months ago)-
Message #1492
Probably your software would be then some sort of "Freeware". I actually don't think people "mess around" with source code, instead they would review your source code and do a lot of testing.
pgRouting in my opinion makes it too difficult for users at the moment to participate, what I want to change, because it's great for a project to have an active community.
On the other hand I'm in favor of licenses with copyleft ( http://en.wikipedia.org/wiki/Free_software_licence#Restrictions) like GPL does.I think to provide good code quality + developer participation, it's just about providing the right infrastructure and tools.
daniel04/27/10 18:33:11 (7 months ago)-
Message #1499
Hi Daniel,
in the meantime I've renamed the converter to osm2po and have put it under a freeware licence. Before posting it here or somewhere else I would like to post it to you. I have also finished the german documentation. Can you give me your email-addi for this purpose?
Regards
Carsten
pimapper05/05/10 04:31:45 (7 months ago)
-
-
-
Message #1488
Hey Daniel,
you said you can translate the doc into english? May I send you the first draft (meanwhile 14 illustrated pages) via email?
Regards,
Carsten.
pimapper04/27/10 06:10:28 (7 months ago)
-
-
-
-
-
-
-
-
-
Message #1517
Hi pimapper!!
i have downloaded your app and it works well!! Thank you!! Now I have some questions about some things that I don't understand. 1- How do you calculate the column "cost"? Normally this columns have to be directly the column lengh, isn't it? 2- Which app can I use to visualize the solution? I was thinking about QGIS!! Isn't there any other better? 3- I don't understand so much the table solution. What is edge_id? and why do I have a lot of lines? what does it mean each line?
thank you far all!! :DDD
Jorge
jorgesolebur05/28/10 21:07:57 (6 months ago)-
Message #1518
The cost is based on the real length in km and the estimated speed from the config.properties (inside jar). I don't use the max-speed from *.osm. The cost itself is measured in real hours. I tested it against google maps. I chose a route from the south to the north of germany. The distance was exactly the same (633 km). The estimated time differed around 10 minutes or so.
Regards,
PS: QGIS is the best!
pimapper05/28/10 22:48:28 (6 months ago)-
Message #1520
Thank youuu!! But I have another question...
With QGIS, can you visualize the number of each node, or the name of each street?¿ I hope that yes, but I don't have any idea of how do it!
Thankssss :)
jorgesolebur05/31/10 20:05:40 (6 months ago)-
Message #1521
Yes, it is possible. Double click on the layer in the tree view. A dialog will pop up where you can edit properties for labels, colors etc. You can also restrict data, classify them (even IDs in yellow, odd in blue) or sth. like that.
Regards
Carsten
pimapper05/31/10 21:23:32 (6 months ago)-
Message #1524
I did it!! thank you!!
Now I've got a problem...I don't know how to use the wrapper functions with your program osm2pgRouting... I have tried by this way (I want to use, for example, the routing dijkstra_sp):
SELECT * FROM dijkstra_sp('SELECT id AS gid, source, target, cost AS lenght, geom_way AS the_geom FROM cat_topo', 119745, 120158);
But it doesn't work!!
How can i solve it??
Thank youu! :)
jorgesolebur06/01/10 23:42:17 (6 months ago)-
Message #1525
I've never tested the wrappers. I don't really know what parameters they do expect... Your cat_topo has id, source, target, x1, y1, x2, y2, cost. This is exactly what shortest_path or shortest_path_astar expect. I don't know if the wrappers need renamed attributes. If so, create a query with aliased attributes like SELECT gid as id, etc... Maybe Daniel can help at this point.
Regards
Carsten (from Hamburg, Germany)
pimapper06/02/10 08:36:22 (6 months ago)-
Message #1526
Yess!! that's what I am trying to do!!
Now I have another query to ask you...Can you give me the equation which you calculate the row COST? I know that there's the time on the middle, but I would like to know how you calculate exactly.
Thank youu! :)
jorgesolebur06/02/10 20:29:46 (6 months ago) -
Message #1527
Can I have too the code source of your app osm2pgrouting? Because on the web there's only the binary .jar, and I would like to have the source. Can I?
Thanksss a lot :)
jorgesolebur06/02/10 21:10:23 (6 months ago)-
Message #1528
Here is a good link for calculating distances on earth:
http://www.movable-type.co.uk/scripts/latlong.html
... no, sorry. I'm not going to put it open source. see discussion above. Maybe the next version will be free. If you have detailed question you can ask me directly via e m ail: cmindividual ( a t ) web (d o t) de.
Regards
Carsten.
pimapper06/03/10 04:13:21 (6 months ago)-
Message #1548
What about a documentation?
What is the meaning of "highway.tertiary = 3, 40" for example? 40 km/h and 3 because it is tertiary?
Thanks and Regards, R.L.
LongRed06/24/10 19:42:08 (5 months ago)-
Message #1552
3 is a self defined priority. I use this for data reduction on PostGIS 40 km/h is correct. You may contact me via EMail. See above.
pimapper06/25/10 00:10:58 (5 months ago) -
Message #1596
LAST INFO ON THIS THREAD:
I RENAMED osm2pgr TO osm2po.
I ALSO PUT IT UNDER ITS OWN DOMAIN.
LOOK AT http://osm2po.de
REGARDS
Carsten
pimapper07/24/10 03:05:01 (4 months ago)
-
-
-
-
-
-
-
-
-