GeoNode Django Apps¶
The user interface of a GeoNode site is built on top of the Django web framework. GeoNode includes a few “apps” (reusable Django modules) to support development of those user interfaces. While these apps have reasonable default configurations, for customized GeoNode sites you will probably want to adjust these apps for your specific needs.
geonode.core - Miscellaneous site utilities¶
This Django app provides some basic website features in an extensible fashion. For example, many sites should be able to add tabs to the site navigation bar without having to modify templates by taking advantage of the navigation features provided by this module.
geonode.maps - Map creation and geospatial data management¶
This Django app provides some support for managing and manipulating geospatial datasets. In particular, it provides tools for editing, viewing, and searching metadata for data layers, and for editing, viewing, and searching maps that aggregate data layers to display data about a particular topic.
The maps app provides two main model types:
- Layer - A data layer managed by the GeoNode
- Map - A collection of data layers composed in a particular order to form a map
Additionally, there is a MapLayer model that maintains some map-specific information related to a layer, such as the z-indexing order.
The maps app provides views for:
- Creating, viewing, browsing, editing, and deleting Maps
- Creating, viewing, browsing, editing, and deleting Layers and their metadata
These operations require the use of GeoServer and GeoNetwork to manage map rendering and metadata indexing, as well as GeoExt to provide interactive editing and previewing of maps and data layers.
There are also some url mappings in the geonode.maps.urls module for easy inclusion in GeoNode sites.
- A 2-tuple with the username and password for a user with privileges to manage data in the GeoServer coupled to this GeoNode.
- A base URL from which GeoNode can construct GeoServer service URLs. This is the servlet context URL for the servlet container, or you can determine it by visiting the GeoServer administration app’s home page without the /web/ at the end. If your GeoServer administration app is at http://example.com/geoserver/web/ , your GEOSERVER_BASE_URL is http://example.com/ .
- Similar to GEOSERVER_CREDENTIALS, but for GeoNetwork. The user must have permissions to create and modify metadata records in GeoNetwork.
- Similar to GEOSERVER_BASE_URL, but for GeoNetwork. Again, this is the servlet context URL, or can be determined by stripping the last path component off the url for the GeoNetwork homepage.
- A base URL for use in creating absolute links to Django views.
- The name of the background layer to include in newly created maps.
- A 2-tuple with the latitude/longitude coordinates of the center-point to use in newly created maps.
- The zoom-level to use in newly created maps. This works like the OpenLayers zom level setting; 0 is at the world extent and each additional level cuts the viewport in half in each direction.
- A Google Maps v2 API key to use when a Google Maps background layer is used.
- Scan GeoServer for data that hasn’t been added to the GeoNode yet, and ensure that each layer in the Django database is indexed in GeoNetwork
This Django app provides some HTTP proxies for accessing data from remote servers, to overcome restrictions imposed by the same-origin policy used by browsers. This helps the GeoExt applications in a GeoNode site to access various XML documents from OGC-compliant data services.
- This view forwards requests without authentication to a URL provided in the request, similar to the proxy.cgi script provided by the OpenLayers project.
- This view proxies requests to GeoServer. Instead of a URL-encoded URL parameter, the path component of the request is expected to be a path component for GeoServer. Requests to this URL require valid authentication against the Django site, and will use the GEOSERVER_CREDENTIALS and GEOSERVER_BASE_URL settings as defined in the maps application.