KML becomes a first-class citizen in Digi3D.NET
There are four types of drawing file importers/exporters in Digi3D.NET
- Importers that allow both import and export and can be opened directly from the New project (such as the file importer ) .bind)
- Importers that allow both import and export and that cannot be opened directly from the new project dialog (such as the .xyz file importer)
- Importers that only allow entities to be imported (such as the comma-separated values or .csv importer)
- Importers that only allow export (such as the exporter of .kml).
We could say that the importers that appear in the first group are first-class citizens within Digi3D.NET, since they not only import and export, but also appear in the New Project dialog box, which means that we can open and modify their entities directly. The ones in the second group can only be loaded as reference files or we can only import their entities using the command IMPORT or create them using the command EXPORT, we could say that they are second-class citizens. Those in the third group only know how to import and do not have the ability to export, they would be third-class citizens. And finally those of the third group, who only know how to export. Until today, the .kml importer belonged to the latter group, but that has just changed. We have modified the importer with the following changes:
- Now allows import entities.
- It now appears in the dialog box of New project, which obviously means that we can open a .kml file and modify its entities, move them, delete them, copy them...
- We have modified the coordinate reference system of importer/exporter to make it compatible with the one indicated in the .KML standard that you can read in http://www.opengeospatial.org/standards/kml/. Until now the coordinate reference system associated with the .kml exporter was the geographic 3D: WGS 84. The geographic coordinate reference systems 3D always have the ellipsoidal Z, and according to the standard the coordinate Z is not ellipsoidal, but is orthometric referred to the coordinate reference system EGM96, so now the coordinate reference system associated with the .kml files is: WGS 84 + EGM96 geoid height. The system 2D (WGS 84) is modified because the order of the coordinates is Longitude/Latitude instead of Latitude/Longitude.
If you delete an entity, the behavior is identical to working with .bind files: the entities are not actually deleted, but marked as deleted, so we can use the commands RECOVER or RECOVER_COD to recover deleted entities. Google Earth does not understand entities marked as deleted, so if you open with Google Earth a file with deleted entities, they will be displayed. To completely remove them and not show in Google Earth, you have to compress the drawing file. Want to know how to mark entities in the .kml file as deleted? We showed it in the development blog of Digi3D, in the post Marking entities deleted in .kml files