GDAL is a C++ translator library for more than 200 raster and vector geospatial data formats. It offers an API for a variety of languages such as C, C++, Python, Perl, C# and Java.
vdPConsulting has investigated whether and how this GDAL/OGR functionality can be implemented in a C# plugin in AutoCAD.
As Proof of Concept II, the download of the BGT and BRK/DKK from the PDOK website has been implemented. Based on a project polygon, a location filter is created and sent to PDOK as a spatial query. The result is downloaded (as a ZIP-file) and extracted into the project folder and then imported into AutoCAD.
GDAL is a C++ translator library for more than 200 raster and vector geospatial data formats. It offers an API for a variety of languages such as C, C++, Python, Perl, C# and Java.
vdPConsulting has investigated whether and how this GDAL/OGR functionality can be implemented in a C# plugin in AutoCAD.
The import of the BGT/IMGeo is implemented as a Proof of Concept. Processed to NLCS-layers based on the features. At a later stage this can always be further broken down based on multiple properties. By keeping the fill and outline separated from each other, a simple Layer-command can be used to turn the fill off and switch to a line map. The software creates a set of Layer Filters for this purpose.
GDAL is a C++ translator library for more than 200 raster and vector geospatial data formats. It offers an API for a variety of languages such as C, C++, Python, Perl, C# and Java.
vdPConsulting has investigated whether and how this GDAL/OGR functionality can be implemented in a C# plugin in AutoCAD.
In vdPCADdesign, it is now possible to export CADdesign-objects to GML, GeoJSON, GeoPackage and ESRI Shape files. For reading from the same files, CADdesign-objects are expected to write them as objects in the drawing.
Also in vdPClassify it is now possible to export Classify-objects to GML, GeoJSON, GeoPackage and ESRI Shape files. For reading in from the same files, generic functions have been implemented in the vdPClassify-toolkit that read in the points, lines and polygons and create them as generic AutoCAD Points, Polylines and Closed Polylines in the drawing.
GDAL is a C++ translator library for more than 200 raster and vector geospatial data formats. It offers an API for a variety of languages such as C, C++, Python, Perl, C# and Java.
In the Visual Studio development environment it is possible to download NuGet packages. These are open source development libraries you can simply add to your .NET project.
A number of NuGet packages are available for GDAL. In addition to the complete GDAL environment, so-called .NET wrappers are installed with which C# functions in the underlying GDAL C++ DLLs can be called.
vdPConsulting is currently investigating the possibilities to implement GDAL/OGR functionality in a C# plugin in AutoCAD to export data to and import from GML, GeoJSON, GeoPackage and ESRI Shape files.
The first step in a vdPCADdesign project is an analysis of the available Product Catalog and the desired data model.
What type of objects do we want to distinguish; pipes, bends, end caps, valves, fire hydrants etc.
Are these point, line or polygon objects, in other words they must be drawn as polyline, blockreference or closed polyline.
What information must be linked to those objects. Which comes from the catalog, which must be selectable from selection lists and which are free text fields.
In addition, it must be investigated whether point objects should be linked to line objects in a certain way.
Some points may be placed on a line at any location; a fire hydrant somewhere on a pipe.
Other points must be placed at a kink point of a line string; a bend at the bend of a pipe.
Certain points must be placed at the end point of a line string and adopt the direction of that segment as the angle of rotation; an end cap at the start or end point of a pipe.
The desired styling must also be mapped.
On which layer names do the objects appear; preferably we conform to NLCS layer codes.
Which standard color and line type are given to all objects on the relevant layer.
Which symbol is used with the relevant point objects.
Which information fields are used to display the labels.
As a result of the analysis, some things must be implemented in code.
Think in particular of the Ribbon interface. Here the functions are provided for entering the desired objects.
But also reading the catalog will have to be aligned with the structure of the existing Product Catalog.
The majority of the settings are recorded in a number of control tables for data model and styling. In addition, a DWG template must be set up with the definition of line types and symbols.
If the contractor uses vdPCADdesign, with the utility-company’s Products Catalog, the revision drawing contains customised object-information and can easily be loaded into the asset-managementsystem as a GML-file.
As a result, the revision is processed faster, the asset-managementsystem is up to date faster and the WIBON-obligation can be met on time.
vdPCADdesign is a C#.NET utility and available for various AutoCAD-versions.