Package org.locationtech.geogig.osm.internal

Examples of org.locationtech.geogig.osm.internal.Mapping


            return Optional.absent();
        }
        try {
            List<String> lines = Files.readLines(file, Charsets.UTF_8);
            String s = Joiner.on("\n").join(lines);
            Mapping mapping = Mapping.fromString(s);
            return Optional.of(mapping);
        } catch (IOException e) {
            throw Throwables.propagate(e);
        }
    }
View Full Code Here


        Form options = getRequest().getResourceRef().getQueryAsForm();

        final String urlOrFilepath = options.getFirstValue("uri");
        final boolean add = Boolean.valueOf(options.getFirstValue("add"));
        final String mappingFile = options.getFirstValue("mapping");
        Mapping mapping = null;
        if (mappingFile != null) {
            mapping = Mapping.fromFile(mappingFile);
        }
        final boolean noRaw = Boolean.valueOf(options.getFirstValue("noRaw"));
        final String message = options.getFirstValue("message");
View Full Code Here

     */
    @Override
    protected void runInternal(GeogigCLI cli) {
        Preconditions.checkNotNull(mappingFile != null, "A data mapping file must be specified");

        final Mapping mapping = Mapping.fromFile(mappingFile);
        List<MappingRule> rules = mapping.getRules();
        checkParameter(!rules.isEmpty(), "No rules are defined in the specified mapping");

        for (final MappingRule rule : mapping.getRules()) {
            Function<Feature, Optional<Feature>> function = new Function<Feature, Optional<Feature>>() {

                @Override
                @Nullable
                public Optional<Feature> apply(@Nullable Feature feature) {
View Full Code Here

        String shapefile = args.get(0);

        final File file = new File(shapefile);

        final Mapping mapping = Mapping.fromFile(mappingFile);
        List<MappingRule> rules = mapping.getRules();
        checkParameter(!rules.isEmpty(), "No rules are defined in the specified mapping");

        for (MappingRule rule : rules) {
            File targetFile = file;
            if (rules.size() > 1) {
View Full Code Here

                && cli.getGeogig().getRepository().workingTree().isClean(),
                "Working tree and index are not clean");

        String mappingFilepath = args.get(0);

        Mapping mapping = Mapping.fromFile(mappingFilepath);

        geogig = cli.getGeogig();

        ObjectId oldTreeId = geogig.getRepository().workingTree().getTree().getId();
View Full Code Here

        checkParameter(importFile.exists(), "The specified OSM data file does not exist");
        checkParameter(!(message != null && noRaw), "cannot use --message if using --no-raw");
        checkParameter(message == null || mappingFile != null,
                "Cannot use --message if not using --mapping");

        Mapping mapping = null;
        if (mappingFile != null) {
            mapping = Mapping.fromFile(mappingFile);
        }

        try {
View Full Code Here

     */
    @Override
    protected void runInternal(GeogigCLI cli) throws IOException {
        Preconditions.checkNotNull(mappingFile != null, "A data mapping file must be specified");

        final Mapping mapping = Mapping.fromFile(mappingFile);
        List<MappingRule> rules = mapping.getRules();
        checkParameter(!rules.isEmpty(), "No rules are defined in the specified mapping");

        for (MappingRule rule : rules) {
            exportRule(rule, cli);
        }
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.osm.internal.Mapping

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.