<commit_before>===============================
Geotools Geodata Exporting Tool
===============================

Transfers all geodata from a source database to a target database. Supported formats are:

* PostGIS
* Spatialite
* H2
* Oracle Spatial (not tested, needs ojdbc7.jar from Oracle)
* A shapefile or directory of shapefiles


Get the code and compile
========================

Requires git, maven and Java 7.

::

	git clone <EMAIL>:oscarfonts/gt-exporter.git
	cd gt-exporter
	mvn package dependency:copy-dependencies


Run from command line
=====================

::

	java -cp "\*:dependency/*" co.geomati.geotools.Exporter [--crs <crs_code>] <source> <target>

Or via the helper ``run.sh`` script::

	./run.sh [--crs <crs_code>] <source> <target>

Where:

* <source> is a shapefile, a directory of shapefiles, or a properties file defining a database connection to read the data from.
* <target> is a shapefile, a directory of shapefiles, or a properties file defining a database connection copy the data to.
* <crs_code> is an optional CRS that will be assigned to target datasets, ignoring any detected source CRS. Please note that no reprojection is performed.

.. note:: The -cp classpath option indicates two directories separated by ":". On windows, this separator character is a ";".


Examples::

	java -cp "\*:dependency/*" co.geomati.geotools.Exporter --crs EPSG:23031 /a/directory/of/shapefiles/ spatialite.properties
	java -cp "\*:dependency/*" co.geomati.geotools.Exporter oracle.properties postgis.properties

.. warning:: The's no way to indicate which tables to be copied; the converter will copy over **all** the available geodata tables in a particular connection (or directory of shapefiles).


Properties file connection parameters
=====================================

PostGIS
-------

============== ======================================================
Parameter      Description
============== ======================================================
"dbtype"       Must be the string "postgis"
"host"         Machine name or IP address to connect to
"port"         Port number to connect to
"database"     The database to connect to
"schema"       The database schema to access (optional if DB default)
"user"         User name
"passwd"       Password
============== ======================================================

Example ``postgis.properties``::

	dbtype=postgis<commit_msg>literals need no scaping<commit_after>===============================
Geotools Geodata Exporting Tool
===============================

Transfers all geodata from a source database to a target database. Supported formats are:

* PostGIS
* Spatialite
* H2
* Oracle Spatial (not tested, needs ojdbc7.jar from Oracle)
* A shapefile or directory of shapefiles


Get the code and compile
========================

Requires git, maven and Java 7.

::

	git clone git@github.com:oscarfonts/gt-exporter.git
	cd gt-exporter
	mvn package dependency:copy-dependencies


Run from command line
=====================

::

	java -cp "*:dependency/*" co.geomati.geotools.Exporter [--crs <crs_code>] <source> <target>

Or via the helper ``run.sh`` script::

	./run.sh [--crs <crs_code>] <source> <target>

Where:

* <source> is a shapefile, a directory of shapefiles, or a properties file defining a database connection to read the data from.
* <target> is a shapefile, a directory of shapefiles, or a properties file defining a database connection copy the data to.
* <crs_code> is an optional CRS that will be assigned to target datasets, ignoring any detected source CRS. Please note that no reprojection is performed.

.. note:: The -cp classpath option indicates two directories separated by ":". On windows, this separator character is a ";".


Examples::

	java -cp "*:dependency/*" co.geomati.geotools.Exporter --crs EPSG:23031 /a/directory/of/shapefiles/ spatialite.properties
	java -cp "*:dependency/*" co.geomati.geotools.Exporter oracle.properties postgis.properties

.. warning:: The's no way to indicate which tables to be copied; the converter will copy over **all** the available geodata tables in a particular connection (or directory of shapefiles).


Properties file connection parameters
=====================================

PostGIS
-------

============== ======================================================
Parameter      Description
============== ======================================================
"dbtype"       Must be the string "postgis"
"host"         Machine name or IP address to connect to
"port"         Port number to connect to
"database"     The database to connect to
"schema"       The database schema to access (optional if DB default)
"user"         User name
"passwd"       Password
============== ======================================================

Example ``postgis.properties``::

	dbtype=postgis
{'fraction_non_alphanumeric': 0.21853759011328527, 'fraction_numerical': 0.0032955715756951597, 'mean_word_length': 4.633410672853828, 'pattern_counts': {'":': 2, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1908148', 'n_tokens_mistral': 1372, 'n_tokens_neox': 1234, 'n_words': 516}