From fe2900abd96ac71cda01f923258e4a6b42bfc2fb Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Jul 2025 11:37:00 +0300 Subject: [PATCH 1/4] docs: added wfs query getting start guide step by step --- docs/MapColonies/Raster/Guides/raster-wfs.mdx | 249 ++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 docs/MapColonies/Raster/Guides/raster-wfs.mdx diff --git a/docs/MapColonies/Raster/Guides/raster-wfs.mdx b/docs/MapColonies/Raster/Guides/raster-wfs.mdx new file mode 100644 index 000000000..c9125e50b --- /dev/null +++ b/docs/MapColonies/Raster/Guides/raster-wfs.mdx @@ -0,0 +1,249 @@ +--- +id: raster-wfs-guide +slug: raster-wfs-guide +title: WFS Guide +tags: + - guide + - wfs + - raster +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import PlaygroundFrame from '@site/src/components/PlaygroundFrame' + +## Export Guide step-by-step +The following guide will help you understand, ***Step-by-step*** the best practices of how to work with the Map Colonies WFS Sevice and how to query layer parts data. + +WFS querying capabilities Reference is [here](MapColonies/Raster/services/LayerParts/layer-parts) + +**Note:** In order to get the layer id (mc:id) you have the following options: +1. Open map-colonies catalog application and locate the required layer +
+ +
+2. Query all records via CSW GetRecords operation and search it in the result response +- [Query Examples](/docs/ogc/protocols/ogc-csw/ogc-csw-examples) + +## Flow diagram + +The following flow will show you one of our main use-case's + +```mermaid +flowchart LR + subgraph CSW + direction LR + b1[STEP 1
Query CSW catalog] + b1 --> b3[STEP 3
Get layer id - mc:id] + end + + subgraph Prerequisite + direction LR + a1[Get Product_ID] + a2[Get Auth Token] + end + + a1 -- product_id --> b1 + a2 -- token --> b1 +``` + +## Query Catalog Service (Step 1) +Query **RASTER CSW catalog** service to find item(s) according to desired filter [example are here](/docs/ogc/protocols/ogc-csw/ogc-csw-examples). + +:::warning +Pay attention to set the following parameter 'outputSchema="http://schema.mapcolonies.com/raster"' in order to get full catalog data +::: + +There are a few ways to acquire the productId, for example: + + + + +To fetch a specific layer you need to aquire 2 properties values: +1. `productType` +2. `productId` +To get unique product when you already have the ***productType*** and ***productId*** you can use the following query (both can be coppied from our catalog app, for example for ***Best Orthophoto*** use the following) + +POST Request + +url: +```'/csw'``` + +body (XML): +```xml + + + + full + + + + + mc:productType + OrthophotoBest + + + mc:productId + ORTHOPHOTO_MOSAIC_BASE + + + + + + +``` + + + + +You can enquire all raster products, use maxRecords and startPosition for pagination: + +POST Request + +url: +```'/csw'``` + +body (XML): +```xml + + + + full + + + + + mc:productId + productId + + + mc:productType + productType + + + + + + +``` + + + + +You will get GetRecords XML Response with product **metadata**. + +
+ Response example + + ``` xml title="GetRecords Response" + + + + + + + 4 + 2022-02-13T13:04:23Z + World Wide 2020 + {"type":"Polygon","coordinates":[[[-180,-90],[-180,90],[180,90],[180,-90],[-180,-90]]]} + 3 + 3b3164a7-280d-4392-a82f-d60a76e69092 + 2022-02-13T13:04:23Z + 2022-02-13T13:04:41Z + image/jpeg + '/service?REQUEST=GetCapabilities' + '/wms' + '/wmts/1.0.0/WMTSCapabilities.xml' + '/service?REQUEST=GetCapabilities&SERVICE=WMTS' + '/wmts' + NEW: -----> '/wfs?request=GetCapabilities' <----- + 0.1 + IDFMU + -180,-90,180,90 + ORTHOPHOTO_MOSAIC_BASE + אורתופוטו מתעדכן + OrthophotoBest + 1.0 + World + 0.000171661376953125 + UNDEFINED + 2020-05-21 + 2020-05-21 + 4326 + WGS84GEO + OPAQUE + RECORD_RASTER + 2022-02-13T13:03:07Z + + -180.0 90.0 + 180.0 90.0 + + + + + ``` +
+ +## Get layer URI (Step 2) {#step-2} + +In the `catalog` response from the first step, look for the `links` tags. + +:::warning +Each layer has it's own links, so make sure to filter for your wanted layer +::: + +```xml title="Example links for a layer" + + +'/wfs?request=GetCapabilities' + +``` + +You need to save the `[desired_layer_identifier]` value for later use. + +## Query WFS layer GetCapabilities (Step 3) +Now you need to make an WFS `GetCapabilities` query request for the desired layer. + +[Service Reference](/docs/MapColonies/Raster/services/LayerParts/layer-parts#getcapabilities) + +Identify the WFS GetCapabilities from above step: + +```xml title="Link for WFS in RESTfull Format" + + '/wfs' + +``` +``` + +Make a GET request to this link. The response contains the details of all available layers in following format: + +```xml title="Example links for a layer" + + + + + + + + + + application/gml+xml; version=3.2 + + + + + + + + + + + +``` + +## Query WFS operations (Step 4) +As you can see, above xml response represents links to wfs operations query names (GetFeature/DescribeFeature) +Now all you have to do is query the desired WFS operation by those references that we mantioned. + + Reference: [DescribeFeatureType](/docs/MapColonies/Raster/services/LayerParts/layer-parts#describefeaturetype) + -> Reference: [GetFeature](/docs/MapColonies/Raster/services/LayerParts/layer-parts#getfeature) \ No newline at end of file From ef97d489fbcfe7ffec8688045d4e166b9260011c Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Jul 2025 11:44:10 +0300 Subject: [PATCH 2/4] docs: fixed closed paragraph --- docs/MapColonies/Raster/Guides/raster-wfs.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/MapColonies/Raster/Guides/raster-wfs.mdx b/docs/MapColonies/Raster/Guides/raster-wfs.mdx index c9125e50b..4a4e594d7 100644 --- a/docs/MapColonies/Raster/Guides/raster-wfs.mdx +++ b/docs/MapColonies/Raster/Guides/raster-wfs.mdx @@ -12,7 +12,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import PlaygroundFrame from '@site/src/components/PlaygroundFrame' -## Export Guide step-by-step +## WFS query Guide step-by-step The following guide will help you understand, ***Step-by-step*** the best practices of how to work with the Map Colonies WFS Sevice and how to query layer parts data. WFS querying capabilities Reference is [here](MapColonies/Raster/services/LayerParts/layer-parts) @@ -213,7 +213,7 @@ Identify the WFS GetCapabilities from above step: '/wfs' ``` -``` + Make a GET request to this link. The response contains the details of all available layers in following format: @@ -241,6 +241,7 @@ Make a GET request to this link. The response contains the details of all availa ``` + ## Query WFS operations (Step 4) As you can see, above xml response represents links to wfs operations query names (GetFeature/DescribeFeature) Now all you have to do is query the desired WFS operation by those references that we mantioned. From 16336ae871258cbb31cef654768d5bc5eec598d7 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Sun, 13 Jul 2025 09:15:59 +0300 Subject: [PATCH 3/4] docs: fixed xml code template --- docs/MapColonies/Raster/Guides/raster-wfs.mdx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/MapColonies/Raster/Guides/raster-wfs.mdx b/docs/MapColonies/Raster/Guides/raster-wfs.mdx index 4a4e594d7..041c9bd71 100644 --- a/docs/MapColonies/Raster/Guides/raster-wfs.mdx +++ b/docs/MapColonies/Raster/Guides/raster-wfs.mdx @@ -184,7 +184,7 @@ You will get GetRecords XML Response with product **metadata**. ``` -## Get layer URI (Step 2) {#step-2} +## Get layer URI (Step 2) In the `catalog` response from the first step, look for the `links` tags. @@ -244,7 +244,15 @@ Make a GET request to this link. The response contains the details of all availa ## Query WFS operations (Step 4) As you can see, above xml response represents links to wfs operations query names (GetFeature/DescribeFeature) -Now all you have to do is query the desired WFS operation by those references that we mantioned. +Now all you have to do is query the desired WFS operation link by those references that we mantioned. - Reference: [DescribeFeatureType](/docs/MapColonies/Raster/services/LayerParts/layer-parts#describefeaturetype) - -> Reference: [GetFeature](/docs/MapColonies/Raster/services/LayerParts/layer-parts#getfeature) \ No newline at end of file +```xml + +``` + Reference: [DescribeFeatureType](/docs/MapColonies/Raster/services/LayerParts/layer-parts#describefeaturetype) + + +```xml + +``` +Reference: [GetFeature](/docs/MapColonies/Raster/services/LayerParts/layer-parts#getfeature) \ No newline at end of file From eeaf5b7a9ac37a946346b545d9ed652897f607ed Mon Sep 17 00:00:00 2001 From: shlomiko Date: Mon, 14 Jul 2025 09:28:31 +0300 Subject: [PATCH 4/4] docs: reference link --- docs/MapColonies/Raster/Guides/raster-wfs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/MapColonies/Raster/Guides/raster-wfs.mdx b/docs/MapColonies/Raster/Guides/raster-wfs.mdx index 041c9bd71..0841cc34c 100644 --- a/docs/MapColonies/Raster/Guides/raster-wfs.mdx +++ b/docs/MapColonies/Raster/Guides/raster-wfs.mdx @@ -15,7 +15,7 @@ import PlaygroundFrame from '@site/src/components/PlaygroundFrame' ## WFS query Guide step-by-step The following guide will help you understand, ***Step-by-step*** the best practices of how to work with the Map Colonies WFS Sevice and how to query layer parts data. -WFS querying capabilities Reference is [here](MapColonies/Raster/services/LayerParts/layer-parts) +WFS querying capabilities Reference is [here](/docs/MapColonies/Raster/services/LayerParts/layer-parts) **Note:** In order to get the layer id (mc:id) you have the following options: 1. Open map-colonies catalog application and locate the required layer