citygml4j 2.0ea released
citygml4j 2.0ea has been released today and is available for download from the Files section.
This is an early access release of the next major version 2.0 of citygml4j.
As announced two months ago, its most notable new feature is the full support for CityGML 2.0.
Further additions and changes include:
- Read-only support for CityGML 0.4.0 (full support has been discontinued)
- Added filtered CityGML reader
- Added support for
<gml:MultiGeometry> - CityGML XML chunks can now be accessed directly from readers before unmarshalling
- Updated all example programs shipped with the library
- Updated to GML 3.1.1.2 (due to OGC Xlink Policy)
- Updated to JAXB 2.2.5-2
- Incorporated JAMA 1.0.2 library for matrix calculations
- Minor bug fixes
Check the Changelog for more details.
Unfortunately, I have not yet found the time to prepare more detailed release notes or code snippets in the Wiki as for previous releases. But I did not want to defer the pre-release any longer. The download package comes with a range of sample programs. I have updated all of them and added some new examples. So you can learn about the new features and changes by simply reviewing their source code. Each example provides its own Ant build script which allows you to easily run the program (note that some of the Ant scripts even have more than one run target).
samples/converting_citygml
Demonstrates upgrading/downgrading a CityGML instance document between CityGML versions 2.0 and 1.0samples/reading_citygml/citygml_v040_reader
Illustrates the read-only support for CityGML 0.4.0 instance documents which are internally mapped onto CityGML 1.0.0samples/reading_citygml/filtered_reader
CityGML readers can be customized to only process specific CityGML feature types and to skip the restsamples/reading_citygml/multithreaded_reader
When reading CityGML chunk-wise, the chunks can be fed to several threads before unmarshalling in order to speed up processing
The support for CityGML 2.0 required some minor changes to the citygml4j API. Thus, if you replace the citygml4j.jar library file in exisiting projects with the latest version 2.0ea, you will most likely run into compile errors. The following list provides the most important reasons.
- Changes to the enumeration of CityGML elements in
CityGMLClass
In CityGML 2.0, some feature types share the same name across CityGML modules. For example, there exists aWallSurfacefeature in theBuilding,Bridge, andTunnelmodules (in fact, all boundary surfaces share the same name). In order to ensure unique values in theCityGMLClassenumeration, some of the entries had to be renamed correspondingly. Simply update to the new values. For example,WALL_SURFACEneeds to be replaced withBUILDING_WALL_SURFACE. - Interface layer removed
The citygml4j object model is split into interfaces and implementation classes in citygml4j 1.0. Since there has only been a single implementation of the interfaces, this separation has been resolved. In citygml4j 2.0ea, all object classes are located inorg.citygml4j.modeland share the same name as the interfaces in version 1.0. If you have not explicitly used the implementation classes from the packageorg.citygml4j.implin your code, then you do not have to adapt any import statements. - CityGML factories removed
Due to the above change, the factories for creating instances of the object classes became obsolete and have been deleted. Everycreatemethod has been replaced by a constructor of the corresponding object class. For example, the following citygml4j 1.0 snippet
can be easily rewritten as1 CityGMLFactory citygml = new CityGMLFactory(); 2 ... 3 Building building = citygml.createBuilding();1 Building building = new Building();
Since this is an early access release, your feedback is required and desired. Please report any bugs or defects through the issue tracker on this site.
Any other discussions or questions are welcome in the Forums section.
Have fun :-)
Claus
Comments