本文整理汇总了Java中org.geotools.util.NullProgressListener类的典型用法代码示例。如果您正苦于以下问题:Java NullProgressListener类的具体用法?Java NullProgressListener怎么用?Java NullProgressListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NullProgressListener类属于org.geotools.util包,在下文中一共展示了NullProgressListener类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setup
import org.geotools.util.NullProgressListener; //导入依赖的package包/类
@Override
public void setup(
final Configuration configuration,
final List<ColumnInterface> columnList) throws IOException
{
final URL url = getUrl(configuration);
final ShapefileDataStoreFactory fac = new ShapefileDataStoreFactory();
final Map params = new HashMap();
params.put(ShapefileDataStoreFactory.URLP.key, url);
params.put(ShapefileDataStoreFactory.CREATE_SPATIAL_INDEX.key, Boolean.TRUE);
params.put(ShapefileDataStoreFactory.ENABLE_SPATIAL_INDEX, Boolean.TRUE);
params.put(ShapefileDataStoreFactory.MEMORY_MAPPED, Boolean.TRUE);
m_dataStore = fac.createDataStore(params);
final String[] typeNames = m_dataStore.getTypeNames();
m_featureSource = m_dataStore.getFeatureSource(typeNames[0]);
m_geometryName = m_featureSource.getSchema().getGeometryDescriptor().getLocalName();
m_filterFactory = CommonFactoryFinder.getFilterFactory2(null);
m_progressListener = new NullProgressListener();
m_buffer = configuration.getFloat(GeoEnrichmentJob.KEY_BUFFER, 0.000001F);
}
开发者ID:mraad,项目名称:GeoEnrichment,代码行数:23,代码来源:SearchShapefileAbstract.java
示例2: withWaldbrueckeAndManual
import org.geotools.util.NullProgressListener; //导入依赖的package包/类
private static void withWaldbrueckeAndManual(String folder) throws Exception {
URL schemaURL = new File("/Users/markus/Documents/Projects/EMFFrag/02_workspace/citygml.git/de.hub.citygml.models/schemas/CityGML_1.0.0_080815/CityGML/building.xsd").toURL();
URL modelURL = new File("/Users/markus/Documents/Projects/EMFFrag/02_workspace/citygml.git/de.hub.citygml.models/examples/fwaldbruecke/waldbruecke_small.citygml").toURL();
//create the parser with the gml 3.0 configuration
org.geotools.xml.Configuration configuration = new org.geotools.gml3.GMLConfiguration();
org.geotools.xml.Parser parser = new org.geotools.xml.Parser( configuration );
// parse
SimpleFeatureCollection fc = (SimpleFeatureCollection) parser.parse(modelURL.openStream());
System.out.println("#3: " + fc.size());
fc.accepts(new AbstractFeatureVisitor() {
public void visit(Feature feature) {
SimpleFeature simpleFeature = ((SimpleFeature)feature);
System.out.println("#3: " + feature.getType().getName());
System.out.println("#3: " + simpleFeature.getDefaultGeometry());
}
}, new NullProgressListener());
}
开发者ID:markus1978,项目名称:citygml4emf,代码行数:20,代码来源:Quickstart.java
示例3: setup
import org.geotools.util.NullProgressListener; //导入依赖的package包/类
@Override
public void setup(
final Configuration configuration,
final List<ColumnInterface> columnList) throws IOException
{
m_spatialIndex = new STRtree();
m_buffer = configuration.getFloat(GeoEnrichmentJob.KEY_BUFFER, 0.000001F);
final URL url = getUrl(configuration);
final ShapefileDataStoreFactory factory = new ShapefileDataStoreFactory();
final Map params = new HashMap();
params.put(ShapefileDataStoreFactory.URLP.key, url);
final DataStore dataStore = factory.createDataStore(params);
try
{
final String[] typeNames = dataStore.getTypeNames();
final SimpleFeatureSource featureSource = dataStore.getFeatureSource(typeNames[0]);
m_geometryName = featureSource.getSchema().getGeometryDescriptor().getLocalName();
final SimpleFeatureCollection featureCollection = featureSource.getFeatures();
featureCollection.accepts(new FeatureVisitor()
{
public void visit(final Feature feature)
{
final Geometry geometry = (Geometry) feature.getProperty(m_geometryName).getValue();
final PreparedGeometry preparedGeometry = PreparedGeometryFactory.prepare(geometry);
m_spatialIndex.insert(geometry.getEnvelopeInternal(), new PreparedFeature(feature, preparedGeometry));
}
}, new NullProgressListener());
}
finally
{
dataStore.dispose();
}
}
开发者ID:mraad,项目名称:GeoEnrichment,代码行数:35,代码来源:SearchShapefileIndexPolygon.java
示例4: withTestModelsAndManual
import org.geotools.util.NullProgressListener; //导入依赖的package包/类
private static void withTestModelsAndManual(String folder) throws Exception {
URL modelURL = new File("/Users/markus/Documents/Projects/EMFFrag/02_workspace/citygml.git/de.hub.citygml.models/schemas/"+folder+"/TestFeature.xml").toURL();
//create the parser with the gml 3.0 configuration
org.geotools.xml.Configuration configuration = new org.geotools.gml3.GMLConfiguration();
org.geotools.xml.Parser parser = new org.geotools.xml.Parser( configuration );
//parse
SimpleFeatureCollection fc = (SimpleFeatureCollection) parser.parse(modelURL.openStream());
System.out.println("#3: " + fc.size());
fc.accepts( new AbstractFeatureVisitor() {
public void visit(Feature feature ) {
System.out.println("#3: " + feature.getType().getName());
}
}, new NullProgressListener());
}
开发者ID:markus1978,项目名称:citygml4emf,代码行数:16,代码来源:Quickstart.java
示例5: fillElasticAttributes
import org.geotools.util.NullProgressListener; //导入依赖的package包/类
private ElasticLayerConfiguration fillElasticAttributes(ResourceInfo ri) {
ElasticLayerConfiguration layerConfig = (ElasticLayerConfiguration) ri.getMetadata()
.get(ElasticLayerConfiguration.KEY);
if (layerConfig == null) {
layerConfig = new ElasticLayerConfiguration(ri.getName());
ri.getMetadata().put(ElasticLayerConfiguration.KEY, layerConfig);
}
try {
ElasticDataStore dataStore = (ElasticDataStore) ((DataStoreInfo) ri.getStore())
.getDataStore(new NullProgressListener());
ArrayList<ElasticAttribute> result = new ArrayList<ElasticAttribute>();
Map<String, ElasticAttribute> tempMap = new HashMap<String, ElasticAttribute>();
final List<ElasticAttribute> attributes;
if (layerConfig.getAttributes() != null) {
attributes = layerConfig.getAttributes();
for (ElasticAttribute att : attributes) {
tempMap.put(att.getName(), att);
}
} else {
attributes = new ArrayList<>();
layerConfig.getAttributes().addAll(attributes);
}
final String docType = layerConfig.getDocType();
final Name layerName = new NameImpl(layerConfig.getLayerName());
dataStore.getDocTypes().put(layerName, docType);
for (ElasticAttribute at : dataStore.getElasticAttributes(layerName)) {
if (tempMap.containsKey(at.getName())) {
ElasticAttribute prev = tempMap.get(at.getName());
at = prev;
}
result.add(at);
}
layerConfig.getAttributes().clear();
layerConfig.getAttributes().addAll(result);
} catch (Exception e) {
LOGGER.log(Level.SEVERE, e.getMessage(), e);
}
return layerConfig;
}
开发者ID:ngageoint,项目名称:elasticgeo,代码行数:45,代码来源:ElasticConfigurationPage.java
注:本文中的org.geotools.util.NullProgressListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论