本文整理汇总了Java中org.geotools.filter.identity.FeatureIdImpl类的典型用法代码示例。如果您正苦于以下问题:Java FeatureIdImpl类的具体用法?Java FeatureIdImpl怎么用?Java FeatureIdImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FeatureIdImpl类属于org.geotools.filter.identity包,在下文中一共展示了FeatureIdImpl类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: execute
import org.geotools.filter.identity.FeatureIdImpl; //导入依赖的package包/类
public void execute(Tuple tuple) {
final String[] attributes = tuple.getValue(0).toString().split(",");
// Only ingest attributes that have a latitude and longitude
if (attributes.length == 2 && attributes[LATITUDE_COL_IDX] != null && attributes[LONGITUDE_COL_IDX] != null) {
featureBuilder.reset();
final SimpleFeature simpleFeature = featureBuilder.buildFeature(String.valueOf(UUID.randomUUID().getMostSignificantBits()));
simpleFeature.setDefaultGeometry(getGeometry(attributes));
try {
final SimpleFeature next = featureWriter.next();
for (int i = 0; i < simpleFeature.getAttributeCount(); i++) {
next.setAttribute(i, simpleFeature.getAttribute(i));
}
((FeatureIdImpl)next.getIdentifier()).setID(simpleFeature.getID());
featureWriter.write();
} catch (IOException e) {
log.error("Exception writing feature", e);
}
}
}
开发者ID:geomesa,项目名称:geomesa-tutorials,代码行数:24,代码来源:OSMKafkaBolt.java
示例2: startElement
import org.geotools.filter.identity.FeatureIdImpl; //导入依赖的package包/类
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
if (qName.indexOf(":") > 0) {
qName = qName.substring(qName.indexOf(":") + 1);
}
buffer.setLength(0);
switch (qName) {
case "LinearRing":
linRingCount++;
break;
case "MaskFeature":
String id = attributes.getValue("gml:id");
currentFeatureId = new FeatureIdImpl(id);
currentFeaturePoligons.clear();
break;
case "posList":
String dimStr = attributes.getValue("srsDimension");
try {
dimensions = Integer.parseInt(dimStr);
} catch (Exception e) {
dimensions = 2;
}
break;
}
}
开发者ID:senbox-org,项目名称:s2tbx,代码行数:26,代码来源:GMLReader.java
示例3: setUp
import org.geotools.filter.identity.FeatureIdImpl; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
// Draw a "Z"
path = new Path2D.Double();
path.moveTo(0, 0);
path.lineTo(3, 0);
path.lineTo(0, 3);
path.lineTo(3, 3);
product = new Product("p", "t", 4, 4);
band = product.addBand("b", "4 * (Y-0.5) + (X-0.5) + 0.1");
dataSourceConfig = new ProfilePlotPanel.DataSourceConfig();
SimpleFeatureTypeBuilder ftb = new SimpleFeatureTypeBuilder();
ftb.setName("ft");
ftb.add("lat", Double.class);
ftb.add("lon", Double.class);
ftb.add("data", Double.class);
SimpleFeatureType ft = ftb.buildFeatureType();
DefaultFeatureCollection fc = new DefaultFeatureCollection("id", ft);
fc.add(new SimpleFeatureImpl(new Object[]{0, 0, 0.3}, ft, new FeatureIdImpl("id1"), false));
fc.add(new SimpleFeatureImpl(new Object[]{0, 0, 0.5}, ft, new FeatureIdImpl("id2"), false));
fc.add(new SimpleFeatureImpl(new Object[]{0, 0, 0.7}, ft, new FeatureIdImpl("id3"), false));
fc.add(new SimpleFeatureImpl(new Object[]{0, 0, 0.1}, ft, new FeatureIdImpl("id4"), false));
dataSourceConfig.pointDataSource = new VectorDataNode("vd", fc);
dataSourceConfig.dataField = ft.getDescriptor("data");
dataSourceConfig.boxSize = 1;
dataSourceConfig.computeInBetweenPoints = true;
}
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:30,代码来源:ProfileDataTableModelTest.java
示例4: changeSomeFids
import org.geotools.filter.identity.FeatureIdImpl; //导入依赖的package包/类
private void changeSomeFids() {
for (int i = 0; i < 10; i++) {
int f = i+1;
FeatureAccessor accessor = m_features.get(new FeatureIdImpl("states." + f));
Feature feature = accessor.getFeature();
feature.getProperty("STATE_NAME").setValue("Changed." + i);
}
}
开发者ID:xandris,项目名称:geoserver-sync,代码行数:9,代码来源:StatesClient.java
示例5: tesFid
import org.geotools.filter.identity.FeatureIdImpl; //导入依赖的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
示例6: createFidFilter
import org.geotools.filter.identity.FeatureIdImpl; //导入依赖的package包/类
@Override
public Filter createFidFilter(String[] featureIDs) {
HashSet<Identifier> ids = new HashSet<Identifier>();
for (String id : featureIDs) {
ids.add(new FeatureIdImpl(id));
}
return FF.id(ids);
}
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:9,代码来源:FilterServiceImpl.java
示例7: check
import org.geotools.filter.identity.FeatureIdImpl; //导入依赖的package包/类
private void check(Map<Identifier, FeatureAccessor> clientMap, int expected, String fid) {
assertEquals(expected, byFid(clientMap, new FeatureIdImpl(fid)).getProperty("classification").getValue());
}
开发者ID:xandris,项目名称:geoserver-sync,代码行数:4,代码来源:GeoserverClientSynchronizerIntegrationTest.java
示例8: WrappedFeature
import org.geotools.filter.identity.FeatureIdImpl; //导入依赖的package包/类
public WrappedFeature(SimpleFeatureType featureType) {
super(new Object[featureType.getAttributeCount()], featureType, new FeatureIdImpl(""), false);
}
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:4,代码来源:InternalFeatureCollection.java
示例9: setId
import org.geotools.filter.identity.FeatureIdImpl; //导入依赖的package包/类
public void setId(String fid) {
((FeatureIdImpl) id).setID(fid);
}
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:4,代码来源:InternalFeatureCollection.java
注:本文中的org.geotools.filter.identity.FeatureIdImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论