Skip to main content

Trying to add WMS url in as a screen overlay/ ground overlay. I believe it has to be both, one to have it the navigation tree and one to display in GE. Here's the kml I'm trying to replicate:

 

<ScreenOverlay id="kml_8">

<Icon>

<href>https://seamlessrnc.nauticalcharts.noaa.gov/arcgis/services/RNC/NOAA_RNC/ImageServer/WMSServer?VERSION=1.1.1</href>

</Icon>

<overlayXY x="0" y="0" yunits="fraction" xunits="fraction"/>

<screenXY x="0" y="0" yunits="fraction" xunits="fraction"/>

</ScreenOverlay>

 

<GroundOverlay>

<name>Seamless NOAA RNCs</name>

<visibility>0</visibility>

<description>NOAA RNCs from:

http://seamlessrnc.nauticalcharts.noaa.gov/arcgis/rest/services/RNC/NOAA_RNC/ImageServer&lt;br&gt;

 

RNCs are updated by the 10th of each month.</description>

<LookAt>

<longitude>-117.8271939286902</longitude>

<latitude>41.3515890964458</latitude>

<altitude>0</altitude>

<heading>4.834287676786927</heading>

<tilt>0</tilt>

<range>13548060.97431418</range>

<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>

</LookAt>

<Icon>

<href>https://seamlessrnc.nauticalcharts.noaa.gov/arcgis/services/RNC/NOAA_RNC/ImageServer/WMSServer?VERSION=1.1.1&amp;REQUEST=GetMap&amp;SRS=EPSG:4326&amp;WIDTH=1600&amp;HEIGHT=1024&amp;LAYERS=0&amp;STYLES=default&amp;TRANSPARENT=TRUE&amp;FORMAT=image/png</href>

<viewRefreshMode>onStop</viewRefreshMode>

<viewRefreshTime>1</viewRefreshTime>

</Icon>

<LatLonBox>

<north>70.57384342246766</north>

<south>-22.04523254704492</south>

<east>-22.73651720725801</east>

<west>-185.9514532828564</west>

</LatLonBox>

</GroundOverlay>

 

Hi @jhawks,

Are you still looking for an answer to this question? Since WMS would be a raster layer, Raster Handling in KML may be a useful resource for you. You can use a WMS reader to read in your service and write out to KML. If you wish to do more with it such as controlling the folders or names of the outputs, KML Transformations has a lot of good examples to work with as well. Hope that helps!


Yes! (I see now I didn't do a good job of describing the issue). I have 90% done workbench, shape>kml. The very last task is to add this wms as a layer in the GE Navigation tree. I'm uncertain if it should be added via Attribute Create (like a water mark or screen overylay). Or in the Writer Parameters>advanced> generate raster ground overlay or generate super overlay.


Yes! (I see now I didn't do a good job of describing the issue). I have 90% done workbench, shape>kml. The very last task is to add this wms as a layer in the GE Navigation tree. I'm uncertain if it should be added via Attribute Create (like a water mark or screen overylay). Or in the Writer Parameters>advanced> generate raster ground overlay or generate super overlay.

Hi @jhawks,

Sorry to get back to you so late. I'm not too sure I understand the issue, does your WMS raster show up in your KML output? And if so, does it not show in your Places (Navigation tree)? When I write a raster over to KML, I definitely see it in the Places menu where I can toggle it on and off. I also tried writing it with Generate Raster Ground Overlay and Super Overlay checked, and it shows up both in the viewer and the navigation. We've got two articles on creating kml folders, if that's what you're looking to do, through fanouts and through KML IDs.

 

 

If you are able to share any screenshots or your workspace template with Include Feature Caches enabled, I'd be happy to take a look at it as well.

 


Yes still looking for answer, i'm trying to replicate the wms functionality in the kmz. It has the wms layer in the navigation tree which then toggles it off/on in GE. Should it be a raster ground overlay or a super raster overlay? and then im not sure how to construct the wms url to get it behave correctly.

 

noaa_rncs.kmz


Yes still looking for answer, i'm trying to replicate the wms functionality in the kmz. It has the wms layer in the navigation tree which then toggles it off/on in GE. Should it be a raster ground overlay or a super raster overlay? and then im not sure how to construct the wms url to get it behave correctly.

 

noaa_rncs.kmz

Hi @jhawks,

 

 

For creating your KML, I believe you will want to use a ground overlay. When I took a look at your sample KMZ file in Notepad++ (I had to unzip it to KML first), the code matches the snippet on Ground Overlays in KML documentation. The Generate Raster Ground Overlays option in the reader just detects if there is a raster present and forces it as a Ground Overlay if detected (by default this is set to yes). This should then be viewable in the navigator where you can toggle it on or off.

 

 

If you wish to set the Super-Overlay as well, it just improves the performance of the ground overlay raster for viewing by adding a resolution pyramid (different levels of scale depending on how close or far you are zoomed in). Under the Advanced section you an read more about Ground Overlays and Super-Overlays in the KML writer parameters.

 

 

As for the WMS url configuration, I'm not personally very familiar with configuring the URLs, it might be worth posting a new question specific to this issue if you're open to that? It would be helpful in this new question to specify the WMS and url you are aiming to grab the raster from, as well as what you've tried and what errors or problems you're running into with it. Hope that clears things up a bit!

Hi @jhawks,

You can replicate the desired output by writing to a GroundOverlay feature. Normally this would require a raster feature, but if you set the kml_icon_href attribute, the writer will use the contents of this attribute instead of the feature raster geometry. You can also set the following format attributes with your desired values:

kml_name

kml_description

kml_visibility

kml_latlonbox_north

kml_latlonbox_south

kml_latlonbox_east

kml_latlonbox_west

kml_lookat_altitude

kml_lookat_latitude

kml_lookat_longitude

kml_lookat_tilt

kml_lookat_heading

kml_lookat_range


Hi @jhawks,

You can replicate the desired output by writing to a GroundOverlay feature. Normally this would require a raster feature, but if you set the kml_icon_href attribute, the writer will use the contents of this attribute instead of the feature raster geometry. You can also set the following format attributes with your desired values:

kml_name

kml_description

kml_visibility

kml_latlonbox_north

kml_latlonbox_south

kml_latlonbox_east

kml_latlonbox_west

kml_lookat_altitude

kml_lookat_latitude

kml_lookat_longitude

kml_lookat_tilt

kml_lookat_heading

kml_lookat_range

Okay but now I'm getting:

KML: Raster feature has no fme_basename attribute; destination filename will be based on the feature id

KML: Raster mode is write, but the feature doesn't have a raster geometry, setting mode to `reference'

KML: fme_dataset must be exposed on raster features if the raster mode is either `copy' or `reference'

When I use this method do I need "Generate Raster Ground Overlays" set to yes in the advanced parameters?


Okay but now I'm getting:

KML: Raster feature has no fme_basename attribute; destination filename will be based on the feature id

KML: Raster mode is write, but the feature doesn't have a raster geometry, setting mode to `reference'

KML: fme_dataset must be exposed on raster features if the raster mode is either `copy' or `reference'

When I use this method do I need "Generate Raster Ground Overlays" set to yes in the advanced parameters?

Hi @jhawks,

FME will produce some warnings, but should still write the overlay to the KML file. I had 'Generate Raster Ground Overlays' set to Yes, but that was just the default - I'm not sure if it matters.


Reply