Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Geo Tools
Commits
ff50a3f5
Commit
ff50a3f5
authored
Jun 01, 2016
by
Matija Obreza
Browse files
README updated
parent
6cd9012d
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
ff50a3f5
Geo Tools
=========
Executing the default main class without additional arguments renders the program
options:
$ java -jar genesys-geo-tools-0.1-SNAPSHOT.jar
Usage: java -Djava.awt.headless=true -jar geo-tools.jar country|landorsea [options] <inputFile> <outputFile>
Options:
<inputFile> File name or - to read CSV from STDIN
<outputFile> File name or - to write CSV to STDOUT
-v Increase log level.
-v Increase log level.
-csv ',"\' Set input CSV separator, quote and escape chars
The program writes log messages to STDERR.
## Running LandOrSea ##
Obtain the genesys-geo-tools-0.1-SNAPSHOT.jar file from the Downloads section or build from source code.
Prepare a CSV file with columns
`DECLATITUDE`
,
`DECLONGITUDE`
. The
program will test the geographic coordinates against the oceans and water data
and report the result in the column
`LANDorSEA_check`
.
### Obtaining base data
Download the two "large split polygons" shapefiles in WGS84 projection from:
...
...
@@ -21,17 +41,26 @@ as the jar file of this application. You should now have three files in this dir
data/land...
data/water_polygons.shp
data/water...
landorsea
.jar
genesys-geo-tools-0.1-SNAPSHOT
.jar
### Running the program
JAI library creates an AWT window. Run in headless mode:
JAI library creates an AWT window. Run
the
*Land or Sea*
test
in headless mode:
java -Djava.awt.headless=true -jar ge
nesys-geo-tools-0.1-SNAPSHOT.jar
java -Djava.awt.headless=true -jar ge
o-tools.jar landorsea [options] <inputFile> <outputFile>
Test.
## Validating Country of Origin ##
Prepare a CSV file with columns
`DECLATITUDE`
,
`DECLONGITUDE`
. The
program will test the geographic coordinates against the country borders and
report the country ISO3 code in
`ORIGCTY_check`
.
When the input CSV includes
`ORIGCTY`
, the program will validate the reported
country against the one identified and report
**OK**
when they match.
### Country borders
Download two distinct shapefiles with country borders:
*
http://thematicmapping.org/downloads/world_borders.php (TM_WORLD_BORDERS-0.3)
...
...
@@ -44,13 +73,15 @@ Unpack the zip archives and drop the data into the `data/` folder. The applicati
The
`TM_WORLD_BORDERS`
data is used for initial matching. Any mismatch will then be looked up in the
very detailed
`GADM0`
and
`GADM1`
layers.
### Running the program
java -Djava.awt.headless=true -jar geo-tools.jar country [options] <inputFile> <outputFile>
## Features ##
*
Accepts CSV as input, produces CSV output
## TODO List ##
*
Generate HTML report
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment