Created
April 10, 2012 15:33
-
-
Save ischneider/2352168 to your computer and use it in GitHub Desktop.
finding nativeName of geoserver resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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