LandXML versus XML

ceaser

Active Member
Licensed User
Hi

Can anybody tell me the difference between LandXML and XML file formats:sign0085::sign0148:

Thanks
Michael
 

DaveW

Active Member
Licensed User
Longtime User
Sorry for the late post, I only just saw the original...

XML is the general definition of the file format, it is the basis for all other schemas. LandXML is a specific definition (schema) for a specific use - in this case survey work. Other examples of schemas are the OpenXML format used for the OpenOffice applications and RSS, which provides Newsfeeds over the internet.

I hope this is still relevant.
 

ceaser

Active Member
Licensed User
Hi Dave

Thanks for your reply. I know that LandXML is used in surveying and civil engineering data exchange. Everybody is asking me to incoporate this into my software, but I do not have a glue where to start:sign0085:

I think my cat knows more about LandXML than I do:sign0148:

Thanks
Ceaser
 

DaveW

Active Member
Licensed User
Longtime User
I don't know much about LandXML but I do have a background in XML (really SGML but they are related). If you have any particular questions let me know. (maybe as private messages so we don't clutter up the forum?)
 

ceaser

Active Member
Licensed User
Hi Dave

I opened a LandXML and XML file with notepad. I must say that they look very similar, but yet there is a difference between them. I also went on the internet to look for a DLL, but the only one that I could find was for desktop programming.

You do not perhaps know where I can look that can be used on a mobile?

Regards
ceaser
 

DaveW

Active Member
Licensed User
Longtime User
Hi Ceaser,

A LandXML file is an XML file - it just uses a tag set specific to the 'schema' defined by the LandXML group. A 'generic' XML file is also constructed according to a schema, just a different, less specific one.

The point of any schema is to define 2 basic characteristics of a dataset, the contents and the structure. The contents are divided up into 3 types of data: Elements which are the 'things' in a dataset, Attributes which tell you about the 'things' and CDATA which is the text inside a 'thing'. A simple example might be:
<para author="DW">Some text</para>
para is the thing - a paragraph, it has an attribute 'author' which tells who wrote it and it's visible content is 'Some text'

The structure describes the order in which the elements can appear within the dataset. For example, for a book the basic structure might be described as: Book contains one Title followed by one or more Chapters, followed by an optional Index; The next level down is Chapter which has one attribute 'number' and contains one Title followed by one or more Sections.

Using this hierarchy a complete dataset can be created - and controlled so that you don't allow a Book with no content or a Chapter with 2 titles.

It's a bit like a database but every record can have a different and variable field structure.

The schema can be a standard one available from a number of sources, however the more generic a schema is, the less control it can exert over a dataset (in some cases it might be quite valid to have more than one title for a chapter even if you don't want that). The LandXML schema is a good example of that. it defines elements, attributes and structure that only have real meaning within the world of surveying. It defines things such as Lat/Long, Roadway and Monument. These have very specific meanings - but only within the LandXML schema. There may well be a definition for Monument in a government schema but that will probably be a quite different definition as it addresses other aspects such legal status.

Anyway, to the practical aspects of actually reading or writing an XML file...
Andrew Graham has just this week created a DLL wrapper for the NET XML reader and writer classes. This gives us the ability to quickly and efficiently to use XML documents. I suggest you take a look at the posts concerning this DLL (http://www.b4x.com/forum/additional-libraries/3385-xml-library.html) I have so far used the XMLreader and it is very simple and quick.

Once you have read the XML file it is up to you as the programmer to decide what to do with each element and attribute that comes out of the document. That is where your knowledge of surveying (and the intentions of the schema) become invaluable. Data is nothing until you do something with it - and only you can decide what you want to do with it!
When writing an XML file it again up to you to ensure that the file you create conforms to the schema you are using. The data elements and attributes have to be in the right order and their contents have to follow the rules set out for them. If you are saving a date and the schema specifies ISO format then putting "22Nov08" will not be valid!

Is this of any use? Sorry if it turned into a sermon - I spend over a decade doing nothing but working with SGML (a forerunner of XML) so it became a bit of a religion for me :rolleyes:. Let me know if you have any specific questions!

David.
 

ceaser

Active Member
Licensed User
Hi David

That was a mouth full!!:sign0188:

Ok let me ask you something: I have in my Job a horizontal alignment which defines the centerline of a road. The file structure is as follows: PINumber,PIYCoord,PIXCoord, Radius, Transition In & Transition Out. This defines the straight lines between all the intersecting points and at each intersecting point you will have a radius of the curve as well as transition curves on either side of the circular curve.

Thanks
Michael
 

DaveW

Active Member
Licensed User
Longtime User
Ok let me ask you something: I have in my Job a horizontal alignment which defines the centerline of a road. The file structure is as follows: PINumber,PIYCoord,PIXCoord, Radius, Transition In & Transition Out. This defines the straight lines between all the intersecting points and at each intersecting point you will have a radius of the curve as well as transition curves on either side of the circular curve.
And the Question is??????
 

ceaser

Active Member
Licensed User
Hi David

Sorry, I forgot to ask the question!:signOops:

The question is, how would the LandXML format be for the horizontal alignment?

Thanks
Michael
 

DaveW

Active Member
Licensed User
Longtime User
Hi Michael,

I don't think I am really the person to ask those sorts of questions. It really requires an expert knowledge of Surveying and the LandXML schema. I would suggest that the best people to ask are your customers. They are the people pushing for XML support so they must know what it is they want to get from you.

However, I did take a look at the schema and some of the example docs on the LandXML website. It would seem that the values you have relate to the roadway structure in the schema. The schema defines one of the top levels as roadways which contains zero or more roadway. Each roadway is related to a set of alignment elements which contain the geometry of points along a line.

I would suggest you take a look at one of the sample files to get an idea of the structure. http://www.landxml.org/schema/LandXML-1.0/samples/Autodesk/ROUTE202.xml looks like a good, simple road description.

Also the samples page User LandXML Transforms might be useful.

Sorry I can't be of more help but I think this should get you started. Let me know if you have more (XML - not surveying ;)) questions!

David.
 

ceaser

Active Member
Licensed User
Hi David

Thanks for those leads! I had a look at those sites and I think I will come right there.

Just one more surveying question:signOops:

Sorry

Thanks
Michael
 
Top