-
Notifications
You must be signed in to change notification settings - Fork 0
Software & tools
When it comes to converting NeTEx data to other formats or vice versa, various tools are available to assist in this process. These tools facilitate the transformation of public transport data between different standards and formats. Here are some notable mapping and conversion tools for NeTEx data:
-
netex-protobuf
- Description: netex-protobuf is a powerful converter designed to transform NeTEx data into the Protobuf format, offering compatibility with various profiles.
- Profile: Suitable for various NeTEx profiles.
- GitHub Repository: netex-protobuf on GitHub
-
gtfs2netexfr
- Description: gtfs2netexfr is a specialized tool for exporting GTFS (General Transit Feed Specification) data into NeTEx format, with a focus on the French profile.
- Profile: French NeTEx profile.
- GitHub Repository: gtfs2netexfr on GitHub
-
hastus
- Description: hastus is a script developed by Giro Hastus OIG that not only exports NeTEx data from systems but also has the capability to export crew operations data, making it a versatile tool for Dutch and Nordic profiles.
- Profile: Dutch and Nordic NeTEx profiles.
- GitHub Repository: hastus on GitHub
-
Chimera
- Description: Chimera is a robust framework for semantic data transformation pipelines. It features a converter that bridges the gap between GTFS and NeTEx by adopting an intermediate Transmodel representation. While it's ready for Nordic profiles, ongoing efforts are being made to support the EPIP/Italian profile as well.
- Profile: Nordic (ready), EPIP/Italian (ongoing).
- GitHub Repository: Chimera on GitHub
These mapping and conversion tools empower users to seamlessly transfer NeTEx data to various formats, facilitating interoperability and data exchange within the public transport domain.
It is possible to create C# classes in different ways.
There are many tools out there, but for instance, you could use the Microsoft xsd.exe
tool or the mganss/XMLSchemaClassGenerator
tool available on Github at https://github.com/mganss/XmlSchemaClassGenerator.
Currently there are some issues if you try to use the official NeTEx XSD as a starting point with either of these tools.
However, the above-mentioned tools work fine if you use them together with an adapted set of XSD-files available from Data4PT. The file set is designed to be compatible with the official NeTEx XSD and to cover many important use cases. It does however not cover all use cases possible with the official schema. There is an interactive graphical presentation of the adapted and reduced XSD available at https://data4pt.org/NeTEx/GraphicKit/Documention_of_reduced_XSD.html.
If you wish to try out this reduced XSD, you can download it at https://data4pt.org/NeTEx/GraphicKit/XSD_reduced.zip.
Using the Microsoft tool
- Get the zipped XSD.
- Extract the ZIP to a folder.
- Make sure that you have a recent version of the
xsd.exe
. It is part of the .NET Framework Developer Pack and can be downloaded from https://dotnet.microsoft.com/download/dotnet-framework. - Install the developer pack. The
xsd.exe
will be placed in a folder with a path similar toC:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools
. - Open a command prompt in the same folder as where the
NeTEx_publication_reduced-NoConstraint.xsd
resides. - Execute the following command (you may have to adapt the path to
xsd.exe
):
Using the MGANSS tool
- Get the zipped XSD.
- Extract the ZIP to a folder.
- Download and extract the binary from https://github.com/mganss/XmlSchemaClassGenerator/releases to a separate folder, e.g.,
C:\MGANSS
. - Open a command prompt in the same folder as where the
NeTEx_publication_reduced-NoConstraint.xsd
resides. - Execute the following command (you may have to adapt the path to the exe):
C:\MGANSS\XmlSchemaClassGenerator.Console.exe NeTEx_publication_reduced-NoConstraint.xsd -n http://www.opengis.net/gml/3.2=gml-v
When working with NeTEx data in Java, you can generate Java classes from NeTEx XSD using various tools and libraries. This section will introduce you to the tools and libraries available for Java development with NeTEx.
netex-java-model
- Description: The netex-java-model is a Java library that provides NeTEx XML bindings for Java, including additional support for mapping temporal types to native Java objects.
- GitHub Repository: netex-java-model on GitHub
netex-parser-java
- Description: The netex-parser-java is a Java library designed for parsing NeTEx files and providing the ability to lookup entities within an index.
- GitHub Repository: netex-parser-java on GitHub
Please refer to the respective GitHub repositories for detailed documentation, usage examples, and installation instructions for these Java libraries.