Tools Et1005 Manual
2021年9月4日Download here: http://gg.gg/vwm60
*Mac Tools Et1005 Manual
*Tools Et1005 Manual Free
*Tools Et1005 Manual Online
Table of Contents
Osmium is a versatile command line tool forworking with OpenStreetMap data. It includes many useful functions formanipulating OSM data and often outperforms similar tools. This manual willintroduce the tool, give a general overview and describe some use cases. Forthe nitty gritty detail consult the manualpages.
Osmium is Open Source and available under the GNU General Public License.It works and is regularly tested on Linux, macOS, and Windows.
Osmium is based on the C++ library libosmiumand it gets most of its functionality from it. If the command line tool doesn’tdo something you need, have a look at the library. Maybe you can use it tocreate a program that does what you want.
MAC TOOL ET50 OBDll Code Reader + User manual. Local pickup (2729 miles away) Posted 2 years ago in Tools & machinery. Power tool manuals and free pdf instructions. Find the user manual you need for your tools and more at ManualsOnline. Free Power Tools User Manuals ManualsOnline.com. VEVOR Hydraulic Cylinder Liner Puller 15 Ton Liner Puller Tool, Both Dry-Type and Wet-Type Fit Diameter of 80mm-140 mm, Universal Cylinder Liner Puller Tool Set for auto Repair and Disassembly.
This manual is intended as an easy to read introduction. It is not complete.Please refer to the manpages for acomplete reference.From source
You can download thelatest release orinstall the current master from GitHub:
Follow the build and installation instructions in theREADME.Debian and Ubuntu
Packages called osmium-tool are available for Debian and Ubuntu systems.(Do not install the osmium package, it is a very old version of the Osmiumlibrary.) Depending on your system, the packages might be rather old. Debianunstable and testing are tracking the development of Osmium closely. ForDebian Stable those new packages are available in thebackports repository.Fedora
Packages for several Fedora versionsare available.ArchlinuxMac Tools Et1005 Manual
Packages can be installed from AUR:osmium-tool
The starting point for everything is the osmium command. All thefunctionality of Osmium is available via this one command and its“subcommands”, similar to how the git command works for instance. Justcalling
will give you a list of subcommands. Use
to get a short description about a subcommand’s options. Use
to display the manual page explaining all the details. If Osmium is installedcorrectly on your system, you can also get those manpages using the usual mancommand:
etc.
The manpages are also available on the web.
Before you can do anything with an OSM file you’ll often want to know what’s inthat file. To find out run
Say you downloaded an extract of the tiny country ofLiechtenstein(it is always good to start your experiments with a small extract)from Geofabrikand want to know what’s in it:
This will show you something like the following:
The File section contains the information gleaned from the file system,the Header section contains, as the name implies, the information from thefile header. To get some more detail use the -e or --extended flag:
In this case the whole file will be read, which will take more time. But itgives you a lot more information:
Sometimes your are only interested in a specific piece of information from thislist. Use the -g, --get option to ask for it. For instance to get the lasttimestamp used:
This will result in just the timestamp:
This format makes it easy to use the output in other shell commands. To put theCRC32 checkum into the checksum shell variable you can use the followingcommand, for instance:
Of course you might also want to look at the contents of the file. For a quicklook, use the show command:
This will show the contents of the file in the debug format (more on thedifferent formats below) using your favourite pager (less by default):
This debug format is intended to be easy to read, on terminals that supportit, colors make it even easier. But you can change the output format to anyformat supported by Osmium.
Osmium supports all popular OSM file formats (and some more): XML, PBF,O5M/O5C, OPL, and the already mentioned debug format. Some formats canonly be read or only be written. See theosmium-file-formatsman page for details. All the text-based formats can be automatically(de)compressed if they use the gzip or bzip2 compression.
Often you need to convert OSM data files from one format to another. Thisis easily done with the osmium cat command. To convert the LiechtensteinPBF file into XML format compressed with bzip2, use this command:
Osmium will automatically detect the file format based on the file name.Usually it will do what you want, but you can force the file format withthe command line options -f (for the output file) and -F for the inputfile. This is useful when reading from STDIN or writing to STDOUT:
The format for the -f and -F options is simply the suffix you would usuallyuse for an OSM file (here osm). It also works with pbf (or osm.pbf),osm.gz etc.
Most file formats have special options to change the details of the fileformat. You can set those special options with the same command line options.For instance, if you want a bz2ip-compressed XML file without metadata usethis:
The output file will not have the version, timestamp, etc. fields and soit is much more compact than the usual XML format.
As you can see, you can add the options to the format separated by commas,multiple options are possible. Some options are available for several or allformats (add_metadata for instance), others are specific to one of theformats, pbf_dense_nodes for instance only works on the PBF format. Notethat unknown options are silently ignored, so if you mistype an option, youwill not get an error message!
See theosmium-file-formatsman page for all the details. Btw: all these file formats and options areimplemented in the libosmium library, so mostlibosmium-based programs will understand them in the same fashion.
While playing around with the command you might have noticed an errormessage like Open failed for ’output.osm.bz2’: File exists. By defaultOsmium will not overwrite an existing file. This is a safety measure tokeep you from accidentally deleting that 60GB planet file, that took youall day to download. With the -O or --overwrite option you can disablethis check.
The osmium cat command can do more: Just like the shell cat command, itcan take several input files and it will concatenate them to generate theoutput. In fact that’s where the name (con”cat”enate) comes from. Its abilityto convert from one file format to another is only a side-effect really, mostOsmium subcommands can read and write OSM files in any format and support thesame -f and -F options. Note that this command will really justconcatenate its inputs and not sort them in any way. This might or might notbe what you want.
There is one additional option of the osmium cat command that often comeshandy. With -t TYPE it can be instructed to only copy objects of the giventype. So
will only copy the nodes, not the ways, or relations.
Most Osmium commands support the -v or --verbose command line option toenable verbose mode. Osmium will then display information about its commandline parameters and about what it is doing to STDERR.
Each line of the output is started with the elapsed time in minutes andseconds. This is especially useful when Osmium is run in scripts and theoutput is logged, you can immediately see where the time went.
In verbose mode, most Osmium commands will also display the memory used. Thisis handy because Osmium command often need a lot of memory to efficiently dotheir job. There is also a MEMORY section in each of the man pages thattells you about memory use of this particular command.
Sometimes you have the ID of a node, way or relation (or a bunch of IDs) andwant to get the objects with those IDs from a file. That’s what the getidcommand is for. The following command will get the nodes 17 and 18, the way42, and the relation 3 out of the file:
As you can see the IDs are written with a one-letter prefix denoting the type.IDs without this prefix are understood to be node IDs (but this can be changedwith the --default-type option).
If you have more than a few IDs you can put them into a file, one ID per lineand use the -i option to read them from that file:
Empty lines and everything after a space or hash (#) sign is ignored. And youcan read from STDIN. So this command
will find the relation with the ID 123 in input.osm.pbf and output it toSTDOUT in debug format.
Often you need not only the OSM objects with the given IDs but also allobjects referenced by those objects. So for ways you need the nodes in itand for relations the members. Use the -r or --add-referenced option toadd them to the output:
The output will contain first all nodes references by way 222 and then theway. The getid command will read the input file up to three times tofollow all the references. Output will be sorted in the usual fashion: firstnodes ordered by ID, then ways, then relations.
A full planet dump is referentially complete. All objects referenced by otherobjects are in the file. So if a relation has a member way 123, then this waywill also be in the file. This is not always true for geographical extracts orother partial OSM files.
This often leads to confusion. Many programs that use OSM data will failin unexpected ways when something is missing in its input data. If you havea situation like this you can use the check-refs command to find out whetheryour OSM file is referentially complete:
This command will check that all nodes referenced in the ways are in the inputfile. If you want to check relation members, too, use the -r or--check-relations option.
There is often the need to create a geographical extract of OSM data that onlycontains the data for a specific region. Instead of working with the hugeamount of data for the whole planet, further work can then be done with muchless data.Creating an extract
Osmium can create such an extract with the osmium extract command. Here is asimple example that will cut (from the file called france.pbf) everythinginside the given bounding box, in this case the city of Paris roughly insidethe ring road and write it out into the file paris.pbf:
If you happen to have a polygon describing Paris, you can use it instead:
This assumes you have the polygon in GeoJSON format inthe file paris-polygon.geojson. Osmium also understands the POLYformat,a text-based format popularized first by Osmosis and sometimes used in the OSMworld to specify such polygons:
Osmium can also read an OSM file with a (multi)polygon in it that specifiesthe area to cut out. If you know the relation ID of such a multipolygon, youcan download it from the OSM server using a URL such as this:
For Paris this could be
(This will not always work, see below on how to fix this.)
This works well for smaller multipolygons (such as city boundaries), but forvery large multipolygons (such as a whole country) chances are you’ll get atimeout from the API. If you have an OSM file lying around that contains theboundary, you can use osmium to get the relation and all the nodes and waysused in that relation:
The options are important here: -r makes sure you get all the members ofthe relation and all the nodes in the member ways. -t removes the tags fromall objects except the relation 7444 itself. This way only the relation itselfis turned into a (multi)polygon and not other relations or closed ways thathappen to be in the data.
(If you have problems with relations downloaded from the API, the solutionis the same. Run the mentioned osmium getid command on them.)
And now you can create the extract:Creating multiple extracts in one go
Often you want to create several extracts from the same source, say one extractfor each département (administrative division) in France. For the 101départments in France, this would mean you have to read the input filethat many times. Fortunately there is another way: You can specify the extractsyou want to create in a config file and then osmium can do all extracts in onego:
Note that this time no output file was named on the command line. Instead theoutput file names are specified in the config file. The config file (heredepartments.json) is in JSON format and looks something like this:
The directory names the common output directory (use --directory or -don the command line to overwrite this). And each member of the extractsarray specifies one extract to create. Just as on the command line you canspecify the extract by bounding box or polygon (using any of the supportedfile formats). There are several ways to specify all the details. See theosmium-extract(1) manpage and theexampleconfigfor the details.Extract strategies
Osmium offers three different strategies governing how the extract shouldbe created. Their results are different, more or less OSM objects will beincluded in the output. They also differ in memory consumption and how oftenthey will read the input file.Strategy: simple
When using the simple strategy, all nodes inside the specified region areincluded and all nodes that are outside the region are not included. All waysthat have at least one node inside the region are included, but they might bemissing some nodes, they are not reference-complete. Only relations that havea node or way that is already in the extract are included. Relations are notreference-complete.
For the simple strategy the input file is only read once. This is the onlystrategy that will work if the input is read from STDIN or the output writtento stdout.Strategy: complete_ways
When using the complete_ways strategy, all nodes inside the specified regionas well as all nodes used by ways that are partially inside the specifiedregion will be in the output. All ways in the output will always bereference-complete (if they were reference-complete in the input). So in theexample image the red, green, and cyan ways will be in the output with alltheir nodes. The blue way is not in the output, because none of its nodes is inthe region, even though the beginning and end nodes will be in the output.All relations that have any already included nodes or ways are in the outputas well as any of their parent relations and so on. Relations are notreference-complete.
For the complete_ways strategy the input file is read twice.
For the complete_ways strategy is the only strategy that can be used onhistory files, too. You have to add the --with-history option for this towork. All objects that have at least one version in the output, will be inthe output with all their versions. So if a node moved from inside the regionto outside, all versions of this node will be in the output as well as allways referencing this node and so on.Strategy: smart
When using the smart strategy, everything is done as in the complete_waysstrategy, but multipolygon relations that have at least one node in theregion will also be completely included. You can see this in the example image:If a multipolygon relation ties the red, green, and blue ways together, theblue way and all its nodes will be included.
By default this only works for relations tagged type=multipolygon, becausethis is what is needed most often. A lake or forest crossing the boundary ofyour region will be in the extract completely. But a boundary for instancewill not be, otherwise you might get a huge boundary around a whole country inyour extract when all you wanted was a small area at the border. You can changethis behaviour with the -S or --option option. If you want all relationtypes, use -S types=any, if you only want particular types, specify them likethis: -S types=multipolygon,route.
For the smart strategy the input file is read three times.Performance and memory use
If you are trying to cut out all 101 départments from France, you’ll mostlikely run into difficulties, because this will need a huge amount of memory.Osmium has to keep track of all the IDs of all nodes, ways, and relations itneeds for each extract. It depends on the strategy used, but you’ll needbetween 1 and 2 GByte RAM for each extract. You can solve this by runningosmium extract several times, each time cutting out smaller and smallerareas. In our example here it might make sense to extract in a first roundeach of the regions of France and then have one round per region cutting itinto the smaller départments.
There is a (small) difference in the performance between cutting out bybounding box and by polygon. It is fastest to extract using a bounding box, forpolygons the performance depends on how detailed the polygon is. But unlikesome other tools that don’t work well with very detailed polygons, this hasonly a relatively small effect in Osmium. But if you want to do your extractsoften, check the performance of different strategies and region specificationsand find out what works best for you.
We are often interested in only a subset of the OSM data, maybe only the roads(if we want to do navigation on them), or all restaurants, or everything thatis some kind of forest.
Osmium supports this through the tags-filter command. For example to geteverything in Rome that’s a road, you could use something like:
The w/highway tells Osmium that we are looking for all ways that have a tagwith key highway. If we want to look for more specific road types, we cando that, too, with something like w/highway=primary. Finding all the primaryroads would look like this:
You can filter by several expressions at the same time, so finding everythingthat’s tagged as some kind of wooded area is easy:
The first positional parameter after tags-filter is always an OSM file, allthe following ones are filter expressions. Filter expressions start with thetype or types of objects we want to filter (n for nodes, w for ways, andr for relations) and than something describing the key and optionally thevalue of a tag. So this will find all nodes tagged as restaurant:
But POIs can also be mapped as area, so we really have to look for the waysand relations, too:
This can be shortend to just
Also allowed are lists of values:
This also works in keys:
Or you can exclude a specific value:
This will find all relations that have a type key with a value that’s notmultipolygon and not route.
An asterisk at the end signals that this should be a prefix check. Everythingwith a tag starting with addr: can be found this way:
An asterisk at the beginning turns this into a substring search:
will find any nodes or ways that have the word school in their name. Osmiumalways uses a case-sensitive search, so you might have to use something likethis to get everything:
Note that in all these cases you will get the full objects back. Osmium is notremoving tags from objects, it is only filtering complete objects from theinput based on those tags.
Osmium will automatically add all nodes referenced by the ways it found and allmembers referenced by the relations
https://diarynote-jp.indered.space
*Mac Tools Et1005 Manual
*Tools Et1005 Manual Free
*Tools Et1005 Manual Online
Table of Contents
Osmium is a versatile command line tool forworking with OpenStreetMap data. It includes many useful functions formanipulating OSM data and often outperforms similar tools. This manual willintroduce the tool, give a general overview and describe some use cases. Forthe nitty gritty detail consult the manualpages.
Osmium is Open Source and available under the GNU General Public License.It works and is regularly tested on Linux, macOS, and Windows.
Osmium is based on the C++ library libosmiumand it gets most of its functionality from it. If the command line tool doesn’tdo something you need, have a look at the library. Maybe you can use it tocreate a program that does what you want.
MAC TOOL ET50 OBDll Code Reader + User manual. Local pickup (2729 miles away) Posted 2 years ago in Tools & machinery. Power tool manuals and free pdf instructions. Find the user manual you need for your tools and more at ManualsOnline. Free Power Tools User Manuals ManualsOnline.com. VEVOR Hydraulic Cylinder Liner Puller 15 Ton Liner Puller Tool, Both Dry-Type and Wet-Type Fit Diameter of 80mm-140 mm, Universal Cylinder Liner Puller Tool Set for auto Repair and Disassembly.
This manual is intended as an easy to read introduction. It is not complete.Please refer to the manpages for acomplete reference.From source
You can download thelatest release orinstall the current master from GitHub:
Follow the build and installation instructions in theREADME.Debian and Ubuntu
Packages called osmium-tool are available for Debian and Ubuntu systems.(Do not install the osmium package, it is a very old version of the Osmiumlibrary.) Depending on your system, the packages might be rather old. Debianunstable and testing are tracking the development of Osmium closely. ForDebian Stable those new packages are available in thebackports repository.Fedora
Packages for several Fedora versionsare available.ArchlinuxMac Tools Et1005 Manual
Packages can be installed from AUR:osmium-tool
The starting point for everything is the osmium command. All thefunctionality of Osmium is available via this one command and its“subcommands”, similar to how the git command works for instance. Justcalling
will give you a list of subcommands. Use
to get a short description about a subcommand’s options. Use
to display the manual page explaining all the details. If Osmium is installedcorrectly on your system, you can also get those manpages using the usual mancommand:
etc.
The manpages are also available on the web.
Before you can do anything with an OSM file you’ll often want to know what’s inthat file. To find out run
Say you downloaded an extract of the tiny country ofLiechtenstein(it is always good to start your experiments with a small extract)from Geofabrikand want to know what’s in it:
This will show you something like the following:
The File section contains the information gleaned from the file system,the Header section contains, as the name implies, the information from thefile header. To get some more detail use the -e or --extended flag:
In this case the whole file will be read, which will take more time. But itgives you a lot more information:
Sometimes your are only interested in a specific piece of information from thislist. Use the -g, --get option to ask for it. For instance to get the lasttimestamp used:
This will result in just the timestamp:
This format makes it easy to use the output in other shell commands. To put theCRC32 checkum into the checksum shell variable you can use the followingcommand, for instance:
Of course you might also want to look at the contents of the file. For a quicklook, use the show command:
This will show the contents of the file in the debug format (more on thedifferent formats below) using your favourite pager (less by default):
This debug format is intended to be easy to read, on terminals that supportit, colors make it even easier. But you can change the output format to anyformat supported by Osmium.
Osmium supports all popular OSM file formats (and some more): XML, PBF,O5M/O5C, OPL, and the already mentioned debug format. Some formats canonly be read or only be written. See theosmium-file-formatsman page for details. All the text-based formats can be automatically(de)compressed if they use the gzip or bzip2 compression.
Often you need to convert OSM data files from one format to another. Thisis easily done with the osmium cat command. To convert the LiechtensteinPBF file into XML format compressed with bzip2, use this command:
Osmium will automatically detect the file format based on the file name.Usually it will do what you want, but you can force the file format withthe command line options -f (for the output file) and -F for the inputfile. This is useful when reading from STDIN or writing to STDOUT:
The format for the -f and -F options is simply the suffix you would usuallyuse for an OSM file (here osm). It also works with pbf (or osm.pbf),osm.gz etc.
Most file formats have special options to change the details of the fileformat. You can set those special options with the same command line options.For instance, if you want a bz2ip-compressed XML file without metadata usethis:
The output file will not have the version, timestamp, etc. fields and soit is much more compact than the usual XML format.
As you can see, you can add the options to the format separated by commas,multiple options are possible. Some options are available for several or allformats (add_metadata for instance), others are specific to one of theformats, pbf_dense_nodes for instance only works on the PBF format. Notethat unknown options are silently ignored, so if you mistype an option, youwill not get an error message!
See theosmium-file-formatsman page for all the details. Btw: all these file formats and options areimplemented in the libosmium library, so mostlibosmium-based programs will understand them in the same fashion.
While playing around with the command you might have noticed an errormessage like Open failed for ’output.osm.bz2’: File exists. By defaultOsmium will not overwrite an existing file. This is a safety measure tokeep you from accidentally deleting that 60GB planet file, that took youall day to download. With the -O or --overwrite option you can disablethis check.
The osmium cat command can do more: Just like the shell cat command, itcan take several input files and it will concatenate them to generate theoutput. In fact that’s where the name (con”cat”enate) comes from. Its abilityto convert from one file format to another is only a side-effect really, mostOsmium subcommands can read and write OSM files in any format and support thesame -f and -F options. Note that this command will really justconcatenate its inputs and not sort them in any way. This might or might notbe what you want.
There is one additional option of the osmium cat command that often comeshandy. With -t TYPE it can be instructed to only copy objects of the giventype. So
will only copy the nodes, not the ways, or relations.
Most Osmium commands support the -v or --verbose command line option toenable verbose mode. Osmium will then display information about its commandline parameters and about what it is doing to STDERR.
Each line of the output is started with the elapsed time in minutes andseconds. This is especially useful when Osmium is run in scripts and theoutput is logged, you can immediately see where the time went.
In verbose mode, most Osmium commands will also display the memory used. Thisis handy because Osmium command often need a lot of memory to efficiently dotheir job. There is also a MEMORY section in each of the man pages thattells you about memory use of this particular command.
Sometimes you have the ID of a node, way or relation (or a bunch of IDs) andwant to get the objects with those IDs from a file. That’s what the getidcommand is for. The following command will get the nodes 17 and 18, the way42, and the relation 3 out of the file:
As you can see the IDs are written with a one-letter prefix denoting the type.IDs without this prefix are understood to be node IDs (but this can be changedwith the --default-type option).
If you have more than a few IDs you can put them into a file, one ID per lineand use the -i option to read them from that file:
Empty lines and everything after a space or hash (#) sign is ignored. And youcan read from STDIN. So this command
will find the relation with the ID 123 in input.osm.pbf and output it toSTDOUT in debug format.
Often you need not only the OSM objects with the given IDs but also allobjects referenced by those objects. So for ways you need the nodes in itand for relations the members. Use the -r or --add-referenced option toadd them to the output:
The output will contain first all nodes references by way 222 and then theway. The getid command will read the input file up to three times tofollow all the references. Output will be sorted in the usual fashion: firstnodes ordered by ID, then ways, then relations.
A full planet dump is referentially complete. All objects referenced by otherobjects are in the file. So if a relation has a member way 123, then this waywill also be in the file. This is not always true for geographical extracts orother partial OSM files.
This often leads to confusion. Many programs that use OSM data will failin unexpected ways when something is missing in its input data. If you havea situation like this you can use the check-refs command to find out whetheryour OSM file is referentially complete:
This command will check that all nodes referenced in the ways are in the inputfile. If you want to check relation members, too, use the -r or--check-relations option.
There is often the need to create a geographical extract of OSM data that onlycontains the data for a specific region. Instead of working with the hugeamount of data for the whole planet, further work can then be done with muchless data.Creating an extract
Osmium can create such an extract with the osmium extract command. Here is asimple example that will cut (from the file called france.pbf) everythinginside the given bounding box, in this case the city of Paris roughly insidethe ring road and write it out into the file paris.pbf:
If you happen to have a polygon describing Paris, you can use it instead:
This assumes you have the polygon in GeoJSON format inthe file paris-polygon.geojson. Osmium also understands the POLYformat,a text-based format popularized first by Osmosis and sometimes used in the OSMworld to specify such polygons:
Osmium can also read an OSM file with a (multi)polygon in it that specifiesthe area to cut out. If you know the relation ID of such a multipolygon, youcan download it from the OSM server using a URL such as this:
For Paris this could be
(This will not always work, see below on how to fix this.)
This works well for smaller multipolygons (such as city boundaries), but forvery large multipolygons (such as a whole country) chances are you’ll get atimeout from the API. If you have an OSM file lying around that contains theboundary, you can use osmium to get the relation and all the nodes and waysused in that relation:
The options are important here: -r makes sure you get all the members ofthe relation and all the nodes in the member ways. -t removes the tags fromall objects except the relation 7444 itself. This way only the relation itselfis turned into a (multi)polygon and not other relations or closed ways thathappen to be in the data.
(If you have problems with relations downloaded from the API, the solutionis the same. Run the mentioned osmium getid command on them.)
And now you can create the extract:Creating multiple extracts in one go
Often you want to create several extracts from the same source, say one extractfor each département (administrative division) in France. For the 101départments in France, this would mean you have to read the input filethat many times. Fortunately there is another way: You can specify the extractsyou want to create in a config file and then osmium can do all extracts in onego:
Note that this time no output file was named on the command line. Instead theoutput file names are specified in the config file. The config file (heredepartments.json) is in JSON format and looks something like this:
The directory names the common output directory (use --directory or -don the command line to overwrite this). And each member of the extractsarray specifies one extract to create. Just as on the command line you canspecify the extract by bounding box or polygon (using any of the supportedfile formats). There are several ways to specify all the details. See theosmium-extract(1) manpage and theexampleconfigfor the details.Extract strategies
Osmium offers three different strategies governing how the extract shouldbe created. Their results are different, more or less OSM objects will beincluded in the output. They also differ in memory consumption and how oftenthey will read the input file.Strategy: simple
When using the simple strategy, all nodes inside the specified region areincluded and all nodes that are outside the region are not included. All waysthat have at least one node inside the region are included, but they might bemissing some nodes, they are not reference-complete. Only relations that havea node or way that is already in the extract are included. Relations are notreference-complete.
For the simple strategy the input file is only read once. This is the onlystrategy that will work if the input is read from STDIN or the output writtento stdout.Strategy: complete_ways
When using the complete_ways strategy, all nodes inside the specified regionas well as all nodes used by ways that are partially inside the specifiedregion will be in the output. All ways in the output will always bereference-complete (if they were reference-complete in the input). So in theexample image the red, green, and cyan ways will be in the output with alltheir nodes. The blue way is not in the output, because none of its nodes is inthe region, even though the beginning and end nodes will be in the output.All relations that have any already included nodes or ways are in the outputas well as any of their parent relations and so on. Relations are notreference-complete.
For the complete_ways strategy the input file is read twice.
For the complete_ways strategy is the only strategy that can be used onhistory files, too. You have to add the --with-history option for this towork. All objects that have at least one version in the output, will be inthe output with all their versions. So if a node moved from inside the regionto outside, all versions of this node will be in the output as well as allways referencing this node and so on.Strategy: smart
When using the smart strategy, everything is done as in the complete_waysstrategy, but multipolygon relations that have at least one node in theregion will also be completely included. You can see this in the example image:If a multipolygon relation ties the red, green, and blue ways together, theblue way and all its nodes will be included.
By default this only works for relations tagged type=multipolygon, becausethis is what is needed most often. A lake or forest crossing the boundary ofyour region will be in the extract completely. But a boundary for instancewill not be, otherwise you might get a huge boundary around a whole country inyour extract when all you wanted was a small area at the border. You can changethis behaviour with the -S or --option option. If you want all relationtypes, use -S types=any, if you only want particular types, specify them likethis: -S types=multipolygon,route.
For the smart strategy the input file is read three times.Performance and memory use
If you are trying to cut out all 101 départments from France, you’ll mostlikely run into difficulties, because this will need a huge amount of memory.Osmium has to keep track of all the IDs of all nodes, ways, and relations itneeds for each extract. It depends on the strategy used, but you’ll needbetween 1 and 2 GByte RAM for each extract. You can solve this by runningosmium extract several times, each time cutting out smaller and smallerareas. In our example here it might make sense to extract in a first roundeach of the regions of France and then have one round per region cutting itinto the smaller départments.
There is a (small) difference in the performance between cutting out bybounding box and by polygon. It is fastest to extract using a bounding box, forpolygons the performance depends on how detailed the polygon is. But unlikesome other tools that don’t work well with very detailed polygons, this hasonly a relatively small effect in Osmium. But if you want to do your extractsoften, check the performance of different strategies and region specificationsand find out what works best for you.
We are often interested in only a subset of the OSM data, maybe only the roads(if we want to do navigation on them), or all restaurants, or everything thatis some kind of forest.
Osmium supports this through the tags-filter command. For example to geteverything in Rome that’s a road, you could use something like:
The w/highway tells Osmium that we are looking for all ways that have a tagwith key highway. If we want to look for more specific road types, we cando that, too, with something like w/highway=primary. Finding all the primaryroads would look like this:
You can filter by several expressions at the same time, so finding everythingthat’s tagged as some kind of wooded area is easy:
The first positional parameter after tags-filter is always an OSM file, allthe following ones are filter expressions. Filter expressions start with thetype or types of objects we want to filter (n for nodes, w for ways, andr for relations) and than something describing the key and optionally thevalue of a tag. So this will find all nodes tagged as restaurant:
But POIs can also be mapped as area, so we really have to look for the waysand relations, too:
This can be shortend to just
Also allowed are lists of values:
This also works in keys:
Or you can exclude a specific value:
This will find all relations that have a type key with a value that’s notmultipolygon and not route.
An asterisk at the end signals that this should be a prefix check. Everythingwith a tag starting with addr: can be found this way:
An asterisk at the beginning turns this into a substring search:
will find any nodes or ways that have the word school in their name. Osmiumalways uses a case-sensitive search, so you might have to use something likethis to get everything:
Note that in all these cases you will get the full objects back. Osmium is notremoving tags from objects, it is only filtering complete objects from theinput based on those tags.
Osmium will automatically add all nodes referenced by the ways it found and allmembers referenced by the relations
https://diarynote-jp.indered.space
コメント