README
¶
intersects
Perform an intersects operation (as in intersecting geometries) for an input geometry and on a set of Who's on First records stored in a spatial database.
$> ./bin/intersects -h
Perform an intersects operation (as in intersecting geometries) for an input geometry and on a set of Who's on First records stored in a spatial database.
Usage:
./bin/intersects [options]
Valid options are:
-alternate-geometry value
One or more alternate geometry labels (wof:alt_label) values to filter results by.
-cessation string
A valid EDTF date string.
-custom-placetypes string
A JSON-encoded string containing custom placetypes defined using the syntax described in the whosonfirst/go-whosonfirst-placetypes repository.
-enable-custom-placetypes
Enable wof:placetype values that are not explicitly defined in the whosonfirst/go-whosonfirst-placetypes repository.
-geometries string
Valid options are: all, alt, default. (default "all")
-geometry-source string
Where to 'read' a geometry (to intersect) from. Valid options are: file, flag, stdin (default "flag")
-geometry-type string
The type of encoding used to perform an intersects operation. Valid options are: geojson, wkt, bbox
-geometry-value string
The value of geometry used to perform an intersects operation. This will vary depending on the value of the -geometry-source flag. For example if -geometry-source=flag then -geometry-value= will be that geometry passed as a string. If -geometry-source=file then -geometry-value= will be the path to a file on disk. If -geometry-source=stdin then -geometry-value will be left empty.
-inception string
A valid EDTF date string.
-is-ceased value
One or more existential flags (-1, 0, 1) to filter results by.
-is-current value
One or more existential flags (-1, 0, 1) to filter results by.
-is-deprecated value
One or more existential flags (-1, 0, 1) to filter results by.
-is-superseded value
One or more existential flags (-1, 0, 1) to filter results by.
-is-superseding value
One or more existential flags (-1, 0, 1) to filter results by.
-iterator-uri value
Zero or more URIs denoting data sources to use for indexing the spatial database at startup. URIs take the form of {ITERATOR_URI} + "#" + {PIPE-SEPARATED LIST OF ITERATOR SOURCES}. Where {ITERATOR_URI} is expected to be a registered whosonfirst/go-whosonfirst-iterate/v2 iterator (emitter) URI and {ITERATOR SOURCES} are valid input paths for that iterator. Supported whosonfirst/go-whosonfirst-iterate/v2 iterator schemes are: cwd://, directory://, featurecollection://, file://, filelist://, geojsonl://, null://, repo://.
-mode string
Valid options are: cli, lambda. (default "cli")
-placetype value
One or more place types to filter results by.
-properties-reader-uri string
A valid whosonfirst/go-reader.Reader URI. Available options are: [fs:// null:// repo:// sqlite:// stdin://]. If the value is {spatial-database-uri} then the value of the '-spatial-database-uri' implements the reader.Reader interface and will be used.
-property value
One or more Who's On First properties to append to each result.
-sort-uri value
Zero or more whosonfirst/go-whosonfirst-spr/sort URIs.
-spatial-database-uri string
A valid whosonfirst/go-whosonfirst-spatial/data.SpatialDatabase URI. options are: [rtree:// sqlite://] (default "rtree://")
-verbose
Enable verbose (debug) logging.
Example
$> ./bin/intersects \
-is-current 1 \
-geometry-source file \
-geometry-type geojson \
-geometry-value fixtures/1360521545.geojson \
-spatial-database-uri 'sqlite://sqlite3?dsn=fixtures/sfomuseum-architecture.db' \
| jq -r '.places[]["wof:name"]'
SFO Terminal Complex
San Francisco International Airport
Terminal 2
``
Documentation
¶
There is no documentation for this package.
Click to show internal directories.
Click to hide internal directories.