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

Java SurfaceProperty类代码示例

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

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



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

示例1: constructPolygons

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
/**
 * Constructs Polygons from CityGML boundary surface properties
 * @param bsp
 * @return
 */
public Vector<Polygon> constructPolygons(List<BoundarySurfaceProperty> bsp)
{
	Vector<Polygon> pols = new Vector<Polygon>();
	for( BoundarySurfaceProperty a : bsp)
	{
		AbstractBoundarySurface b = a.getBoundarySurface();
		MultiSurfaceProperty 	c = b.getLod2MultiSurface();
		MultiSurface 			d = c.getGeometry();
		List<SurfaceProperty>   e = d.getSurfaceMember();
		for( SurfaceProperty f  : e)
		{
			if(f.getGeometry().getGMLClass() == GMLClass.POLYGON)
			{
				pols.add(constructPolygon(f));
			} else if(f.getGeometry().getGMLClass() == GMLClass.COMPOSITE_SURFACE)
			{
				for( SurfaceProperty g: ((CompositeSurface)f.getGeometry()).getSurfaceMember())
				{
					pols.add(constructPolygon(g));
				}
			}
		}
	}
	return pols;
}
 
开发者ID:SteuerHorst,项目名称:Voluminator,代码行数:31,代码来源:PolygonConstructor.java


示例2: constructPolygon

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
/**
 * Constructs a Polygon from CityGML surface property
 * @param f
 * @return
 */
private Polygon constructPolygon( SurfaceProperty f)
{
	Polygon pol = new Polygon();	
	org.citygml4j.model.gml.geometry.primitives.Polygon p = (org.citygml4j.model.gml.geometry.primitives.Polygon)f.getSurface();		
	LinearRing r = (LinearRing) (p.getExterior().getRing());
	DirectPositionList q = r.getPosList();
	List<Double> a1 = q.getValue();
	
	//exterior
	pol.addExterior(constructRing(a1));
	
	//interior
	List<AbstractRingProperty> liste = (List<AbstractRingProperty>)p.getInterior();
	for(AbstractRingProperty ar : liste)
	{
		LinearRing r2 = (LinearRing)ar.getRing();
		DirectPositionList q2 = r2.getPosList();
		List<Double> a2 = q2.getValue();
		pol.addInterior(constructRing(a2));
	}
	
	pol.project();
	return pol;

}
 
开发者ID:SteuerHorst,项目名称:Voluminator,代码行数:31,代码来源:PolygonConstructor.java


示例3: calcBoundingBox

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public BoundingBox calcBoundingBox() {
	BoundingBox bbox = new BoundingBox();
	
	if (isSetSurfaceMember()) {
		for (SurfaceProperty surfaceProperty : getSurfaceMember())
			if (surfaceProperty.isSetSurface())
				bbox.update(surfaceProperty.getSurface().calcBoundingBox());
	}

	if (isSetSurfaceMembers()) {
		SurfaceArrayProperty surfaceArrayProperty = getSurfaceMembers();

		if (surfaceArrayProperty.isSetSurface())
			for (AbstractSurface abstractSurface : surfaceArrayProperty.getSurface())
				bbox.update(abstractSurface.calcBoundingBox());
	}
	
	return bbox;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:20,代码来源:MultiSurface.java


示例4: copyTo

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
@Override
public Object copyTo(Object target, CopyBuilder copyBuilder) {
	MultiSurface copy = (target == null) ? new MultiSurface() : (MultiSurface)target;
	super.copyTo(copy, copyBuilder);
	
	if (isSetSurfaceMember()) {
		for (SurfaceProperty part : surfaceMember) {
			SurfaceProperty copyPart = (SurfaceProperty)copyBuilder.copy(part);
			copy.addSurfaceMember(copyPart);
			
			if (part != null && copyPart == part)
				part.setParent(this);
		}
	}
	
	if (isSetSurfaceMembers()) {
		copy.setSurfaceMembers((SurfaceArrayProperty)copyBuilder.copy(surfaceMembers));
		if (copy.getSurfaceMembers() == surfaceMembers)
			surfaceMembers.setParent(this);
	}
	
	return copy;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:24,代码来源:MultiSurface.java


示例5: copyTo

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
@Override
public Object copyTo(Object target, CopyBuilder copyBuilder) {
	CompositeSurface copy = (target == null) ? new CompositeSurface() : (CompositeSurface)target;
	super.copyTo(copy, copyBuilder);

	if (isSetSurfaceMember()) {
		for (SurfaceProperty part : surfaceMember) {
			SurfaceProperty copyPart = (SurfaceProperty)copyBuilder.copy(part);
			copy.addSurfaceMember(copyPart);

			if (part != null && copyPart == part)
				part.setParent(this);
		}
	}

	return copy;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:18,代码来源:CompositeSurface.java


示例6: apply

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public T apply(MultiSurface multiSurface) {
	T object = apply((AbstractGeometricAggregate)multiSurface);
	if (object != null)
		return object;

	if (multiSurface.isSetSurfaceMember()) {
		for (SurfaceProperty surfaceProperty : new ArrayList<SurfaceProperty>(multiSurface.getSurfaceMember())) {
			object = apply(surfaceProperty);
			if (object != null)
				return object;
		}
	}

	if (multiSurface.isSetSurfaceMembers()) {
		object = apply(multiSurface.getSurfaceMembers());
		if (object != null)
			return object;
	}

	return null;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:22,代码来源:GMLFunctionWalker.java


示例7: unmarshalAbstractBoundarySurface

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public void unmarshalAbstractBoundarySurface(SemanticsType src, AbstractBoundarySurface dest, List<AbstractSurface> surfaces, Number lod) {
	dest.setId(DefaultGMLIdManager.getInstance().generateUUID());
	
	if (src.isSetProperties())
		citygml.getGenericsUnmarshaller().unmarshalSemanticsAttributes(src.getProperties(), dest);

	MultiSurface multiSurface = new MultiSurface();
	for (AbstractSurface surface : surfaces)
		multiSurface.addSurfaceMember(new SurfaceProperty(surface));

	switch (lod.intValue()) {
	case 2:
		dest.setLod2MultiSurface(new MultiSurfaceProperty(multiSurface));
		break;
	case 3:
		dest.setLod3MultiSurface(new MultiSurfaceProperty(multiSurface));
		break;
	}
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:20,代码来源:BridgeUnmarshaller.java


示例8: unmarshalAbstractWaterBoundarySurface

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public void unmarshalAbstractWaterBoundarySurface(SemanticsType src, AbstractWaterBoundarySurface dest, List<AbstractSurface> surfaces, Number lod) {
	dest.setId(DefaultGMLIdManager.getInstance().generateUUID());
	
	if (src.isSetProperties())
		citygml.getGenericsUnmarshaller().unmarshalSemanticsAttributes(src.getProperties(), dest);
	
	CompositeSurface compositeSurface = new CompositeSurface();
	for (AbstractSurface surface : surfaces)
		compositeSurface.addSurfaceMember(new SurfaceProperty(surface));

	switch (lod.intValue()) {
	case 2:
		dest.setLod2Surface(new SurfaceProperty(compositeSurface));
		break;
	case 3:
		dest.setLod3Surface(new SurfaceProperty(compositeSurface));
		break;
	}
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:20,代码来源:WaterBodyUnmarshaller.java


示例9: createMultiSurface

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public MultiSurface createMultiSurface(Polygon... polygons) {
	MultiSurface multiSurface = new MultiSurface();
	
	for (Polygon polygon : polygons) {
		if (polygon != null && polygon.isSetExterior())
			multiSurface.addSurfaceMember(new SurfaceProperty(polygon));
	}
	
	return multiSurface;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:11,代码来源:GMLGeometryFactory.java


示例10: createSolid

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public Solid createSolid(Polygon... polygons) {
	Solid solid = new Solid();
	
	CompositeSurface exterior = new CompositeSurface();
	for (Polygon polygon : polygons) {
		if (polygon != null && polygon.isSetExterior())
			exterior.addSurfaceMember(new SurfaceProperty(polygon));
	}
	
	if (exterior.isSetSurfaceMember())
		solid.setExterior(new SurfaceProperty(exterior));
	
	return solid;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:15,代码来源:GMLGeometryFactory.java


示例11: copyTo

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
@Override
public Object copyTo(Object target, CopyBuilder copyBuilder) {
	if (target == null)
		throw new IllegalArgumentException("Target argument must not be null for abstract copyable classes.");

	AbstractWaterBoundarySurface copy = (AbstractWaterBoundarySurface)target;		
	super.copyTo(copy, copyBuilder);
	
	if (isSetLod2Surface()) {
		copy.setLod2Surface((SurfaceProperty)copyBuilder.copy(lod2Surface));
		if (copy.getLod2Surface() == lod2Surface)
			lod2Surface.setParent(this);
	}
	
	if (isSetLod3Surface()) {
		copy.setLod3Surface((SurfaceProperty)copyBuilder.copy(lod3Surface));
		if (copy.getLod3Surface() == lod3Surface)
			lod3Surface.setParent(this);
	}
	
	if (isSetLod4Surface()) {
		copy.setLod4Surface((SurfaceProperty)copyBuilder.copy(lod4Surface));
		if (copy.getLod4Surface() == lod4Surface)
			lod4Surface.setParent(this);
	}
	
	if (isSetGenericApplicationPropertyOfWaterBoundarySurface()) {
		for (ADEComponent part : ade) {
			ADEComponent copyPart = (ADEComponent)copyBuilder.copy(part);
			copy.addGenericApplicationPropertyOfWaterBoundarySurface(copyPart);

			if (part != null && copyPart == part)
				part.setParent(this);
		}
	}

	return copy;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:39,代码来源:AbstractWaterBoundarySurface.java


示例12: calcBoundingBox

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public BoundingBox calcBoundingBox() {
	BoundingBox bbox = new BoundingBox();

	if (isSetSurfaceMember()) {
		for (SurfaceProperty surfaceProperty : getSurfaceMember())
			if (surfaceProperty.isSetSurface())
				bbox.update(surfaceProperty.getSurface().calcBoundingBox());
	}

	return bbox;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:12,代码来源:CompositeSurface.java


示例13: visit

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public void visit(MultiSurface multiSurface) {
	visit((AbstractGeometricAggregate)multiSurface);

	if (multiSurface.isSetSurfaceMember())
		for (SurfaceProperty surfaceProperty : new ArrayList<SurfaceProperty>(multiSurface.getSurfaceMember()))
			visit(surfaceProperty);

	if (multiSurface.isSetSurfaceMembers())
		visit(multiSurface.getSurfaceMembers());
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:11,代码来源:GMLWalker.java


示例14: marshalCompositeSurface

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public CompositeSurfaceType marshalCompositeSurface(CompositeSurface src) {
	CompositeSurfaceType dest = gml.createCompositeSurfaceType();
	marshalAbstractSurface(src, dest);

	if (src.isSetSurfaceMember()) {
		for (SurfaceProperty member : src.getSurfaceMember())
			dest.getSurfaceMember().add(marshalSurfaceProperty(member));
	}

	return dest;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:12,代码来源:GMLMarshaller.java


示例15: marshalMultiSurface

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public MultiSurfaceType marshalMultiSurface(MultiSurface src) {
	MultiSurfaceType dest = gml.createMultiSurfaceType();
	marshalAbstractGeometricAggregate(src, dest);

	if (src.isSetSurfaceMember()) {
		for (SurfaceProperty member : src.getSurfaceMember())
			dest.getSurfaceMember().add(marshalSurfaceProperty(member));
	}

	if (src.isSetSurfaceMembers())
		dest.setSurfaceMembers(marshalSurfaceArrayProperty(src.getSurfaceMembers()));

	return dest;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:15,代码来源:GMLMarshaller.java


示例16: marshalSolid

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public SolidType marshalSolid(Solid src) {
	SolidType dest = gml.createSolidType();
	marshalAbstractSolid(src, dest);

	if (src.isSetExterior())
		dest.setExterior(marshalSurfaceProperty(src.getExterior()));

	if (src.isSetInterior()) {
		for (SurfaceProperty interior : src.getInterior())
			dest.getInterior().add(marshalSurfaceProperty(interior));
	}

	return dest;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:15,代码来源:GMLMarshaller.java


示例17: marshalSurfaceProperty

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public SurfacePropertyType marshalSurfaceProperty(SurfaceProperty src) {
	SurfacePropertyType dest = gml.createSurfacePropertyType();

	if (src.isSetSurface()) {
		JAXBElement<?> elem = jaxb.marshalJAXBElement(src.getSurface());
		if (elem != null && elem.getValue() instanceof AbstractSurfaceType)
			dest.set_Surface((JAXBElement<? extends AbstractSurfaceType>)elem);
	}

	if (src.isSetRemoteSchema())
		dest.setRemoteSchema(src.getRemoteSchema());

	if (src.isSetType())
		dest.setType(TypeType.fromValue(src.getType().getValue()));

	if (src.isSetHref())
		dest.setHref(src.getHref());

	if (src.isSetRole())
		dest.setRole(src.getRole());

	if (src.isSetArcrole())
		dest.setArcrole(src.getArcrole());

	if (src.isSetTitle())
		dest.setTitle(src.getTitle());

	if (src.isSetShow())
		dest.setShow(ShowType.fromValue(src.getShow().getValue()));

	if (src.isSetActuate())
		dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));

	return dest;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:37,代码来源:GMLMarshaller.java


示例18: unmarshalSurfaceProperty

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public SurfaceProperty unmarshalSurfaceProperty(SurfacePropertyType src) {
	SurfaceProperty dest = new SurfaceProperty();

	if (src.isSet_Surface()) {
		try {
			ModelObject abstractSurface = jaxb.unmarshal(src.get_Surface());
			if (abstractSurface instanceof AbstractSurface)
				dest.setSurface((AbstractSurface)abstractSurface);
		} catch (MissingADESchemaException e) {
			//
		}
	}

	if (src.isSetRemoteSchema())
		dest.setRemoteSchema(src.getRemoteSchema());

	if (src.isSetType())
		dest.setType(XLinkType.fromValue(src.getType().value()));

	if (src.isSetHref())
		dest.setHref(src.getHref());

	if (src.isSetRole())
		dest.setRole(src.getRole());

	if (src.isSetArcrole())
		dest.setArcrole(src.getArcrole());

	if (src.isSetTitle())
		dest.setTitle(src.getTitle());

	if (src.isSetShow())
		dest.setShow(XLinkShow.fromValue(src.getShow().value()));

	if (src.isSetActuate())
		dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));

	return dest;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:40,代码来源:GMLUnmarshaller.java


示例19: preprocessGeometry

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
private Map<Integer, MultiSurface> preprocessGeometry(WaterBody waterBody) {
	Map<Integer, MultiSurface> multiSurfaces = null;
	SurfaceCollector collector = new SurfaceCollector();

	for (BoundedByWaterSurfaceProperty property : waterBody.getBoundedBySurface()) {
		if (property.isSetWaterBoundarySurface()) {
			LodRepresentation lodRepresentation = property.getWaterBoundarySurface().getLodRepresentation();
			for (int lod = 2; lod < 4; lod++) {
				if (lodRepresentation.isSetGeometry(lod)) {
					collector.setLod(lod);
					for (GeometryProperty<?> geometryProperty : lodRepresentation.getGeometry(lod))
						collector.visit(geometryProperty);
				}
			}
		}
	}

	if (collector.hasSurfaces()) {
		multiSurfaces = new HashMap<>();

		for (int lod = 2; lod < 4; lod++) {
			Collection<AbstractSurface> surfaces = collector.getSurfaces(lod);
			if (surfaces != null) {
				MultiSurface multiSurface = new MultiSurface();

				for (AbstractSurface surface : surfaces) {					
					SurfaceProperty dummy = new SurfaceProperty();
					dummy.setLocalProperty(CityJSONMarshaller.GEOMETRY_XLINK, surface);
					surface.setLocalProperty(CityJSONMarshaller.GEOMETRY_XLINK_TARGET, true);
					multiSurface.addSurfaceMember(dummy);
				}

				multiSurfaces.put(lod, multiSurface);
			}
		}
	}

	return multiSurfaces;
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:40,代码来源:WaterBodyMarshaller.java


示例20: unmarshalAbstractOpening

import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty; //导入依赖的package包/类
public void unmarshalAbstractOpening(SemanticsType src, AbstractOpening dest, List<AbstractSurface> surfaces, Number lod) {
	if (src.isSetProperties())
		citygml.getGenericsUnmarshaller().unmarshalSemanticsAttributes(src.getProperties(), dest);

	if (lod.intValue() == 3) {
		MultiSurface multiSurface = new MultiSurface();
		for (AbstractSurface surface : surfaces)
			multiSurface.addSurfaceMember(new SurfaceProperty(surface));

		dest.setLod3MultiSurface(new MultiSurfaceProperty(multiSurface));
	}
}
 
开发者ID:citygml4j,项目名称:citygml4j,代码行数:13,代码来源:BridgeUnmarshaller.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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