{% extends "site_base.html" %}

{% load i18n %}
{% block title %} {% trans "Information for Developers" %} — {{ block.super }} {% endblock %}

{% block body %}
  <header class="jumbotron subhead" id="overview">
    <h1>{% trans "Information for Developers" %}</h1>
    <p class="lead">{% trans "Useful information for developers interested in GeoNode." %}</p>
  </header>

  {% blocktrans %}
  <p><a href="http://geonode.org/">GeoNode</a> is an open service built on open source software. We encourage you to build new applications using the components and resources it provides. This page is a starting point for developers interesting in taking full advantage of GeoNode. It also includes links to the project's source code so anyone can build and customize their own GeoNode. </p>

  <h4>GeoNode Software</h4>

  <p>All the code that runs GeoNode is open source. The code is available at <a href="http://github.com/GeoNode/geonode">http://github.com/GeoNode/geonode/</a>. The issue tracker for the project is at <a href="http://github.com/GeoNode/geonode/issues">http://github.com/GeoNode/geonode/issues</a>.</p>

  <p>GeoNode is built using several open source projects, each with its own community. If you are interested in contributing new features to the GeoNode, we encourage you to do so by contributing to one of the projects on which it is built:</p>
  <ul>
    <li><a href="http://geoext.org">GeoExt</a> - The JavaScript toolkit for rich web mapping applications</li>
    <li><a href="http://geoserver.org">GeoServer</a> - Standards based server for geospatial information</li>
    <li><a href="http://geowebcache.org">GeoWebCache</a> - Cache engine for WMS Tiles</li><li><a href="http://openlayers.org">OpenLayers</a> - Pure JavaScript library powering the maps of GeoExt</li>
    <li><a href="http://pycsw.org">pycsw</a> - CSW metadata catalogue server</li>
  </ul>

  <h4>What are OGC Services?</h4>
  <p>The data in this application is served using open standards endorsed by the <a href="http://opengeospatial.org/">Open Geospatial Consortium</a>; in particular, WMS (Web Map Service) is used for accessing maps, WFS (Web Feature Service) is used for accessing vector data, and WCS (Web Coverage Service) is used for accessing raster data.  WMC (Web Map Context Documents) is used for sharing maps. You can use these services in your own applications using libraries such as OpenLayers, GeoTools, and OGR (all of which are open-source software and available at zero cost).</p>

  <h4>What is GeoWebCache?</h4>
  <p>GeoWebCache provides mapping tiles that are compatible with a number of mapping engines, including Google Maps, Bing Maps and OpenLayers. All the data hosted by GeoNode is also available through GeoWebCache. GeoWebCache improves on WMS by caching data and providing more responsive maps.</p>

  <h4>OpenLayers Example Code</h4>

  <p>To include a GeoNode map layer in an OpenLayers map, first find the name for that layer. This is found in the layer's <code>name</code> field (not <code>title</code>) of the layer list. For this example, we will use the Nicaraguan political boundaries background layer, whose name is <code>risk:nicaragua_admin</code>. Then, create an instance of OpenLayers.Layer.WMS:</p>
  <p><code>var geonodeLayer = new OpenLayers.Layer.WMS("GeoNode Risk Data", "http://demo.geonode.org/geoserver/wms",{ layers: "risk:nicaragua_admin" });</code></p>

  <h4>Google Maps Example Code</h4>
  <p>To include a GeoNode map layer in a Google Map, include the layer namein the URL template.</p>
  <p><code>var tilelayer =  new GTileLayer(null, null, null, {tileUrlTemplate: 'http://demo.geonode.org/geoserver/gwc/service/gmaps?layers=risk:nicaragua_admin&#38;zoom={Z}&#38;x={X}&#38;y={Y}', isPng:true, opacity:0.5 } );</code></p>

  <h4>Shapefile/GeoJSON/GML Output</h4>
  <p>To get data from the GeoNode web services use the WFS protocol. For example, to get the full Nicaraguan admin boundaries use:</p>
  <p><code>http://demo.geonode.org/geoserver/wfs?request=GetFeature&#38;typeName=risk:nicaragua_admin&#38;outputformat=SHAPE-ZIP</code></p>
  <p>Changing output format to <code>json</code>, <code>GML2</code>, <code>GML3</code>, or <code>csv</code> will get data in those formats. The WFS protocol also can handle more precise queries, specifying a bounding box or various spatial and non-spatial filters based on the attributes of the data.</p>

  <h4>GeoTools Example Code</h4>
  <p>Create a DataStore and extract a FeatureType from it, then run a Query. It is all documented on the wiki at <code>http://geotools.org/</code>.</p>
{% endblocktrans %}
{% endblock %}

{% block sidebar %}
  <h3>{% trans "GeoNode's Web Services" %}</h3>
  <p>{% trans "GeoNode's Web Services are available from the following URLs:" %}</p>
  <table class="table table-striped table-condensed">
    <tr>
      <td><strong>{% trans "Dynamic tiles via WMS:" %}</strong></td>
      <td><a href="{{GEOSERVER_BASE_URL}}ows?service=WMS&version=1.1.1&request=GetCapabilities">WMS 1.1.1</a></td>
    </tr>
    <tr>
      <td><strong>{% trans "Vector data via WFS:" %}</strong></td>
      <td><a href="{{GEOSERVER_BASE_URL}}ows?service=WFS&version=1.1.0&request=GetCapabilities">WFS 1.1.0</a></td>
    </tr>
    <tr>
      <td><strong>{% trans "Raster data via WCS:" %}</strong></td>
      <td><a href="{{GEOSERVER_BASE_URL}}ows?service=WCS&version=1.1.1&request=GetCapabilities">WCS 1.1.1</a></td>
    </tr>
    <tr>
      <td><strong>{% trans "Metadata search via CSW:" %}</strong></td>
      <td><a href="{{CATALOGUE_BASE_URL}}?service=CSW&version=2.0.2&request=GetCapabilities">CSW 2.0.2</a></td>
    </tr>
    <tr>
      <td><strong>{% trans "Cached tiles via WMTS:" %}</strong></td>
      <td><a href="{{GEOSERVER_BASE_URL}}gwc/service/wmts?service=WMTS&version=1.0.0&request=GetCapabilities">WMTS 1.0.0</a></td>
    </tr>
  </table>
{% endblock %}
