home products news downloads documentation support gallery online maps resellers search
TNTmips Downloads Menu

HOME

CONTACT US

CURRENT RELEASE
  TNT 2013

DEVELOPMENT VERSION
  TNT 2014

TNTmips Pro
PRIOR RELEASES
  TNT 2012

FREE SOFTWARE
  TNTmips Free
  TNTatlas
  TNTsdk

MORE DOWNLOADS
  HASP Key Driver
  Screen Recorder
  TNT Language Kits
  Sample Geodata
  TNT Scripts

DOCUMENTATION
  TNTmips Tutorials
  Tutorial Datasets
  Technical Guides
  Scripts
  Quick Guides

MORE INFO
  Download FAQs
  FTP
  Download Managers
  Find Reseller

SITE MAP


VerticesInLines.sml


# Script demonstrates a way to print out coordinates of line vertices
# Lists all vertices for every line in a vector object
# Be sure to first resample (warp) your vector to the Coordinate Reference System you want the vertices to be in
# Cindy Robbins - 28 April 2005

clear();
numeric i, numLines, j, numPoints, lineID, k;
class VECTOR V;
GetInputVector(V);

# Here's where the output file will go:
class FILE myFile = fopen("c:/vertices.csv");

# the following arrays will be resized automatically
array lineArray[10]; 
array xArray[10]; 
array yArray[10]; 
array zArray[10];   
numLines = NumVectorLines(V);
for j = 1 to numLines {
		numPoints = GetVectorLinePointList(V, xArray, yArray, j, zArray);
      lineID = V.line[j].Internal.ElemNum; 
      for k = 1 to numPoints {
				# modify this to format the output the way you want
				fprintf(myFile, "%d%s%f%s%f%s%f\n", j, ",",xArray[k], ",", yArray[k], ",",zArray[k]);
      }
}
print("Done");

 



Back Home ©MicroImages, Inc. 2013 Published in the United States of America
11th Floor - Sharp Tower, 206 South 13th Street, Lincoln NE 68508-2010   USA
Business & Sales: (402)477-9554  Support: (402)477-9562  Fax: (402)477-9559
Business info@microimages.com  Support support@microimages.com  Web webmaster@microimages.com

25 March 2009

page update: 26 May 11