Re: [OSM-talk] Converting .osm file into shape file or mapinfo table
Below is what I would do on my MacBook. More info at http://www.gdal.org/drv_osm.html Hermann $ wget http://download.geofabrik.de/europe/liechtenstein-latest.osm.pbf $ mkdir outfiles $ ogr2ogr outfiles/ liechtenstein-latest.osm.pbf $ ls -1 outfiles/ lines.dbf lines.prj lines.shp lines.shx multilinestrings.dbf multilinestrings.prj multilinestrings.shp multilinestrings.shx multipolygons.dbf multipolygons.prj multipolygons.shp multipolygons.shx points.dbf points.prj points.shp points.shx On 2014-05-27 3:34, mick wrote: After a few months break from mapping I'm having dificulty converting .osm files into mapinfo tables. Before the break I could import the .osm into qgis then export is as needed but now Qgis wont do this. With the old wiki I could find a section that listed and described a number of tools for various manipulations of osm data, this seems to be missing or moved to somewhere not directly accessable from the wiki. Could someone help this old fool find it again please. mik ___ talk mailing list talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/talk
[OSM-talk] Fwd: Re: Converting OSM roads to GIS dataset (Queensland, Australia)
On 2013-09-03 3:23, nicholas.g.lawrence wrote: Hello all, I'm trying to convert the Queensland, Australia OSM roads into a GIS format (esri shape or mapinfo) using GDAL 1.10 I downloaded a .osm.pbf file for australia from http://download.geofabrik.de/australia-oceania/australia.html I'm only really after the geometry that represents roads. So I don't need the points or polygons. Does anyone have any suggestions about any arguments I can put into my GDAL command to restrict translation to only what I consider relevant? For example, the argument -spat 136 -31 156 should restrict import to a bounding box that approximately represents Qld. I would appreciate advice on; - what geometry layer suits my purposes - how to specify that in a GDAL argument Hi, Below is what I would do. I assume you know http://gdal.org/ogr/drv_osm.html, for further reading. $ ogr2ogr roads.shp australia-oceania-latest.osm.pbf \ -spat 136 -31 156 10 \ -sql "select * from lines where highway is not null" --config OSM_CONFIG_FILE ./osmconf.ini The above conversion took ~30 seconds and extracted 208109 highway lines. ./osmconf.ini is a local copy of my Macbook's /opt/local/share/gdal/osmconf.ini where I changed 1 line in section [lines]: attributes=name,highway,waterway,aerialway,barrier,man_made # default attributes=name,highway,ref,oneway,maxspeed # customised for highways BTW: the northern latitude is missing in your spatial bounds, so I added 10 there. Hope this helps, Hermann ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Updated Geofabrik Download Server
Hi, Thanks for the updated download service. Just to let you know that my GE client didn't want to display brazil.kml. I had to change element name Multigeometry to MultiGeometry in order to make it work. Hermann On 2013-03-11 7:11, Frederik Ramm wrote: Hi, I've made some updates to the download server at download.geofabrik.de. You'll now get a map preview of the are you're downloading, and if you have a very slow internet connection you will value the fact that you can now expliticly download something like europe-130310.osm.pbf instead of always using "-latest" - that way you can be sure the file won't be removed from under your feet while you're downloading it. MD5 sums are now supported, as are regional daily diffs - it should now be very easy to keep an updated extract for your region of interest using just Osmosis and minimal daily downloads. The URLs have changed slightly but redirects are in place so that old links should still work: * leading /openstreetmap/ has gone * "-latest" introduced before file extension * underscores replaced by hyphens i.e. instead of /openstreetmap/europe/great_britain.osm.pbf it is now /europe/great-britain-latest.osm.pbf Bye Frederik ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] What to call OSM data?
On 2012-11-26 11:22, Martin Koppenhoefer wrote: I'd like to point out that even though your claim might be true in terms of quantity (didn't check that but have my doubts too, because there are far more road ways in the db than landuse) there are many countries which didn't import CORINE, Germany and Italy for instance (I think also UK) About one year ago, I made a rough count of the values for the source key, for all OSM ways in geofabrik's europe.osm.pbf. IIRC: about 1% of the ways looked like imported CORINE, Urban Atlas, or similar data. Hermann ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Worst of OSM
On 15/05/2012 15:37, Pieren wrote: On Tue, May 15, 2012 at 2:53 PM, Kate Chapman wrote: Personally I think it is discouraging. I think positive encouragement is much better than this negative method. The problem is that this page is mixing real mistakes (mainly bad imports) and areas where the geodata do not comply with... The page also includes a good part of ignorance. The Worst of "Worst of OSM" is an example from Brasilia where the question is: "Do they have road names at all in Brazil?" The simple answer is: Not necessarily in Brasilia, where block names are quite popular. This went over various lists recently, e.g. [1]. If one doesn't know a minimum about a given area, it could be wise to keep one's mouth shut rather than pointing to "mistakes". Hermann [1] http://lists.openstreetmap.org/pipermail/tagging/2012-April/009878.html ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Statistics on road network length?
On 20/11/2011 20:48, Frederik Ramm wrote: http://www.remote.org/frederik/tmp/osmium_road_length.cpp Does all of Germany (from a PBF file) in less than 5 minutes and using less than 2 GB of RAM. I haven't got the time to do this properly... Thanks for this one. I just managed to do germany.osm.pbf in 3 minutes and 3 seconds. Memory usage only went up to 1.3G. Hermann ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Statistics on road network length?
On 18/11/2011 23:30, Jo wrote: Concerning the issue with dual carriageways, I am using a brute-force approach and divide the calculated distance by 2 if these conditions are true: highway ~ /^(motorway|trunk|primary|secondary|tertiary)/&& oneway ~ /yes|true|1/ You probably want to add oneway=-1 to that list. There are some oddballs who used that indicate oneway is against the vector sense. Also JOSM proposes to use it when reversing a way. Jo Thanks for the hint. I already thought about it but forgot to mention that the above tests are using regular expressions. ^motorway also matches motorway_link, etc. and 1 also matches -1. Hermann ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Statistics on road network length?
On 18/11/2011 19:20, ThomasB wrote: I guess there are not so many people out there having a machine with more than 20GB RAM. I tried to calculate Germany with a 2009 planet file but failed, I guess because of RAM. So calculating large countries with 2011 data may require RAM well in excess of 20GB. Smaller countries work fine. One idea could be to use Geofabrik's OSM files by country. My rather crude script needs 2 seconds for processing Albania and 6 minutes each for France and Germany (on a machine with 8G RAM). See below. Hermann Fri Nov 18 19:36:28 CET 2011 +++ albania.osm.pbf Fri Nov 18 19:36:30 CET 2011 +++ andorra.osm.pbf Fri Nov 18 19:36:30 CET 2011 +++ austria.osm.pbf Fri Nov 18 19:37:40 CET 2011 +++ azores.osm.pbf Fri Nov 18 19:37:40 CET 2011 +++ belarus.osm.pbf Fri Nov 18 19:37:52 CET 2011 +++ belgium.osm.pbf Fri Nov 18 19:38:19 CET 2011 +++ bosnia-herzegovina.osm.pbf Fri Nov 18 19:38:23 CET 2011 +++ bulgaria.osm.pbf Fri Nov 18 19:38:29 CET 2011 +++ croatia.osm.pbf Fri Nov 18 19:38:42 CET 2011 +++ cyprus.osm.pbf Fri Nov 18 19:38:45 CET 2011 +++ czech_republic.osm.pbf Fri Nov 18 19:39:37 CET 2011 +++ denmark.osm.pbf Fri Nov 18 19:40:13 CET 2011 +++ estonia.osm.pbf Fri Nov 18 19:40:19 CET 2011 +++ faroe_islands.osm.pbf Fri Nov 18 19:40:19 CET 2011 +++ finland.osm.pbf Fri Nov 18 19:40:54 CET 2011 +++ france.osm.pbf Fri Nov 18 19:46:46 CET 2011 +++ germany.osm.pbf Fri Nov 18 19:53:23 CET 2011 +++ great_britain.osm.pbf Fri Nov 18 19:55:47 CET 2011 +++ greece.osm.pbf Fri Nov 18 19:56:10 CET 2011 +++ hungary.osm.pbf Fri Nov 18 19:56:20 CET 2011 +++ iceland.osm.pbf Fri Nov 18 19:56:24 CET 2011 +++ ireland.osm.pbf Fri Nov 18 19:56:41 CET 2011 +++ isle_of_man.osm.pbf Fri Nov 18 19:56:41 CET 2011 +++ italy.osm.pbf Fri Nov 18 19:59:07 CET 2011 +++ kosovo.osm.pbf Fri Nov 18 19:59:13 CET 2011 +++ latvia.osm.pbf Fri Nov 18 19:59:18 CET 2011 +++ liechtenstein.osm.pbf Fri Nov 18 19:59:18 CET 2011 +++ lithuania.osm.pbf Fri Nov 18 19:59:23 CET 2011 +++ luxembourg.osm.pbf Fri Nov 18 19:59:26 CET 2011 +++ macedonia.osm.pbf Fri Nov 18 19:59:27 CET 2011 +++ malta.osm.pbf Fri Nov 18 19:59:28 CET 2011 +++ moldova.osm.pbf Fri Nov 18 19:59:32 CET 2011 +++ monaco.osm.pbf Fri Nov 18 19:59:32 CET 2011 +++ montenegro.osm.pbf ... ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Statistics on road network length?
On 16/11/2011 17:27, Matthias Meißer wrote: Thanks Frederik! I think this will do it :) bye Matthias Just to let you know: I am occasionally running my own script which is kind of similar to Frederik's Perl script. As OSM input data, I am using the .pbf files from [1] For the Haversine Formula, I followed the explanations at [2]. This formula calculates distances between 2 points on a spherical Earth. There can be 1% of differences compared to distances measured on an ellipsoid. I am using 6367516.477 m as Earth radius, which is the mean of a^2/b and b^2/a, where a and b are the semi-major/minor axis of the WGS84 ellipsoid. (As a side remark: the distance between 2 nodes of an OSM way is often below 100m, so any considerations about distances on spheres vs. ellipsoids are rather of an academical nature.) Concerning the issue with dual carriageways, I am using a brute-force approach and divide the calculated distance by 2 if these conditions are true: highway ~ /^(motorway|trunk|primary|secondary|tertiary)/ && oneway ~ /yes|true|1/ (If someone has a better algorithm: I would be interested.) Hermann [1] http://download.geofabrik.de/osm/europe/ [2] http://mathforum.org/library/drmath/view/51879.html ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] relations within relations - walking trails
On 24/05/2011 10:10, Frederik Ramm wrote: Hi, On 05/24/11 09:24, Hermann Peifer wrote: The problem (at least mine) is not to relate the existing relation objects conceptually, but to do this practically, in Potlatch. * Select the way * use "Advanced" mode to see relation X of wich way is a member * double click relation X to open relation editor * use "Advanced" mode to see relations of which X is member (currently empty) * click "Add to" to add X to another relation * since Y is unlikely to be already loaded, and thus will not appear in the list, click "Load Relation" and enter Y's relation ID * Y is loaded, and X is made a child of Y. Thanks for the hints. I managed to redefine our regional bike route 51 as a relation of 2 relations (local bike routes) and 5 Ways which are needed for filling the gaps in between the local routes: http://www.openstreetmap.org/browse/relation/1588406 It looks to me that some of the web tools for checking relations are only able to present the relation's way members. They do not resolve the "sub-relations" into their way members, e.g. http://www.openstreetmap.org/?relation=1588406 and http://ra.osmsurround.org/analyze.jsp?relationId=1588406 Am I perhaps doing something wrong? In any case, the same relation looks OK here: http://osmrm.openstreetmap.de/relation.jsp?id=1588406#lon=12.52484215;lat=55.69023765;zoom=13;layer=Mpnk Hermann ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] relations within relations - walking trails
On 24/05/2011 08:41, Frederik Ramm wrote: Hi, On 05/24/11 03:18, Robin Paulson wrote: it is made up at parts of the way of other walking tracks, such as the 'coast to coast' walking track in the auckland region. problem is, i can't get my head round how to relate the two in a relation Example: Trans-European hiking route E1 http://www.openstreetmap.org/browse/relation/371743 consists, among other relations, of the "E1 German Part" http://www.openstreetmap.org/browse/relation/36367 which in turn consists of smaller relations like "E1 Hamburg", "E1 Schleswig-Holstein", etc. http://www.openstreetmap.org/browse/relation/69471 http://www.openstreetmap.org/browse/relation/71770 I have a similar issue with the nesting of international > national > regional > local bike routes where relations on the lower levels already exists. The problem (at least mine) is not to relate the existing relation objects conceptually, but to do this practically, in Potlatch. Hermann ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Geofabrik Download Server Update
On 19/05/2011 11:09, Frank Fesevur wrote: It would be interesting for me if I could just review those polygons on a map. Indeed. Why not on an Open Street Map? For Denmark, it would expect the bounding polygon it to look like a simplified version of: http://www.openstreetmap.org/browse/relation/50046. Hermann ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Geofabrik Download Server Update
On 19/05/2011 08:10, Frederik Ramm wrote: No, they aren't publicly available but I send them to people on request. There's really no reason to keep them secret, I just haven't set up a mechanism to automatically put them on the server because I didn't think people were all that interested. I am about to make some (rough) overview statistics for European countries, about the length of OSM ways (with tagfilters highway=motorway, railway=rail, etc.). Your country files at http://download.geofabrik.de/osm/europe/ are very convenient in this context. Thanks for this great service! However, I wanted to see how much double-counting there might be, due to the simplified country borders and overlaps between neighbouring countries. I also wanted to know what your difference is between 'british_isles' and 'great_britain', etc. Other users of your files might have a similar interest. Hermann ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk