Skip to content

Instantly share code, notes, and snippets.

@tomkralidis
Last active October 19, 2016 10:48
Show Gist options
  • Save tomkralidis/76824527ca7cc312c5a81db22b436fa2 to your computer and use it in GitHub Desktop.
Save tomkralidis/76824527ca7cc312c5a81db22b436fa2 to your computer and use it in GitHub Desktop.
OGC CAT 3.0 12-168r6 query example update (example after Table 4)
<?xml version="1.0" encoding="UTF-8"?>
<GetRecords
service="CSW"
version="3.0.0"
maxRecords="5"
startPosition="1"
outputFormat="application/xml"
outputSchema="http://www.opengis.net/cat/csw/3.0"
xmlns="http://www.opengis.net/cat/csw/3.0"
xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:fes="http://www.opengis.net/fes/2.0"
xmlns:ows="http://www.opengis.net/ows"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/cat/csw/3.0
http://schemas.opengis.net/cat/csw/3.0/cswAll.xsd">
<Query typeNames="csw:Record">
<ElementSetName typeNames="csw:Record">full</ElementSetName>
<Constraint version="1.1.0">
<fes:Filter>
<fes:And>
<fes:PropertyIsLike escapeChar="\" singleChar="?" wildCard="*">
<fes:ValueReference>dc:title</fes:ValueReference>
<fes:Literal>*Elevation*</fes:Literal>
</fes:PropertyIsLike>
<fes:PropertyIsEqualTo>
<fes:ValueReference>dc:type</fes:ValueReference>
<fes:Literal>Service</fes:Literal>
</fes:PropertyIsEqualTo>
<fes:PropertyIsGreaterThanOrEqualTo>
<fes:ValueReference>dct:modified</fes:ValueReference>
<fes:Literal>2004-03-01</fes:Literal>
</fes:PropertyIsGreaterThanOrEqualTo>
<fes:Intersects>
<fes:ValueReference>ows:BoundingBox</fes:ValueReference>
<gml:Envelope>
<gml:lowerCorner>14.05 46.46</gml:lowerCorner>
<gml:upperCorner>17.24 48.42</gml:upperCorner>
</gml:Envelope>
</fes:Intersects>
</fes:And>
</fes:Filter>
</Constraint>
</Query>
</GetRecords>
<?xml version="1.0" encoding="UTF-8"?>
<csw:Record
xmlns:csw="http://www.opengis.net/cat/csw/3.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:ows="http://www.opengis.net/ows/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/cat/csw/3.0
http://schemas.opengis.net/cat/csw/3.0/record.xsd">
<dc:creator>U.S. Geological Survey</dc:creator>
<dc:contributor>State of Texas</dc:contributor>
<dc:publisher>U.S. Geological Survey</dc:publisher>
<dc:subject>Elevation, Hypsography, and Contours</dc:subject>
<dc:subject>elevation</dc:subject>
<dct:abstract>Elevation data collected for the National Elevation Dataset (NED) based on 30m horizontal and 15m vertical accuracy.</dct:abstract>
<dc:identifier>ac522ef2-89a6-11db-91b1-7eea55d89593</dc:identifier>
<dc:relation>OfferedBy</dc:relation>
<dc:source>http://myserver.com/csw?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;RECORD=dd1b2ce7-0722-4642-8cd4-6f885f132777</dc:source>
<dc:rights>Copyright © 2011, State of Texas</dc:rights>
<dc:type>Service</dc:type>
<dc:title>Elevation Mapping Service for Texas</dc:title>
<dct:modified>2011-03-01</dct:modified>
<dc:language>en</dc:language>
<ows:BoundingBox>
<ows:LowerCorner>-108.44 28.229</ows:LowerCorner>
<ows:UpperCorner>-96.223 34.353</ows:UpperCorner>
</ows:BoundingBox>
</csw:Record>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment