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
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> | |
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" service="CSW" version="2.0.2" resultType="results" startPosition="1" maxRecords="5" outputFormat="application/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd" xmlns:gml="http://www.opengis.net/gml" xmlns:gmd="http://www.isotc211.org/2005/gmd" outputSchema="http://www.isotc211.org/2005/gmd"> | |
<csw:Query typeNames="gmd:MD_Metadata"> | |
<csw:ElementSetName>brief</csw:ElementSetName> | |
<csw:Constraint version="1.1.0"> | |
<ogc:Filter> | |
<ogc:PropertyIsEqualTo> | |
<ogc:PropertyName>apiso:TopicCategory</ogc:PropertyName> | |
<ogc:Literal>imageryBaseMapsEarthCover</ogc:Literal> | |
</ogc:PropertyIsEqualTo> |
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
def update_metadata(layer_uuid, xml, saved_layer): | |
"""Update metadata XML document with GeoNode specific values""" | |
# check if document is XML | |
try: | |
exml = etree.fromstring(xml) | |
except Exception, err: | |
raise GeoNodeException('Uploaded XML document is not XML: %s' % str(err)) | |
# check if document is an accepted XML metadata format | |
try: | |
tagname = exml.tag.split('}')[1] |
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
Install Dependencies: | |
- Python (2.7 series) | |
- http://python.org/download/ | |
Install Package Management Tools | |
- download http://python-distribute.org/distribute_setup.py | |
- C:\python27\python.exe distribute_setup.py | |
Install Virtual Environment | |
- C:\python27\scripts\easy_install.exe virtualenv |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Record | |
xmlns="http://www.opengis.net/cat/csw/2.0.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/record.xsd"> | |
<dc:identifier>123</dc:identifier> | |
<dc:title>My Impact function calculation</dc:title> | |
<dct:modified>2013-07-23T11:01:41Z</dct:modified> | |
<dct:abstract>This is my impact function description</dct:abstract> | |
<dc:type>model</dc:type> | |
<dc:subject>impact</dc:subject> | |
<dc:subject>function</dc:subject> |
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
import sys | |
import csv | |
from slugify import slugify | |
with open('posts.csv') as csvfile: | |
for row in csv.reader(csvfile): | |
slug = '%s-%s' % (row[0], slugify(unicode(row[1]))) | |
content = '''--- | |
layout: default | |
title: %s |
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
# -*- coding: utf-8 -*- | |
#------------------------------------------------------------------------------- | |
# Portions coming from EOxServer | |
# ( https://github.com/EOxServer/eoxserver/blob/master/eoxserver/services/testbase.py ) | |
# Copyright (C) 2011 EOX IT Services GmbH | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
#!/bin/sh | |
WMO_SYMBOLS_DIR=build/WorldWeatherSymbols | |
if [ ! -d $WMO_SYMBOLS_DIR ]; then | |
echo "Downloading WMO World Weather Symbols" | |
git clone https://github.com/OGCMetOceanDWG/WorldWeatherSymbols.git $WMO_SYMBOLS_DIR | |
echo "Converting all symbols to PNG" | |
$WMO_SYMBOLS_DIR/scripts/wws_manage.sh png |
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
# test to exemplify CKAN API issue of false positive harvested objects | |
# Example invocation: | |
# python test_ckan_harvest_objects.py https://data.noaa.gov 1c7cb5dd-f2ca-4aad-b971-af251c1acf4d | |
import sys | |
from urllib2 import urlopen | |
import requests | |
if len(sys.argv) < 3: |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows"> | |
<rdf:Description rdf:about="{{ record.identifier }}"> | |
<dc:identifier>{{ record.identifier }}</dc:identifier> | |
<dc:title>{{ record.title }}</dc:title> | |
<dc:type>{{ record.type }}</dc:type> | |
<dc:format>{{ record.format }}</dc:format> | |
<dc:description>{{ record.description }}</dc:description> | |
<dct:abstract>{{ record.abstract }}</dct:abstract> | |
<dct:modified>{{ record.modified }}</dct:modified> |
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
# scan a directory of ISO metadata files | |
# and generate a keyword frequency count | |
from glob import glob | |
import os | |
from pprint import pprint | |
import sys | |
from lxml import etree |
OlderNewer