Package org.locationtech.geogig.api

Examples of org.locationtech.geogig.api.FeatureBuilder.build()


                                    break;
                                }
                            }

                            FeatureBuilder builder = new FeatureBuilder(type);
                            GeogigSimpleFeature simpleFeature = (GeogigSimpleFeature) builder
                                    .build(feature.getId().toString(), feature);
                            Geometry geom = null;
                            List<Object> attributes = simpleFeature.getAttributes();
                            for (Object attribute : attributes) {
                                if (attribute instanceof Geometry) {
View Full Code Here


                                break;
                            }
                        }

                        FeatureBuilder builder = new FeatureBuilder(featureType);
                        GeogigSimpleFeature simpleFeature = (GeogigSimpleFeature) builder.build(
                                revFeature.getId().toString(), revFeature);
                        change = new GeometryChange(simpleFeature, ChangeType.MODIFIED, input
                                .getPath(), crsCode);
                        return change;
                    }
View Full Code Here

                        .setObjectId(noderef.getMetadataId()).call(RevFeatureType.class).get();
                featureBuilders.put(noderef.getMetadataId(), new FeatureBuilder(ft));
            }
            FeatureBuilder fb = featureBuilders.get(noderef.getMetadataId());
            String parentPath = NodeRef.parentPath(NodeRef.appendChild(treePath, noderef.path()));
            insert(parentPath, fb.build(noderef.getNode().getName(), feature));
        }

        return context.command(FindTreeChild.class).setIndex(true).setParent(getTree())
                .setChildPath(treePath).call().get();
View Full Code Here

                    RevFeatureType revFeatureType;
                    revFeatureType = featureTypes.get(featureTypeId);
                    FeatureBuilder featureBuilder = new FeatureBuilder(revFeatureType);
                    ObjectReader<RevFeature> reader = factory.createFeatureReader();
                    RevFeature revFeature = reader.read(null, stream);
                    Feature feature = featureBuilder.build(NodeRef.nodeFromPath(fullPath),
                            revFeature);
                    if (operation.equals("R")) {
                        patch.addRemovedFeature(fullPath, feature, revFeatureType);
                    } else {
                        patch.addAddedFeature(fullPath, feature, revFeatureType);
View Full Code Here

                RevFeature revFeature = parseCommand.setObjectId(ref.objectId())
                        .call(RevFeature.class).get();
                final String parentPath = ref.getParentPath();
                FeatureBuilder featureBuilder = builders.get(parentPath);
                String fid = ref.name();
                Feature feature = featureBuilder.build(fid, revFeature);
                return feature;
            }

        };
        return Iterators.transform(iterator, nodeRefToFeature);
View Full Code Here

                if (ref.isPresent()) {
                    org.locationtech.geogig.api.Node nodeRef = ref.get();

                    RevFeature revFeature = index.getDatabase().getFeature(nodeRef.getObjectId());
                    String id = NodeRef.nodeFromPath(nodeRef.getName());
                    Feature feature = featureBuilder.build(id, revFeature);

                    Point p = (Point) ((SimpleFeature) feature).getAttribute("location");
                    if (p != null) {
                        coord = p.getCoordinate();
                        thisChangePointCache.put(Long.valueOf(nodeId), coord);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.