• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java FactoryRegistryException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: main

import org.geotools.factory.FactoryRegistryException; //导入依赖的package包/类
public static void main(String [] args) throws NoSuchAuthorityCodeException, FactoryRegistryException, FactoryException, MismatchedDimensionException, TransformException{

		
		String zone = "52";
		double easting =596450.153;
		double northing = 6680793.777;
		System.out.print(SpatialUtilities.convertUTM_MGA942Geographic_EPSG4326(easting, northing, zone));
		
//		String zone = "53";
//		double easting =616450.153;
//		double northing = 6680793.777;
//		System.out.print(SpatialUtilities.convertUTM_MGA942Geographic_EPSG4326(easting, northing, zone));
		
	}
 
开发者ID:AuScope,项目名称:igsn30,代码行数:15,代码来源:TEST.java


示例2: FeatureExtender

import org.geotools.factory.FactoryRegistryException; //导入依赖的package包/类
/**
 * @param oldFeatureType the {@link FeatureType} of the existing features.
 * @param fieldArray the list of the names of new fields. 
 * @param classesArray the list of classes of the new fields.
 * @throws FactoryRegistryException 
 * @throws SchemaException
 */
public FeatureExtender( SimpleFeatureType oldFeatureType, String[] fieldArray,
        Class<?>[] classesArray ) throws FactoryRegistryException, SchemaException {

    List<AttributeDescriptor> oldAttributeDescriptors = oldFeatureType
            .getAttributeDescriptors();
    List<AttributeDescriptor> addedAttributeDescriptors = new ArrayList<AttributeDescriptor>();
    for( int i = 0; i < fieldArray.length; i++ ) {
        AttributeTypeBuilder build = new AttributeTypeBuilder();
        build.setNillable(true);
        build.setBinding(classesArray[i]);
        AttributeDescriptor descriptor = build.buildDescriptor(fieldArray[i]);
        addedAttributeDescriptors.add(descriptor);
    }

    List<AttributeDescriptor> newAttributesTypesList = new ArrayList<AttributeDescriptor>();
    for( AttributeDescriptor attributeDescriptor : oldAttributeDescriptors ) {
        newAttributesTypesList.add(attributeDescriptor);
    }
    newAttributesTypesList.addAll(addedAttributeDescriptors);

    // create the feature type
    SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder();
    b.setName(oldFeatureType.getName());
    b.setCRS(oldFeatureType.getCoordinateReferenceSystem());
    b.addAll(newAttributesTypesList);
    newFeatureType = b.buildFeatureType();
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:35,代码来源:FeatureExtender.java


示例3: newFeatureType

import org.geotools.factory.FactoryRegistryException; //导入依赖的package包/类
/**
 * The most specific way to create a new FeatureType.
 * 
 * @param types
 *            The AttributeTypes to create the FeatureType with.
 * @param name
 *            The typeName of the FeatureType. Required, may not be null.
 * @param ns
 *            The namespace of the FeatureType. Optional, may be null.
 * @param isAbstract
 *            True if this created type should be abstract.
 * @param superTypes
 *            A Collection of types the FeatureType will inherit from.
 *            Currently, all types inherit from feature in the opengis
 *            namespace.
 * 
 * @return A new FeatureType created from the given arguments.
 * 
 * @throws FactoryRegistryException
 *             If there are problems creating a factory.
 * @throws SchemaException
 *             If the AttributeTypes provided are invalid in some way.
 */
public static FeatureType newFeatureType(final AttributeType[] types,
		final String name, final URI ns, final boolean isAbstract,
		final FeatureType[] superTypes, final AttributeType defaultGeometry)
		throws FactoryRegistryException, SchemaException {
	final FeatureTypeFactory factory = newInstance(name);
	factory.addTypes(types);
	factory.setNamespace(ns);
	factory.setAbstract(isAbstract);
	if (defaultGeometry != null) {
		factory.setDefaultGeometry((GeometryAttributeType) defaultGeometry);
	}

	if (superTypes != null) {
		factory.setSuperTypes(Arrays.asList(superTypes));
	}

	return factory.getFeatureType();
}
 
开发者ID:52North,项目名称:uDig-SOS-plugin,代码行数:42,代码来源:SOSFeatureTypeFactory.java


示例4: createTemplate

import org.geotools.factory.FactoryRegistryException; //导入依赖的package包/类
/**
 * Create a FeatureTypeFactory which contains all of the AttributeTypes from
 * the given FeatureType. This is simply a convenience method for<br>
 * <code><pre>
 * FeatureTypeFactory factory = FeatureTypeFactory.newInstace();
 * factory.importType(yourTypeHere);
 * factory.setName(original.getName());
 * factory.setNamespace(original.getNamespace());
 * factory.setNillable(original.isNillable());
 * factory.setDefaultGeometry(original.getDefaultGeometry());
 * </pre></code>
 * 
 * @param original
 *            The FeatureType to obtain information from.
 * 
 * @return A new FeatureTypeFactory which is initialized with the state of
 *         the original FeatureType.
 * 
 * @throws FactoryRegistryException
 *             If a FeatureTypeFactory cannot be found.
 */
public static FeatureTypeFactory createTemplate(final FeatureType original)
		throws FactoryRegistryException {

	final FeatureTypeFactory builder = FeatureTypeFactory
			.newInstance(original.getTypeName());
	builder.importType(original);
	builder.setNamespace(original.getNamespace());
	builder.setDefaultGeometry(original.getDefaultGeometry());

	final FeatureType[] ancestors = original.getAncestors();

	if (ancestors != null) {
		builder.setSuperTypes(Arrays.asList(ancestors));
	}

	return builder;
}
 
开发者ID:52North,项目名称:uDig-SOS-plugin,代码行数:39,代码来源:SOSFeatureTypeFactory.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TaskTrackerStatus类代码示例发布时间:2022-05-23
下一篇:
Java ContainerHistoryData类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap