Showing posts with label LandXML. Show all posts
Showing posts with label LandXML. Show all posts

Friday, 30 June 2017

Generating vb.net classes using XSD schemas !!! A miracle ? No ! Just a bummer !

Two freeware solutions for producing Classes from XSD !!!

Microsoft's XSD.exe
Capable of using multiple schemas at one pass but too many errors and arrays instead of lists !!!

My path for the xsd.exe...
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\xsd.exe

In case a schema refers to another eg "HeXML-1_5.xsd" refers to "LandXML-1_2.xsd" the syntax should be as following...

xsd.exe LandXML-1_2.xsd HeXML-1_5.xsd /classes /language:vb

https://stackoverflow.com/questions/35285713/vb-net-create-class-from-xsd-and-generate-xml

https://bembengarifin.wordpress.com/2009/07/14/generate-net-class-from-xsd-with-references-to-other-xsd-using-xsd-exe/


XSD2CODE.exe
Not capable of handling multiple schemas at one pass.
Found at https://xsd2code.codeplex.com/

https://stackoverflow.com/questions/9386754/using-xsd2code-with-multiple-schema-files


Finally there is also another guy that ran into the same problems.
https://stackoverflow.com/questions/35658403/error-deserializing-xml-in-c-sharp

Endless corrections leading to...bummer. Hours lost for nothing. Crapware.

Just, do not bother loosing time with them.



Wish i had time to make my own conversion software.

Wednesday, 14 June 2017

LandXML & Civil 3D tips, clarifications and important matters to remind me while programming

LandXML angular direction :
Unit is always Decimal Degrees
Positive values only, counter clockwise, zero to East

LandXML horizontal alignment elements :
Are set in CoordGeom
Common to Civil 3D are Line, Curve and Spiral (others are Irregular line and Feature ?)

LandXML horizontal alignment element Spiral :
Civil 3D supports only Spiral.SPItype=Clothoid

LandXML horizontal alignment element Curve (Civil 3D Arc) :
Civil 3D supports only crvType=arc

Civil 3D api can be viewed only using Chrome. IE does not show side window elements !?
http://docs.autodesk.com/CIV3D/2018/ENU/API_Reference_Guide/

Civil 3D alignment simple type entities are subentities of more complex ones like SCCS etc.

LandXML theta angle :
is Pi-SpiralIncludedAngle in degrees and is always positive and less than Pi.
Spiral Included Angle is the angle between Short and Long tangents and is always positive and less than Pi.

Saturday, 14 March 2015

Leica RoadRunner-LandXML import

I do heavy use of autodesk Civil 3D and Leica RoadRunner 5.0 for roads, bridges, underpasses, overpasses etc.

At present time i prefer to use my programs to do the exporting from Civil 3D to LandXML.
I use the Civil 3D LandXML export only for the alignment and profiles.
Then with a program i developed i export CrossSections consisting of the points i choose in the order i set.
Finally i use another program of my own with which i join alignment and cross sections on the fly (although i can do this by hand-using a simple text editor to edit do the proper LandXML file joining)

This is just an online guide to remind me problems and tricks for future use.

1. DesignCrossSectionSurf are ignored. Only CrossSectSurf are loaded.

2. Multiple axies can exist in a single LandXML file but...
    2a. only one axis with cross sections can be loaded or else an error is reported and importing stops . Unfortunately even though a success message is displayed when importing multiple axies with only one of them containing cross sections in fact not a single cross section is loaded. Layers do exist. One for each alignment. But each layer is an empty of cross sections alignment.
    2b. user cannot select which axis to load. All of them are loaded. Each axis is set on a seperate layer mention this having in mind Carlson SurvCE way of improting LandXML.

3. Each CrossSect can have multiple CrossSectSurf . They will be represented as layers with their correspondent names. But the points will not be named with the codes mentioned in Civil 3D since CrossSectSurf format does not keep point codes. The names used are of type for example L1:3. L if left side, 1 for the first point in sequense,3 the ascending number for the layer when imported (it was loaded as the third one).

In case someone wants to preserve the point naming, since DesignCrossSectSurf are ignored, has to use Autodesk Civil 3D->Toolbox->Leica Geosystems->X-change->Export data to job.

But ALL points for each feature line checked when building corridor will be assigned. No layering takes place inside a baseline. Layering takes place only if multiple corridor and/or baselines exist.

For example if a corridor has three baselines but only the two of them were checked when building the corridor then the RoadRunner job will include those two base lines as layers with all of their points that belong to checked feature lines.
This means that point joining to lines for X-Slope will be sequential using the axis criteria. So if those lines are not the desired then the user has to go back and edit road job using the include/exclude key and store it.

Finally using Leica X-change for autodesk Civil 3D user can have multiple corridors with multiple baselines all in one job. Layering takes place at baseline level.

4. While in RoadRunner staking or checking then only points in selected layer appear. Again i mention this having in mind Carlson SurvCE in which all layers are visible but only the current is selectable.
A good practice is to include a layer with all points in it just for checking that no mistaken assignment took place when building LandXML CrossSectSurfs (layers).

Addition 2015-03-16

LandXML supports multiple gaps in CrossSectSurf . Multiple PntList2D are meant to be gaps.
But Leica RoadRunner importer does ignore them. No gaps. All points are joined sequentially.

But it is possible to enter points in what ever order. Points are joined the way they are ordered in PntList2D. That is perfect compared to Trimble's logic (Trimble Link-exporting road as surface). This way it is possible to enter points with same horizontal offset the way user wants to or even draw correctly closed shapes !

Addition 2015-03-17

If CrossSects->CrossSectSurf->PntList2D starts from right to left (descending order by offset) then ALL points are named as right even if there are points with negative offset.

Also if points start with negative offset but they are not ordered by ascending offset, just after the first positive offset, then all points even if negative they are named as right.

So for the points to get correctly named by RoadRunner LandXML importer, a good practice is to be ordered in PntList2D from left to right. But even if not correctly named this leads to no mistakes while staking or checking.