Skip to content

Commit

Permalink
setup.py working now
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Jun 9, 2013
1 parent 4abc29e commit 67485e4
Show file tree
Hide file tree
Showing 37 changed files with 287 additions and 268 deletions.
8 changes: 7 additions & 1 deletion CREDITS.txt
Expand Up @@ -5,5 +5,11 @@ Stetl is written by:

* Just van den Broecke (http://www.justobjects.nl)

Stetl would not be possible without the great work of Frank Warmerdam and other
This project would not be possible without the great work of Frank Warmerdam and other
GDAL/OGR developers (http://gdal.org).

Plus the people that brought Python, PostGIS (like Paul Ramsey), lxml and the libs
like GEOS, Proj, libxml2 and libxslt.

We are mainly standing on the shoulders of these giants.

File renamed without changes.
7 changes: 1 addition & 6 deletions README.md
@@ -1,6 +1,5 @@
Stetl, streaming ETL, pronounced "staedl", is a lightweight ETL-framework for the conversion of rich (as GML)
geospatial data conversion. Stetl is Open Source (GNU GPL v3).
(Stetl used to be called sETL but this was colliding with the SET Language or SETL).

The main website and documentation can be found on http://stetl.org (or http://stetl.readthedocs.org).
Read a 5-minute introduction here: http://www.slideshare.net/justb4/5-minute-intro-to-setl and a longer presentation
Expand All @@ -14,14 +13,10 @@ and IMKAD/BRK (Cadastral Data) it has now a repo of its own.

Stetl basically glues together existing parsing and transformation tools like GDAL/OGR (ogr2ogr) and XSLT.
By using native tools like libxml and libxslt (via Python lxml) Stetl is speed-optimized.
There are offcourse existing Open Source ETL tools like GeoKettle and Talend Geospatial, but
in many cases a simpler/bulk ETL is required.

So why en when to use Stetl.

* when ogr2ogr or XSLT alone cannot do the job
* when GeoKettle/Talend is too heavy/complex
* when FME is too expensive, too closed and/or too slow ;-)
* when having to deal with complex GML as source or destination

So Stetl is in particularly useful for INSPIRE-related transformations and other complex GML-related ETL.
Expand All @@ -43,7 +38,7 @@ For example: using the OgrPostgisInput module an GML stream can be generated fro
A component called the GmlSplitter can split this stream into managable chunks (like 20000 features)
and feed this upstream into the ETL chain.

More to follow...see some examples under the examples dir.
See examples under the examples dir.

Another example in http://code.google.com/p/inspire-foss/source/browse/trunk/etl/NL.Kadaster/Addresses
(Dutch Addresses (BAG) to INSPIRE Addresses)
Expand Down
18 changes: 4 additions & 14 deletions bin/stetl
Expand Up @@ -5,34 +5,24 @@
#
# Author: Just van den Broecke
#
from stetl.main import parse_args
from stetl.etl import ETL
from stetl.util import Util
import argparse #apt-get install python-argparse

log = Util.get_log('main')


def main():
"""The `main` function, to be called from commandline, like `python src/main.py -c etl.cfg`.
"""The Stetl `main` program, to be called from commandline, like `stetl -c etl.cfg`.
Args:
-c --config <config_file> the Stetl config file.
-s --section <section_name> the section in the Stetl config (ini) file to execute (default is [etl]).
-a --args <arglist> substitutable args for symbolic, {arg}, values in Stetl config file, in format "arg1=foo arg2=bar" etc.
"""

argparser = argparse.ArgumentParser(description='Invoke stETL')
argparser.add_argument('-c ', '--config', type=str, help='ETL config file in .ini format', dest='config_file',
required=True)

argparser.add_argument('-a ', '--args', type=str,
help='Arguments to be substituted for {argN}s in config file, as "arg1=foo arg2=bar" etc',
dest='config_args', required=False)
args = argparser.parse_args()

if args.config_args:
# Convert string to dict: http://stackoverflow.com/a/1248990
args.config_args = Util.string_to_dict(args.config_args)
args = parse_args()

# Do the ETL
etl = ETL(vars(args), args.config_args)
Expand Down
2 changes: 1 addition & 1 deletion examples/basics/1_copystd/etl.sh
Expand Up @@ -4,5 +4,5 @@
#
# Shortcut to call stETL main.py with etl config.
#
python ../../../stetl/main.py -c etl.cfg
stetl -c etl.cfg

2 changes: 1 addition & 1 deletion examples/basics/2_xslt/etl.sh
Expand Up @@ -4,6 +4,6 @@
#
# Author: Just van den Broecke
#
python ../../../stetl/main.py -c etl.cfg
stetl -c etl.cfg


2 changes: 1 addition & 1 deletion examples/basics/3_shape/etl.sh
Expand Up @@ -5,6 +5,6 @@
# Author: Just van den Broecke
#
rm -rf output/* temp/*
python ../../../stetl/main.py -c etl.cfg
stetl -c etl.cfg


2 changes: 1 addition & 1 deletion examples/basics/4_validate/etl.sh
Expand Up @@ -4,6 +4,6 @@
#
# Author: Just van den Broecke
#
python ../../../stetl/main.py -c etl.cfg
stetl -c etl.cfg


2 changes: 1 addition & 1 deletion examples/basics/5_split/etl.sh
Expand Up @@ -4,6 +4,6 @@
#
# Author: Just van den Broecke
#
python ../../../stetl/main.py -c etl.cfg
stetl -c etl.cfg


2 changes: 1 addition & 1 deletion examples/basics/6_cmdargs/etl.sh
Expand Up @@ -4,6 +4,6 @@
#
# Author: Just van den Broecke
#
python ../../../stetl/main.py -c etl.cfg -a "in_xml=input/cities.xml in_xsl=cities2gml.xsl out_xml=output/gmlcities.gml"
stetl -c etl.cfg -a "in_xml=input/cities.xml in_xsl=cities2gml.xsl out_xml=output/gmlcities.gml"


2 changes: 1 addition & 1 deletion examples/basics/7_mycomponent/etl.sh
Expand Up @@ -5,5 +5,5 @@
# Shortcut to call stETL main.py with etl config.
#

python ../../../stetl/main.py -c etl.cfg
stetl -c etl.cfg

6 changes: 3 additions & 3 deletions examples/basics/7_mycomponent/my/myfilter.py
Expand Up @@ -4,9 +4,9 @@
#
# Author:Just van den Broecke

from util import Util
from filter import Filter
from packet import FORMAT
from stetl.util import Util
from stetl.filter import Filter
from stetl.packet import FORMAT

log = Util.get_log("myfilter")

Expand Down
2 changes: 1 addition & 1 deletion examples/basics/8_wfs/etl.sh
Expand Up @@ -4,5 +4,5 @@
#
# Shortcut to call stETL main.py with etl config.
#
python ../../../stetl/main.py -c etl.cfg
stetl -c etl.cfg

0 comments on commit 67485e4

Please sign in to comment.