Oblique photography flattening island cave polygon flattening

weizhongrun

Oblique photography is a kind of high and new technology that can directly reflect the appearance, position, height and other attributes of features through efficient data acquisition equipment and professional data processing process, and provide guarantee for real effects and surveying accuracy. Many of the products also support the import, display, format conversion, cropping, and flattening operations for oblique photography; in SuperMap iClient3D for WebGL, when flattening oblique photography, a complete polygon to oblique photography is usually used Do flattening changes, but in daily life, occasionally we will encounter flattening needs like the following figure:

Insert picture description here

In such a situation, if we directly use the query results for flattening, we will get the following results:
Insert picture description here
that is to say, the hollow part in the middle of the flattened area is also flattened during the flattening process, but the island in the middle is also flattened. The hole exists because you want to keep the middle area and only press the part of the plane, but because the node information of the surface is stored in the same location in the same way, when querying, although all the node information is obtained, it is flattened There is still only one area defined in the interface.
Therefore, when using the island hole polygon to flatten the oblique photography, you can appropriately segment the island hole polygon (object operation-object editing-line drawing and cutting). After the segmentation, you can get two objects, and then use this The data set publishes the data service, and the query and flattening in the code can get the following results. The
Insert picture description here
following is the function code

function onQueryComplete(queryEventArgs) {
    
    
					let features = queryEventArgs.originResult.features;
					for (let k = 0; k < features.length; k++) {
    
    
						yaping(features[k]);
					};
				}

				function yaping(featureK) {
    
    
						var layer = scene.layers.find("compressed");
						let points = featureK.geometry.points;
						let region = []
						for (let j = 0; j < points.length; j++) {
    
    
							region.push(points[j].x)
							region.push(points[j].y)
							region.push(54)
						}
						console.log(region);
						layer.addFlattenRegion({
    
    
							position: region,
							name: 'flatten' + Math.random()
						});

					}

			function doSqlQuery(SQL) {
    
    

				var getFeatureParam, getFeatureBySQLService, getFeatureBySQLParams;
				getFeatureParam = new SuperMap.REST.FilterParameter({
    
    
					attributeFilter: SQL
				});
				getFeatureBySQLParams = new SuperMap.REST.GetFeaturesBySQLParameters({
    
    
					queryParameter: getFeatureParam,
					toIndex: -1,
					datasetNames: ["test:" + "WRegion3D_1"]
				});
				var url = 'http://localhost:8090/iserver/services/data-CSDNdaodong/rest/data';
				getFeatureBySQLService = new SuperMap.REST.GetFeaturesBySQLService(url, {
    
    
					eventListeners: {
    
    
						"processCompleted": onQueryComplete,
						"processFailed": processFailed
					}
				});
				getFeatureBySQLService.processAsync(getFeatureBySQLParams);
			}

			function processFailed(queryEventArgs) {
    
    
				alert('查询失败!');
			}

Guess you like

Origin blog.csdn.net/supermapsupport/article/details/112167844