本文整理汇总了Java中org.opengis.feature.type.Name.getNamespaceURI方法的典型用法代码示例。如果您正苦于以下问题:Java Name.getNamespaceURI方法的具体用法?Java Name.getNamespaceURI怎么用?Java Name.getNamespaceURI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opengis.feature.type.Name
的用法示例。
在下文中一共展示了Name.getNamespaceURI方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: rawSchemaExample
import org.opengis.feature.type.Name; //导入方法依赖的package包/类
private void rawSchemaExample() throws Exception {
Name typeName = null;
URL schemaLocation = null;
CoordinateReferenceSystem crs = null;
// rawSchemaExample start
// assume we are working from WFS 1.1 / GML3 / etc...
final QName featureName = new QName(typeName.getNamespaceURI(), typeName.getLocalPart());
String namespaceURI = featureName.getNamespaceURI();
String uri = schemaLocation.toExternalForm();
Configuration wfsConfiguration = new org.geotools.gml3.ApplicationSchemaConfiguration(
namespaceURI, uri);
FeatureType parsed = GTXML.parseFeatureType(wfsConfiguration, featureName, crs);
// safely cast down to SimpleFeatureType
SimpleFeatureType schema = DataUtilities.simple(parsed);
// rawSchemaExample end
}
示例2: rawSchemaExample2
import org.opengis.feature.type.Name; //导入方法依赖的package包/类
private void rawSchemaExample2() throws Exception {
Name typeName = null;
URL schemaLocation = null;
CoordinateReferenceSystem crs = null;
// rawSchemaExample2 start
// more involved example showing a custom Configuration
final QName featureName = new QName(typeName.getNamespaceURI(), typeName.getLocalPart());
String namespaceURI = featureName.getNamespaceURI();
String uri = schemaLocation.toExternalForm();
// Step 1: Parse schema using XSD
XSD xsd = new org.geotools.gml2.ApplicationSchemaXSD(namespaceURI, uri);
// Step 2: custom configuration
Configuration configuration = new Configuration(xsd) {
{
addDependency(new XSConfiguration());
addDependency(new org.geotools.gml2.GMLConfiguration());
}
protected void registerBindings(java.util.Map bindings) {
// we have no special bindings
}
};
FeatureType parsed = GTXML.parseFeatureType(configuration, featureName, crs);
// safely cast down to SimpleFeatureType
SimpleFeatureType schema = DataUtilities.simple(parsed);
// rawSchemaExample2 end
}