1 .TH nominatim "1" Manual
6 [-h] {import,freeze,replication,special-phrases,add-data,index,refresh,admin,export,serve,search,reverse,lookup,details,status} ...
8 Command\-line tools for importing, updating, administrating and
9 querying the Nominatim database.
17 \fBnominatim\fR \fI\,import\/\fR
18 Create a new Nominatim database from an OSM file.
20 \fBnominatim\fR \fI\,freeze\/\fR
21 Make database read-only.
23 \fBnominatim\fR \fI\,replication\/\fR
24 Update the database using an online replication service.
26 \fBnominatim\fR \fI\,special-phrases\/\fR
27 Import special phrases.
29 \fBnominatim\fR \fI\,add-data\/\fR
30 Add additional data from a file or an online source.
32 \fBnominatim\fR \fI\,index\/\fR
33 Reindex all new and modified data.
35 \fBnominatim\fR \fI\,refresh\/\fR
36 Recompute auxiliary data used by the indexing process.
38 \fBnominatim\fR \fI\,admin\/\fR
39 Analyse and maintain the database.
41 \fBnominatim\fR \fI\,export\/\fR
42 Export addresses as CSV file from the database.
44 \fBnominatim\fR \fI\,serve\/\fR
45 Start a simple web server for serving the API.
47 \fBnominatim\fR \fI\,search\/\fR
48 Execute API search query.
50 \fBnominatim\fR \fI\,reverse\/\fR
51 Execute API reverse query.
53 \fBnominatim\fR \fI\,lookup\/\fR
54 Execute API lookup query.
56 \fBnominatim\fR \fI\,details\/\fR
57 Execute API details query.
59 \fBnominatim\fR \fI\,status\/\fR
60 Execute API status query.
61 .SH OPTIONS 'nominatim import'
62 usage: nominatim import [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
63 (--osm-file FILE | --continue {load-data,indexing,db-postprocess})
64 [--osm2pgsql-cache SIZE] [--reverse-only]
65 [--no-partitions] [--no-updates] [--ignore-errors]
68 Create a new Nominatim database from an OSM file.
74 \fB\-q\fR, \fB\-\-quiet\fR
75 Print only error messages
78 \fB\-v\fR, \fB\-\-verbose\fR
79 Increase verboseness of output
82 \fB\-\-project\-dir\fR DIR
83 Base directory of the Nominatim installation (default:.)
86 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
87 Number of parallel threads to use
90 \fB\-\-osm\-file\fR FILE
91 OSM file to be imported.
94 \fB\-\-continue\fR {load\-data,indexing,db\-postprocess}
95 Continue an import that was interrupted
98 \fB\-\-osm2pgsql\-cache\fR SIZE
99 Size of cache to be used by osm2pgsql (in MB)
102 \fB\-\-reverse\-only\fR
103 Do not create tables and indexes for searching
106 \fB\-\-no\-partitions\fR
107 Do not partition search indices (speeds up import of single country extracts)
110 \fB\-\-no\-updates\fR
111 Do not keep tables that are only needed for updating the database later
114 \fB\-\-ignore\-errors\fR
115 Continue import even when errors in SQL are present
118 \fB\-\-index\-noanalyse\fR
119 Do not perform analyse operations during index
121 .SH OPTIONS 'nominatim freeze'
122 usage: nominatim freeze [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
124 Make database read\-only.
126 About half of data in the Nominatim database is kept only to be able to
127 keep the data up\-to\-date with new changes made in OpenStreetMap. This
128 command drops all this data and only keeps the part needed for geocoding
131 This command has the same effect as the `\-\-no\-updates` option for imports.
137 \fB\-q\fR, \fB\-\-quiet\fR
138 Print only error messages
141 \fB\-v\fR, \fB\-\-verbose\fR
142 Increase verboseness of output
145 \fB\-\-project\-dir\fR DIR
146 Base directory of the Nominatim installation (default:.)
149 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
150 Number of parallel threads to use
152 .SH OPTIONS 'nominatim replication'
153 usage: nominatim replication [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
154 [--init] [--no-update-functions]
155 [--check-for-updates] [--once] [--no-index]
156 [--osm2pgsql-cache SIZE]
157 [--socket-timeout SOCKET_TIMEOUT]
159 Update the database using an online replication service.
165 \fB\-q\fR, \fB\-\-quiet\fR
166 Print only error messages
169 \fB\-v\fR, \fB\-\-verbose\fR
170 Increase verboseness of output
173 \fB\-\-project\-dir\fR DIR
174 Base directory of the Nominatim installation (default:.)
177 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
178 Number of parallel threads to use
182 Initialise the update process
185 \fB\-\-no\-update\-functions\fR
186 Do not update the trigger function to support differential updates.
189 \fB\-\-check\-for\-updates\fR
190 Check if new updates are available and exit
194 Download and apply updates only once. When not set, updates are continuously applied
198 Do not index the new data. Only applicable together with \-\-once
201 \fB\-\-osm2pgsql\-cache\fR SIZE
202 Size of cache to be used by osm2pgsql (in MB)
205 \fB\-\-socket\-timeout\fR \fI\,SOCKET_TIMEOUT\/\fR
206 Set timeout for file downloads.
208 .SH OPTIONS 'nominatim special-phrases'
209 usage: nominatim special-phrases [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
212 Import special phrases.
218 \fB\-q\fR, \fB\-\-quiet\fR
219 Print only error messages
222 \fB\-v\fR, \fB\-\-verbose\fR
223 Increase verboseness of output
226 \fB\-\-project\-dir\fR DIR
227 Base directory of the Nominatim installation (default:.)
230 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
231 Number of parallel threads to use
234 \fB\-\-import\-from\-wiki\fR
235 Import special phrases from the OSM wiki to the database.
237 .SH OPTIONS 'nominatim add-data'
238 usage: nominatim add-data [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
239 (--file FILE | --diff FILE | --node ID | --way ID | --relation ID | --tiger-data DIR)
242 Add additional data from a file or an online source.
244 Data is only imported, not indexed. You need to call `nominatim index`
245 to complete the process.
251 \fB\-q\fR, \fB\-\-quiet\fR
252 Print only error messages
255 \fB\-v\fR, \fB\-\-verbose\fR
256 Increase verboseness of output
259 \fB\-\-project\-dir\fR DIR
260 Base directory of the Nominatim installation (default:.)
263 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
264 Number of parallel threads to use
268 Import data from an OSM file
272 Import data from an OSM diff file
276 Import a single node from the API
280 Import a single way from the API
283 \fB\-\-relation\fR ID
284 Import a single relation from the API
287 \fB\-\-tiger\-data\fR DIR
288 Add housenumbers from the US TIGER census database.
291 \fB\-\-use\-main\-api\fR
292 Use OSM API instead of Overpass to download objects
294 .SH OPTIONS 'nominatim index'
295 usage: nominatim index [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
296 [--boundaries-only] [--no-boundaries] [--minrank RANK]
299 Reindex all new and modified data.
305 \fB\-q\fR, \fB\-\-quiet\fR
306 Print only error messages
309 \fB\-v\fR, \fB\-\-verbose\fR
310 Increase verboseness of output
313 \fB\-\-project\-dir\fR DIR
314 Base directory of the Nominatim installation (default:.)
317 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
318 Number of parallel threads to use
321 \fB\-\-boundaries\-only\fR
322 Index only administrative boundaries.
325 \fB\-\-no\-boundaries\fR
326 Index everything except administrative boundaries.
329 \fB\-\-minrank\fR RANK, \fB\-r\fR RANK
330 Minimum/starting rank
333 \fB\-\-maxrank\fR RANK, \fB\-R\fR RANK
334 Maximum/finishing rank
336 .SH OPTIONS 'nominatim refresh'
337 usage: nominatim refresh [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
338 [--postcodes] [--word-counts] [--address-levels]
339 [--functions] [--wiki-data] [--importance]
340 [--website] [--no-diff-updates]
341 [--enable-debug-statements]
343 Recompute auxiliary data used by the indexing process.
345 These functions must not be run in parallel with other update commands.
351 \fB\-q\fR, \fB\-\-quiet\fR
352 Print only error messages
355 \fB\-v\fR, \fB\-\-verbose\fR
356 Increase verboseness of output
359 \fB\-\-project\-dir\fR DIR
360 Base directory of the Nominatim installation (default:.)
363 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
364 Number of parallel threads to use
368 Update postcode centroid table
371 \fB\-\-word\-counts\fR
372 Compute frequency of full\-word search terms
375 \fB\-\-address\-levels\fR
376 Reimport address level configuration
380 Update the PL/pgSQL functions in the database
384 Update Wikipedia/data importance numbers.
388 Recompute place importances (expensive!)
392 Refresh the directory that serves the scripts for the web API
395 \fB\-\-no\-diff\-updates\fR
396 Do not enable code for propagating updates
399 \fB\-\-enable\-debug\-statements\fR
400 Enable debug warning statements in functions
402 .SH OPTIONS 'nominatim admin'
403 usage: nominatim admin [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
404 (--warm | --check-database | --migrate | --analyse-indexing)
405 [--search-only] [--reverse-only]
406 [--osm-id OSM_ID | --place-id PLACE_ID]
408 Analyse and maintain the database.
414 \fB\-q\fR, \fB\-\-quiet\fR
415 Print only error messages
418 \fB\-v\fR, \fB\-\-verbose\fR
419 Increase verboseness of output
422 \fB\-\-project\-dir\fR DIR
423 Base directory of the Nominatim installation (default:.)
426 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
427 Number of parallel threads to use
431 Warm database caches for search and reverse queries.
434 \fB\-\-check\-database\fR
435 Check that the database is complete and operational.
439 Migrate the database to a new software version.
442 \fB\-\-analyse\-indexing\fR
443 Print performance analysis of the indexing process.
446 \fB\-\-search\-only\fR
447 Only pre\-warm tables for search queries
450 \fB\-\-reverse\-only\fR
451 Only pre\-warm tables for reverse queries
454 \fB\-\-osm\-id\fR \fI\,OSM_ID\/\fR
455 Analyse indexing of the given OSM object
458 \fB\-\-place\-id\fR \fI\,PLACE_ID\/\fR
459 Analyse indexing of the given Nominatim object
461 .SH OPTIONS 'nominatim export'
462 usage: nominatim export [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
463 [--output-type {continent,country,state,county,city,suburb,street,path}]
464 [--output-format OUTPUT_FORMAT]
465 [--output-all-postcodes] [--language LANGUAGE]
466 [--restrict-to-country COUNTRY_CODE]
467 [--restrict-to-osm-node ID] [--restrict-to-osm-way ID]
468 [--restrict-to-osm-relation ID]
470 Export addresses as CSV file from the database.
476 \fB\-q\fR, \fB\-\-quiet\fR
477 Print only error messages
480 \fB\-v\fR, \fB\-\-verbose\fR
481 Increase verboseness of output
484 \fB\-\-project\-dir\fR DIR
485 Base directory of the Nominatim installation (default:.)
488 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
489 Number of parallel threads to use
492 \fB\-\-output\-type\fR {continent,country,state,county,city,suburb,street,path}
493 Type of places to output (default: street)
496 \fB\-\-output\-format\fR \fI\,OUTPUT_FORMAT\/\fR
497 Semicolon\-separated list of address types (see \-\-output\-type). Multiple ranks can be merged into one column by simply using a comma\-separated list.
500 \fB\-\-output\-all\-postcodes\fR
501 List all postcodes for address instead of just the most likely one
504 \fB\-\-language\fR \fI\,LANGUAGE\/\fR
505 Preferred language for output (use local name, if omitted)
508 \fB\-\-restrict\-to\-country\fR COUNTRY_CODE
509 Export only objects within country
512 \fB\-\-restrict\-to\-osm\-node\fR ID
513 Export only children of this OSM node
516 \fB\-\-restrict\-to\-osm\-way\fR ID
517 Export only children of this OSM way
520 \fB\-\-restrict\-to\-osm\-relation\fR ID
521 Export only children of this OSM relation
523 .SH OPTIONS 'nominatim serve'
524 usage: nominatim serve [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
527 Start a simple web server for serving the API.
529 This command starts the built\-in PHP webserver to serve the website
530 from the current project directory. This webserver is only suitable
531 for testing and develop. Do not use it in production setups!
533 By the default, the webserver can be accessed at: http://127.0.0.1:8088
539 \fB\-q\fR, \fB\-\-quiet\fR
540 Print only error messages
543 \fB\-v\fR, \fB\-\-verbose\fR
544 Increase verboseness of output
547 \fB\-\-project\-dir\fR DIR
548 Base directory of the Nominatim installation (default:.)
551 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
552 Number of parallel threads to use
555 \fB\-\-server\fR \fI\,SERVER\/\fR
556 The address the server will listen to.
558 .SH OPTIONS 'nominatim search'
559 usage: nominatim search [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
560 [--query QUERY] [--street STREET] [--city CITY]
561 [--county COUNTY] [--state STATE] [--country COUNTRY]
562 [--postalcode POSTALCODE]
563 [--format {xml,json,jsonv2,geojson,geocodejson}]
564 [--addressdetails] [--extratags] [--namedetails]
566 [--polygon-output {geojson,kml,svg,text}]
567 [--polygon-threshold TOLERANCE] [--countrycodes CC,..]
568 [--exclude_place_ids ID,..] [--limit LIMIT]
569 [--viewbox X1,Y1,X2,Y2] [--bounded] [--no-dedupe]
571 Execute API search query.
577 \fB\-q\fR, \fB\-\-quiet\fR
578 Print only error messages
581 \fB\-v\fR, \fB\-\-verbose\fR
582 Increase verboseness of output
585 \fB\-\-project\-dir\fR DIR
586 Base directory of the Nominatim installation (default:.)
589 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
590 Number of parallel threads to use
593 \fB\-\-query\fR \fI\,QUERY\/\fR
594 Free\-form query string
597 \fB\-\-street\fR \fI\,STREET\/\fR
598 Structured query: housenumber and street
601 \fB\-\-city\fR \fI\,CITY\/\fR
602 Structured query: city, town or village
605 \fB\-\-county\fR \fI\,COUNTY\/\fR
606 Structured query: county
609 \fB\-\-state\fR \fI\,STATE\/\fR
610 Structured query: state
613 \fB\-\-country\fR \fI\,COUNTRY\/\fR
614 Structured query: country
617 \fB\-\-postalcode\fR \fI\,POSTALCODE\/\fR
618 Structured query: postcode
621 \fB\-\-format\fR {xml,json,jsonv2,geojson,geocodejson}
625 \fB\-\-addressdetails\fR
626 Include a breakdown of the address into elements.
630 Include additional information if available (e.g. wikipedia link, opening hours).
633 \fB\-\-namedetails\fR
634 Include a list of alternative names.
637 \fB\-\-lang\fR LANGS, \fB\-\-accept\-language\fR LANGS
638 Preferred language order for presenting search results
641 \fB\-\-polygon\-output\fR {geojson,kml,svg,text}
642 Output geometry of results as a GeoJSON, KML, SVG or WKT.
645 \fB\-\-polygon\-threshold\fR TOLERANCE
646 Simplify output geometry.Parameter is difference tolerance in degrees.
649 \fB\-\-countrycodes\fR CC,..
650 Limit search results to one or more countries.
653 \fB\-\-exclude_place_ids\fR ID,..
654 List of search object to be excluded
657 \fB\-\-limit\fR \fI\,LIMIT\/\fR
658 Limit the number of returned results
661 \fB\-\-viewbox\fR X1,Y1,X2,Y2
662 Preferred area to find search results
666 Strictly restrict results to viewbox area
670 Do not remove duplicates from the result list
672 .SH OPTIONS 'nominatim reverse'
673 usage: nominatim reverse [-h] [-q] [-v] [--project-dir DIR] [-j NUM] --lat LAT
674 --lon LON [--zoom ZOOM]
675 [--format {xml,json,jsonv2,geojson,geocodejson}]
676 [--addressdetails] [--extratags] [--namedetails]
678 [--polygon-output {geojson,kml,svg,text}]
679 [--polygon-threshold TOLERANCE]
681 Execute API reverse query.
687 \fB\-q\fR, \fB\-\-quiet\fR
688 Print only error messages
691 \fB\-v\fR, \fB\-\-verbose\fR
692 Increase verboseness of output
695 \fB\-\-project\-dir\fR DIR
696 Base directory of the Nominatim installation (default:.)
699 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
700 Number of parallel threads to use
703 \fB\-\-lat\fR \fI\,LAT\/\fR
704 Latitude of coordinate to look up (in WGS84)
707 \fB\-\-lon\fR \fI\,LON\/\fR
708 Longitude of coordinate to look up (in WGS84)
711 \fB\-\-zoom\fR \fI\,ZOOM\/\fR
712 Level of detail required for the address
715 \fB\-\-format\fR {xml,json,jsonv2,geojson,geocodejson}
719 \fB\-\-addressdetails\fR
720 Include a breakdown of the address into elements.
724 Include additional information if available (e.g. wikipedia link, opening hours).
727 \fB\-\-namedetails\fR
728 Include a list of alternative names.
731 \fB\-\-lang\fR LANGS, \fB\-\-accept\-language\fR LANGS
732 Preferred language order for presenting search results
735 \fB\-\-polygon\-output\fR {geojson,kml,svg,text}
736 Output geometry of results as a GeoJSON, KML, SVG or WKT.
739 \fB\-\-polygon\-threshold\fR TOLERANCE
740 Simplify output geometry.Parameter is difference tolerance in degrees.
742 .SH OPTIONS 'nominatim lookup'
743 usage: nominatim lookup [-h] [-q] [-v] [--project-dir DIR] [-j NUM] --id OSMID
744 [--format {xml,json,jsonv2,geojson,geocodejson}]
745 [--addressdetails] [--extratags] [--namedetails]
747 [--polygon-output {geojson,kml,svg,text}]
748 [--polygon-threshold TOLERANCE]
750 Execute API lookup query.
756 \fB\-q\fR, \fB\-\-quiet\fR
757 Print only error messages
760 \fB\-v\fR, \fB\-\-verbose\fR
761 Increase verboseness of output
764 \fB\-\-project\-dir\fR DIR
765 Base directory of the Nominatim installation (default:.)
768 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
769 Number of parallel threads to use
773 OSM id to lookup in format <NRW><id> (may be repeated)
776 \fB\-\-format\fR {xml,json,jsonv2,geojson,geocodejson}
780 \fB\-\-addressdetails\fR
781 Include a breakdown of the address into elements.
785 Include additional information if available (e.g. wikipedia link, opening hours).
788 \fB\-\-namedetails\fR
789 Include a list of alternative names.
792 \fB\-\-lang\fR LANGS, \fB\-\-accept\-language\fR LANGS
793 Preferred language order for presenting search results
796 \fB\-\-polygon\-output\fR {geojson,kml,svg,text}
797 Output geometry of results as a GeoJSON, KML, SVG or WKT.
800 \fB\-\-polygon\-threshold\fR TOLERANCE
801 Simplify output geometry.Parameter is difference tolerance in degrees.
803 .SH OPTIONS 'nominatim details'
804 usage: nominatim details [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
805 (--node NODE | --way WAY | --relation RELATION | --place_id PLACE_ID)
806 [--class OBJECT_CLASS] [--addressdetails]
807 [--keywords] [--linkedplaces] [--hierarchy]
808 [--group_hierarchy] [--polygon_geojson]
811 Execute API details query.
817 \fB\-q\fR, \fB\-\-quiet\fR
818 Print only error messages
821 \fB\-v\fR, \fB\-\-verbose\fR
822 Increase verboseness of output
825 \fB\-\-project\-dir\fR DIR
826 Base directory of the Nominatim installation (default:.)
829 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
830 Number of parallel threads to use
833 \fB\-\-node\fR \fI\,NODE\/\fR, \fB\-n\fR \fI\,NODE\/\fR
834 Look up the OSM node with the given ID.
837 \fB\-\-way\fR \fI\,WAY\/\fR, \fB\-w\fR \fI\,WAY\/\fR
838 Look up the OSM way with the given ID.
841 \fB\-\-relation\fR \fI\,RELATION\/\fR, \fB\-r\fR \fI\,RELATION\/\fR
842 Look up the OSM relation with the given ID.
845 \fB\-\-place_id\fR \fI\,PLACE_ID\/\fR, \fB\-p\fR \fI\,PLACE_ID\/\fR
846 Database internal identifier of the OSM object to look up.
849 \fB\-\-class\fR \fI\,OBJECT_CLASS\/\fR
850 Class type to disambiguated multiple entries of the same object.
853 \fB\-\-addressdetails\fR
854 Include a breakdown of the address into elements.
858 Include a list of name keywords and address keywords.
861 \fB\-\-linkedplaces\fR
862 Include a details of places that are linked with this one.
866 Include details of places lower in the address hierarchy.
869 \fB\-\-group_hierarchy\fR
870 Group the places by type.
873 \fB\-\-polygon_geojson\fR
874 Include geometry of result.
877 \fB\-\-lang\fR LANGS, \fB\-\-accept\-language\fR LANGS
878 Preferred language order for presenting search results
880 .SH OPTIONS 'nominatim status'
881 usage: nominatim status [-h] [-q] [-v] [--project-dir DIR] [-j NUM]
882 [--format {text,json}]
884 Execute API status query.
890 \fB\-q\fR, \fB\-\-quiet\fR
891 Print only error messages
894 \fB\-v\fR, \fB\-\-verbose\fR
895 Increase verboseness of output
898 \fB\-\-project\-dir\fR DIR
899 Base directory of the Nominatim installation (default:.)
902 \fB\-j\fR NUM, \fB\-\-threads\fR NUM
903 Number of parallel threads to use
906 \fB\-\-format\fR {text,json}
910 The latest version of Nominatim may be downloaded from
911 .UR https://nominatim.org