Open ismailsunni opened 7 years ago
CMIIW, aside from QGIS related request (and styles). I think for most of these, we can get it from CSW and/or WFS, WMS.
Hi @lucernae
For QGIS Server backend, I am not sure we have already the implementation of the WFS / WMS (at least they are only accessed internally).
For example, with Geoserver, when you can access the WFS and WMS via http://demo.geonode.org/geoserver/geonode/wfs
or http://demo.geonode.org/geoserver/geonode/wms
. But, it won't work for QGIS Server.
I though we have access to the WMS : https://github.com/kartoza/geonode_qgis_server/blob/develop/geonode_qgis_server/urls.py#L60 Is-it not this one ?
The result doesn't give wms or wfs url. It only gives detail_url
that point to the that layer page in geonode and thumbnail_url
for the thumbnail. Sample result:
{
"meta": {
"limit": 0,
"offset": 0,
"total_count": 1
},
"objects": [
{
"abstract": "No abstract provided",
"category__gn_description": null,
"csw_type": "dataset",
"csw_wkt_geometry": "POLYGON((-90.85715972938966 19.218502019302726,-90.85715972938966 19.63586086972619,-90.68248947485647 19.63586086972619,-90.68248947485647 19.218502019302726,-90.85715972938966 19.218502019302726))",
"date": "2017-03-26T11:40:10.486601",
"detail_url": "/layers/geonode%3Apuntos_condominios",
"distribution_description": null,
"distribution_url": null,
"id": 469,
"owner__username": "admin222",
"popular_count": 6,
"rating": 0,
"share_count": 0,
"srid": "EPSG:4326",
"supplemental_information": "No se provee información",
"thumbnail_url": "http://demo.geonode.org/uploaded/thumbs/layer-e0b178da-1242-11e7-b375-0e23392a5c01-thumb.png",
"title": "puntos_condominios",
"uuid": "e0b178da-1242-11e7-b375-0e23392a5c01"
}
]
}
Same result as GeoServer
Sample result from GeoNode CSW:
<csw:Record>
<dc:identifier>a7cd67c0-ef94-11e6-92ac-0e23392a5c01</dc:identifier>
<dc:title>mukesh_firstgate_3</dc:title>
<dc:type>dataset</dc:type>
<dc:subject></dc:subject>
<dct:references scheme="OGC:WFS">http://demo.geonode.org/geoserver/geonode/wfs</dct:references>
<dct:references scheme="OGC:WMS">http://demo.geonode.org/geoserver/geonode/wms</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wms?request=GetLegendGraphic&format=image/png&WIDTH=20&HEIGHT=20&LAYER=geonode:mukesh_firstgate_3&legend_options=fontAntiAliasing:true;fontSize:12;forceLabels:on</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wms/reflect?layers=geonode:mukesh_firstgate_3&width=200&height=150&format=image/png8</dct:references>
<dct:references scheme="WWW:LINK-1.0-http--link">http://demo.geonode.org/layers/geonode%3Amukesh_firstgate_3</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/gwc/service/gmaps?layers=geonode:mukesh_firstgate_3&zoom={z}&x={x}&y={y}&format=image/png8</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wms/kml?layers=geonode%3Amukesh_firstgate_3&mode=refresh</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wms/kml?layers=geonode%3Amukesh_firstgate_3&mode=download</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wfs?srsName=EPSG%3A4326&typename=geonode%3Amukesh_firstgate_3&outputFormat=json&version=1.0.0&service=WFS&request=GetFeature</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wfs?typename=geonode%3Amukesh_firstgate_3&outputFormat=excel&version=1.0.0&request=GetFeature&service=WFS</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wfs?typename=geonode%3Amukesh_firstgate_3&outputFormat=csv&version=1.0.0&request=GetFeature&service=WFS</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wfs?typename=geonode%3Amukesh_firstgate_3&outputFormat=text%2Fxml%3B+subtype%3Dgml%2F3.1.1&version=1.0.0&request=GetFeature&service=WFS</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wfs?typename=geonode%3Amukesh_firstgate_3&outputFormat=gml2&version=1.0.0&request=GetFeature&service=WFS</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wfs?format_options=charset%3AUTF-8&typename=geonode%3Amukesh_firstgate_3&outputFormat=SHAPE-ZIP&version=1.0.0&service=WFS&request=GetFeature</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wms?layers=geonode%3Amukesh_firstgate_3&width=550&bbox=0.0%2C0.0%2C-1.0%2C-1.0&service=WMS&format=image%2Fpng&srs=EPSG%3A4326&request=GetMap&height=550</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wms?layers=geonode%3Amukesh_firstgate_3&width=550&bbox=0.0%2C0.0%2C-1.0%2C-1.0&service=WMS&format=application%2Fpdf&srs=EPSG%3A4326&request=GetMap&height=550</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">http://demo.geonode.org/geoserver/wms?layers=geonode%3Amukesh_firstgate_3&width=550&bbox=0.0%2C0.0%2C-1.0%2C-1.0&service=WMS&format=image%2Fjpeg&srs=EPSG%3A4326&request=GetMap&height=550</dct:references>
<dct:modified>2017-02-10</dct:modified>
<dct:abstract>No abstract provided</dct:abstract>
<dc:date>2017-02-10</dc:date>
<dc:language>eng</dc:language>
<ows:BoundingBox crs="urn:x-ogc:def:crs:EPSG:6.11:4326" dimensions="2">
<ows:LowerCorner>-1.0 -1.0</ows:LowerCorner>
<ows:UpperCorner>0.0 0.0</ows:UpperCorner>
</ows:BoundingBox>
</csw:Record>
There is URL for WFS and WMS from the geoserver.
Accessing this: QGIS Server GeoNode - CSW
The result:
<csw:Record>
<dc:identifier>b5b71426-0ebb-11e7-ba36-0242ac120008</dc:identifier>
<dc:title>Buildings</dc:title>
<dc:type>dataset</dc:type>
<dc:subject>Human health and safety</dc:subject>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">/qgis-server/download-zip/buildings</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">/qgis-server/tiles/buildings/{z}/{x}/{y}.png</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">/qgis-server/legend/buildings</dct:references>
<dct:references scheme="WWW:DOWNLOAD-1.0-http--download">/qgis-server/thumbnail/buildings</dct:references>
<dct:modified>2017-03-22</dct:modified>
<dct:abstract>No abstract provided</dct:abstract>
<dc:date>2017-03-22</dc:date>
<dc:language>eng</dc:language>
<ows:BoundingBox crs="urn:x-ogc:def:crs:EPSG:6.11:4326" dimensions="2">
<ows:LowerCorner>-6.18730753858 106.806451101</ows:LowerCorner>
<ows:UpperCorner>-6.17267712705 106.825250235</ows:UpperCorner>
</ows:BoundingBox>
</csw:Record>
Now, it's not even WMS / WFS url.
@timlinux I think for geoserver one, since the CSW and layers / maps API is completed, I can make a little work around in the QGIS side. In the table in the GeoNode connection dialog, I am thinking to create a table like this:
Name | Type | Title | Abstract |
---|---|---|---|
layer_1 | Layer | Layer 1 | blah |
map 1 | Map | Map 1 | bleh |
In the bottom, there will be 2 (or more) buttons to add as WMS (for layer and map) and add as WFS (for layer).
For QGIS Server one, I think we need to make the WMS / WFS mature first. I looked again at the code that @Gustry mentioned above, it's not enough, and is being used internally only.
@ismailsunni please update progress in the OP and add any comments to update the status
@gubuntu updated. Perhaps @lucernae can check it also, if I missed any API that has been created.
For Geonode version, in the layers response meta, there will be geonode_version
{
"geonode_version": "2.7.dev20170920065914",
"meta": {
"limit": 0,
"offset": 0,
"total_count": 8
},
...
}
We need to list all the needed GeoNode API to implement the QGIS-GeoNode Integration:
General
[x] Check version of geonode
[x] Get all layer IDs
[x] Get all map IDs
[x] Get all available styles IDs
[x] Get all available styles IDs for a layer
[x] Get WMS url for a layer
[x] Get WFS url for a layer
[ ] Get WMS url for a map
[x] Get a layer object (including typename)
[ ] Get a map objet (including list of layers)
[x] Download a layer file
[x] Download a layer style
[ ] Download a layer metadata
[ ] Download QGIS project of a map
ref https://github.com/kartoza/geonode/issues/144
cc @timlinux @gubuntu @lucernae @myarjunar