objext.sml

  Download

More scripts: Georeference

Syntax Highlighing:

comments, key words, predefined symbols, class members & methods, functions & classes
            
# objext.sml
# get object (Vector, CAD, TIN) min x, y, z and max x, y, z
clear();
# Vector object
vector V;
numeric xmin, ymin, xmax, ymax;
numeric zMin, zMax;
class Georef vGeoref;
GetInputVector(V);
GetObjectExtents(V, xmin, ymin, xmax, ymax);
print("vector extents xmin, ymin, xmax, ymax");
printf("%10.2f %10.2f %10.2f %10.2f \n", xmin, ymin, xmax, ymax);
GetObjectZExtents(V, zMin, zMax);
print("vector z extents - zmin, zmax");
printf("%10.2f %10.2f \n", zMin, zMax);
vGeoref = GetLastUsedGeorefObject(V);
GetObjectExtents(V, xmin, ymin, xmax, ymax, vGeoref);
print("vector extents xmin, ymin, xmax, ymax");
printf("%10.2f %10.2f %10.2f %10.2f \n", xmin, ymin, xmax, ymax);
# CAD object
cad C;
GetInputCAD(C);
GetObjectExtents(C, xmin, ymin, xmax, ymax);
print("CAD extents xmin, ymin, xmax, ymax");
printf("%10.2f %10.2f %10.2f %10.2f \n", xmin, ymin, xmax, ymax);
GetObjectZExtents(C, zMin, zMax);
print("CAD z extents - zmin, zmax");
printf("%10.2f %10.2f \n", zMin, zMax);
vGeoref = GetLastUsedGeorefObject(C);
GetObjectExtents(C, xmin, ymin, xmax, ymax, vGeoref);
print("CAD extents xmin, ymin, xmax, ymax");
printf("%10.2f %10.2f %10.2f %10.2f \n", xmin, ymin, xmax, ymax);
# TIN object
tin T;
GetInputTIN(T);
GetObjectExtents(T, xmin, ymin, xmax, ymax);
print("TIN extents xmin, ymin, xmax, ymax");
printf("%10.2f %10.2f %10.2f %10.2f \n", xmin, ymin, xmax, ymax);
GetObjectZExtents(T, zMin, zMax);
print("TIN z extents - zmin, zmax");
printf("%10.2f %10.2f \n", zMin, zMax);