Linking in JSON Exceptions to the general rules

Copyright © 2015 Open Geospatial Consortium. 29 the expected size of the object. For convenience the reason for the link can be encapsulated in a “link” key. In the following example, we are relating linking the representation of the Rio Negro river in Wikipedia with the Amazon river and also to a metadata record better describing the Rio Negro. { type: pg:River, id: wiki:Rio_Negro_Amazon, tributes: { href: wiki:Amazon_River, type: pg:River, }, links: { id: wiki:Rio_Negro_Amazon, via: { type: atom:link, MIMEtype: applicationxml, href: http:www.river.comMetadataRioNegro.xml, title: XML metadata for the Rio Negro river, length: 1523, } } } Using the following context: context: { atom: http:www.w3.org2005Atom, wiki: http:en.wikipedia.orgwiki, pg: http:physicalgeography.schema.org, id: id, href: id, type: type, MIMEtype: atom:type, links: _:, via: atom:via, title: atom:title, length: atom:length, tributes: pg:tributes, } 30 Copyright © 2015 Open Geospatial Consortium. We can automatically transform the JSON file into RDF where the relations between objects are highlighted in green . http:en.wikipedia.orgwikiRio_Negro_Amazon http:www.w3.org19990222-rdf-syntax-nstype http:physicalgeography.schema.orgRiver . http:en.wikipedia.orgwikiRio_Negro_Amazon http:physicalgeography.schema.orgtributes http:en.wikipedia.orgwikiAmazon_River . http:en.wikipedia.orgwikiAmazon_River http:www.w3.org19990222-rdf-syntax-nstype http:physicalgeography.schema.orgRiver . http:en.wikipedia.orgwikiRio_Negro_Amazon http:www.w3.org2005Atomvia http:www.river.comMetadataRioNegro.xml . http:www.river.comMetadataRioNegro.xml http:www.w3.org19990222-rdf-syntax-nstype http:www.w3.org2005Atomlink . http:www.river.comMetadataRioNegro.xml http:www.w3.org2005Atomlength 1523http:www.w3.org2001XMLSchemainteger . http:www.river.comMetadataRioNegro.xml http:www.w3.org2005Atomtitle XML metadata for the Rio Negro river . http:www.river.comMetadataRioNegro.xml http:www.w3.org2005Atomtype applicationxml . Recommendation 10: Include in a best practice for JSON a subclause for linking to other objects in JSON, using the natural approaches that JSON-LD provides for both simple links and atom links. Target: OWS Common.SWG

6.1.2.3 Geospatial objects

XML objects that can be described as simple features in particular GML objects and Bounding Boxes should be encoded in GeoJSON geometric elements. For instance, the ows:WGS84BoundingBox object, should be converted into a bbox GeoJSON objects. For example, the following WFS ServiceMetadata fragment: FeatureTypeList FeatureType NameNHDPlusFlowlines:PlusFlowlineVAA_NHDPlus18Name TitlePlusFlowlineVAATitle Copyright © 2015 Open Geospatial Consortium. 31 Abstract DefaultCRSurn:ogc:def:crs:EPSG::900913DefaultCRS ows:WGS84BoundingBox ows:LowerCorner-124.40958558399815 32.50005761536461ows:LowerCorner ows:UpperCorner-114.58848453257575 43.33627233179173ows:UpperCorner ows:WGS84BoundingBox FeatureType ... Should be converted into: { Name: NHDPlusFlowlines:FeatureTypeList, FeatureType: [ { Name: NHDPlusFlowlines:PlusFlowlineVAA_NHDPlus18, Title: PlusFlowlineVAA, Abstract: null, DefaultCRS: urn:ogc:def:crs:EPSG::900913, bbox: [-124.40958558399815 32.50005761536461, -114.58848453257575, 43.33627233179173] } } The corresponding context could be: Using the following context: context: { wfs: http:www.opengis.netwfs2.5, ows: http:www.opengis.netows2.0, geojson: http:ld.geojson.orgvocab, Name: id, Title: ows:Title, Abstract: ows:Abstact, DefaultCRS: wfs:DefaultCRS, bbox: geojson:bbox, } Recommendation 11: Include in the JSON best practice that if a fragment of a XML document contains a geospatial object then when converting to JSON, consider using the GeoJSON equivalent type. Target: OWS.Common