LandXML in miniCAD
LandXML is a non-proprietary data standard increasingly used by Total Station manufacturers and governments around the world. It has many advantages over existing proprietary data formats.
This section covers:
- LandXML Import Notes.
- LandXML Export Notes.
- Handling Invalid Xml.
LandXML Import Notes.
In miniCAD you may open or merge LandXML files. Elements supported include:
- Job Information
- Plan Features
miniCAD will open versions: 1.0, 1.1 and 1.2.
miniCAD will convert metric or imperial units and uses the elements:
Monuments record marks. Elements used include:
- name - The name becomes the minicad point code.
- pntRef - The miniCAD point number.
Note: If an oID number appears in the monument name it will be removed.
cgPoints are used to create miniCAD points. Elements used include:
- name - Numeric names are converted to point numbers.
When a text name is encountered the next available point number is used.
- code - The point code.
- desc - The description is appended to the code.
e.g. To scale and describe a tree:
The miniCAD code will become: "TR 4D.3H12". If you have a scaleable TR symbol it will be drawn at 4 times standard size.
- pntRef - If the point reference field contains a point number the referenced point will be used.
- coordinates - 2D or 3D coordinates are taken from the cgPoint element text.
This data is either: 'northing easting' or 'northing easting elevation'.
miniCAD processes each instrument setup and creates points from the raw observations. Point coding is used to determine layer, symbol and stringing as per the minicad.cod standards. Elements used include:
- InstrumentSetup - InstrumentPoint - The 2D or 3D point at which the instrument is set. (as per cgPoint rules above).
- InstrumentSetup - RawObservation - The observation data.
Elements read by miniCAD
- Either Slope Distance or Horizontal Distance and Target Height.
- TargetPoint - name: A numeric name will become the point number.
- TargetPoint - desc: Stringing, command or comment appended to the code.
- TargetPoint - code: The point code.
- Feature - code: The point code (when TargetPoint - code is not used).
- Feature - desc: The point code description (TOPCON, ignored in miniCAD)
- Feature - stringing: The string number (TOPCON)
- Backsight - azimuth: Optional
- Backsight - circle: Required. When azimuth <> circle a swing of (azimuth - circle) is applied.
- OffsetVals - in/out, left/right, up/down: Will be applied to the coordinate position calculated.
HA Swing - When a swing is calculated it is subtracted from the HA reading i.e. angle = (HA - swing)
Rules for TargetPoint - desc (i.e. Stringing, additional comments or commands.)
- Numeric data, same number of digits as stringing. (see parameters in Utility)
- Character data.
- Mixed data.
The point will be strung.
The data will be treated as a comment or command.
Point will be strung after appling the command.
E.g. 1. code="FCE" desc="01"
- String the related points. (group FCE01)
E.g. 2. code="FCE" desc="01/NEW"
- String the related points. (group FCE01). Code = "FCE NEW"
E.g. 3. code="TR" desc="4D.3H10"
- Stores point code as "TR 4D.3H10"
E.g. 4. code="HSE" desc="]T.5"
- Point coord is offset: 0.5 to the right (Tangential). Code = "HSE"
E.g.5. code="HSE" desc="DEMO"
- Codes stored as "HSE DEMO"
Note: LandXML Offsets are not currently supported however you may use miniCAD offset commands in the 'desc' element. (Default command = ']' followed by T=Tangential offset dist, R=radial offset dist, H=height offset)
miniCAD creates points, lines and arcs from the Plan Features geometry. Elements used include:
coordgeom - The geometry element.
- line - a string line segment, end points will be created.
- curve - a CCW or CW string arc segment, end points and a centre point will be created.
miniCAD will create a string (polyline) from each parcel by processing the line and curve geometry types. Elements used include:
- name - The name of the parcel.
- description - stored a a string attribute in miniCAD.
- area - stored as a string attribute (text) in miniCAD.
- center - the coordinates are stored as text. (also an attribute)
- line - a string line segment
- irregularline - a set of 2D or 3D line segments
- curve - a CCW or CW string arc segment
miniCAD creates a mesh for each surface. Elements used include:
- name - The name of the surface.
- definition - the point coordinates, faces and neighbours for each triangle.
LandXML Export Notes.
When you export data from a job to landxml miniCAD will create points and plan features only. You may select a subset of the job by using the point selection feature.
Handling Invalid Xml.
When miniCAD opens your landXML it will attempt to parse the entire file. Any invalid data will be reported at the position it is found in the source xml text file. In the example below the LandXML element time attribute is incorrectly entered.
e.g. time="9:00" rather then time="09:00:00".
'There is an error in XML document (3,26) --> String was not recognized as a valid DateTime.'
To find and correct the problem you must open the xml file in notepad.exe. Then follow these steps:
- Open notepad and turn wordwrap OFF and turn View - Statusbar ON
- Open the problem landXML file.
- Scroll the cursor position watching the line and column shown in the status bar.
- When you reach the position reported by miniCAD edit or remove the offending xml.
- Save the xml file. (file - save)
See W3 Schools Web Site for more information on XML as a data storage.
For more information about LandXML files see: www.LandXML.org