curl http://landsat-pds.s3.amazonaws.com/c1/L8/scene_list.gz | gunzip > /tmp/scene_list
# download 1000 random JSON scene metadata
python landsat8-aws-es.py fetch /tmp/scene_list
# publish the JSON scene metadata in current directory as STAC records to an ES index
python landsat8-aws-es.py load ./Example of MetPX plugin integration in a Python 3 virtualenv.
python3 -m venv bulletins_es_test
cd bulletins_es_test
. bin/activate
pip install elasticsearch
sr_subscribe --version # Version 2.18.11b6
sr_subscribe bulletins.conf foreground
This file contains hidden or 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 unicodecsv as csv | |
| import sys | |
| import polib | |
| def po2csv(po_file): | |
| po = polib.pofile(po_file) | |
| with open('messages.csv', 'wb') as csvfile: | |
| writer = csv.writer(csvfile) |
This file contains hidden or 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 | |
| # /etc/init.d/pygeoapi | |
| PROGRAMNAME=pygeoapi | |
| check_service() { | |
| ps cax | grep $PROGRAMNAME > /dev/null | |
| if [ $? -eq 0 ]; then | |
| return 0 | |
| else |
This file contains hidden or 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
| # load https://aws.amazon.com/public-datasets/landsat/ scene_list into ES index | |
| import csv | |
| from datetime import datetime | |
| import json | |
| from elasticsearch import Elasticsearch | |
| index_name = 'landsat-aws' | |
| type_name = 'FeatureCollection' |
Minimal exmaple as per http://osgeo-org.1560.x6.nabble.com/Use-extra-columns-in-pycsw-admin-setup-db-td5323610.html
# ensure column exists in database table
This file contains hidden or 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"?> | |
| <che:CHE_MD_Metadata xmlns:che="http://www.geocat.ch/2008/che" xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:geonet="http://www.fao.org/geonetwork" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" gco:isoType="gmd:MD_Metadata" xsi:schemaLocation="http://www.geocat.ch/2008/che http://www.isotc211.org/2005/gmd http://www.isotc211.org/2005/gmd/gmd.xsd http://www.isotc211.org/2005/srv http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd"> | |
| <gmd:fileIdentifier> | |
| <gco:CharacterString>8698bf0b-fceb-4f0f-989b-111e7c4af0a4</gco:CharacterString> | |
| </gmd:fileIdentifier> | |
| <gmd:language xmlns:comp="http://www.geocat.ch/2003/05/gateway/GM03Comprehensive" xmlns:xalan="http://xml.apache.org/xalan"> | |
| <gco:CharacterString>ger</gco:CharacterString> | |
| </gmd:language> | |
| <gmd:characterSet xmlns:comp="http://www.geocat.ch/2003/05/gateway/GM03Co |
This file contains hidden or 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 -*- | |
| # set pycsw configuration like: | |
| # [repository] | |
| # source=ogr_repository.OGRRepository | |
| from pycsw.core.repository import Repository | |
| class OGRRepository(Repository): | |
| ''' Class to interact with underlying repository ''' |
This file contains hidden or 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"?> | |
| <GetRecords | |
| service="CSW" | |
| version="3.0.0" | |
| maxRecords="5" | |
| startPosition="1" | |
| outputFormat="application/xml" | |
| outputSchema="http://www.opengis.net/cat/csw/3.0" | |
| xmlns="http://www.opengis.net/cat/csw/3.0" | |
| xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" |
Please post questions to the $PROJECT mailing list.
$PROJECT's GitHub issues are for software bugs/enhancements and related tasks.