Skip to content

Commit f0c8612

Browse files
committed
Add initial files.
1 parent f66f42d commit f0c8612

File tree

4 files changed

+116
-0
lines changed

4 files changed

+116
-0
lines changed

Samples.xcodeproj/project.pbxproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,8 @@
420420
D79EE76F2A4CEA7F005A52AE /* SetUpLocationDrivenGeotriggersView.Model.swift in Copy Source Code Files */ = {isa = PBXBuildFile; fileRef = D79EE76D2A4CEA5D005A52AE /* SetUpLocationDrivenGeotriggersView.Model.swift */; };
421421
D7A737E02BABB9FE00B7C7FC /* AugmentRealityToShowHiddenInfrastructureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A737DC2BABB9FE00B7C7FC /* AugmentRealityToShowHiddenInfrastructureView.swift */; };
422422
D7A737E32BABBA2200B7C7FC /* AugmentRealityToShowHiddenInfrastructureView.swift in Copy Source Code Files */ = {isa = PBXBuildFile; fileRef = D7A737DC2BABB9FE00B7C7FC /* AugmentRealityToShowHiddenInfrastructureView.swift */; };
423+
D7A85A082CD5ABF5009DC68A /* QueryWithCQLFiltersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A85A022CD5ABF5009DC68A /* QueryWithCQLFiltersView.swift */; };
424+
D7A85A092CD5AC0B009DC68A /* QueryWithCQLFiltersView.swift in Copy Source Code Files */ = {isa = PBXBuildFile; fileRef = D7A85A022CD5ABF5009DC68A /* QueryWithCQLFiltersView.swift */; };
423425
D7ABA2F92A32579C0021822B /* MeasureDistanceInSceneView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7ABA2F82A32579C0021822B /* MeasureDistanceInSceneView.swift */; };
424426
D7ABA2FA2A32760D0021822B /* MeasureDistanceInSceneView.swift in Copy Source Code Files */ = {isa = PBXBuildFile; fileRef = D7ABA2F82A32579C0021822B /* MeasureDistanceInSceneView.swift */; };
425427
D7ABA2FF2A32881C0021822B /* ShowViewshedFromGeoelementInSceneView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7ABA2FE2A32881C0021822B /* ShowViewshedFromGeoelementInSceneView.swift */; };
@@ -581,6 +583,7 @@
581583
dstPath = "";
582584
dstSubfolderSpec = 7;
583585
files = (
586+
D7A85A092CD5AC0B009DC68A /* QueryWithCQLFiltersView.swift in Copy Source Code Files */,
584587
D751B4CB2CD3E598005CE750 /* AddKMLLayerWithNetworkLinksView.swift in Copy Source Code Files */,
585588
D70789952CD1611E000DF215 /* ApplyDictionaryRendererToGraphicsOverlayView.swift in Copy Source Code Files */,
586589
D7F2A0302CD00F400008D981 /* ApplyDictionaryRendererToFeatureLayerView.swift in Copy Source Code Files */,
@@ -1040,6 +1043,7 @@
10401043
D79482D02C35D872006521CD /* CreateDynamicBasemapGalleryView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CreateDynamicBasemapGalleryView.swift; sourceTree = "<group>"; };
10411044
D79EE76D2A4CEA5D005A52AE /* SetUpLocationDrivenGeotriggersView.Model.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SetUpLocationDrivenGeotriggersView.Model.swift; sourceTree = "<group>"; };
10421045
D7A737DC2BABB9FE00B7C7FC /* AugmentRealityToShowHiddenInfrastructureView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AugmentRealityToShowHiddenInfrastructureView.swift; sourceTree = "<group>"; };
1046+
D7A85A022CD5ABF5009DC68A /* QueryWithCQLFiltersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QueryWithCQLFiltersView.swift; sourceTree = "<group>"; };
10431047
D7ABA2F82A32579C0021822B /* MeasureDistanceInSceneView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeasureDistanceInSceneView.swift; sourceTree = "<group>"; };
10441048
D7ABA2FE2A32881C0021822B /* ShowViewshedFromGeoelementInSceneView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShowViewshedFromGeoelementInSceneView.swift; sourceTree = "<group>"; };
10451049
D7AE861D2AC39DC50049B626 /* DisplayAnnotationView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DisplayAnnotationView.swift; sourceTree = "<group>"; };
@@ -1347,6 +1351,7 @@
13471351
108EC03F29D25AE1000F35D0 /* Query feature table */,
13481352
D73F06652B5EE73D000B574F /* Query features with Arcade expression */,
13491353
D7BA38962BFBFC0F009954F5 /* Query related features */,
1354+
D7A85A052CD5ABF5009DC68A /* Query with CQL filters */,
13501355
D7ECF5942AB8BDCA003FB2BE /* Render multilayer symbols */,
13511356
1CAB8D402A3CEAB0002AA649 /* Run valve isolation trace */,
13521357
D75F66322B48EABC00434974 /* Search for web map */,
@@ -2668,6 +2673,14 @@
26682673
path = "Augment reality to show hidden infrastructure";
26692674
sourceTree = "<group>";
26702675
};
2676+
D7A85A052CD5ABF5009DC68A /* Query with CQL filters */ = {
2677+
isa = PBXGroup;
2678+
children = (
2679+
D7A85A022CD5ABF5009DC68A /* QueryWithCQLFiltersView.swift */,
2680+
);
2681+
path = "Query with CQL filters";
2682+
sourceTree = "<group>";
2683+
};
26712684
D7ABA2F52A3256610021822B /* Measure distance in scene */ = {
26722685
isa = PBXGroup;
26732686
children = (
@@ -3435,6 +3448,7 @@
34353448
E000E7602869E33D005D87C5 /* ClipGeometryView.swift in Sources */,
34363449
9503056E2C46ECB70091B32D /* ShowDeviceLocationUsingIndoorPositioningView.Model.swift in Sources */,
34373450
4D2ADC6729C50BD6003B367F /* AddDynamicEntityLayerView.Model.swift in Sources */,
3451+
D7A85A082CD5ABF5009DC68A /* QueryWithCQLFiltersView.swift in Sources */,
34383452
E004A6E928493BCE002A1FE6 /* ShowDeviceLocationView.swift in Sources */,
34393453
1C26ED192A859525009B7721 /* FilterFeaturesInSceneView.swift in Sources */,
34403454
D751B4C82CD3E572005CE750 /* AddKMLLayerWithNetworkLinksView.swift in Sources */,
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright 2024 Esri
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
import ArcGIS
16+
import SwiftUI
17+
18+
struct QueryWithCQLFiltersView: View {
19+
@State private var map = Map(basemapStyle: .arcGISTopographic)
20+
21+
var body: some View {
22+
MapView(map: map)
23+
}
24+
}
25+
26+
#Preview {
27+
QueryWithCQLFiltersView()
28+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Query with CQL filters
2+
3+
Query data from an OGC API feature service using CQL filters.
4+
5+
![Image of Query with CQL filters](QueryWithCqlFilters.jpg)
6+
7+
## Use case
8+
9+
CQL (Common Query Language) is an OGC-created query language used to query for subsets of features. Use CQL filters to narrow geometry results from an OGC feature table.
10+
11+
## How to use the sample
12+
13+
Enter a CQL query. Press the "Apply query" button to see the query applied to the OGC API features shown on the map.
14+
15+
## How it works
16+
17+
1. Create an `OgcFeatureCollectionTable` object using a URL to an OGC API feature service and a collection ID.
18+
2. Create a `QueryParameters` object.
19+
3. Set the `QueryParameters.WhereClause` property.
20+
4. Set the `QueryParameters.MaxFeatures` property.
21+
5. Create `Datetime` objects for the start time and end time being queried.
22+
6. Create a `TimeExtent` object using the start and end `Datetime` objects. Set the `QueryParameters.TimeExtent` property
23+
7. Populate the `OgcFeatureCollectionTable` using `PopulateFromServiceAsync()` with the custom `QueryParameters` created in the previous steps.
24+
8. Use `MapView.SetViewpointGeometryAsync()` with the `OgcFeatureCollectionTable.Extent` to view the newly-queried features.
25+
26+
## Relevant API
27+
28+
* OGCFeatureCollectionTable
29+
* QueryParameters
30+
* TimeExtent
31+
32+
## About the data
33+
34+
The [Daraa, Syria test data](https://demo.ldproxy.net/daraa) is OpenStreetMap data converted to the Topographic Data Store schema of NGA.
35+
36+
## Additional information
37+
38+
See the [OGC API website](https://ogcapi.ogc.org/) for more information on the OGC API family of standards. See the [CQL documentation](https://portal.ogc.org/files/96288#cql-core) to learn more about the common query language.
39+
40+
## Tags
41+
42+
browse, catalog, common query language, CQL, feature table, filter, OGC, OGC API, query, service, web
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"category": "Search and Query",
3+
"description": "Query data from an OGC API feature service using CQL filters.",
4+
"ignore": false,
5+
"images": [],
6+
"keywords": [
7+
"CQL",
8+
"OGC",
9+
"OGC API",
10+
"browse",
11+
"catalog",
12+
"common query language",
13+
"feature table",
14+
"filter",
15+
"query",
16+
"service",
17+
"web",
18+
"OGCFeatureCollectionTable",
19+
"QueryParameters",
20+
"TimeExtent"
21+
],
22+
"redirect_from": [],
23+
"relevant_apis": [
24+
"OGCFeatureCollectionTable",
25+
"QueryParameters",
26+
"TimeExtent"
27+
],
28+
"snippets": [
29+
"QueryWithCQLFiltersView.swift"
30+
],
31+
"title": "Query with CQL filters"
32+
}

0 commit comments

Comments
 (0)