Package org.geotools.factory

Examples of org.geotools.factory.Hints


    DefaultMapContext mapContext = new DefaultMapContext();
    mapContext.setCoordinateReferenceSystem(geoService.getCrs2(clientMapInfo.getCrs()));
    MapRasterizingInfo mapInfo = (MapRasterizingInfo) clientMapInfo.getWidgetInfo(MapRasterizingInfo.WIDGET_KEY);
    mapContext.setAreaOfInterest(new ReferencedEnvelope(dtoConverterService.toInternal(mapInfo.getBounds()),
        mapContext.getCoordinateReferenceSystem()));
    RenderingHints renderingHints = new Hints();
    renderingHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    RasterizingContainer response = new RasterizingContainer();
    context.put(RasterizingPipelineCode.CLIENT_MAP_INFO_KEY, clientMapInfo);
    context.put(RasterizingPipelineCode.RENDERING_HINTS, renderingHints);
    context.put(RasterizingPipelineCode.MAP_CONTEXT_KEY, mapContext);
    pipelineService.execute(RasterizingPipelineCode.PIPELINE_RASTERIZING_GET_MAP_IMAGE, null, context, response);
View Full Code Here


    DefaultMapContext mapContext = new DefaultMapContext();
    mapContext.setCoordinateReferenceSystem(geoService.getCrs2(clientMapInfo.getCrs()));
    MapRasterizingInfo mapInfo = (MapRasterizingInfo) clientMapInfo.getWidgetInfo(MapRasterizingInfo.WIDGET_KEY);
    mapContext.setAreaOfInterest(new ReferencedEnvelope(dtoConverterService.toInternal(mapInfo.getBounds()),
        mapContext.getCoordinateReferenceSystem()));
    RenderingHints renderingHints = new Hints();
    renderingHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    RasterizingContainer response = new RasterizingContainer();
    context.put(RasterizingPipelineCode.CLIENT_MAP_INFO_KEY, clientMapInfo);
    context.put(RasterizingPipelineCode.RENDERING_HINTS, renderingHints);
    context.put(RasterizingPipelineCode.MAP_CONTEXT_KEY, mapContext);
    pipelineService.execute(RasterizingPipelineCode.PIPELINE_RASTERIZING_GET_LEGEND_IMAGE, null, context, response);
View Full Code Here

      }
    }
    JComponent c = builder.buildComponent();
    BufferedImage image = new BufferedImage(c.getWidth(), c.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
    Graphics2D graphics = image.createGraphics();
    RenderingHints renderingHints = new Hints();
    renderingHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    graphics.setRenderingHints(renderingHints);
    c.print(graphics);
    return image;
  }
View Full Code Here

        //
        // map.put( Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, true );
        // map.put( Hints.FORCE_STANDARD_AXIS_DIRECTIONS, true );
        // map.put( Hints.FORCE_STANDARD_AXIS_UNITS, true );
        map.put(Hints.LENIENT_DATUM_SHIFT, true);
        Hints global = new Hints(map);
        GeoTools.init(global);
        Logging.GEOTOOLS.setLoggerFactory((LoggerFactory<?>)null);
       
        // Suppress JAI warnings when native support unavailable
        JAI.getDefaultInstance().setImagingListener(new ImagingListener() {
View Full Code Here

                }
            }

            if (epsg != null) {
                monitor.subTask(Messages.LOADING + epsg);
                Hints hints = new Hints(Hints.CRS_AUTHORITY_FACTORY, PropertyAuthorityFactory.class);
                ReferencingFactoryContainer referencingFactoryContainer = ReferencingFactoryContainer
                        .instance(hints);

                PropertyAuthorityFactory factory = new PropertyAuthorityFactory(
                        referencingFactoryContainer, Citations.fromName("EPSG"), epsg); //$NON-NLS-1$
View Full Code Here

    
        //get the gml object id
        GmlObjectId id = request.getGmlObjectId();
       
        //set up the hints
        Hints hints = new Hints();
        if ( request.getTraverseXlinkDepth() != null ) {
           Integer depth =
               GetFeature.traverseXlinkDepth(request.getTraverseXlinkDepth());
           hints.put( Hints.ASSOCIATION_TRAVERSAL_DEPTH , depth);
        }
       
        //walk through datastores finding one that is gmlobject aware
        for ( Iterator d = catalog.getDataStores().iterator(); d.hasNext(); ) {
            DataStoreInfo dsInfo = (DataStoreInfo) d.next();
View Full Code Here

        if (query.getFeatureVersion() != null) {
            dataQuery.setVersion(query.getFeatureVersion());
        }

        //create the Hints to set at the end
        final Hints hints = new Hints();
               
        //handle xlink traversal depth
        if (request.getTraverseXlinkDepth() != null) {
            //TODO: make this an integer in the model, and have hte NumericKvpParser
            // handle '*' as max value
            Integer traverseXlinkDepth = traverseXlinkDepth( request.getTraverseXlinkDepth() );
           
            //set the depth as a hint on the query
            hints.put(Hints.ASSOCIATION_TRAVERSAL_DEPTH, traverseXlinkDepth);
        }
       
        //handle xlink properties
        if (!query.getXlinkPropertyName().isEmpty() ) {
            for ( Iterator x = query.getXlinkPropertyName().iterator(); x.hasNext(); ) {
                XlinkPropertyNameType xlinkProperty = (XlinkPropertyNameType) x.next();
               
                Integer traverseXlinkDepth = traverseXlinkDepth( xlinkProperty.getTraverseXlinkDepth() );
               
                //set the depth and property as hints on the query
                hints.put(Hints.ASSOCIATION_TRAVERSAL_DEPTH, traverseXlinkDepth );
               
                PropertyName xlinkPropertyName = filterFactory.property( xlinkProperty.getValue() );
                hints.put(Hints.ASSOCIATION_PROPERTY, xlinkPropertyName );
               
                dataQuery.setHints( hints );
               
                //TODO: support multiple properties
                break;
            }
        }
       
        //tell the datastore to use a lite coordinate sequence factory, if possible
        hints.put(Hints.JTS_COORDINATE_SEQUENCE_FACTORY, new LiteCoordinateSequenceFactory());

        //finally, set the hints
        dataQuery.setHints(hints);
       
        return dataQuery;
View Full Code Here

                    // TODO this code need to be made much more robust
                    if (requestedCRS != null) {
                       
                        final CoordinateReferenceSystem targetCRS = coverageGeometry.getCoordinateReferenceSystem();
                        final TransformedDirectPosition arbitraryToInternal = new
                          TransformedDirectPosition(requestedCRS, targetCRS, new Hints(Hints.LENIENT_DATUM_SHIFT,Boolean.TRUE));
                        try {
                            arbitraryToInternal.transform(position);
                        } catch (TransformException exception) {
                            throw new CannotEvaluateException("Unable to answer the geatfeatureinfo",exception);
                        }
View Full Code Here

        if (resource.getStore() == null || resource.getStore().getDataStore(null) == null) {
            throw new IOException("featureType: " + getName()
                    + " does not have a properly configured " + "datastore");
        }

        Hints hints = new Hints(ResourcePool.REPROJECT, Boolean.valueOf(!skipReproject));

        return resource.getFeatureSource(null, hints);
    }
View Full Code Here

            @SuppressWarnings("rawtypes") final FeatureSource featureSource,
            final ProgressListener taskProgress) {

        final Query query = new Query();
        CoordinateSequenceFactory coordSeq = new PackedCoordinateSequenceFactory();
        query.getHints().add(new Hints(Hints.JTS_COORDINATE_SEQUENCE_FACTORY, coordSeq));
        workTree.insert(path, featureSource, query, taskProgress);

    }
View Full Code Here

TOP

Related Classes of org.geotools.factory.Hints

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.