From: Maxime G. <ml...@mg...> - 2012-03-14 21:06:18
|
fli...@sa... wrote : > This shapefiles are not shapefiles from regular OSM data distributors. > I created this ones myself, after .osm import to postgres, so it > contains all or another selection of .osm information available. Sorry Yves, I looked at the content of the zip file but could not open the shapefiles on that machine. My comment relates to the shapefiles from the Geofabrik website. Now here is more information about what I wrote before: Maxime Guillaud <ml...@mg...> wrote : > My solution was to start from the raw .osm data, and to process it through osmosis > (http://wiki.openstreetmap.org/wiki/Osmosis) to reduce its size while preserving the > tags relevant to scenery generation, before importing everything in a PostGIS database. > I can post my osmosis filter later today when I get home - the syntax is a bit tricky. here is the osmosis command that achieves the above: it merges two files (Europe and the Canary islands), and selects the "highway", "junction", "railway" and "tunnel" tags only: osmosis -v --read-pbf /storage1/OSMmaps/canary_islands_20110921.osm.pbf --read-pbf /storage1/OSMmaps/europe_20110921.osm.pbf --merge --wkv keyValueList="highway.motorway,highway.motorway_link,highway.trunk,highway.trunk_link,highway.primary,highway.primary_link,highway.secondary,highway.secondary_link,highway.tertiary,highway.unclassified,highway.residential,highway.rest_area,junction.roundabout,railway.rail,tunnel.yes,tunnel.1" --tf reject-relations --used-node --write-pbf /storage2/tmp/europe_and_canary_20110921_roadsonly.pbf > The road width can be inferred from their class (highway/primary/secondary/etc...). I > have set up some criterion that I will also post here soon. For this, I came up with the following SQL queries to populate tables containing respectively the 12m-wide, 8m-wide, 6m-wide and 4m-wide roads, and railways: INSERT INTO fg_roads_12m (the_geom) SELECT (ST_Dump(st_union(st_multi(way),st_pointn(way,1)))).geom FROM planet_osm_line osm WHERE highway IN ('motorway','trunk') AND (tunnel ISNULL) AND railway ISNULL; INSERT INTO fg_roads_8m (the_geom) SELECT (ST_Dump(st_union(st_multi(way),st_pointn(way,1)))).geom FROM planet_osm_line osm WHERE highway IN ('primary') AND (tunnel ISNULL) AND railway ISNULL; INSERT INTO fg_roads_6m (the_geom) SELECT (ST_Dump(st_union(st_multi(way),st_pointn(way,1)))).geom FROM planet_osm_line osm WHERE highway IN ('motorway_link','trunk_link','primary_link','secondary') AND (tunnel ISNULL) AND railway ISNULL; INSERT INTO fg_roads_4m (the_geom) SELECT (ST_Dump(st_union(st_multi(way),st_pointn(way,1)))).geom FROM planet_osm_line osm WHERE highway IN ('secondary_link','tertiary') AND (tunnel ISNULL) AND railway ISNULL; INSERT INTO fg_railroads (the_geom) SELECT (ST_Dump(st_union(st_multi(way),st_pointn(way,1)))).geom FROM planet_osm_line osm WHERE railway IN ('rail') AND (tunnel ISNULL); > - My experience is that the CORINE 2006 dataset is topologically clean - this was NOT > the case for CORINE 2000. Regarding the mapping of CORINE to flightgear textures, I am using the correspondance detailed in the attached table (corine-mapping.txt). In order to see the relative importance of each landcover type in the europe dataset, the table also contains the surface that they occupy, in % relative to the total of the land surface (excluding oceans). Some more remarks about CORINE: - the latest release of the CORINE 2006 data (August 2011) has Malta in the wrong location (!). I reported that to the European Environment Agency already, and they are planning a new release: http://community.eea.europa.eu/home/environmental-topics/land-use-soil/hello-i-downloaded-the-latest-release-version-15-from-august-2011-of-the/view - the available CORINE 2006 data does not include Greece. While trying to piece together the CORINE 2006 dataset and the CORINE 2000 data around Greece, I noticed that it is better to cut along horizontal or vertical (in fact, latitude or longitude) lines, since oblique cuts often introduce some topological inconsistencies. I hope these few remarks help - do not hesitate to ask for details. It's not always easy to transfer this kind of practical experience with the scenery tools! Maxime -- sent from my armchair |