Management Commands for GeoNode¶
GeoNode comes with administrative commands to help with day to day tasks.
Below is the list of the ones that come from the GeoNode application, the full list can be obtained by doing:
geonode help
importlayers¶
Imports a file or folder with geospatial files to GeoNode.
It supports data in Shapefile and GeoTiff format. It also picks up the styles if a .sld file is present.
Usage:
geonode importlayers <data_dir>
Additional options:
--user=USER Name of the user account which should own the imported
layers
--keywords=KEYWORDS The default keywords for the imported layer(s). Will
be the same for all imported layers if multiple
imports are done in one command
updatelayers¶
Update the GeoNode application with data from GeoServer.
This is useful to add data in formats that are not supported in GeoNode by default, and for example to link it it to ArcSDE datastores. The updatelayers command provides several options that can be used to control how layer information is read from GeoServer and updated in GeoNode. Refer to ‘Additional Options’.
Usage:
geonode updatelayers
Additional options:
--ignore-errors Do not stop if errors are encountered.
--skip-unadvertised Skip processing any layers that are marked 'advertised=False' in GeoServer
--skip-geonode-registered Just processing GeoServer layers still not registered in GeoNode.
Useful if you are importing layers through GeoServer and not through GeoNode
and you don't want to run updatelayers on every GeoServer layer but just on the new ones.
--remove-deleted Remove layers from GeoNode that have been deleted (or marked unavailable) from GeoServer.
Note: this option can be combined with --workspace and --store to only check
for deleted layers in a particular workspace or store.
It can also be combined with --skip-unadvertised, in which case any layers marked
'advertised=False' will be removed from GeoNode
Also, --remove-deleted does not consider the --filter parameter in determining
GeoServer layers to be deleted. When --filter is combined with --remove-deleted, the
filter will be applied to layers to update, but layers that do not match the filter will
not be marked for deletion from GeoNode.
-u
--user Name of the GeoNode user account that should own the imported layers.
-f
--filter Only update layers from GeoServer that match the given filter prefix.
-s
--store Only update layers for the given GeoServer store name.
-w
--workspace Only update layers for the given GeoServer workspace name.
emit_notices¶
Sends email notices, for example after layers have been uploaded.
It should be configured as a cronjob, running for example every 5 minutes, otherwise the notices will be created (available in the system) but not sent. It requires the email gateway to be set correctly.
Usage:
geonode emit_notices
fixsitename¶
Uses SITENAME and SITEURL to set the values of the default site object.
This information is used in the page titles and when sending emails from GeoNode, for example, new registrations.
Usage:
geonode fixsitename