Examples of GeometryDescriptor


Examples of org.opengis.feature.type.GeometryDescriptor

            return catalog.getStyleByName(StyleInfo.DEFAULT_RASTER);
    
        // for vectors we depend on the the nature of the default geometry
        String styleName;
        FeatureTypeInfo featureType = (FeatureTypeInfo) resource;
        GeometryDescriptor gd = featureType.getFeatureType().getGeometryDescriptor();
        if(gd == null)
            return null;
           
        Class gtype = gd.getType().getBinding();
        if ( Point.class.isAssignableFrom(gtype) || MultiPoint.class.isAssignableFrom(gtype)) {
            styleName = StyleInfo.DEFAULT_POINT;
        }
        else if ( LineString.class.isAssignableFrom(gtype) || MultiLineString.class.isAssignableFrom(gtype)) {
            styleName = StyleInfo.DEFAULT_LINE;
View Full Code Here

Examples of org.opengis.feature.type.GeometryDescriptor

        }
    }

    private Query reprojectFilter(Query query) throws IOException {
        SimpleFeatureType nativeFeatureType = source.getSchema();
        final GeometryDescriptor geom = nativeFeatureType.getGeometryDescriptor();
        // if no geometry involved, no reprojection needed
        if(geom == null)
            return query;
       
        try {
            // default CRS: the CRS we can assume geometry and bbox elements in filter are
            // that is, usually the declared one, but the native one in the leave case
            CoordinateReferenceSystem defaultCRS = null;
            // we need to reproject all bbox and geometries to a target crs, which is
            // the native one usually, but it's the declared on in the force case (since in
            // that case we completely ignore the native one)
            CoordinateReferenceSystem targetCRS = null;
            CoordinateReferenceSystem nativeCRS = geom.getCoordinateReferenceSystem();
            if(srsHandling == ProjectionPolicy.FORCE_DECLARED) {
                defaultCRS = declaredCRS;
                targetCRS = declaredCRS;
                nativeFeatureType = FeatureTypes.transform(nativeFeatureType, declaredCRS);
            } else if(srsHandling == ProjectionPolicy.REPROJECT_TO_DECLARED) {
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.