Schema Create a new feature with a multimedia-valued property

20 Copyright © 2016 Open Geospatial Consortium. service=WFS version=2.5.0 xmlns=http:www.someserver.commyns xmlns:cw=http:schemas.cubewerx.comnamespacesnull xmlns:fes=http:www.opengis.netfes2.5 xmlns:wfs=http:www.opengis.netwfs2.5 xmlns:xsi=http:www.w3.org2001XMLSchema-instance xsi:schemaLocation=http:www.opengis.netwfs2.5 http:www.pvretano.comschemaswfs2.5wfs.xsd http:schemas.cubewerx.comnamespacesnull http:www.pvretano.comcubewerxcubeserv.cgi?datastore=ows11amp;service=WFSa mp;version=2.5amp;request=DescribeFeatureTypeamp;typeName=wwAccess wfs:Insert wwAccess Geometry gml:Point gml:id=GID1 srsName=urn:ogc:def:crs:EPSG::4326 gml:pos-43.603 172.574gml:pos gml:Point Geometry uidWWMH-4078uid AccessTypeStandard ManholeAccessType SourceId2604S00330SourceId LocationCeNon VerifiedLocationCe NearestPru1NearestPru HansenId63945HansenId n5734056.64n e2475523.95e WwAccessID4078WwAccessID Compkey8148Compkey HeightAbov30.8HeightAbov Constructi1Constructi Depth0.9Depth MaintenancCity Water and WasteMaintenanc ServiceStaIn ServiceServiceSta YearLaid1983-01-01YearLaid SAPInternaIE000000000010754107SAPInterna LastEditDa2013-10-18LastEditDa LastEditUsCCITY\TredinnickCLastEditUs Photo mimeType=imagejpeg9j4AAQSkZJRgABAQEAZABkAAD2wBDAAIBAQIBAQICAgICAgICAwUDA wMDAwYEBAMFBwYHBwcG BwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwM DAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAzwAARCAISArwDAREA AhEBAxEB8QAHQAAAAcBAQEAAAAAAAAAAAAAAQIDBAUGBwAICfEAEsQAAECBAQFAgQEBAQFAgUB CQECEQADBCEFEjFBBhMiUWEHcQgUMoEjQpGhUrHB0RUz4fAJFiRi8UNyFyY0U5IlNXMYGYKTY6Ky -- more base64 data here removed for the sake of brevity -- ajwCjieof9yhCapM5wpQLjfwI9A39pjg4Jh4JywtIC1AZhvG1PFQ58mYEVU3nJEmWBMYX P90pfAlKaarInqVqN4vDckbwANhzTVU3lpPMmODrmMasv93+IDx+A+kVk3kpFmf8A5GNXD+En Lz2pH+G1c0LR+LM+kmMWv9oPNbglZ9XN58r8WZdzGGEQ3kISK2cxFmXEYv8A4Yseyayd zkizNFfmPaLxEgjPrp7Sxpv0D85h2T+438f8ASAJ7nZPhoto wwAccess wfs:Insert wfs:Transaction Simply POSTing this message to the servers transaction controller resource will create a new instance of the wwAccess feature that also includes a photo valued property. Copyright © 2016 Open Geospatial Consortium. 21

7.4 Update a multimedia-valued property

Updating a feature with a multimedia value proceeds in the usual manner; a Transaction message is posted to the transaction handler of the server. Multimedia values can either be encoded in-line or referenced in which case the server shall retrieve the multimedia value prior to updating the feature. Here is an example of an update message that updates the value of the Photo property in the wwAccess feature: ?xml version=1.0 ? wfs:Transaction version=2.5.0 service=WFS xmlns=http:www.someserver.commyns xmlns:cw=http:schemas.cubewerx.comnamespacesnull xmlns:fes=http:www.opengis.netfes2.5 xmlns:wfs=http:www.opengis.netwfs2.5 xmlns:xsi=http:www.w3.org2001XMLSchema-instance xsi:schemaLocation=http:www.opengis.netwfs2.5 http:www.pvretano.comschemaswfs2.5wfs.xsd http:schemas.cubewerx.comnamespacesnull http:www.pvretano.comcubewerxcubeserv.cgi?datastore=ows11amp;servi ce=WFSamp;version=2.5amp;request=DescribeFeatureTypeamp;typeName=wwA ccess wfs:Update typeName=wwAccess wfs:Property wfs:ValueReferencePhotowfs:ValueReference wfs:Value Photo mimeType=imagejpeg9j4AAQSkZJRgABAQAAAQABAADgA7Q1JFQVRPUjogZ2Qta nBlZyB2MS4wICh1c2luZyBJSkcg SlBFRyB2NjIpLCBxdWFsaXR5ID0gNjUK9sAQwALCAgKCAcLCgkKDQwLDREcEhEPDxEiGRo UHCkk KyooJCcnLTJANy0wPTAnJzhMOT1DRUhJSCs2T1VORlRAR0hF9sAQwEMDQ0RDxEhEhIhRS4 nLkVF RUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVF8AAEQg BgAHg ... more base64 encoded image data here -- 8ZjG51B92FZwY2aCTc4IqyjVTjli7yx99CpvOiHLaPvsVpcklJy2Kg1LAI8v+BClWaL JJlj AO+xUdLE1kwEsbHI4DCk9io7mRmkpN6wB5fzpN63h+dc50C0lJvX+8Pzo3reH50hC5o Jpu5f 7wOk3rAHh+dADqKbuX+8Pzo3LAHhQA6k60m5f7wOk3D1H50wFpabuHqPzo3D+8PzpAK aa33T RuH94fnSMw2nkdPWgD2Q==Photo wfs:Value wfs:Property fes:Filter fes:ResourceId rid=CWFID.WWACCESS.0.34723.BA89DFD04C0B73161F20020000 fes:Filter wfs:Update wfs:Transaction 22 Copyright © 2016 Open Geospatial Consortium.

7.5 Query

7.5.1 Feature query

In a query response, the CubeWerx server encodes multimedia property values by reference rather than encoding the values in-line in order to keep the bulk of the response down. Here is an example of a REST URL that returns a wwAccess feature with a photo: http:www.pvretano.comcubewerxcubeservdefaultwfs2.5.0ows11wwAccessCWFI D.WWACCESS.0.34729.BA89DFD04C0B73161F20020000 . Resolving the href URL that is the value of the Photo property will retrieve the image. Although not yet implemented in the CubeWerx server, in the future a client would be able to use the resolve parameters see OGC 09-025r2 clause 7.6.4 to control whether the multimedia data is encoded in-line or not [resolve=none|local means that the value is referenced; resolve=remote|all means that the value is encoded in-line in the response]. NOTE 1: If you follow the above link in your browser, the response may be HTML as the browser sets the Accept header to prefer HTML output. Adding the f parameter allows GML to be returned: http:www.pvretano.comcubewerxcubeservdefaultwfs2.5.0ows11wwAccessCWFID.WW ACCESS.0.34729.BA89DFD04C0B73161F20020000?f=applicationgml2Bxml;20version=3 .2 NOTE 2: The editor is still working of the GeoJSON generation of multimedia values but the pattern will be that established for GML i.e. the value shall be encoded either in line or by reference depending on the value of the resolve query parameter.

7.5.2 Property Value query

Getting the multimedia value of a property is simply a matter of using a GetPropertyValue operation or referencing the property values URL. Here is an example of the latter: http:www.pvretano.comcubewerxcubeservdefaultwfs2.5.0ows11wwAccessCWFI D.WWACCESS.0.34709.BA89DFD04C0B73161F20020000photo?f=applicationgml 2Bxml;+version=3.2 . This is very nice but it would be better to be able to stream the actual or native binary value without the response container. In this way a client, say a browser, can handle the multimedia value in whatever manner it has been configured to do so e.g. a browser could display a photo, or play the audio or video clip. The initial idea for streaming multimedia values from a WFS was to define a new operation, similar to the one found in the CSW-ebRIM profile of the catalogue , called GetRepositoryItem . However, a better approach is to use what is already defined in the WFS; that is, the GetPropertyValue operation.