Skip to content

Instantly share code, notes, and snippets.

@tomkralidis
tomkralidis / gdal-netcdf-issues.md
Created December 10, 2015 17:25
GDAL NetCDF issues

GDAL NetCDF Issues

GDAL has some limitation concerning the reading of netCDF4 files.

Most of the tests were done on a personal computer using QGIS 2.12.1 and GDAL 1.11.3.

  • Gdal can't read correctly netCDF lat/long values if there is not an exact spacing between points (pixel). For example: use a exact spacing of 0.2 degrees.
  • Gdal reads misplaced lat/long grid in netCDF4 files. It reads 0 to 360 degrees instead of -180 to 180 degrees. But I think that this can be solved setting a parameter (pm=-180 or pm=180) in projection definition in QGIS or MapServer.
  • Gdal displays netCDF files upside down: http://lagerratrobe.blogspot.ca/2009/02/upside-down-netcdf-created-with-gdal.html
  • Gdal can't detect if data are wrtitten bottom up or bottom down, so when reading netCDF files, to get statistics and pixel values we must change a configuration of Gdal.
@tomkralidis
tomkralidis / qgis-metadata-strategy.md
Last active April 14, 2022 09:51
QGIS Metadata Strategy

QGIS Metadata Strategy

  • Date 2015/11/17
  • Author Tom Kralidis
  • Contact tomkralidis at gmail dot com
  • Last Edited 2015/11/17
  • Status Draft
  • Version QGIS 3.x

Overview

@tomkralidis
tomkralidis / README.md
Last active February 9, 2016 09:27
Simple Pythonic Wrapper to INSPIRE Metadata Validation Service
@tomkralidis
tomkralidis / 00README.md
Last active August 29, 2015 14:22
OGC CITE setup / orchestration

CITE CSW helper script

  • automates building of CSW 3.0.0, CSW 2.0.2 and teamengine packages
  • set the MAVEN variable accordingly in build-cite-csw.sh
@tomkralidis
tomkralidis / ogc-csw3-specification-cr-list.md
Last active August 29, 2015 14:20
OGC CSW3 specification change request items

OGC CSW 3.0.0 specification change request items

  1. fix typo in examples (2015-05-11)
sed 's/FedeartedCatalogues/FederatedCatalogues/g' http://pvretano.com/schemas/csw/3.0/examples/Capabilities.xml
sed 's/FedeartedCatalogues/FederatedCatalogues/g' http://test.schemas.opengis.net/csw/3.0/examples/Capabilities.xml
  1. pre 2.9 versions of libxml2 (or dervied bindings) fail to validate XML Schemas. Options:
@tomkralidis
tomkralidis / download-csw-metadata.py
Last active August 29, 2015 14:20
Download CSW metadata
import sys
from owslib.csw import CatalogueServiceWeb
if len(sys.argv) < 3:
print 'Usage: %s <csw-endpoint> <max-records>'
sys.exit(1)
URL = sys.argv[1]
MAXRECORDS = sys.argv[2] or 10
@tomkralidis
tomkralidis / harvest-csw.py
Last active April 6, 2016 14:13
simple CSW metadata download design pattern
# -*- coding: utf-8 -*-
# =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2016 Tom Kralidis
#
# 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
@tomkralidis
tomkralidis / 00README.txt
Last active August 29, 2015 14:10
metador2 repository plugin ideas
Copy https://github.com/geopython/pycsw/blob/master/pycsw/repository.py to https://github.com/geopython/pycsw/blob/master/pycsw/plugins/repository/metador2/metador2.py and edit the insert/update/delete functions accordingly.
@tomkralidis
tomkralidis / csw-harvest-with-filter.xml
Created November 11, 2014 02:07
harvest with filter example
<?xml version="1.0" encoding="UTF-8"?>
<Harvest xmlns="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" 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-publication.xsd" service="CSW" version="2.0.2">
<Source>http://demo.pycsw.org/cite/csw</Source>
<ResourceType>http://www.opengis.net/cat/csw/2.0.2</ResourceType>
<ResourceFormat>application/xml</ResourceFormat>
<Constraint version="1.1.0">
<ogc:Filter>
<ogc:BBOX>
<ogc:PropertyName>ows:BoundingBox</ogc:PropertyName>
<gml:Envelope>