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

Java PointType类代码示例

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

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



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

示例1: copyTo

import net.opengis.gml.PointType; //导入依赖的package包/类
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
    final Object draftCopy = ((target == null)?createNewInstance():target);
    if (draftCopy instanceof TridasLocationGeometry) {
        final TridasLocationGeometry copy = ((TridasLocationGeometry) draftCopy);
        if (this.isSetPolygon()) {
            PolygonType sourcePolygon;
            sourcePolygon = this.getPolygon();
            PolygonType copyPolygon = ((PolygonType) strategy.copy(LocatorUtils.property(locator, "polygon", sourcePolygon), sourcePolygon));
            copy.setPolygon(copyPolygon);
        } else {
            copy.polygon = null;
        }
        if (this.isSetPoint()) {
            PointType sourcePoint;
            sourcePoint = this.getPoint();
            PointType copyPoint = ((PointType) strategy.copy(LocatorUtils.property(locator, "point", sourcePoint), sourcePoint));
            copy.setPoint(copyPoint);
        } else {
            copy.point = null;
        }
    }
    return draftCopy;
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:24,代码来源:TridasLocationGeometry.java


示例2: getPositionFromSamplingPoint

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * Parse the position from a given {@link SamplingPointType}
 * @throws com.vividsolutions.jts.io.ParseException 
 */
private Geometry getPositionFromSamplingPoint(SamplingPointType spt) throws com.vividsolutions.jts.io.ParseException {
	if (spt.getPosition().isSetPoint()) {
		PointType point = spt.getPosition().getPoint();

		if (point.isSetPos()) {
			WKTReader reader = new WKTReader();
			return reader.read("POINT("+ point.getPos().getStringValue() + ")");
		}
	}

	else if (spt.isSetBoundedBy()) {
		BoundingShapeType bb = spt.getBoundedBy();
		EnvelopeType env = bb.getEnvelope();
		return getGeometryFromEnvelope(env);
	}

	return null;
}
 
开发者ID:52North,项目名称:epos,代码行数:23,代码来源:OMParser.java


示例3: getPositionFromSamplingPoint

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * Parse the position from a given {@link SamplingPointType}
 */
private Geometry getPositionFromSamplingPoint(SamplingPointType spt) throws com.vividsolutions.jts.io.ParseException {
	if (spt.getPosition().isSetPoint()) {
		PointType point = spt.getPosition().getPoint();

		if (point.isSetPos()) {
			WKTReader reader = new WKTReader();
			return reader.read("POINT("+ point.getPos().getStringValue() + ")");
		}
	}

	else if (spt.isSetBoundedBy()) {
		BoundingShapeType bb = spt.getBoundedBy();
		EnvelopeType env = bb.getEnvelope();
		return getGeometryFromEnvelope(env);
	}

	return null;
}
 
开发者ID:52North,项目名称:SES,代码行数:22,代码来源:OMParser.java


示例4: appendFields

import net.opengis.gml.PointType; //导入依赖的package包/类
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
    {
        PolygonType thePolygon;
        thePolygon = this.getPolygon();
        strategy.appendField(locator, this, "polygon", buffer, thePolygon);
    }
    {
        PointType thePoint;
        thePoint = this.getPoint();
        strategy.appendField(locator, this, "point", buffer, thePoint);
    }
    return buffer;
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:14,代码来源:TridasLocationGeometry.java


示例5: equals

import net.opengis.gml.PointType; //导入依赖的package包/类
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
    if (!(object instanceof TridasLocationGeometry)) {
        return false;
    }
    if (this == object) {
        return true;
    }
    final TridasLocationGeometry that = ((TridasLocationGeometry) object);
    {
        PolygonType lhsPolygon;
        lhsPolygon = this.getPolygon();
        PolygonType rhsPolygon;
        rhsPolygon = that.getPolygon();
        if (!strategy.equals(LocatorUtils.property(thisLocator, "polygon", lhsPolygon), LocatorUtils.property(thatLocator, "polygon", rhsPolygon), lhsPolygon, rhsPolygon)) {
            return false;
        }
    }
    {
        PointType lhsPoint;
        lhsPoint = this.getPoint();
        PointType rhsPoint;
        rhsPoint = that.getPoint();
        if (!strategy.equals(LocatorUtils.property(thisLocator, "point", lhsPoint), LocatorUtils.property(thatLocator, "point", rhsPoint), lhsPoint, rhsPoint)) {
            return false;
        }
    }
    return true;
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:29,代码来源:TridasLocationGeometry.java


示例6: hashCode

import net.opengis.gml.PointType; //导入依赖的package包/类
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
    int currentHashCode = 1;
    {
        PolygonType thePolygon;
        thePolygon = this.getPolygon();
        currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "polygon", thePolygon), currentHashCode, thePolygon);
    }
    {
        PointType thePoint;
        thePoint = this.getPoint();
        currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "point", thePoint), currentHashCode, thePoint);
    }
    return currentHashCode;
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:15,代码来源:TridasLocationGeometry.java


示例7: getText

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * This returns the label text for the adapted class.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getText(Object object) {
	String label = ((PointType)object).getId();
	return label == null || label.length() == 0 ?
		getString("_UI_PointType_type") :
		getString("_UI_PointType_type") + " " + label;
}
 
开发者ID:markus1978,项目名称:citygml4emf,代码行数:14,代码来源:PointTypeItemProvider.java


示例8: notifyChanged

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged(Notification notification) {
	updateChildren(notification);

	switch (notification.getFeatureID(PointType.class)) {
		case GmlPackage.POINT_TYPE__POS:
		case GmlPackage.POINT_TYPE__COORDINATES:
		case GmlPackage.POINT_TYPE__COORD:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
			return;
	}
	super.notifyChanged(notification);
}
 
开发者ID:markus1978,项目名称:citygml4emf,代码行数:21,代码来源:PointTypeItemProvider.java


示例9: getPoint

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EList<PointType> getPoint() {
	if (point == null) {
		point = new EObjectContainmentEList<PointType>(PointType.class, this, GmlPackage.POINT_ARRAY_PROPERTY_TYPE__POINT);
	}
	return point;
}
 
开发者ID:markus1978,项目名称:citygml4emf,代码行数:12,代码来源:PointArrayPropertyTypeImpl.java


示例10: eSet

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
	switch (featureID) {
		case GmlPackage.POINT_ARRAY_PROPERTY_TYPE__POINT:
			getPoint().clear();
			getPoint().addAll((Collection<? extends PointType>)newValue);
			return;
	}
	super.eSet(featureID, newValue);
}
 
开发者ID:markus1978,项目名称:citygml4emf,代码行数:17,代码来源:PointArrayPropertyTypeImpl.java


示例11: basicSetPoint

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetPoint(PointType newPoint, NotificationChain msgs) {
	PointType oldPoint = point;
	point = newPoint;
	if (eNotificationRequired()) {
		ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GmlPackage.POINT_PROPERTY_TYPE__POINT, oldPoint, newPoint);
		if (msgs == null) msgs = notification; else msgs.add(notification);
	}
	return msgs;
}
 
开发者ID:markus1978,项目名称:citygml4emf,代码行数:15,代码来源:PointPropertyTypeImpl.java


示例12: setPoint

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setPoint(PointType newPoint) {
	if (newPoint != point) {
		NotificationChain msgs = null;
		if (point != null)
			msgs = ((InternalEObject)point).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GmlPackage.POINT_PROPERTY_TYPE__POINT, null, msgs);
		if (newPoint != null)
			msgs = ((InternalEObject)newPoint).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GmlPackage.POINT_PROPERTY_TYPE__POINT, null, msgs);
		msgs = basicSetPoint(newPoint, msgs);
		if (msgs != null) msgs.dispatch();
	}
	else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GmlPackage.POINT_PROPERTY_TYPE__POINT, newPoint, newPoint));
}
 
开发者ID:markus1978,项目名称:citygml4emf,代码行数:19,代码来源:PointPropertyTypeImpl.java


示例13: eSet

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eSet(int featureID, Object newValue) {
	switch (featureID) {
		case GmlPackage.POINT_PROPERTY_TYPE__POINT:
			setPoint((PointType)newValue);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__ACTUATE:
			setActuate((ActuateType)newValue);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__ARCROLE:
			setArcrole((String)newValue);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__HREF:
			setHref((String)newValue);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__REMOTE_SCHEMA:
			setRemoteSchema((String)newValue);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__ROLE:
			setRole((String)newValue);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__SHOW:
			setShow((ShowType)newValue);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__TITLE:
			setTitle((String)newValue);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__TYPE:
			setType((String)newValue);
			return;
	}
	super.eSet(featureID, newValue);
}
 
开发者ID:markus1978,项目名称:citygml4emf,代码行数:39,代码来源:PointPropertyTypeImpl.java


示例14: eUnset

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eUnset(int featureID) {
	switch (featureID) {
		case GmlPackage.POINT_PROPERTY_TYPE__POINT:
			setPoint((PointType)null);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__ACTUATE:
			unsetActuate();
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__ARCROLE:
			setArcrole(ARCROLE_EDEFAULT);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__HREF:
			setHref(HREF_EDEFAULT);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__REMOTE_SCHEMA:
			setRemoteSchema(REMOTE_SCHEMA_EDEFAULT);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__ROLE:
			setRole(ROLE_EDEFAULT);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__SHOW:
			unsetShow();
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__TITLE:
			setTitle(TITLE_EDEFAULT);
			return;
		case GmlPackage.POINT_PROPERTY_TYPE__TYPE:
			unsetType();
			return;
	}
	super.eUnset(featureID);
}
 
开发者ID:markus1978,项目名称:citygml4emf,代码行数:39,代码来源:PointPropertyTypeImpl.java


示例15: handle

import net.opengis.gml.PointType; //导入依赖的package包/类
public String handle(PuntOfVlak puntOfVlak)
{
	try
	{
		if (puntOfVlak.getPoint() != null)
			return XMLMessageBuilder.getInstance(PointType.class).handle(new ObjectFactory().createPoint(puntOfVlak.getPoint()));
		else if (puntOfVlak.getSurface() != null)
			return XMLMessageBuilder.getInstance(PolygonType.class).handle(new ObjectFactory().createPolygon((PolygonType)puntOfVlak.getSurface().getValue()));
		return null;
	}
	catch (JAXBException e)
	{
		throw new HandlerException(e);
	}
}
 
开发者ID:eluinstra,项目名称:bag-etl,代码行数:16,代码来源:BAGGeometrieHandler.java


示例16: getGeometryFromPoint

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * @param pt xbeans {@link PointType}
 * @return java topology suite {@link Geometry}
 */
private static final Geometry getGeometryFromPoint(PointType pt) {
	GeometryFactory gf = new GeometryFactory();

	Node child = pt.getDomNode().getFirstChild();

	while (child != null) {
		if (child.getLocalName()!= null && child.getLocalName().equals("pos")) {
			break;
		}
		child = child.getNextSibling();
	}

	String posString = "";
	if (child != null) {
		//child is the pos element
		posString = child.getFirstChild().getNodeValue();
	}

	//		Element elem = (Element) pt.getDomNode();
	//		posString = XmlUtils.toString(elem.getFirstChild()).trim();

	String[] cs = posString.split(" ");

	if (cs != null && cs.length > 1) {
		Coordinate c = new Coordinate(Double.parseDouble(cs[0]), Double.parseDouble(cs[1]));	
		return gf.createPoint(c);
	}

	return null;
}
 
开发者ID:52North,项目名称:SES,代码行数:35,代码来源:GML31Parser.java


示例17: parseGeometry

import net.opengis.gml.PointType; //导入依赖的package包/类
/**
 * Main method for parsing a geometry from an xml-fragment.
 * This method delegates to the private concrete parsing methods.
 * 
 * @param geomElement the geometry xml object
 * @return a {@link Geometry} as a JTS representation.
 * @throws ParseException if the geometry could not be parsed.
 * @throws GMLParseException if something could not be parsed or is not supported.
 */
public static Geometry parseGeometry(XmlObject geomElement) throws ParseException, GMLParseException {
	if (geomElement instanceof EnvelopeType) {
		return getGeometryFromEnvelope((EnvelopeType) geomElement);
	}
	else if (geomElement instanceof PointType) {
		return getGeometryFromPoint((PointType) geomElement);
	}
	else if (geomElement instanceof LineStringType) {
		return getGeometryFromLineString((LineStringType) geomElement);
	}
	else if (geomElement instanceof LinearRingType) {
		return getGeometryFromLinearRing((LinearRingType) geomElement);
	}
	else if (geomElement instanceof PolygonType) {
		return getGeometryFromPolygon((PolygonType) geomElement);
	}
	else if (geomElement instanceof PolygonDocument) {
		return getGeometryFromPolygon(((PolygonDocument) geomElement).getPolygon());
	}
	else if (geomElement instanceof MultiPolygonType) {
		return getGeometryFromMultiPolygon((MultiPolygonType) geomElement);
	}
	else if (geomElement instanceof MultiPolygonDocument) {
		return getGeometryFromMultiPolygon(((MultiPolygonDocument) geomElement).getMultiPolygon());
	}

	return null;
}
 
开发者ID:52North,项目名称:SES,代码行数:38,代码来源:GML31Parser.java


示例18: addLocation

import net.opengis.gml.PointType; //导入依赖的package包/类
private static void addLocation(SystemType xbSystem, double lat, double lng) {
    PointType xbPoint = xbSystem.addNewSmlLocation().addNewPoint();
    xbPoint.setSrsName(IoosSosConstants.EPSG_4326_DEF);
    DirectPositionType xbPos = xbPoint.addNewPos();
    xbPos.setStringValue(lat + " " + lng);
}
 
开发者ID:ioos,项目名称:i52n-sos,代码行数:7,代码来源:IoosTestDataSmlGenerator.java


示例19: testSamplingPointCreation

import net.opengis.gml.PointType; //导入依赖的package包/类
public void testSamplingPointCreation() {
	SamplingPointDocument sa = SamplingPointDocument.Factory.newInstance();
	SamplingPointType point = sa.addNewSamplingPoint();
	FeaturePropertyType feat = point.addNewSampledFeature();
	feat.setHref("ha");
	PointPropertyType pos = point.addNewPosition();;
	PointType posP = pos.addNewPoint();
	DirectPositionType posPPos = posP.addNewPos();
	posPPos.setListValue(Arrays.asList(52.0, 6.0));
	
	SamplingFeatureType feature = SamplingFeatureType.Factory.newInstance();
	feat.setFeature(feature);
	XmlUtil.qualifySubstitutionGroup(feat.getFeature(), SamplingFeatureDocument.type.getDocumentElementName());
	
	BoundingShapeType bb = point.addNewBoundedBy();
	EnvelopeType env = bb.addNewEnvelope();
	env.setSrsName("EPSG:4326");
	DirectPositionType low = env.addNewPos();
	low.setListValue(Arrays.asList(52.0, 7.0));
	DirectPositionType up = env.addNewPos();
	up.setListValue(Arrays.asList(53.0, 8.0));
	
	XMLBeansParser.registerLaxValidationCase(new LaxValidationCase() {
		@Override
		public boolean shouldPass(XmlValidationError xve) {
			if (xve.getExpectedQNames() != null &&
					xve.getExpectedQNames().contains(
							FeatureDocument.type.getDocumentElementName())) {
				return true;
			}
			return false;
		}

		@Override
		public boolean shouldPass(XmlError validationError) {
			if (validationError instanceof XmlValidationError) {
				return shouldPass((XmlValidationError) validationError);
			}
			return false;
		}
	});
	Collection<XmlError> err = XMLBeansParser.validate(sa);
	assertTrue(err.isEmpty());
	
	SamplingPointDocument parsedSa;
	try {
		parsedSa = SamplingPointDocument.Factory.parse(sa.toString());
		err = XMLBeansParser.validate(parsedSa);
		assertTrue(err.isEmpty());
	} catch (XmlException e) {
		e.printStackTrace();
	}
	
}
 
开发者ID:52North,项目名称:SES,代码行数:55,代码来源:SamplingPointTest.java


示例20: createGmlPointType

import net.opengis.gml.PointType; //导入依赖的package包/类
@Provides
@Override
public PointType createGmlPointType() {
    return PointType.Factory.newInstance();
}
 
开发者ID:moosbusch,项目名称:xbLIDO,代码行数:6,代码来源:DefaultLidoModule.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java EntityBlaze类代码示例发布时间:2022-05-23
下一篇:
Java ExprToIntCast类代码示例发布时间: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