Learn R Programming

plotKML (version 0.8-3)

makeCOLLADA: Generate a COLLADA file representing the 3D model of a rectangle

Description

Produces a COLLADA file representing the 3D model of a rectangle with the image specifies via href wrapped over the surface (as texture fill). This allows free rotation of any rectangular image in the 3D space.

Usage

makeCOLLADA.rectangle(coords, filename, href, DateTime, 
          up_axis = "Z_UP", authoring_tool = "plotKML", 
          technique_profile = "GOOGLEEARTH", 
          double_sided = TRUE)

Arguments

coords

a matrix defining the rectangle: 4 points with X, Z and Y coordinates (P1 --- upper right, P2 --- upper left, P3 --- lower right, P4 --- lower left)

filename

output filename with *.dae extension

href

location of the image used for wrapping (texture fill)

DateTime

creation / update time (system time)

up_axis

specify which axis is errected

authoring_tool

specify authoring tool

technique_profile

specify technique profile

double_sided

logical; specify whether to drape image on both sides

Details

COLLADA is managed by the nonprofit technology consortium, the Khronos Group. You can also simply drag and drop a COLLADA (.dae) file on top of the virtual Earth.

References

See Also

kml_layer.SpatialPhotoOverlay

Examples

Run this code
# NOT RUN {
# image previously uploaded to Wikimedia commons:
imagename = "Soil_monolith.jpg"
x1 <- getWikiMedia.ImageInfo(imagename)
sm <- spPhoto(filename = x1$url$url, exif.info = x1$metadata)
kml(sm, method="monolith")
xmlTreeParse("Soil_monolith_jpg.dae")
# }

Run the code above in your browser using DataLab