Closed garnertb closed 10 years ago
@capooti, on this line: https://github.com/GeoNode/geonode/blob/master/geonode/base/models.py#L439, description
is an undefined variable and it is not immediately apparent to me what description
should be maybe self.description
? Any ideas?
Hi @garnertb sorry, it was a refuse. By the way, I see that you don't store anymore the different link_type but always the same value ('WWW:DOWNLOAD-1.0-http--download'). Are you sure that this not break things in pycsw? I am pretty sure that 'OGC:WMS', 'OGC:WFS', 'OGC:WCS' link type is needed for adding the WMS/WFS in QGIS metasearch.
@garnertb ignore my previous comment, thanks to @simod I have just realized that I was reading a collapsed version of the method in GH :) sorry for the noise
No problem, @capooti. I'm still confused as to what description
is/should be here: https://github.com/GeoNode/geonode/blob/master/geonode/base/models.py#L481.
@garnertb @capooti that should be url.name
, not description
.
Awesome, I'll update that. Thanks @tomkralidis!
@capooti @tomkralidis Sorry, can I hijack this discussion for a minute? What effect do the OGC:WMS, OGC:WFS, and OGC:WCS link types have on the output in GeoNode's CS-W service? I'd expect to see GetCapabilities links inserted into the ISO 19115 metadata records, but on my test instance I don't see any. Here's an example: http://54.221.223.46/catalogue/csw?outputschema=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd&service=CSW&request=GetRecordById&version=2.0.2&elementsetname=full&id=3c2fc093-664d-4104-903b-9a90d761d8b9. There are only the various WMS and WFS output links.
Will this commit fix this and add those missing types to the output? Just wondering how the integration happens with QGIS search or an external catalog without links to the GetCapabilities endpoints in the metadata. Or perhaps my instance needs some updates...
try to run updatelayers -f layername and see if you get the links as a first test, in case your metadata haven't been updated for a while
@capooti I've run updatelayers recently via daily cron, and the base_links table has lines that include the OGC:WMS and OGC:WFS types for each layer in GeoNode. For ex:
1332;54;"html";"OGC:WFS";"precip_outlook_SON_2013";"text/html";"http://services.ogc.noaa.gov/geoserver/wfs?" 1331;54;"html";"OGC:WMS";"precip_outlook_SON_2013";"text/html";"http://services.ogc.noaa.gov/geoserver/wms?" 1330;54;"png";"image";"Legend";"image/png";"http://services.ogc.noaa.gov/geoserver/wms?request=GetLegendGraphic&format=image/png&WIDTH=20&HEIGHT=20&LAYER=cpc:precip_outlook_SON_2013&legend_options=fontAntiAliasing:true;fontSize:12;forceLabels:on" 1329;54;"png";"image";"Remote Thumbnail";"image/png";"http://services.ogc.noaa.gov/geoserver/wms/reflect?layers=cpc:precip_outlook_SON_2013&width=200&height=150&format=image/png8" 1328;54;"html";"html";"cpc:precip_outlook_SON_2013";"text/html";"http://54.221.223.46/layers/cpc%3Aprecip_outlook_SON_2013" 1327;54;"html";"OGC:WMS";"OWS";"text/html";"http://services.ogc.noaa.gov/geoserver/cpc/precip_outlook_SON_2013/wms" 1326;54;"tiles";"image";"Tiles";"image/png";"http://services.ogc.noaa.gov/geoserver/gwc/service/gmaps?layers=cpc:precip_outlook_SON_2013&zoom={z}&x={x}&y={y}&format=image/png8" 1325;54;"kml";"data";"View in Google Earth";"text/xml";"http://services.ogc.noaa.gov/geoserver/wms/kml?layers=cpc%3Aprecip_outlook_SON_2013&mode=refresh" 1324;54;"kml";"data";"KML";"text/xml";"http://services.ogc.noaa.gov/geoserver/wms/kml?layers=cpc%3Aprecip_outlook_SON_2013&mode=download" etc....
They are links to the generic WMS/WFS endpoints in GeoServer (geoserver/wms/). I would think a workspace-specific link would be more appropriate maybe, such as 'http://services.ogc.noaa.gov/geoserver/cpc/wms?' ? Or maybe I don't understand the intent of these links. I did notice that the second OGC:WMS in the above is invalid for some reason, led me to think it might be a setup problem on my side.
In any case, they don't appear in the ISO output. Are they supposed to? I can troubleshoot some more, just hoping a little help from the experts will get me there quicker. Thanks.
we need @tomkralidis or @kalxas here :)
May start a thread in geonode-dev instead, that would be a better location. In the meantime I'll update with master and try to debug.
@mwengren yes please raise in geonode-dev.
Fix the PEP8 violations in the
base
app.How to find PEP8 violations:
pip install flake8
in your GeoNode virtual environment.cd <geonode_root>/geonode/base
flake8 .
White listing Whitelisting should be used to ignore PEP8 violations that cannot be prevented.
# noqa
to the end of the line.setup.cfg
file in the geonode root.Note: You can add questions specific to this app in this thread. If you have general questions about PEP8 compliance in GeoNode add it to the main thread here: https://github.com/GeoNode/geonode/issues/1576