[osmosis-dev] Tagfilter plugin: filter by key-values read from a file instead of comma separated values
Raluca Martinescu
raluca.martinescu at skobbler.com
Fri Jun 1 14:05:51 BST 2012
Hi all,
This is the first time I'm writing on a mailing list of an open project, so if I'm not following the conventions, please tell me.
A while ago I've used the osmosis tool, but I needed a small change in order to use it easier and now I'm sharing it with you, maybe someone finds the feature useful also:
For the --node-key-value and --way-key-value command line options I added also the possibility to read the key.value combinations from an external file, specifying keyValueList="file=<file_path>" (if the keyValueList does not start with "file=", the option works as before). The reason for this change is that the initial way worked very good if you only needed to filter by couple of key.value combinations, but if you need to do this by, let's say 100 combinations, it's much more convenient to put it in a file.
I've attached the code changes I've made (very small):
* I've added the package: org.openstreetmap.osmosis.tagfilter.common (and the KeyValueFileReader.java file)
* I've changed the beginning of the constructors of NodeKeyValueFilter.java and WayKeyValueFilter.java classes from org.openstreetmap.osmosis.tagfilter.v0_6 in order to check if it is a file or a comma separated list
If you think the file should be specified in a different way, I'm opened to suggestions.
Best regards,
Raluca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20120601/14b019c7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tagfilter_patch.zip
Type: application/x-zip-compressed
Size: 6048 bytes
Desc: tagfilter_patch.zip
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20120601/14b019c7/attachment.bin>
More information about the osmosis-dev
mailing list