This namespace contains definitions of static functions for common Profile3d operations.
- Source:
- mapspace/util/profile3d/util.jsdoc
Methods
-
<static> drawPlaneFromCoordsAndHeight(viewer, entities, coords, height, useGrid, color, outline, outlineColor, outlineWidth)
-
Draws a plane to given Cesium viewer and save created entity in given array.
Parameters:
Name Type Description viewerCesium.Viewer Cesium viewer.
entitiesArray.<Cesium.Entity> Array of entities.
coordsArray.<Mapspace.Coordinate> Array of a pair of coordinates in mercator projection and with elevations in meters.
heightnumber Height of the plane. It must be an integer value in meters.
useGridboolean If use a grid material or not.
colorCesium.Color The color for the plane.
outlineboolean If true then draws the outline of the plane.
outlineColorCesium.Color The color for the outline.
outlineWidthnumber The width of the outline.
- Source:
- mapspace/util/profile3d/util.js
Returns:
The created entity.
- Type
- Cesium.Entity
-
<static> drawPlaneFromNormalAndPoint(viewer, entities, vNormal, point, width, height, color, outline, outlineColor, outlineWidth)
-
Creates a plane with a specific color and alpha channel
Parameters:
Name Type Description viewerCesium.Viewer Cesium viewer.
entitiesArray.<Cesium.Entity> Array of entities.
vNormalCesium.Cartesian3 Normal vector to create the plane
pointCesium.Cartesian3 A point in the plane
widthnumber Width of the plane.
heightnumber Height of the plane.
colorCesium.Color The color for the plane.
outlineboolean If true then draws the outline of the plane.
outlineColorCesium.Color The color for the outline.
outlineWidthnumber The width of the outline.
- Source:
- mapspace/util/profile3d/util.js
Returns:
The created entity.
- Type
- Cesium.Entity
-
<static> drawPoint(viewer, entities, point, size, color, description)
-
Creates a new entity and adds it to viewer.
Parameters:
Name Type Description viewerCesium.Viewer Cesium viewer.
entitiesArray.<Cesium.Entity> Array of entities.
pointCesium.Cartesian3 Point to draw
sizenumber The size of the point
colorCesium.Color The color for the point
descriptionString The text to add to the entity.
- Source:
- mapspace/util/profile3d/util.js
-
<static> getClippingPlanesForProfile(profileFeature)
-
Return the collection of clipping planes that will be used to limit the rendering for the given profile. First plane in the collection is front plane, second is back plane, third is right plane in viewing direction and fourth is left plane.
Parameters:
Name Type Description profileFeatureol.Feature The feature that defines the profile.
- Source:
- mapspace/util/profile3d/util.js
Returns:
- Type
- Cesium.ClippingPlaneCollection
-
<static> getClippingPlanesForProfileRafa(profileFeature, rootPoint, elevation, cameraSettings)
-
Return the collection of clipping planes that will be used to limit the rendering for the given profile. First plane in the collection is front plane, second is back plane, third is right plane in viewing direction and fourth is left plane.
Parameters:
Name Type Description profileFeatureol.Feature The feature that defines the profile.
rootPointCesium.Cartesian3 The root point of the tileset.
elevationnumber Elevation.
cameraSettingsObject Object to store camera settings.
- Source:
- mapspace/util/profile3d/util.js
Returns:
- Type
- Cesium.ClippingPlaneCollection
-
<static> getFrustumWidthForProfile(profileFeature)
-
Returns the frustum width required to fit given profile in viewer viewport.
Parameters:
Name Type Description profileFeatureol.Feature The feature that defines the profile.
- Source:
- mapspace/util/profile3d/util.js
Returns:
Width in meters.
- Type
- number
-
<static> getMainPointsForProfile(profileFeature, elevation)
-
Returns a pair of points that are the main points of a profile. First point is the one on the right side of the profile when looking from viewing point; second is on the left side. Elevations are zero meters on ground. Coordinates are in Cesium Cartesian 3D.
Parameters:
Name Type Description profileFeatureol.Feature The feature that defines the profile.
elevationnumber Elevation.
- Source:
- mapspace/util/profile3d/util.js
Returns:
- Type
- Array.<Cesium.Cartesian3>
-
<static> getNewestProjectsName(projects)
-
Returns the name of newest LiDAR project from an array.
Parameters:
Name Type Description projectsArray.<Mapspace.LiDARProjectMetadata> LiDAR projects metadata objects.
- Source:
- mapspace/util/profile3d/util.js
Returns:
Name of newest project or null if passed an empty array.
- Type
- string
-
<static> getProfile3dCenter(profileFeature)
-
Returns the Mercator Spheric coordinate at the center of the box that defines the profile. Return a coordinate with no elevation.
Parameters:
Name Type Description profileFeatureol.Feature The profile feature.
- Source:
- mapspace/util/profile3d/util.js
Returns:
- Type
- Mapspace.Coordinate
-
<static> getProjectsForProfile3d(profileFeature)
-
Returns an array of LiDAR projects metadata objects that overlap the given profile feature.
Parameters:
Name Type Description profileFeatureol.Feature The profile feature to search proyects for.
- Source:
- mapspace/util/profile3d/util.js
Returns:
- Type
- Array.<Mapspace.LiDARProjectMetadata>
-
<static> getViewForProfile(profileFeature, elevation)
-
Returns the view object required to fit given profile in viewer viewport.
Parameters:
Name Type Description profileFeatureol.Feature The feature that defines the profile.
elevationnumber Elevation.
- Source:
- mapspace/util/profile3d/util.js
Returns:
- Type
- Object
-
<static> profile3dToString(profile)
-
Converts a
ol.Featureobject to string to make it easy to compare them.Parameters:
Name Type Argument Description profileol.Feature <nullable>
Profile or null.
- Source:
- mapspace/util/profile3d/util.js
Returns:
- Type
- string
-
<static> to3DGeometry(geometry, z, viewer)
-
Returns a new fixed geometry with a given Z value if geometry has no Z, or the same geometry object but with a fixed Z if it has Zs.
Parameters:
Name Type Description geometryol.geom.Geometry The input geometry.
znumber The Z value to use to fix the input geometry.
viewerMapspace.profile3d.Viewer Profile3d viewer
- Source:
- mapspace/util/profile3d/util.js
Returns:
The returned geometry always have Z values.
- Type
- ol.geom.Geometry