diff --git a/osmosis-tagtransform/build.gradle b/osmosis-tagtransform/build.gradle index f8843b8a3..340c85ae7 100644 --- a/osmosis-tagtransform/build.gradle +++ b/osmosis-tagtransform/build.gradle @@ -1,6 +1,8 @@ dependencies { compile project(':osmosis-core') compile project(':osmosis-xml') + compile group: 'org.apache.commons', name: 'commons-csv', version: 1.7 + testCompile project(':osmosis-testutil') } diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/DataSource.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/DataSource.java new file mode 100644 index 000000000..a0f2bc5e5 --- /dev/null +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/DataSource.java @@ -0,0 +1,8 @@ +// This software is released into the Public Domain. See copying.txt for details. +package org.openstreetmap.osmosis.tagtransform; + +public interface DataSource { + + String[] transform(String[] matches); + +} diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/Output.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/Output.java index d2f73a36f..1d77d9fa2 100644 --- a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/Output.java +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/Output.java @@ -7,6 +7,6 @@ public interface Output { - void apply(Map originalTags, Map tags, Collection matches); + void apply(Map originalTags, Map tags, Collection matches, Map dataSources); } diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/Translation.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/Translation.java index 1bbd037aa..6a2134b30 100644 --- a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/Translation.java +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/Translation.java @@ -10,6 +10,9 @@ public interface Translation { Collection match(Map tags, TTEntityType entityType, String uname, int uid); + Map getDataSources(); + + boolean isDropOnMatch(); diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyAll.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyAll.java index eef4606f4..a845904ba 100644 --- a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyAll.java +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyAll.java @@ -3,7 +3,7 @@ import java.util.Collection; import java.util.Map; - +import org.openstreetmap.osmosis.tagtransform.DataSource; import org.openstreetmap.osmosis.tagtransform.Match; import org.openstreetmap.osmosis.tagtransform.Output; @@ -11,7 +11,7 @@ public class CopyAll implements Output { @Override - public void apply(Map originalTags, Map tags, Collection matches) { + public void apply(Map originalTags, Map tags, Collection matches, Map dataSources) { // copy all tags tags.putAll(originalTags); } diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyMatched.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyMatched.java index 90123e40e..08205dae4 100644 --- a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyMatched.java +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyMatched.java @@ -3,7 +3,7 @@ import java.util.Collection; import java.util.Map; - +import org.openstreetmap.osmosis.tagtransform.DataSource; import org.openstreetmap.osmosis.tagtransform.Match; import org.openstreetmap.osmosis.tagtransform.Output; @@ -11,7 +11,7 @@ public class CopyMatched implements Output { @Override - public void apply(Map originalTags, Map tags, Collection matches) { + public void apply(Map originalTags, Map tags, Collection matches, Map dataSources) { // put any matches directly for (Match match : matches) { if (match.getKeyGroupCount() > 0) { diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyUnmatched.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyUnmatched.java index eab6963a1..55faee787 100644 --- a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyUnmatched.java +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/CopyUnmatched.java @@ -4,7 +4,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; - +import org.openstreetmap.osmosis.tagtransform.DataSource; import org.openstreetmap.osmosis.tagtransform.Match; import org.openstreetmap.osmosis.tagtransform.Output; @@ -12,7 +12,7 @@ public class CopyUnmatched implements Output { @Override - public void apply(Map originalTags, Map tags, Collection matches) { + public void apply(Map originalTags, Map tags, Collection matches, Map dataSources) { // copy the original, then remove the matches Map toCopy = new HashMap(originalTags); for (Match match : matches) { diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/DataSourceCSV.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/DataSourceCSV.java new file mode 100644 index 000000000..1ebf6a028 --- /dev/null +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/DataSourceCSV.java @@ -0,0 +1,75 @@ +// This software is released into the Public Domain. See copying.txt for details. + +package org.openstreetmap.osmosis.tagtransform.impl; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.apache.commons.csv.CSVFormat; +import org.apache.commons.csv.CSVParser; +import org.apache.commons.csv.CSVRecord; +import org.apache.commons.csv.QuoteMode; +import org.w3c.dom.NamedNodeMap; + +import org.openstreetmap.osmosis.tagtransform.DataSource; + +/** + * + * @author fwiesweg + */ +public class DataSourceCSV implements DataSource { + + private Map data = Collections.emptyMap(); + private String[] fallback; + + public DataSourceCSV(File parentDirectory, NamedNodeMap attributes) { + String file = attributes.getNamedItem("file").getTextContent(); + String csvFormat = attributes.getNamedItem("csvFormat").getTextContent(); + + + List lookupIndices = Stream.of(attributes.getNamedItem("lookup").getTextContent().split(",")) + .map(idx -> Integer.parseInt(idx)) + .collect(Collectors.toList()); + List returnIndices = Stream.of(attributes.getNamedItem("return").getTextContent().split(",")) + .map(idx -> Integer.parseInt(idx)) + .collect(Collectors.toList()); + + try(InputStreamReader fis = new InputStreamReader(new FileInputStream(new File(parentDirectory, file)))) { + CSVRecord fallbackRecord = CSVParser.parse(attributes.getNamedItem("fallback").getTextContent(), CSVFormat.newFormat(',') + .withDelimiter(',') + .withQuote('"') + .withQuoteMode(QuoteMode.MINIMAL)) + .iterator().next(); + this.fallback = new String[fallbackRecord.size()]; + for(int i = 0; i < fallback.length; i++) { + this.fallback[i] = fallbackRecord.get(i); + } + + CSVParser parser = CSVParser.parse(fis, CSVFormat.valueOf(csvFormat)); + this.data = parser.getRecords().stream().collect(Collectors.toMap( + r -> { + return lookupIndices.stream().map(i -> r.get(i)).collect(Collectors.joining("\0")); + }, + r -> { + return returnIndices.stream().map(i -> r.get(i)).toArray(i -> new String[i]); + })); + + + } catch (IOException ex) { + Logger.getLogger(DataSourceCSV.class.getName()).log(Level.SEVERE, null, ex); + } + } + + @Override + public String[] transform(String[] matches) { + return data.getOrDefault(String.join("\0", matches), fallback); + } +} diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/DataSources.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/DataSources.java new file mode 100644 index 000000000..3dec65611 --- /dev/null +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/DataSources.java @@ -0,0 +1,26 @@ +// This software is released into the Public Domain. See copying.txt for details. +package org.openstreetmap.osmosis.tagtransform.impl; + +import java.io.File; +import java.util.function.BiFunction; +import org.w3c.dom.NamedNodeMap; + +import org.openstreetmap.osmosis.tagtransform.DataSource; + +/** + * + * @author fwiesweg + */ +public enum DataSources { + CSV(DataSourceCSV::new); + + private final BiFunction factory; + + private DataSources(BiFunction factory) { + this.factory = factory; + } + + public DataSource create(File parentDir, NamedNodeMap attributes) { + return this.factory.apply(parentDir, attributes); + } +} diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TagOutput.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TagOutput.java index faee7ebca..7bcbe6a87 100644 --- a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TagOutput.java +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TagOutput.java @@ -4,7 +4,7 @@ import java.text.MessageFormat; import java.util.Collection; import java.util.Map; - +import org.openstreetmap.osmosis.tagtransform.DataSource; import org.openstreetmap.osmosis.tagtransform.Match; import org.openstreetmap.osmosis.tagtransform.Output; @@ -14,14 +14,24 @@ public class TagOutput implements Output { private MessageFormat keyFormat; private MessageFormat valueFormat; private String fromMatch; + private String keyDataSource; + private String valueDataSource; - public TagOutput(String key, String value, String fromMatch) { + public TagOutput(String key, String value, String fromMatch, String keyDataSource, String valueDataSource) { keyFormat = new MessageFormat(santitise(key)); valueFormat = new MessageFormat(santitise(value)); - if ((fromMatch != null && fromMatch.length() > 0)) { + if (fromMatch != null && fromMatch.length() > 0) { this.fromMatch = fromMatch; } + + if (keyDataSource != null && keyDataSource.length() > 0) { + this.keyDataSource = keyDataSource; + } + + if (valueDataSource != null && valueDataSource.length() > 0) { + this.valueDataSource = valueDataSource; + } } @@ -31,13 +41,19 @@ private String santitise(String str) { } return str; } - + + private final DataSource dummyDataSource = matches -> matches; @Override - public void apply(Map originalTags, Map tags, Collection matches) { + public void apply(Map originalTags, Map tags, Collection matches, Map dataSources) { // if we have a fromMatch field we apply our format to // each and every matching match if (fromMatch != null) { + DataSource keyDataSourceImpl = this.keyDataSource != null && dataSources.containsKey(this.keyDataSource) + ? dataSources.get(this.keyDataSource) : dummyDataSource; + DataSource valueDataSourceImpl = this.valueDataSource != null && dataSources.containsKey(this.valueDataSource) + ? dataSources.get(this.valueDataSource) : dummyDataSource; + for (Match match : matches) { String matchID = match.getMatchID(); if (matchID != null && matchID.equals(fromMatch)) { @@ -46,14 +62,14 @@ public void apply(Map originalTags, Map tags, Co for (int i = 0; i < args.length; i++) { args[i] = match.getKey(i); } - String key = keyFormat.format(args); + String key = keyFormat.format(keyDataSourceImpl.transform(args)); // process value args args = new String[match.getValueGroupCount()]; for (int i = 0; i < args.length; i++) { args[i] = match.getValue(i); } - String value = valueFormat.format(args); + String value = valueFormat.format(valueDataSourceImpl.transform(args)); // put the tag tags.put(key, value); diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformHelper.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformHelper.java index 990278882..915d752db 100644 --- a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformHelper.java +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformHelper.java @@ -12,7 +12,6 @@ import java.util.Map.Entry; import java.util.logging.Level; import java.util.logging.Logger; - import org.openstreetmap.osmosis.core.container.v0_6.EntityContainer; import org.openstreetmap.osmosis.core.domain.common.TimestampFormat; import org.openstreetmap.osmosis.core.domain.v0_6.Entity; @@ -137,7 +136,7 @@ protected EntityContainer processEntityContainer(EntityContainer entityContainer Map newTags = new HashMap(); for (Output output : translation.getOutputs()) { - output.apply(tagMap, newTags, matches); + output.apply(tagMap, newTags, matches, translation.getDataSources()); } tagMap = newTags; } diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformLoader.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformLoader.java index c1eace58b..e3ad96e84 100644 --- a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformLoader.java +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformLoader.java @@ -3,12 +3,15 @@ import java.io.File; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.logging.Level; import java.util.logging.Logger; - import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; - +import org.openstreetmap.osmosis.tagtransform.DataSource; import org.openstreetmap.osmosis.tagtransform.Matcher; import org.openstreetmap.osmosis.tagtransform.Output; import org.openstreetmap.osmosis.tagtransform.TTEntityType; @@ -32,7 +35,7 @@ public List load(String configFile) { NodeList translationElements = doc.getDocumentElement().getElementsByTagName("translation"); for (int i = 0; i < translationElements.getLength(); i++) { - Translation t = parseTranslation((Element) translationElements.item(i)); + Translation t = parseTranslation(file.getParentFile(), (Element) translationElements.item(i)); if (t != null) { translations.add(t); } @@ -44,12 +47,13 @@ public List load(String configFile) { } - private Translation parseTranslation(Element element) { + private Translation parseTranslation(File parentDir, Element element) { String name = ""; String description = ""; Matcher matcher = null; Matcher finder = null; - List output = new ArrayList(); + List output = new ArrayList<>(); + Map dataSources = Collections.emptyMap(); NodeList children = element.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { @@ -66,6 +70,8 @@ private Translation parseTranslation(Element element) { matcher = parseMatcher(child); } else if (nodeName.equals("find")) { finder = parseMatcher(child); + } else if(nodeName.equals("data")) { + dataSources = parseDataSources(parentDir, child); } else if (nodeName.equals("output")) { NodeList outputs = child.getChildNodes(); for (int j = 0; j < outputs.getLength(); j++) { @@ -82,7 +88,7 @@ private Translation parseTranslation(Element element) { if (matcher != null) { LOG.info("New translation: " + name); - return new TranslationImpl(name, description, matcher, finder, output); + return new TranslationImpl(name, description, matcher, finder, dataSources, output); } else { return null; } @@ -101,7 +107,9 @@ private Output parseOutput(Element child) { String k = child.getAttribute("k"); String v = child.getAttribute("v"); String m = child.getAttribute("from_match"); - return new TagOutput(k, v, m); + String kd = child.getAttribute("key_datasource"); + String vd = child.getAttribute("value_datasource"); + return new TagOutput(k, v, m, kd, vd); } return null; } @@ -127,10 +135,10 @@ private Matcher parseMatcher(Element matcher) { } TTEntityType type = getType(matcher.getAttribute("type")); - if (matcher.getAttribute("user") != "") { + if (matcher.getAttribute("user") != null && !matcher.getAttribute("user").isEmpty()) { uname = matcher.getAttribute("user"); } - if (matcher.getAttribute("uid") != "") { + if (matcher.getAttribute("uid") != null && !matcher.getAttribute("uid").isEmpty()) { uid = Integer.parseInt(matcher.getAttribute("uid")); } String mode; @@ -158,6 +166,28 @@ private Matcher parseMatcher(Element matcher) { return null; } + private Map parseDataSources(File parentDir, Element parent) { + NodeList children = parent.getChildNodes(); + Map dataSources = new HashMap<>(); + for (int i = 0; i < children.getLength(); i++) { + if (!(children.item(i) instanceof Element)) { + continue; + } + Element child = (Element) children.item(i); + String name = child.getNodeName(); + if (name.equals("source")) { + DataSource ds; + String id = child.getAttribute("source_id"); + try { + ds = DataSources.valueOf(child.getAttribute("type")).create(parentDir, child.getAttributes()); + dataSources.put(id, ds); + } catch(IllegalArgumentException ex) { + Logger.getLogger(DataSourceCSV.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + return dataSources; + } private TTEntityType getType(String type) { if (type == null || type.isEmpty() || type.equals("all")) { diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TranslationImpl.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TranslationImpl.java index 9ab6d0fc9..34f1e4cc9 100644 --- a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TranslationImpl.java +++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TranslationImpl.java @@ -5,7 +5,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; - +import org.openstreetmap.osmosis.tagtransform.DataSource; import org.openstreetmap.osmosis.tagtransform.Match; import org.openstreetmap.osmosis.tagtransform.Matcher; import org.openstreetmap.osmosis.tagtransform.Output; @@ -18,15 +18,17 @@ public class TranslationImpl implements Translation { private String name; private String description; private Matcher matcher; + private Map dataSources; private List output; private Matcher finder; - public TranslationImpl(String name, String description, Matcher matcher, Matcher finder, List output) { + public TranslationImpl(String name, String description, Matcher matcher, Matcher finder, Map dataSources, List output) { this.name = name; this.description = description; this.matcher = matcher; this.finder = finder; + this.dataSources = dataSources; this.output = output; } @@ -36,6 +38,10 @@ public Collection getOutputs() { return output; } + @Override + public Map getDataSources() { + return dataSources; + } @Override public boolean isDropOnMatch() { diff --git a/osmosis-tagtransform/src/test/java/org/openstreetmap/osmosis/tagtransform/v0_6/TagTransformTest.java b/osmosis-tagtransform/src/test/java/org/openstreetmap/osmosis/tagtransform/v0_6/TagTransformTest.java index f52295676..90ebfffce 100644 --- a/osmosis-tagtransform/src/test/java/org/openstreetmap/osmosis/tagtransform/v0_6/TagTransformTest.java +++ b/osmosis-tagtransform/src/test/java/org/openstreetmap/osmosis/tagtransform/v0_6/TagTransformTest.java @@ -2,7 +2,9 @@ package org.openstreetmap.osmosis.tagtransform.v0_6; import java.io.File; +import java.io.FileOutputStream; import java.io.IOException; +import java.nio.file.Files; import org.junit.Test; import org.openstreetmap.osmosis.core.Osmosis; @@ -52,4 +54,49 @@ public void testTransform() throws IOException { // Validate that the output file matches the expected result. dataUtils.compareFiles(expectedOutputFile, actualOutputFile); } + + /** + * Test data source transformation using CSV file. + * + * @throws IOException + * if any file operations fail. + */ + @Test + public void testDataSourceTransform() throws IOException { + File sourceFile; + File translationFile; + File originalCsvFile; + File usedCsvFile; + File expectedOutputFile; + File actualOutputFile; + + // Generate files. + sourceFile = dataUtils.createDataFile("v0_6/test-datasource-in.osm"); + translationFile = dataUtils.createDataFile("v0_6/test-datasource-translation.xml"); + originalCsvFile = dataUtils.createDataFile("v0_6/test-datasource.csv"); + usedCsvFile = dataUtils.newFile("postal_code.csv"); + try (FileOutputStream fos = new FileOutputStream(usedCsvFile)) { + Files.copy(originalCsvFile.toPath(), fos); + } + + expectedOutputFile = dataUtils.createDataFile("v0_6/test-datasource-out.osm"); + actualOutputFile = dataUtils.newFile(); + + // Append the two source files into the destination file. + Osmosis.run( + new String[] { + "-q", + "--read-xml-0.6", + sourceFile.getPath(), + "--tag-transform-0.6", + "file=" + translationFile, + "--tag-sort-0.6", + "--write-xml-0.6", + actualOutputFile.getPath() + } + ); + + // Validate that the output file matches the expected result. + dataUtils.compareFiles(expectedOutputFile, actualOutputFile); + } } diff --git a/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource-in.osm b/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource-in.osm new file mode 100644 index 000000000..c38f53c06 --- /dev/null +++ b/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource-in.osm @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource-out.osm b/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource-out.osm new file mode 100644 index 000000000..d0cbae3a5 --- /dev/null +++ b/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource-out.osm @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource-translation.xml b/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource-translation.xml new file mode 100644 index 000000000..c7121ee05 --- /dev/null +++ b/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource-translation.xml @@ -0,0 +1,18 @@ + + + + Join postcodes + Join postcodes from CSV file + + + + + + + + + + + + + diff --git a/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource.csv b/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource.csv new file mode 100644 index 000000000..cdca1e5c5 --- /dev/null +++ b/osmosis-tagtransform/src/test/resources/data/template/v0_6/test-datasource.csv @@ -0,0 +1 @@ +"48712","5000" \ No newline at end of file