From cfa86c6699ac24aa1db5e18c194a635abf9ad8d4 Mon Sep 17 00:00:00 2001 From: Nicholas Hallahan Date: Fri, 11 May 2018 14:44:42 -0700 Subject: [PATCH] Update README and gradlew (#43) * Update README to explain that you need to put in a PBF in data. * update gradlew wrapper and say to use that in instructions --- .gitignore | 1 + README.md | 5 +++-- docs/dev.md | 6 +++--- docs/standalone.md | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 2f5795517..d5be5682d 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ **/out/ /bin/ **/ignored/ +/data/*.pbf diff --git a/README.md b/README.md index 642eafe23..c0d7a9c69 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,10 @@ To run Atlas Checks the following is required: To start working with Checks follow the steps below: 1. Clone Atlas Checks project using following command `git clone https://github.com/osmlab/atlas-checks.git` 2. Switch to newly created directory: `cd atlas-checks` -3. Execute `gradle run` +3. Download an OSM PBF file and place it in the `/data/` directory. +3. Execute `./gradlew run` -This command will build and run Atlas Checks with all the default options against the country Anguilla. GeoJSON output will be be produced that contains all the results found from the run. For more information on running Atlas Checks as a standalone application click [here](docs/standalone.md). +This command will build and run Atlas Checks with all the default options against OSM PBF that you put in the data directory.. GeoJSON output will be be produced that contains all the results found from the run. Those outputs will be found in `/build/geojson/`. For more information on running Atlas Checks as a standalone application click [here](docs/standalone.md). ## Working with Configuration See [configuration docs](docs/configuration.md) for more information about the configuration files that can be used to define specific details around the Atlas Checks application. diff --git a/docs/dev.md b/docs/dev.md index 53024bae3..00e7f714d 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -20,13 +20,13 @@ There are a couple of requirements for building and running a new Atlas Check. T ### Building Check Template Building a check template is as easy as running a very basic command using gradle: -`gradle buildCheck -PCheckName=CheckName` +`./gradlew buildCheck -PCheckName=CheckName` The value "CheckName" can and should be changed with whatever represents the check that you are planning to write more clearly. So if you are writing a check to make sure that any areas tagged as pools are not larger than a certain maximum or smaller than a certain minimum, then we might call that check "PoolSizeCheck", and would be done like so: -`gradle buildCheck -PCheckName=PoolSizeCheck` +`./gradlew buildCheck -PCheckName=PoolSizeCheck` This command would be required to be run inside the Atlas-Checks root folder, and would provide the following updates: - Creates new file src/main/java/org/openstreetmap/atlas/checks/validation/PoolSizeCheck @@ -142,7 +142,7 @@ all the configuration values for the system and the checks themselves. For more #### Results To execute our check(s), we simply need to run the following gradle command: -`gradle run` +`./gradlew run` This will execute our flag using the default configuration. For executing with advanced properties see [Atlas Checks Standalone Application](standalone.md). diff --git a/docs/standalone.md b/docs/standalone.md index d7d96487b..7c2a550a0 100644 --- a/docs/standalone.md +++ b/docs/standalone.md @@ -18,7 +18,7 @@ Gradle will look inside this folder [data/](../data/) for any atlas or PBF files Atlas Checks allows you to run the checks against PBF files. If you have downloaded a PBF file you can simply place the PBF in the [data/](../data/) directory and execute -`gradle run` +`./gradlew run` If you want to supply a location to a remote PBF you can use a project property in Gradle to set the PBF location and execute @@ -33,7 +33,7 @@ area allows Atlas Checks to complete faster, or simply for focus. Like running a the PBF file using either a URL location or a local file, but in this case you would include the bounding box as well. -`gradle run -Pchecks.local.input=https://download.geofabrik.de/africa/south-africa-latest.osm.pbf -Pchecks.local.pbfBoundingBox=lat,lon:lat,lon` +`./gradlew run -Pchecks.local.input=https://download.geofabrik.de/africa/south-africa-latest.osm.pbf -Pchecks.local.pbfBoundingBox=lat,lon:lat,lon` In the above case you would replace lat,lon:lat,lon with the actual bounds of your box. @@ -44,7 +44,7 @@ execute the checks over the Atlas file. Ordinarily the Atlas file will simply be then garbage collected once we are finished with it. However it may be useful to save the Atlas for later usage, you can do this by adding the `savePbfAtlas` flag to your gradle command, like so: -`gradle run -Pchecks.local.savePbfAtlas=true` +`./gradlew run -Pchecks.local.savePbfAtlas=true` #### Output File Formats @@ -60,7 +60,7 @@ GeometryCollection within a GeoJson Feature that has aggregate information withi By default, all output formats are enabled. This can be changed by setting the `outputFormat` flag to a comma-separated list' of desired formats, like so: -`gradle run -Pchecks.local.outputFormats=geojson,metrics` +`./gradlew run -Pchecks.local.outputFormats=geojson,metrics` #### Publish directly to MapRoulette diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 16135d4bd..f3631249d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Aug 07 14:37:03 PDT 2017 +#Thu May 10 08:52:16 PDT 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip