Giter VIP home page Giter VIP logo

ogc-schemas's Introduction

ogc-schemas

OGC Schemas project provides JAXB bindings for XML Schemas defined by the Open Geospatial Consortium (OGC).

OGC Schemas

OGC Schemas project provides JAXB and Jsonix bindings for some of the XML Schemas defined by OGC.

This allows converting between XML (conforming to one of these schemas) and Java objects in Java or JSON in JavaScript.

Supports the following schemas:

  • ARML_2_0
  • CityGML_1_0
    • CityGML_Appearance_1_0
    • CityGML_Building_1_0
    • CityGML_CityFuntiture_1_0
    • CityGML_CityObjectGroup_1_0
    • CityGML_Generics_1_0
    • CityGML_LandUse_1_0
    • CityGML_Relief_1_0
    • CityGML_TexturedSurface_1_0
    • CityGML_Transportation_1_0
    • CityGML_Vegetation_1_0
    • CityGML_Waterbody_1_0
  • CityGML_2_0
    • CityGML_Appearance_2_0
    • CityGML_Bridge_2_0
    • CityGML_Building_2_0
    • CityGML_CityFuntiture_2_0
    • CityGML_CityObjectGroup_2_0
    • CityGML_Generics_2_0
    • CityGML_LandUse_2_0
    • CityGML_Relief_2_0
    • CityGML_TexturedSurface_2_0
    • CityGML_Transportation_2_0
    • CityGML_Tunnel_2_0
    • CityGML_Vegetation_2_0
    • CityGML_Waterbody_2_0
  • CSW_2_0_2
    • DC_1_1
    • DCT
  • EOP_1_0
  • EOP_ATM_1_0
  • EOP_OPT_1_0
  • EOP_SAR_1_0
  • EOSPS_2_0
  • Filter_1_0_0
  • Filter_1_1_0
  • Filter_2_0
  • GML_1_0_0
  • GML_2_1_2
  • GML_3_1_1
  • GML_3_2
  • GML_CE_3_3
  • GML_EXR_3_3
  • GML_LR_3_3
  • GML_LRO_3_3
  • GML_LROV_3_3
  • GML_LRTR_3_3
  • GML_RGRID_3_3
  • GML_TIN_3_3
  • GML_XBT_3_3
  • GMLCOV_1_0
  • GMLCOV_GeoTIFF_1_0
  • GMLJP2_2_0
  • SMIL_2_0
  • SMIL_2_0_Language
  • IC_2_0
  • IC_2_1
  • IndoorGML_Core_1_0
  • IndoorGML_Navigation_1_0
  • ISO19139_GCO_20070417
  • ISO19139_GMD_20070417
  • ISO19139_GMX_20070417
  • ISO19139_GSR_20070417
  • ISO19139_GSS_20070417
  • ISO19139_GTS_20070417
  • KML_2_1
  • KML_2_2_0
  • KML_2_3
  • OLS_1_1_0
  • OLS_1_2
  • OLS_NAV_1_3
  • OM_1_0_0
  • OM_2_0
  • OMEO_ALT_2_0
  • OMEO_ATM_2_0
  • OMEO_EOP_2_0
  • OMEO_LMB_2_0
  • OMEO_OPT_2_0
  • OMEO_SAR_2_0
  • OMEO_SEN1_2_0
  • OMEO_ALT_2_0
  • OMEO_SSP_2_0
  • OMX_1_0_0
  • OSEO_1_0
  • OWC_0_3_1
  • OWS_1_0_0
  • OWS_1_1_0
  • OWS_2_0
  • Sampling_1_0_0
  • Sampling_2_0
  • SamplingSpatial_2_0
  • SamplingSpecimen_2_0
  • SE_1_1_0
  • SensorML_1_0_0
  • SensorML_1_0_1
  • SensorML_2_0
  • SLD_1_0_0
  • SLD_1_0_0_GeoServer
  • SLD_1_1_0
  • SPS_1_0_0
  • SPS_2_0
  • SOS_1_0_0
  • SOS_1_0_0_Filter
  • SOS_2_0
  • SWE_1_0_0
  • SWE_1_0_1
  • SWE_2_0
  • SWES_2_0
    • WSN_T_1
  • TJS_1_0
  • TML_1_0_0
  • WAMI_1_0_0
  • WAMI_1_0_1
    • WAMI_Common_1_0_1
  • WAMI_1_0_2
    • WAMI_Common_1_0_0
  • WaterML_2_0
  • WCPS_1_0
  • WCS_1_0_0
    • GML4WCS_1_0_0
  • WCS_1_1
  • WCS_1_1_1
  • WCS_2_0
  • WCS_CRS_1_0
  • WCS_Interpolation_1_0
  • WCS_Processing_2_0
  • WCS_Range_Subsetting_1_0
  • WCS_Scaling_1_0
  • WCS_WCSEO_1_0
  • WCST_1_1
  • WFS_1_0_0
  • WFS_1_1_0
  • WFS_2_0
  • WMS_1_0_0
  • WMS_1_1_0
  • WMS_1_1_1
  • WMS_1_3_0
  • WMS_1_3_0_Exceptions
  • WMSC_1_1_1
  • WPS_1_0_0
  • xAL_2_0

JavaScript Example

var XLink_1_0 = require('w3c-schemas').XLink_1_0;
var OWS_1_1_0 = require('ogc-schemas').OWS_1_1_0;
var WPS_1_0_0 = require('ogc-schemas').WPS_1_0_0;

var context =  new Jsonix.Context([XLink_1_0, OWS_1_1_0, WPS_1_0_0]);
var unmarshaller = context.createUnmarshaller();
unmarshaller.unmarshalFile("tests/WPS/1.0.0/execute-01.xml", function(result) {
	test.equal("geom", result.value.dataInputs.input[0].title.value);
	test.done();
});

ogc-schemas's People

Contributors

avautour avatar charlesmoore99 avatar highsource avatar juanmav avatar jungham avatar tastle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ogc-schemas's Issues

tests are failing

Here's what I did:

git clone https://github.com/highsource/ogc-schemas.git
cd ogc-schemas
cd scripts
npm install
npm test

Then I get the following error:

tests.js
✔ ogc-schemas - ogc-schemas - CSW - CSW - CSW_2_0_2 - Context
✔ ogc-schemas - ogc-schemas - CSW - CSW - CSW_2_0_2 - Example
✔ ogc-schemas - ogc-schemas - CSW - CSW - CSW_2_0_2 - Roundtrips - Clause_6.3.3_Example01_Response.xml
✔ ogc-schemas - ogc-schemas - SensorML - SensorML - SensorML_1_0_1 - Context
✔ ogc-schemas - ogc-schemas - SensorML - SensorML - SensorML_1_0_1 - Example
Error: Expected start or end tag.
    at Object.Jsonix.XML.Input.Jsonix.Class.nextTag (/tmp/ogc-schemas/scripts/node_modules/jsonix/jsonix.js:1114:10)
    at Object.Jsonix.Context.Unmarshaller.Jsonix.Class.unmarshalDocument (/tmp/ogc-schemas/scripts/node_modules/jsonix/jsonix.js:5153:9)
    at /tmp/ogc-schemas/scripts/node_modules/jsonix/jsonix.js:5145:19
    at fs.js:271:14
    at Object.oncomplete (fs.js:107:15)

FAILURES: Undone tests (or their setups/teardowns):

Trouble building OGC WAMI Services

I am attempting to build OGC Best Practices schema for WAMI Services: Dissemination Services for Wide Area Motion Imagery - Best Practice.
OGC 12-032r2.
Best Practices List: http://www.opengeospatial.org/standards/bp
Document: https://portal.opengeospatial.org/files/?artifact_id=50486
and http://www.opengis.net/doc/bp/wami/1.0

Associated Schemas: http://bp.schemas.opengis.net/12-032r2/wami/xsd/

Directed to this site from: https://java.net/projects/ogc/lists/users/archive/2015-03/message/2

My goal is to convert our existing WAMI server software to support this Best Practices schema.
I am using NetBeans 7.3 and 8.0.2, but am not very familiar with OGC JAXB issues, MAVEN, or GitHub.

Thanks.

marshalString fails

I tried to marshal back an unmarshaled xml document without any success.
https://github.com/pgiraud/ogc-schemas/blob/owscontext_marshal/scripts/tests/OWC/0.3.1/OWC_0_3_1.js#L25-L28

I get the following error:

Error: Argument [undefined] must be an object.
    at Object.Jsonix.Util.Ensure.ensureObject (/home/pierre/public_html/ogc-schemas/scripts/node_modules/jsonix/jsonix.js:678:10)
    at Object.Jsonix.Context.Marshaller.Jsonix.Class.marshalElementNode (/home/pierre/public_html/ogc-schemas/scripts/node_modules/jsonix/jsonix.js:5081:22)
    at Object.Jsonix.Context.Marshaller.Jsonix.Class.marshalDocument (/home/pierre/public_html/ogc-schemas/scripts/node_modules/jsonix/jsonix.js:5071:8)
    at Object.Jsonix.Context.Marshaller.Jsonix.Class.marshalString (/home/pierre/public_html/ogc-schemas/scripts/node_modules/jsonix/jsonix.js:5060:18)
    at /home/pierre/public_html/ogc-schemas/scripts/tests/OWC/0.3.1/OWC_0_3_1.js:26:15
    at /home/pierre/public_html/ogc-schemas/scripts/node_modules/jsonix/jsonix.js:5145:5
    at fs.js:271:14
    at Object.oncomplete (fs.js:107:15)

I haven't figured out when the error appears exactly. Using a similar code in the browser and iterating through breakpoints didn't help me. ensureObject is called several times.

Any help would be appreciated.

OGC WAMI Build Dependencies

Can the build process copy all dependent JAR to a release directory (or something equivalent)?
To support applications not built using Maven environment.

error in mvn clean install

I'm getting a build failure on the above, is something missing from the repository?

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:06.239s
[INFO] Finished at: Mon Sep 01 15:34:52 CEST 2014
[INFO] Final Memory: 48M/791M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:exec (compile) on project ogc-schemas-scripts: Command execution failed. Cannot run program "mnpm.sh" (in directory "/Users/bartvandeneijnden/opengeo/git/ogc-schemas/scripts"): error=2, No such file or directory -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :ogc-schemas-scripts

Invalid XML generated when writing out SLD

When writing out SLD I get:

<p0:StyledLayerDescriptor xmlns:p0="http://www.opengis.net/sld" version="1.0.0"><p0:NamedLayer><p0:Name>simple</p0:Name><p0:UserStyle><p0:FeatureTypeStyle><p0:Rule><p0:PointSymbolizer><p0:Graphic><p0:ExternalGraphic><p0:OnlineResource p1:type="simple" xmlns:p1="http://www.w3.org/1999/xlink" xmlns:p1="http://www.w3.org/1999/xlink" p1:href="icon.svg"/><p0:Format>image/svg+xml</p0:Format></p0:ExternalGraphic></p0:Graphic></p0:PointSymbolizer></p0:Rule></p0:FeatureTypeStyle></p0:UserStyle></p0:NamedLayer></p0:StyledLayerDescriptor>
SystemID: /Users/bartvandeneijnden/Downloads/Untitled1.xml
Severity: error
Description: Attribute "xmlns:p1" was already specified for element "p0:OnlineResource".
Start location: 1:302

This is using JSONIX highsource/jsonix@9481171 and the most recent versions of the schema / mappings.

This is the JSON config:

{"name":{"namespaceURI":"http://www.opengis.net/sld","localPart":"StyledLayerDescriptor"},"value":{"version":"1.0.0","namedLayerOrUserLayer":[{"TYPE_NAME":"SLD_1_0_0.NamedLayer","name":"simple","namedStyleOrUserStyle":[{"TYPE_NAME":"SLD_1_0_0.UserStyle","featureTypeStyle":[{"rule":[{"symbolizer":[{"name":{"localPart":"PointSymbolizer","namespaceURI":"http://www.opengis.net/sld"},"value":{"graphic":{"externalGraphicOrMark":[{"TYPE_NAME":"SLD_1_0_0.ExternalGraphic","format":"image/svg+xml","onlineResource":{"href":"icon.svg","type":"simple"}}]},"size":{"content":["10"]}}}]}]}]}]}]}}

marshal SLD document

I am trying to unmarshal an SLD document and then marshal it again as a string, but the last step fails.

The JSON returned has this root object:

screen shot 2014-12-11 at 11 49 49

but when using this structure for the marshalString function argument, JSONIX will expect a name and value property.

How to generate PO.js with *.jsonix.jxb and *.jxb files

Hi,

I can't figure out how generate the Javascript mapping from the *.jxb files (I am trying with CSW files). Already downloaded the schema compiler and the xjb files.

The command I trying is:

java -jar jsonix-schema-compiler-full-2.0.0.jar -b csw-v_2_0_2.xjb

The output error:

Exception in thread "main" com.sun.tools.xjc.BadCommandLineException: grammar is not specified
    at com.sun.tools.xjc.Options.parseArguments(Options.java:809)
    at org.hisrc.jsonix.JsonixMain.main(JsonixMain.java:89)

If anyone can help will be appreciated.

Thanks in advance
JM

Support GMLCOV 1.0.2

The schemas are already present in the repository. It would be nice to have a maven artifact as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.