This library parses and generates GML 3.2 application schemas and data sets that conform to:
To install the gem, add the following line to your Gemfile:
gem 'ogc-gml'
And then execute:
$ bundle install
To use the OGC GML gem in your Ruby project, require it in your code:
require 'ogc-gml'
Then, you can start using the gem’s functionality.
For example:
# Parse a GML file
gml_data = File.read('spec/fixtures/geospatial_jp_iur_3.1/Bridge_class.xml')
gml = Ogc::Gml::Dictionary.from_xml(gml_data)
# Access the loaded GML Dictionary
gml_dictionary = gml.dictionary
gml_dictionary.features.each do |feature|
puts feature.name
end
It is possible to utilize the library to develop an Executable Test Suite for GML, similar to the OGC ETS for GML 3.2.
The OGC GML gem includes test fixtures from the following sources:
- GML dictionary
-
From the Cabinet Office, Government Of Japan, i-UR data. Downloaded from: here.
- GML objects
-
Curve, Polygon, Line, Surface, etc. from the test suite of OGC ETS for GML 3.2.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.