Skip to content

v0.2.49..v0.2.50 changeset CommandLineExamples.asciidoc

Garret Voltz edited this page Nov 6, 2019 · 1 revision
diff --git a/docs/user/CommandLineExamples.asciidoc b/docs/user/CommandLineExamples.asciidoc
index 9fa081d..d656aae 100644
--- a/docs/user/CommandLineExamples.asciidoc
+++ b/docs/user/CommandLineExamples.asciidoc
@@ -32,10 +32,27 @@ See the User Guide for more details on command usage.
     hoot conflate --differential input1.osm input2.osm output.osm
 -----
 
-===== Conflate only restaurants (see the User Guide Feature Filtering section for more filter examples):
+===== Conflate only buildings:
+
+-----
+    hoot conflate -D match.creators="hoot::BuildingMatchCreator" -D merger.creators="hoot::BuildingMergerCreator" \ 
+      input1.osm input2.osm output.osm
+-----
+
+===== Conflate only restaurant buildings:
+
+-----
+    hoot conflate -D match.creators="hoot::BuildingMatchCreator" -D merger.creators="hoot::BuildingMergerCreator" \ 
+      -D conflate.tag.filter="{ \"must\": [ { \"tag\": \"amenity=restaurant\" } ] }" \
+      input1.osm input2.osm output.osm
+-----
+
+===== Conflate only restaurant buildings with "Subway" in the name:
 
 -----
-    hoot conflate -D conflate.tag.filter="{ \"must\": [ { \"tag\": \"amenity=restaurant\" } ] }" \
+    hoot conflate -D match.creators="hoot::BuildingMatchCreator" -D merger.creators="hoot::BuildingMergerCreator" \ 
+      -D conflate.tag.filter="{ \"must\": [ { \"tag\": \"amenity=restaurant\" } ] }" \
+      -D conflate.pre.ops="hoot::TagCriterion" -D tag.criterion.kvps="name;Subway" \
       input1.osm input2.osm output.osm
 -----
 
@@ -60,28 +77,28 @@ See the User Guide for more details on command usage.
     hoot changeset-apply changeset.osc http://railsPortUrl --stats --progress
 -----
 
-===== Replace all features in a first dataset with overlapping features from a second dataset within a specified bounds:
+===== Create a changeset that replaces all features in a dataset with overlapping features from another dataset within a specified bounds:
 
 -----
     hoot changeset-derive-replacement -D changeset.user.id=1 input1.osm input2.osm "-71.4698,42.4866,-71.4657,42.4902" \
       output.osc
 -----
 
-===== Completely replace all features in a first dataset with features from a second dataset within a specified bounds:
+===== Create a changeset that completely replaces all features in a dataset with features from another dataset within a specified bounds:
 
 -----
     hoot changeset-derive-replacement -D changeset.user.id=1 input1.osm input2.osm "-71.4698,42.4866,-71.4657,42.4902" \
       output.osc --full-replacement
 -----
 
-===== Replace all buildings in a first dataset with overlapping buildings from a second dataset within a specified bounds:
+===== Create a changeset that replaces all buildings in a dataset with overlapping buildings from another dataset within a specified bounds:
 
 -----
     hoot changeset-derive-replacement -D changeset.user.id=1 input1.osm input2.osm "-71.4698,42.4866,-71.4657,42.4902" \
       output.osc -geometry-filters "hoot::BuildingCriterion"
 -----
 
-===== Completely replace all buildings in a first dataset with buildings from a second dataset within a specified bounds:
+===== Create a changeset that completely replaces all buildings in a dataset with buildings from another dataset within a specified bounds:
 
 -----
     hoot changeset-derive-replacement -D changeset.user.id=1 input1.osm input2.osm "-71.4698,42.4866,-71.4657,42.4902" \
@@ -374,14 +391,14 @@ See the User Guide for more details on command usage.
     hoot changeset-apply changeset.osc.sql osmapidb://username:password@localhost:5432/databaseName
 -----
 
-===== Replace all buildings and POIs in a first dataset with overlapping buildings and POIs from a second dataset within a specified bounds:
+===== Create a changeset that replaces all buildings and POIs in a dataset with overlapping buildings and POIs from another dataset within a specified bounds:
 
 -----
     hoot changeset-derive-replacement -D changeset.user.id=1 input1.osm input2.osm "-71.4698,42.4866,-71.4657,42.4902" \
       output.osc -geometry-filters "hoot::BuildingCriterion;hoot::PoiCriterion"
 -----
 
-===== Completely replace all POIs in a first dataset, except those with "Staunton" in the name, with schools from a second dataset within a specified bounds:
+===== Create a changeset that replaces all POIs in a dataset, except those with "Staunton" in the name, with schools from another dataset within a specified bounds:
 
 -----
     hoot changeset-derive-replacement input1.osm input2.osm "38,-105,39,-104" outputChangeset.osc \
@@ -391,7 +408,7 @@ See the User Guide for more details on command usage.
       --retainment-filter-options "tag.criterion.kvps='name=Staunton' --full-replacement
 -----
 
-===== Replace all POIs in a first dataset with overlapping cafes having "Java" in the name from a second dataset within a specified bounds:
+===== Create a changeset that replaces all POIs in a dataset with overlapping cafes having "Java" in the name from another dataset within a specified bounds:
 
 -----
     hoot changeset-derive-replacement -D changeset.user.id=1 input1.osm input2.osm \
@@ -674,6 +691,26 @@ hoot convert -D convert.ops="hoot::FindRailwayIntersectionsOp" input.osm output.
     hoot count -D tag.key.contains.criterion.text="phone" input.osm hoot::TagKeyContainsCriterion
 -----
 
+===== Count all features which have a name:
+
+-----
+    hoot count input.osm hoot::HasNameCriterion
+-----
+
+===== Count all features which have the name, "Old Town Tavern":
+
+-----
+    hoot count -D name.criterion.names="Old Town Tavern" -D name.criterion.case.sensitive=false \
+      input.osm hoot::NameCriterion
+-----
+
+===== Count all features whose name contains "subway":
+
+-----
+    hoot count -D name.contains.criterion.names="subway" -D name.contains.criterion.case.sensitive=false \
+      input.osm hoot::NameContainsCriterion
+-----
+
 ===== Calculate the area of all features in a map:
 
 -----
@@ -715,6 +752,12 @@ hoot convert -D convert.ops="hoot::FindRailwayIntersectionsOp" input.osm output.
       -D attribute.value.criterion.comparison.value="username" input.osm hoot::AttributeValueCriterion
 -----
 
+===== Calculate the average number of nodes for a set of buildings:
+
+-----
+hoot stat -D nodes.per.way.visitor.element.criterion=hoot::BuildingCriterion input.osm hoot::NodesPerWayVisitor average
+-----
+
 ===== Calculate the numerical average of all "accuracy" tags:
 
 -----
@@ -902,6 +945,30 @@ Requires language translation server installation.  See the Hootenanny Install G
     hoot info --formats --input-bounded
 -----
 
+===== List all input formats that support streamable reading:
+
+-----
+    hoot info --formats --input-streamable
+-----
+
+===== List all output formats that support streamable writing:
+
+-----
+    hoot info --formats --output-streamable
+-----
+
+===== List all input formats that Hootenanny uses OGR to read:
+
+-----
+    hoot info --formats --input --ogr
+-----
+
+===== List all output formats that Hootenanny uses OGR to write:
+
+-----
+    hoot info --formats --output --ogr
+-----
+
 ===== List all criteria that can be used to identify a feature's geometry type:
 
 -----
Clone this wiki locally