Skip to content

Instantly share code, notes, and snippets.

@echo off
rem nery[_at_]tecnico.ulisboa.pt v2014.01.16 [CC BY-NC-SA]
rem OBJETIVO: Converter de RST para DOCX utilizando o PANDOC.
rem Criar ficheiro de texto com o mesmo nome e extensão DOCX
rem PRE-REQUISITOS:
rem C:\Users\nery\AppData\Local\Pandoc\
rem --reference-docx=FILE
rem Use the specified file as a style reference in producing a docx file.
rem The following styles are used by pandoc: [paragraph] Normal, Compact, Title, Authors, Date, Heading 1, Heading 2, Heading 3, rem Heading 4, Heading 5, Block Quote, Definition Term, Definition, Body Text, Table Caption, Image Caption; [character] Default rem Paragraph Font, Body Text Char, Verbatim Char, Footnote Ref, Link.
@percursoaleatorio
percursoaleatorio / compressTIFS.bat
Last active December 15, 2015 16:59
GDAL batch file to compress TIFF orthophotos, and place CRS information into the file header.
@echo off
rem “compressTIFS.bat”
rem >> compressTIFS diretoria_input directoria_output
rem nery v2013.03
rem OBJETIVOS: Processar ortofotomapas
rem 1) integrar a informação de georreferenciação do ficheiro TFW no header do ficheiro GeoTiff;
rem 2) forçar a atribuição e escrita da informação sobre o sistema EPSG 3763 (PT-TM06) no header do ficheiro GeoTiff
rem 3) marcar a inexistência de um canal alpha na imagem (requer GDAL 20DEV)
rem 4) comprimir o ficheiro resultante com compressão DEFLATE e utilizando o algoritmo de predição adequado para imagens de satélite ou fotografias aéreas
#!/usr/bin/env python
#buffer.py
import sys
import os
from osgeo import ogr
def buffer(infile,outfile,buffdist):
try:
ds_in=ogr.Open( infile )
lyr_in=ds_in.GetLayer( 0 )
#
# script to register Python 2.0 or later for use with win32all
# and other extensions that require Python registry settings
# written by Joakim Loew for Secret Labs AB / PythonWare
#
# source:
# http://www.pythonware.com/products/works/articles/regpy20.htm
#
# modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html
#!/usr/bin/env python
#******************************************************************************
# $Id: gdal2tiles.py 19288 2010-04-02 18:36:17Z rouault $
#
# Project: Google Summer of Code 2007, 2008 (http://code.google.com/soc/)
# Support: BRGM (http://www.brgm.fr)
# Purpose: Convert a raster into TMS (Tile Map Service) tiles in a directory.
# - generate Google Earth metadata (KML SuperOverlay)
# - generate simple HTML viewer based on Google Maps and OpenLayers
# - support of global tiles (Spherical Mercator) for compatibility
@percursoaleatorio
percursoaleatorio / wubi.rst
Last active December 15, 2015 20:41
WUBI
Author

nery

Copyright

CC BY-NC-SA 2.0 <http://creativecommons.org/licenses/by-nc-sa/2.0/>

Date

$Date: 2013-04 $

Revision

$Revision: 2014.01.08 $

Description

Ubuntu 12.04LTS Precise Pangolin | Ubuntu 13.10 Saucy Salamander - Notas sobre a Instalação em Windows (WUBI), instalação de programas de escritório eletrónico, sistemas de informação geográfica e outras aplicações úteis ao dia-a-dia...

Introdução

Versões de Ubuntu

@percursoaleatorio
percursoaleatorio / Bitnami-Stack-for-Limesurvey.rst
Last active December 24, 2015 23:29
LimeSurvey - my notes on Bitnami-Stack for LimeSurvey.

Bitnami Limesurvey

  1. Update Virtual Box if necessary. Install the most recent Virtual Box Extension Pack.
  2. Download the VM from http://bitnami.com/stack/limesurvey. Unzip...
  3. Create a new VirtualBox VM
#####################################
# Reportnet: Data flows #
# http://cr.eionet.europa.eu/sparql #
#####################################
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rod: <http://rod.eionet.europa.eu/schema.rdf#>
PREFIX obl: <http://rod.eionet.europa.eu/obligations/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
(: Suppose that validate-record is a function that checks a single record.
It receives the sequence of records to be validated and the position of the specific record to validate.
It returns a sequence.
If the recork is OK, then the returned sequence is empty.
If the recork is not OK, then the returned sequence contains a single element with the validation result.
Something like... :)
declare function validate-record($records as element()+, $position as xs:integer) as element()?
{ (: Whatever you need to do the check the record in that position.
Return an empty sequence if the record is ok.