Skip to content

Instantly share code, notes, and snippets.

@ischneider
Created April 10, 2012 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ischneider/2352168 to your computer and use it in GitHub Desktop.
Save ischneider/2352168 to your computer and use it in GitHub Desktop.
finding nativeName of geoserver resource
cat = Layer.objects.gs_catalog
for l in Layer.objects.all():
gsl = cat.get_layer(l.name)
# always returns a copy, so hold on to it
res = gsl.resource
res.fetch()
name = res.dom.find('nativeName').text
print l.name, name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment