Preparing Previews of Resources for Publication

It is helpful for a prospective user to see a sample of the data in either a graphic or an interactive map prior to download. Several formats are accepted. Below you will find information on preparing  a preview and registering it with the associated dataResource for publication. The simplest way to do this is using a static .jpeg preview.

JPEG or JPG preview

This is a single file named preview.jpg or preview.jpeg, stored in the metadata sub-directory of the parent dataResource directory.

One of the best ways to get as much into the preview as possible is to take a screenshot of an ArcMap project. Add a symbolized layer representing the data to the map and then zoom to a scale that best displays the data and/or labels. A screenshot of the ArcMap project will enable you to capture the Table of Contents as well, which can be useful as a legend. This is particularly useful when more than one Feature Class or Layer is packaged in a single Data Resource.

HTML Preview

The HTML preview can provide a link to webmaps, applications, descriptive web pages, or other publicly accessible map products that employ the data and or services from the featured dataResource. It may or may not be an interactive web map site. However, interactive web map sites are the most effective in allowing the user a more hands-on review of the data prior to download.  Links to static web pages can also provide a wealth of descriptive information, including images, on the dataResource.  This type of  preview can be activated through a dataSubresource type of "external", with a subresource URL Type of "HTML".  For example:


 <dataSubResource>
     <subResourceType>external</subResourceType>
     <subResourceIdentifiers>
          <subResourceGUID>{07eaf405-91b7-49d9-bada-49bbd914058d}</subResourceGUID>
     </subResourceIdentifiers>
     <subResourceAccess>
           <subResourceURL type="HTML" description="" name="ARMP Homepage">http://www.dnr.state.mn.us/lands_minerals/aggregate_maps/index.html</subResourceURL>
           <subResourceURL type="HTML" description="" name="Static Preview - Sample Image">http://images.dnr.state.mn.us/lands_minerals/aggregate/status_image.jpg</subResourceURL>
      </subResourceAccess>
</dataSubResource>

WMS Preview

There are at least two options for previewing WMS data: a static map or a interactive overlay.

WMS Static Map

A WMS static map must be registered in the dataResource.xml, as shown in the example below. For more details parameters to use in constructing your URLs, please visit http://docs.geoserver.org/stable/en/user/services/wms/reference.html#getmap. Also, note that the ampersands(&), all need to be escaped in XML (change & to &amp;). The Commons won't be able to translate unescaped ampersands into something viewable in a browser. (Note: copying and pasting the example below into a browser won't work, but this is expected.)

<dataSubResource>
    <subResourceType>wms</subResourceType>
    <subResourceName>env_emerald_ash_borer</subResourceName>
    <subResourceIdentifiers>
           <subResourceGUID>{1cccfebc-66ef-497f-a8ec-31a3a38a4097}</subResourceGUID>
    </subResourceIdentifiers>
    <subResourceAccess>
           <subResourceURL type="ServiceSampleURL" description="">
http://gis.mda.state.mn.us/ArcGIS/services/MN_Agriculture_EAB_Detection/...
          </subResourceURL>

     </subResourceAccess>

</dataSubResource>

WMS Interactive Overlay

A WMS interactive overlay must be registered in the data Resource.xml with a getCapabilities statement, as shown in the example below. For more detail on how to construct a GetCapabilities statement, please visit http://docs.geoserver.org/stable/en/user/services/wms/reference.html#getcapabilities. The WMS interactive overlay option works well for displaying dataResources that are points, lines, or polygons.  The Commons automatically brings up the Minnesota Composite Image Service to provide an imagery background for the vector data being displayed.  This option does not work well for displaying imagery or other nontransparent data layers.

        <dataSubResource>
            <subResourceType>wms</subResourceType>
            <subResourceName>env_emerald_ash_borer</subResourceName>
            <subResourceIdentifiers>
                <subResourceGUID>{1cccfebc-66ef-497f-a8ec-31a3a38a4097}</subResourceGUID>
            </subResourceIdentifiers>
            <subResourceAccess>
                <subResourceURL type="ServiceGetCapabilities" description="">http://gis.mda.state.mn.us/arcgis/services/MN_Agriculture_EAB_Detection/...
                <subResourceURL type="ServiceSampleURL" description="">http://gis.mda.state.mn.us/ArcGIS/services/MN_Agriculture_EAB_Detection/...
            </subResourceAccess>
        </dataSubResource>