当前位置: 首页>>代码示例>>Java>>正文


Java FilterFactoryImpl类代码示例

本文整理汇总了Java中org.geotools.filter.FilterFactoryImpl的典型用法代码示例。如果您正苦于以下问题:Java FilterFactoryImpl类的具体用法?Java FilterFactoryImpl怎么用?Java FilterFactoryImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FilterFactoryImpl类属于org.geotools.filter包,在下文中一共展示了FilterFactoryImpl类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: paint

import org.geotools.filter.FilterFactoryImpl; //导入依赖的package包/类
/**
 * @param obj
 *            The FT_coverage to render This method shall be reworked.
 */
public static void paint(final RasterSymbolizer symbolizer, final IFeature obj, final Viewport viewport, final double opacity) {
    FT_Coverage fcoverage = (FT_Coverage) obj;
    try {
        GridCoverage2D coverage = fcoverage.coverage();
        IEnvelope view = viewport.getEnvelopeInModelCoordinates();
        Envelope renderEnvelope = new Envelope(view.minX(), view.maxX(), view.minY(), view.maxY());
        GridCoverageRenderer renderer = new GridCoverageRenderer(coverage.getCoordinateReferenceSystem(), renderEnvelope, viewport.getLayerViewPanels()
                .iterator().next().getVisibleRect(), null);
        org.geotools.styling.RasterSymbolizer s = new StyleBuilder().createRasterSymbolizer();
        s.setOpacity(new FilterFactoryImpl().literal(opacity * symbolizer.getOpacity()));
        logger.warn("Replace by a GL function");
        // renderer.paint(coverage, s);
    } catch (Exception e) {
        e.printStackTrace();
    }
    return;
}
 
开发者ID:IGNF,项目名称:geoxygene,代码行数:22,代码来源:RenderGL11Util.java

示例2: createDefaultLineFeatureTypeStyle

import org.geotools.filter.FilterFactoryImpl; //导入依赖的package包/类
private FeatureTypeStyle createDefaultLineFeatureTypeStyle(String strokeWidth, String strokeColor, String opacity){		
	StyleFactory sf = CommonFactoryFinder.getStyleFactory(new Hints(Hints.KEY_RENDERING, Hints.VALUE_RENDER_SPEED));
	FilterFactory filterFactory = new FilterFactoryImpl();

	Stroke lineStroke = sf.getDefaultStroke();
       lineStroke.setWidth(filterFactory.literal(new Integer(strokeWidth)));
       lineStroke.setColor(filterFactory.literal(strokeColor));
       lineStroke.setOpacity(filterFactory.literal(opacity));
       
       LineSymbolizer lineSymbolizer = sf.createLineSymbolizer();
       lineSymbolizer.setStroke(lineStroke);
       
       Rule lineRule = sf.createRule();
       lineRule.symbolizers().add(lineSymbolizer);
       FeatureTypeStyle lineFeatureTypeStyle = sf.createFeatureTypeStyle(new Rule[]{lineRule});
       
       return lineFeatureTypeStyle;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:19,代码来源:LayerFactory.java

示例3: testBBOX

import org.geotools.filter.FilterFactoryImpl; //导入依赖的package包/类
@Test
public void testBBOX() throws IllegalArgumentException, NoSuchElementException, IOException {
    final FilterFactoryImpl factory = new FilterFactoryImpl();
    final Query query = new Query(
            "GeoWaveFeatureReaderTest",
            factory.bbox(
                    "",
                    -180,
                    -90,
                    180,
                    90,
                    "EPSG:4326"),
            new String[] {
                "geometry",
                "pid"
            });

    final FeatureReader<SimpleFeatureType, SimpleFeature> reader =
        dataStore.getFeatureReader(query, Transaction.AUTO_COMMIT);
    int count = 0;
    while (reader.hasNext()) {
        final SimpleFeature feature = reader.next();
        assertTrue(fids.contains(feature.getID()));
        count++;
    }
    assertTrue(count > 0);
}
 
开发者ID:apache,项目名称:incubator-rya,代码行数:28,代码来源:GeoWaveFeatureReaderTest.java

示例4: testBBOX

import org.geotools.filter.FilterFactoryImpl; //导入依赖的package包/类
@Test
public void testBBOX()
		throws IllegalArgumentException,
		NoSuchElementException,
		IOException {
	final FilterFactoryImpl factory = new FilterFactoryImpl();
	final Query query = new Query(
			"GeoWaveFeatureReaderTest",
			factory.bbox(
					"",
					-180,
					-90,
					180,
					90,
					"EPSG:4326"),
			new String[] {
				"geometry",
				"pid"
			});

	final FeatureReader<SimpleFeatureType, SimpleFeature> reader = dataStore.getFeatureReader(
			query,
			Transaction.AUTO_COMMIT);
	int count = 0;
	while (reader.hasNext()) {
		final SimpleFeature feature = reader.next();
		assertTrue(fids.contains(feature.getID()));
		count++;
	}
	assertTrue(count > 0);

}
 
开发者ID:locationtech,项目名称:geowave,代码行数:33,代码来源:GeoWaveFeatureReaderTest.java

示例5: test

import org.geotools.filter.FilterFactoryImpl; //导入依赖的package包/类
@Test
public void test() {
	final FilterFactoryImpl factory = new FilterFactoryImpl();
	final Expression exp1 = factory.property("pid");
	final Expression exp2 = factory.literal("a89dhd-123-abc");
	final Filter f = factory.equal(
			exp1,
			exp2,
			false);
	final PrimaryIndex spatialIndex = new SpatialDimensionalityTypeProvider()
			.createPrimaryIndex(new SpatialOptions());

	final FeatureDataAdapter adapter = new FeatureDataAdapter(
			type);
	adapter.init(spatialIndex);
	final CQLQuery cqlQuery = new CQLQuery(
			null,
			f,
			adapter);

	final List<QueryFilter> filters = cqlQuery.createFilters(spatialIndex);
	final List<DistributableQueryFilter> dFilters = new ArrayList<DistributableQueryFilter>();
	for (final QueryFilter filter : filters) {
		dFilters.add((DistributableQueryFilter) filter);
	}

	final DistributableFilterList dFilterList = new DistributableFilterList(
			dFilters);

	assertTrue(dFilterList.accept(
			spatialIndex.getIndexModel(),
			DataStoreUtils.getEncodings(
					spatialIndex,
					adapter.encode(
							createFeature(),
							spatialIndex.getIndexModel())).get(
					0)));
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:39,代码来源:CQLQueryFilterTest.java

示例6: tesFid

import org.geotools.filter.FilterFactoryImpl; //导入依赖的package包/类
@Test
public void tesFid() {
	final FilterFactoryImpl factory = new FilterFactoryImpl();
	final Id f = factory.id(new FeatureIdImpl(
			"123-abc"));
	final String ss = ECQL.toCQL(f);
	System.out.println(ss);
	assertTrue(ss.contains("'123-abc'"));

}
 
开发者ID:locationtech,项目名称:geowave,代码行数:11,代码来源:FilterToCQLToolTest.java

示例7: test

import org.geotools.filter.FilterFactoryImpl; //导入依赖的package包/类
@Test
public void test() {
	final FilterFactoryImpl factory = new FilterFactoryImpl();
	final Expression exp1 = factory.property("pid");
	final Expression exp2 = factory.literal("a89dhd-123-abc");
	final Filter f = factory.equal(
			exp1,
			exp2,
			false);
	final String ss = ECQL.toCQL(f);
	assertTrue(ss.contains("'a89dhd-123-abc'"));
}
 
开发者ID:locationtech,项目名称:geowave,代码行数:13,代码来源:FilterToCQLToolTest.java

示例8: getQueryFilter

import org.geotools.filter.FilterFactoryImpl; //导入依赖的package包/类
private Filter getQueryFilter(org.geoserver.monitor.Query query) {
	final FilterFactoryImpl factory = new FilterFactoryImpl();
	Filter queryFilter = query == null ? Filter.INCLUDE : convertFilter(
			factory, query.getFilter());

	if (query != null && query.getToDate() != null
			&& query.getFromDate() != null) {
		Filter betweenFilter = factory.between(
				factory.property(new NameImpl("startTime")),
				factory.literal(query.getFromDate()),
				factory.literal(query.getToDate()));
		if (queryFilter == Filter.INCLUDE)
			queryFilter = betweenFilter;
		else {
			betweenFilter = factory.and(Arrays.asList(queryFilter,
					betweenFilter));
		}
	}
	return queryFilter;
}
 
开发者ID:joaomartins27396,项目名称:GSOC2015-gsmonitoext,代码行数:21,代码来源:FeatureMonitorDAO.java

示例9: LayerFactory

import org.geotools.filter.FilterFactoryImpl; //导入依赖的package包/类
public LayerFactory(){
DEFAULT_CRS = DefaultGeographicCRS.WGS84;
sf = CommonFactoryFinder.getStyleFactory(new Hints(Hints.KEY_RENDERING, Hints.VALUE_RENDER_SPEED));
filterFactory = new FilterFactoryImpl();
  }
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:6,代码来源:LayerFactory.java


注:本文中的org.geotools.filter.FilterFactoryImpl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。