Search in sources :

Example 1 with Features

use of org.apache.sis.feature.Features in project geotoolkit by Geomatys.

the class GeoJSONWriter method writeProperties.

/**
 * Write ComplexAttribute.
 *
 * @param edited
 * @param fieldName
 * @param writeFieldName
 * @throws IOException
 * @throws IllegalArgumentException
 */
private void writeProperties(Feature edited, String fieldName, boolean writeFieldName, Set<Feature> alreadyWritten) throws IOException, IllegalArgumentException {
    if (writeFieldName) {
        writer.writeObjectFieldStart(fieldName);
    } else {
        writer.writeStartObject();
    }
    FeatureType type = edited.getType();
    PropertyType defGeom = FeatureExt.getDefaultGeometrySafe(type).flatMap(Features::toAttribute).orElse(null);
    Collection<? extends PropertyType> descriptors = type.getProperties(true).stream().filter(GeoJSONUtils.IS_NOT_CONVENTION).filter(it -> !Objects.equals(defGeom, it)).collect(Collectors.toList());
    for (PropertyType propType : descriptors) {
        final String name = propType.getName().tip().toString();
        final Object value = edited.getPropertyValue(propType.getName().toString());
        if (propType instanceof AttributeType) {
            final AttributeType attType = (AttributeType) propType;
            if (attType.getMaximumOccurs() > 1) {
                writer.writeArrayFieldStart(name);
                for (Object v : (Collection) value) {
                    writeProperty(name, v, false, alreadyWritten);
                }
                writer.writeEndArray();
            } else {
                writeProperty(name, value, true, alreadyWritten);
            }
        } else if (propType instanceof FeatureAssociationRole) {
            final FeatureAssociationRole asso = (FeatureAssociationRole) propType;
            if (asso.getMaximumOccurs() > 1) {
                writer.writeFieldName(name);
                writeFeatureCollection((List<Feature>) value, asso.getValueType());
            } else {
                writeProperty(name, value, true, alreadyWritten);
            }
        } else if (propType instanceof Operation) {
            writeProperty(name, value, true, alreadyWritten);
        }
    }
    writer.writeEndObject();
}
Also used : GeoJSONMultiPoint(org.geotoolkit.internal.geojson.binding.GeoJSONGeometry.GeoJSONMultiPoint) GeoJSONParser(org.geotoolkit.internal.geojson.GeoJSONParser) Link(org.geotoolkit.atom.xml.Link) JsonGenerator(com.fasterxml.jackson.core.JsonGenerator) TRUNCATE_EXISTING(java.nio.file.StandardOpenOption.TRUNCATE_EXISTING) NumberFormat(java.text.NumberFormat) Envelope(org.opengis.geometry.Envelope) Level(java.util.logging.Level) GeoJSONGeometry(org.geotoolkit.internal.geojson.binding.GeoJSONGeometry) GeoJSONMultiPolygon(org.geotoolkit.internal.geojson.binding.GeoJSONGeometry.GeoJSONMultiPolygon) FeatureType(org.opengis.feature.FeatureType) Operation(org.opengis.feature.Operation) JsonEncoding(com.fasterxml.jackson.core.JsonEncoding) Locale(java.util.Locale) GeoJSONMultiLineString(org.geotoolkit.internal.geojson.binding.GeoJSONGeometry.GeoJSONMultiLineString) GeoJSONPoint(org.geotoolkit.internal.geojson.binding.GeoJSONGeometry.GeoJSONPoint) FeatureAssociationRole(org.opengis.feature.FeatureAssociationRole) CommonCRS(org.apache.sis.referencing.CommonCRS) GeoJSONUtils(org.geotoolkit.internal.geojson.GeoJSONUtils) Path(java.nio.file.Path) WRITE(java.nio.file.StandardOpenOption.WRITE) Feature(org.opengis.feature.Feature) Utilities(org.apache.sis.util.Utilities) IdentityHashMap(java.util.IdentityHashMap) Files(java.nio.file.Files) Collection(java.util.Collection) Set(java.util.Set) AttributeType(org.opengis.feature.AttributeType) Attribute(org.opengis.feature.Attribute) Features(org.apache.sis.feature.Features) Collectors(java.util.stream.Collectors) GeoJSONLineString(org.geotoolkit.internal.geojson.binding.GeoJSONGeometry.GeoJSONLineString) PropertyNotFoundException(org.opengis.feature.PropertyNotFoundException) Objects(java.util.Objects) List(java.util.List) JsonFactory(com.fasterxml.jackson.core.JsonFactory) PropertyType(org.opengis.feature.PropertyType) java.io(java.io) AttributeConvention(org.apache.sis.internal.feature.AttributeConvention) CREATE(java.nio.file.StandardOpenOption.CREATE) GeoJSONGeometryCollection(org.geotoolkit.internal.geojson.binding.GeoJSONGeometry.GeoJSONGeometryCollection) FeatureExt(org.geotoolkit.feature.FeatureExt) Optional(java.util.Optional) Geometry(org.locationtech.jts.geom.Geometry) GeoJSONPolygon(org.geotoolkit.internal.geojson.binding.GeoJSONGeometry.GeoJSONPolygon) GeoJSONConstants(org.geotoolkit.storage.geojson.GeoJSONConstants) Collections(java.util.Collections) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem) FeatureType(org.opengis.feature.FeatureType) AttributeType(org.opengis.feature.AttributeType) Collection(java.util.Collection) GeoJSONGeometryCollection(org.geotoolkit.internal.geojson.binding.GeoJSONGeometry.GeoJSONGeometryCollection) List(java.util.List) PropertyType(org.opengis.feature.PropertyType) GeoJSONMultiLineString(org.geotoolkit.internal.geojson.binding.GeoJSONGeometry.GeoJSONMultiLineString) GeoJSONLineString(org.geotoolkit.internal.geojson.binding.GeoJSONGeometry.GeoJSONLineString) Operation(org.opengis.feature.Operation) FeatureAssociationRole(org.opengis.feature.FeatureAssociationRole)

Example 2 with Features

use of org.apache.sis.feature.Features in project geotoolkit by Geomatys.

the class FeatureExt method prepareGeometryExtractor.

/**
 * Try to create an operator to extract primary geometry from features of a specific type. This method offers the
 * following advantages:
 * <ul>
 *     <li>When read geometry does not define any CRS, we assign the one extracted from related property type.</li>
 *     <li>Property/characteristic analysis is done on assembly, to ensure minimal overhead on result function execution.</li>
 * </ul>
 *
 * @param targetType Type of the features that will be passed as input to the resulting function. Cannot be null.
 * @return A function for geometry extraction from features whose is or inherits from input type. Never null.
 * If we cannot return a valid value, an error will be thrown as specified by {@link #getDefaultGeometry(FeatureType)}.
 * @throws RuntimeException See {@link #getDefaultGeometry(FeatureType)}.
 */
public static Function<Feature, Geometry> prepareGeometryExtractor(final FeatureType targetType) {
    ensureNonNull("Target type", targetType);
    PropertyType geom = getDefaultGeometry(targetType);
    // Minor optimisation : directly use geometry attribute in case a link convention has been set.
    geom = Features.getLinkTarget(geom).map(name -> targetType.getProperty(name)).orElse(geom);
    final AttributeType<?> attr = Features.toAttribute(geom).orElseThrow(() -> new IllegalStateException("Cannot extract geometries when associate type is not an attribute"));
    final Class<?> vClass = attr.getValueClass();
    if (!Geometry.class.isAssignableFrom(vClass)) {
        throw new UnsupportedOperationException("Only JTS geometries are supported for now.");
    }
    // Name is built from geom, not attr, because attr can be a virtual result property, not present in source type.
    // For example, if you've got two numeric attributes x and y, then add a concatenation operation, you've got no
    // geometric attribute, but a geometric operation.
    final String name = geom.getName().toString();
    final CoordinateReferenceSystem crs = AttributeConvention.getCRSCharacteristic(targetType, attr);
    if (crs == null) {
        return f -> (Geometry) f.getPropertyValue(name);
    } else {
        return f -> {
            final Object value = f.getPropertyValue(name);
            if (value == null)
                return null;
            final Geometry geometry = (Geometry) value;
            final CoordinateReferenceSystem currentCrs;
            try {
                currentCrs = JTS.findCoordinateReferenceSystem(geometry);
            } catch (FactoryException e) {
                throw new BackingStoreException(e);
            }
            if (currentCrs == null)
                JTS.setCRS(geometry, crs);
            return geometry;
        };
    }
}
Also used : Geometry(org.locationtech.jts.geom.Geometry) GeneralParameterDescriptor(org.opengis.parameter.GeneralParameterDescriptor) Arrays(java.util.Arrays) Array(java.lang.reflect.Array) URL(java.net.URL) Date(java.util.Date) BiFunction(java.util.function.BiFunction) FeatureTypeBuilder(org.apache.sis.feature.builder.FeatureTypeBuilder) Envelope(org.opengis.geometry.Envelope) DefaultFactories(org.apache.sis.internal.system.DefaultFactories) FeatureType(org.opengis.feature.FeatureType) IdentifiedType(org.opengis.feature.IdentifiedType) Map(java.util.Map) FeatureAssociationRole(org.opengis.feature.FeatureAssociationRole) URI(java.net.URI) NAME_KEY(org.apache.sis.feature.AbstractIdentifiedType.NAME_KEY) ParameterValue(org.opengis.parameter.ParameterValue) GeneralEnvelope(org.apache.sis.geometry.GeneralEnvelope) ArgumentChecks.ensureNonNull(org.apache.sis.util.ArgumentChecks.ensureNonNull) Feature(org.opengis.feature.Feature) NameFactory(org.opengis.util.NameFactory) DefaultAttributeType(org.apache.sis.feature.DefaultAttributeType) Geometries(org.apache.sis.internal.feature.Geometries) Parameters(org.apache.sis.parameter.Parameters) Predicate(java.util.function.Predicate) Collection(java.util.Collection) AttributeType(org.opengis.feature.AttributeType) Attribute(org.opengis.feature.Attribute) Logger(java.util.logging.Logger) Collectors(java.util.stream.Collectors) Property(org.opengis.feature.Property) FilterUtilities(org.geotoolkit.filter.FilterUtilities) ArrayFeature(org.geotoolkit.internal.feature.ArrayFeature) List(java.util.List) ParameterValueGroup(org.opengis.parameter.ParameterValueGroup) Entry(java.util.Map.Entry) GeneralParameterValue(org.opengis.parameter.GeneralParameterValue) Optional(java.util.Optional) Geometry(org.locationtech.jts.geom.Geometry) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem) FactoryException(org.opengis.util.FactoryException) Static(org.apache.sis.util.Static) DefaultNameSpace(org.apache.sis.util.iso.DefaultNameSpace) HashMap(java.util.HashMap) FeatureAssociation(org.opengis.feature.FeatureAssociation) Function(java.util.function.Function) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) DefaultFeatureType(org.apache.sis.feature.DefaultFeatureType) Operation(org.opengis.feature.Operation) ParameterDescriptorGroup(org.opengis.parameter.ParameterDescriptorGroup) BackingStoreException(org.apache.sis.util.collection.BackingStoreException) UID(java.rmi.server.UID) FeatureLoop(org.geotoolkit.internal.feature.FeatureLoop) ResourceId(org.opengis.filter.ResourceId) Iterator(java.util.Iterator) JTS(org.geotoolkit.geometry.jts.JTS) Features(org.apache.sis.feature.Features) PropertyNotFoundException(org.opengis.feature.PropertyNotFoundException) GenericName(org.opengis.util.GenericName) PropertyType(org.opengis.feature.PropertyType) GridCoverage(org.apache.sis.coverage.grid.GridCoverage) AttributeConvention(org.apache.sis.internal.feature.AttributeConvention) ObjectConverters(org.apache.sis.util.ObjectConverters) Collections(java.util.Collections) ParameterDescriptor(org.opengis.parameter.ParameterDescriptor) FactoryException(org.opengis.util.FactoryException) BackingStoreException(org.apache.sis.util.collection.BackingStoreException) PropertyType(org.opengis.feature.PropertyType) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem)

Example 3 with Features

use of org.apache.sis.feature.Features in project geotoolkit by Geomatys.

the class RenderingRoutines method prepareQuery.

/**
 * Creates an optimal query to send to the datastore, knowing which properties are knowned and
 * the appropriate bounding box to filter.
 */
public static Query prepareQuery(final RenderingContext2D renderingContext, FeatureSet fs, final MapLayer layer, final Set<String> styleRequieredAtts, final List<Rule> rules, double symbolsMargin) throws PortrayalException {
    final FeatureType schema;
    try {
        schema = fs.getType();
    } catch (DataStoreException ex) {
        throw new PortrayalException(ex.getMessage(), ex);
    }
    // Note: do not use layer boundary to define the target bbox, because it can be expensive.
    // Anyway, the target resource will be better to determine clipping between rendering boundaries and its own.
    final Envelope bbox = optimizeBBox(renderingContext, fs, symbolsMargin);
    final CoordinateReferenceSystem layerCRS = FeatureExt.getCRS(schema);
    final RenderingHints hints = renderingContext.getRenderingHints();
    /*
         * To restrict queried values to the rendering area, we must identify what geometries are used by the style.
         * For each applied symbol, there are 3 possible cases:
         * - if the rule uses default geometries, they will be added to the geometry property list after the loop
         * - The geometric expression is a value reference, we can safely register it in geometric properties. The
         *   reference xpath is unwrapped in a set to ensure we won't create any doublon filters.
         * - If the geometry property is a complex expression(Ex: a value computed from non geometric fields), we keep
         *   it as is to apply a filter directly upon it. Note that even if it's an expression derived from geometric
         *   fields, we cannot apply spatial filter on them, because the expression could drastically change topology.
         *   For example, if the expression is 'buffer', the result geometry would be larger than any of its operands.
         *   TODO: such cases are maybe manageable by replacing bbox filter by a distance filter based upon the buffer
         *   distance. But would it do more good than harm ?
         */
    boolean isDefaultGeometryNeeded = rules == null || rules.isEmpty();
    final Set<String> geomProperties = new HashSet<>();
    final Set<Expression> complexProperties = new HashSet<>();
    if (rules != null) {
        for (Rule r : rules) {
            for (Symbolizer s : r.symbolizers()) {
                final Expression expGeom = s.getGeometry();
                if (isNil(expGeom))
                    isDefaultGeometryNeeded = true;
                else if (expGeom instanceof ValueReference)
                    geomProperties.add(((ValueReference) expGeom).getXPath());
                else
                    complexProperties.add(expGeom);
            }
        }
    }
    if (isDefaultGeometryNeeded) {
        try {
            final PropertyType defaultGeometry = FeatureExt.getDefaultGeometry(schema);
            final String geomName = Features.getLinkTarget(defaultGeometry).orElseGet(() -> defaultGeometry.getName().toString());
            geomProperties.add(geomName);
        } catch (PropertyNotFoundException e) {
            throw new PortrayalException("Default geometry cannot be determined. " + "However, it is needed to properly define filtering rules.");
        } catch (IllegalStateException e) {
            // If there's multiple geometric properties, and no primary one, we will use them all
            schema.getProperties(true).stream().filter(p -> !Features.getLinkTarget(p).isPresent()).filter(AttributeConvention::isGeometryAttribute).map(p -> p.getName().toString()).forEach(geomProperties::add);
        }
    }
    if (!complexProperties.isEmpty()) {
        LOGGER.fine("A style rule uses complex geometric properties. It can severly affect performance");
    }
    final Optional<Filter> spatialFilter = Stream.concat(geomProperties.stream().map(FILTER_FACTORY::property), complexProperties.stream()).<Filter>map(expression -> FILTER_FACTORY.bbox(expression, bbox)).reduce(FILTER_FACTORY::or);
    Filter userFilter = null;
    // concatenate geographic filter with data filter if there is one
    if (layer != null) {
        Query query = layer.getQuery();
        if (query instanceof FeatureQuery) {
            userFilter = ((FeatureQuery) query).getSelection();
        }
    }
    Filter filter;
    if (spatialFilter.isPresent()) {
        if (userFilter == null)
            filter = spatialFilter.get();
        else
            // Note: we give priority to the spatial filter here, because it is our main use case: rendering is driven
            // by bounding box.
            filter = FILTER_FACTORY.and(spatialFilter.get(), userFilter);
    } else if (userFilter == null) {
        throw new PortrayalException("No spatial filter can be determined from style rules, and no user filter specified." + "We refuse dataset full-scan. To authorize it, manually specify Filter 'INCLUDE' on your map layer.");
    } else {
        LOGGER.warning("Spatial filter cannot be determined for rendering. However, user has provided a custom filter that we'll use as sole filtering policy");
        filter = userFilter;
    }
    final Set<String> copy = new HashSet<>();
    final FeatureType expected;
    final String[] atts;
    if (styleRequieredAtts == null) {
        // all properties are requiered
        expected = schema;
        atts = null;
    } else {
        final Set<String> attributs = styleRequieredAtts;
        copy.addAll(attributs);
        copy.addAll(geomProperties);
        try {
            // always include the identifier if it exist
            schema.getProperty(AttributeConvention.IDENTIFIER);
            copy.add(AttributeConvention.IDENTIFIER);
        } catch (PropertyNotFoundException ex) {
        // no id, ignore it
        }
        atts = copy.toArray(new String[copy.size()]);
        // then we reduce it to the first parent property.
        for (int i = 0; i < atts.length; i++) {
            String attName = atts[i];
            int index = attName.indexOf('/');
            if (index == 0) {
                // remove all xpath elements
                // remove first slash
                attName = attName.substring(1);
                final Pattern pattern = Pattern.compile("(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\])|/{1}");
                final Matcher matcher = pattern.matcher(attName);
                final StringBuilder sb = new StringBuilder();
                int position = 0;
                while (matcher.find()) {
                    final String match = matcher.group();
                    sb.append(attName.substring(position, matcher.start()));
                    position = matcher.end();
                    if (match.charAt(0) == '/') {
                        // we don't query precisely sub elements
                        position = attName.length();
                        break;
                    } else if (match.charAt(0) == '{') {
                        sb.append(match);
                    } else if (match.charAt(0) == '[') {
                    // strip indexes or xpath searches
                    }
                }
                sb.append(attName.substring(position));
                atts[i] = sb.toString();
            }
        }
        try {
            expected = new ViewMapper(schema, atts).getMappedType();
        } catch (MismatchedFeatureException ex) {
            throw new PortrayalException(ex);
        }
    }
    // combine the filter with rule filters----------------------------------
    if (rules != null) {
        List<Filter<Object>> rulefilters = new ArrayList<>();
        for (Rule rule : rules) {
            if (rule.isElseFilter()) {
                // we can't append styling filters, an else rule match all features
                rulefilters = null;
                break;
            }
            final Filter rf = rule.getFilter();
            if (rf == null || rf == Filter.include()) {
                // we can't append styling filters, this rule matchs all features.
                rulefilters = null;
                break;
            }
            rulefilters.add(rf);
        }
        if (rulefilters != null) {
            final Filter combined;
            if (rulefilters.size() == 1) {
                // we can optimze here, since we pass the filter on the query, we can remove
                // the filter on the rule.
                final MutableRule mr = StyleUtilities.copy(rules.get(0));
                mr.setFilter(null);
                rules.set(0, mr);
                combined = rulefilters.get(0);
            } else {
                combined = FILTER_FACTORY.or(rulefilters);
            }
            if (filter != Filter.include()) {
                filter = FILTER_FACTORY.and(filter, combined);
            } else {
                filter = combined;
            }
        }
    }
    // optimize the filter---------------------------------------------------
    filter = FilterUtilities.prepare(filter, Feature.class, expected);
    final Hints queryHints = new Hints();
    final org.geotoolkit.storage.feature.query.Query qb = new org.geotoolkit.storage.feature.query.Query();
    qb.setTypeName(schema.getName());
    qb.setSelection(filter);
    qb.setProperties(atts);
    // resampling and ignore flag only works when we know the layer crs
    if (layerCRS != null) {
        // add resampling -------------------------------------------------------
        Boolean resample = (hints == null) ? null : (Boolean) hints.get(GO2Hints.KEY_GENERALIZE);
        if (!Boolean.FALSE.equals(resample)) {
            // we only disable resampling if it is explictly specified
            double[] res = renderingContext.getResolution(layerCRS);
            // adjust with the generalization factor
            final Number n = (hints == null) ? null : (Number) hints.get(GO2Hints.KEY_GENERALIZE_FACTOR);
            final double factor;
            if (n != null) {
                factor = n.doubleValue();
            } else {
                factor = GO2Hints.GENERALIZE_FACTOR_DEFAULT.doubleValue();
            }
            res[0] *= factor;
            res[1] *= factor;
            qb.setResolution(res);
            try {
                res = renderingContext.getResolution(CRS.forCode("EPSG:3395"));
                res[0] *= factor;
                res[1] *= factor;
                qb.setLinearResolution(Quantities.create(res[0], Units.METRE));
            } catch (FactoryException ex) {
                throw new PortrayalException(ex.getMessage(), ex);
            }
        }
    // add ignore flag ------------------------------------------------------
    // TODO this is efficient but erases values, when plenty of then are to be rendered
    // we should find another way to handle this
    // if(!GO2Utilities.visibleMargin(rules, 1.01f, renderingContext)){
    // //style does not expend itself further than the feature geometry
    // //that mean geometries smaller than a pixel will not be renderer or barely visible
    // queryHints.put(Hints.KEY_IGNORE_SMALL_FEATURES, renderingContext.getResolution(layerCRS));
    // }
    }
    // add reprojection -----------------------------------------------------
    // we don't reproject, the reprojection may produce curves but JTS can not represent those.
    // so we generate those curves in java2d shapes by doing the transformation ourself.
    // TODO wait for a new geometry implementation
    // qb.setCRS(renderingContext.getObjectiveCRS2D());
    // set the acumulated hints
    qb.setHints(queryHints);
    return qb;
}
Also used : Expression(org.opengis.filter.Expression) Hints(org.geotoolkit.factory.Hints) Envelope2D(org.apache.sis.geometry.Envelope2D) CRS(org.apache.sis.referencing.CRS) PortrayalException(org.geotoolkit.display.PortrayalException) RenderingHints(java.awt.RenderingHints) Envelope(org.opengis.geometry.Envelope) GeographicBoundingBox(org.opengis.metadata.extent.GeographicBoundingBox) FeatureType(org.opengis.feature.FeatureType) Matcher(java.util.regex.Matcher) ValueReference(org.opengis.filter.ValueReference) TransformException(org.opengis.referencing.operation.TransformException) GeneralEnvelope(org.apache.sis.geometry.GeneralEnvelope) Feature(org.opengis.feature.Feature) Utilities(org.apache.sis.util.Utilities) MutableFeatureTypeStyle(org.geotoolkit.style.MutableFeatureTypeStyle) MismatchedFeatureException(org.opengis.feature.MismatchedFeatureException) Set(java.util.Set) FeatureIterator(org.geotoolkit.storage.feature.FeatureIterator) Literal(org.opengis.filter.Literal) FilterUtilities(org.geotoolkit.filter.FilterUtilities) List(java.util.List) Stream(java.util.stream.Stream) ProjectedFeature(org.geotoolkit.display2d.primitive.ProjectedFeature) FeatureExt(org.geotoolkit.feature.FeatureExt) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) Rule(org.opengis.style.Rule) Envelopes(org.apache.sis.geometry.Envelopes) Query(org.apache.sis.storage.Query) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem) FactoryException(org.opengis.util.FactoryException) MutableRule(org.geotoolkit.style.MutableRule) ViewMapper(org.geotoolkit.feature.ViewMapper) GO2Utilities(org.geotoolkit.display2d.GO2Utilities) ProjectedObject(org.geotoolkit.display2d.primitive.ProjectedObject) STYLE_FACTORY(org.geotoolkit.display2d.GO2Utilities.STYLE_FACTORY) FeatureQuery(org.apache.sis.storage.FeatureQuery) FILTER_FACTORY(org.geotoolkit.display2d.GO2Utilities.FILTER_FACTORY) FeatureTypeStyle(org.opengis.style.FeatureTypeStyle) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) HashSet(java.util.HashSet) RenderingContext2D(org.geotoolkit.display2d.canvas.RenderingContext2D) LOGGER(org.geotoolkit.display2d.GO2Utilities.LOGGER) DataStoreException(org.apache.sis.storage.DataStoreException) CanvasMonitor(org.geotoolkit.display.canvas.control.CanvasMonitor) FeatureStoreRuntimeException(org.geotoolkit.storage.feature.FeatureStoreRuntimeException) GO2Hints(org.geotoolkit.display2d.GO2Hints) MutableStyle(org.geotoolkit.style.MutableStyle) Units(org.apache.sis.measure.Units) MapLayer(org.apache.sis.portrayal.MapLayer) Iterator(java.util.Iterator) Quantities(org.apache.sis.measure.Quantities) IOException(java.io.IOException) Features(org.apache.sis.feature.Features) PropertyNotFoundException(org.opengis.feature.PropertyNotFoundException) StyleUtilities(org.geotoolkit.style.StyleUtilities) PropertyType(org.opengis.feature.PropertyType) AttributeConvention(org.apache.sis.internal.feature.AttributeConvention) FeatureSet(org.apache.sis.storage.FeatureSet) Closeable(java.io.Closeable) Filter(org.opengis.filter.Filter) Symbolizer(org.opengis.style.Symbolizer) FeatureType(org.opengis.feature.FeatureType) PropertyNotFoundException(org.opengis.feature.PropertyNotFoundException) Query(org.apache.sis.storage.Query) FeatureQuery(org.apache.sis.storage.FeatureQuery) Hints(org.geotoolkit.factory.Hints) RenderingHints(java.awt.RenderingHints) GO2Hints(org.geotoolkit.display2d.GO2Hints) Matcher(java.util.regex.Matcher) FactoryException(org.opengis.util.FactoryException) ArrayList(java.util.ArrayList) PropertyType(org.opengis.feature.PropertyType) FeatureQuery(org.apache.sis.storage.FeatureQuery) Envelope(org.opengis.geometry.Envelope) GeneralEnvelope(org.apache.sis.geometry.GeneralEnvelope) Feature(org.opengis.feature.Feature) ProjectedFeature(org.geotoolkit.display2d.primitive.ProjectedFeature) RenderingHints(java.awt.RenderingHints) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem) HashSet(java.util.HashSet) ValueReference(org.opengis.filter.ValueReference) Pattern(java.util.regex.Pattern) DataStoreException(org.apache.sis.storage.DataStoreException) FILTER_FACTORY(org.geotoolkit.display2d.GO2Utilities.FILTER_FACTORY) ViewMapper(org.geotoolkit.feature.ViewMapper) Symbolizer(org.opengis.style.Symbolizer) MutableRule(org.geotoolkit.style.MutableRule) Expression(org.opengis.filter.Expression) Filter(org.opengis.filter.Filter) MismatchedFeatureException(org.opengis.feature.MismatchedFeatureException) Rule(org.opengis.style.Rule) MutableRule(org.geotoolkit.style.MutableRule) PortrayalException(org.geotoolkit.display.PortrayalException)

Aggregations

List (java.util.List)3 Optional (java.util.Optional)3 Level (java.util.logging.Level)3 Features (org.apache.sis.feature.Features)3 AttributeConvention (org.apache.sis.internal.feature.AttributeConvention)3 ArrayList (java.util.ArrayList)2 Collection (java.util.Collection)2 Collections (java.util.Collections)2 Iterator (java.util.Iterator)2 Set (java.util.Set)2 Collectors (java.util.stream.Collectors)2 GeneralEnvelope (org.apache.sis.geometry.GeneralEnvelope)2 FilterUtilities (org.geotoolkit.filter.FilterUtilities)2 Feature (org.opengis.feature.Feature)2 FeatureType (org.opengis.feature.FeatureType)2 PropertyNotFoundException (org.opengis.feature.PropertyNotFoundException)2 PropertyType (org.opengis.feature.PropertyType)2 Envelope (org.opengis.geometry.Envelope)2 CoordinateReferenceSystem (org.opengis.referencing.crs.CoordinateReferenceSystem)2 FactoryException (org.opengis.util.FactoryException)2