Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OGC API #1514

Draft
wants to merge 2 commits into
base: prod-2-9
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13
3.12
4 changes: 4 additions & 0 deletions docker-compose-lib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ services:
- CPL_VSIL_CURL_CACHE_SIZE
- CPL_VSIL_CURL_USE_HEAD
- GDAL_DISABLE_READDIR_ON_OPEN
ports:
- 8090:8080

qgisserver:
image: camptocamp/geomapfish-qgisserver:gmf${GEOMAPFISH_MAIN_VERSION}-qgis${QGIS_VERSION}
Expand Down Expand Up @@ -143,6 +145,8 @@ services:
- QGIS_SERVER_API_WFS3_MAX_LIMIT
- QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES
- QGIS_SERVER_OVERRIDE_SYSTEM_LOCALE
ports:
- 8091:8080

tinyows:
image: camptocamp/tinyows:master
Expand Down
3 changes: 2 additions & 1 deletion mapserver/mapserver.map.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ MAP
"ows_enable_request" "*"
"ows_title" "GeoMapFish demo"
"ows_abstract" "Some example layers"
"ows_onlineresource" "${VISIBLE_WEB_PROTOCOL}://${VISIBLE_WEB_HOST}${VISIBLE_ENTRY_POINT}mapserv_proxy?ogcserver=MapServer"
"ows_srs" "EPSG:2056"
"wms_allow_getmap_without_styles" "true"
"ows_onlineresource" "${VISIBLE_WEB_PROTOCOL}://${VISIBLE_WEB_HOST}${VISIBLE_ENTRY_POINT}mapserv_proxy/?ogcserver=MapServer"
"oga_onlineresource" "${VISIBLE_WEB_PROTOCOL}://${VISIBLE_WEB_HOST}${VISIBLE_ENTRY_POINT}mapserv_proxy/mapserver/MapServer/ogcapi"
END
END
LEGEND
Expand Down
19 changes: 19 additions & 0 deletions test
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
curl 'http://localhost:8090/mapserv_proxy/MapServer/ogcapi/collections/osm_open/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0'
curl 'http://localhost:8091/mapserv_proxy/QGIS_Server/wfs3/collections/points/items?bbox=6.0,46.0,7.0,47.0&limit=100&map=/etc/qgisserver/project.qgs'


curl -k 'https://localhost:8484/mapserv_proxy?ogcserver=MapServer&SERVICE=WMS&REQUEST=GetCapabilities'
curl -k 'https://localhost:8484/mapserv_proxy?ogcserver=QGIS_Server&SERVICE=WMS&REQUEST=GetCapabilities'


curl -k 'https://localhost:8484/mapserv_proxy/MapServer/ogcapi/collections/osm_open/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0'
curl -k 'https://localhost:8484/mapserv_proxy/QGIS_Server/wfs3/collections/points/items?bbox=6.0,46.0,7.0,47.0&limit=100'



curl 'https://geomapfish-demo-2-9.camptocamp.com/mapserv_proxy?ogcserver=MapServer&SERVICE=WMS&REQUEST=GetCapabilities'
curl 'https://geomapfish-demo-2-9.camptocamp.com/mapserv_proxy?ogcserver=QGIS_Server&SERVICE=WMS&REQUEST=GetCapabilities'


curl 'https://geomapfish-demo-2-9.camptocamp.com/mapserv_proxy/MapServer/ogcapi/collections/osm_open/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0'
curl 'https://geomapfish-demo-2-9.camptocamp.com/mapserv_proxy/QGIS_Server/wfs3/collections/points/items?bbox=6.0,46.0,7.0,47.0&limit=100'
32 changes: 32 additions & 0 deletions ui/src/interfaces/ControllerDesktop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import ngeoStreetviewModule from 'ngeo/streetview/module';
import ngeoRoutingModule from 'ngeo/routing/module';
import ngeoStatemanagerWfsPermalink from 'ngeo/statemanager/WfsPermalink';
import '../webcomponents/index';
import {OgcApiEndpoint} from '@camptocamp/ogc-client';

/**
* @private
Expand All @@ -55,6 +56,37 @@ class Controller extends AbstractDesktopController {
if (this.dimensions.FLOOR == undefined) {
this.dimensions.FLOOR = '*';
}

// const baseUrl = 'http://localhost:8090/mapserv_proxy/mapserver/MainPNG/ogcapi';
// const ogcAPIManager = new OgcApiEndpoint(baseUrl);
//
// // features in the bbox
// const bbox: [number, number, number, number] = [-6.8824, 58.1736, -6.7937, 58.2042];
// ogcAPIManager.getCollectionItems('osm_open', 100, 0, false, undefined, bbox).then((features) => {
// console.log(features);
// });

// MapServer route: /mapserv_proxy/<ogc-server>/ogcapi/*
fetch(
'https://localhost:8484/mapserv_proxy/<ogc-server>/ogcapi/collections/<layer>/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0',
);
fetch(
'http://localhost:8090/mapserv_proxy/MainPNG/ogcapi/collections/osm_open/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0&ogcserver=MainPNG',
);

// QGISServer route: /mapserv_proxy/<ogc-server>/wfs3/*
fetch(
'https://localhost:8484/mapserv_proxy/<ogc-server>/wfs3/collections/<layer-name/items?bbox=6.0,46.0,7.0,47.0&limit=100&offset=0',
);
fetch(
'http://localhost:8091/mapserv_proxy/wfs3/collections/points/items?bbox=6.0,46.0,7.0,47.0&limit=100&map=/etc/qgisserver/project.qgs',
);

//fetch(
// 'http://localhost:8090/mapserv_proxy/mapserver/MainPNG/ogcapi/collections/osm_open/items?bbox=2600000.0,1200000.0,2800000.0,1400000.0&limit=100&offset=0&bbox-crs=http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F2056'
//);
//view-source:http://www.opengis.net/def/crs/EPSG/0/2056
//fetch('https://localhost:8484/mapserv_proxy?ogcserver=Main%20PNG&bbox=-6.8824,58.1736,-6.7937,58.2042&limit=100&offset=0');
}

/**
Expand Down
Loading