#-----------------------------------------------------------------------------
if (BUILD_IMPORTER)
+ find_file(COUNTRY_GRID_FILE country_osm_grid.sql.gz
+ PATHS ${PROJECT_SOURCE_DIR}/data
+ NO_DEFAULT_PATH
+ DOC "Location of the country grid file."
+ )
+
+ if (NOT COUNTRY_GRID_FILE)
+ message(FATAL_ERROR "\nYou need to download the country_osm_grid first:\n"
+ " wget -O ${PROJECT_SOURCE_DIR}/data/country_osm_grid.sql.gz https://www.nominatim.org/data/country_grid.sql.gz")
+ endif()
+
set(CUSTOMSCRIPTS
check_import_finished.php
country_languages.php
${PROJECT_BINARY_DIR}/nominatim)
endif()
+#-----------------------------------------------------------------------------
+# Targets for running a development webserver from the build directory.
+#-----------------------------------------------------------------------------
+
+if (BUILD_API)
+ set(WEBSITEFILES
+ 403.html
+ 509.html
+ crossdomain.xml
+ favicon.ico
+ nominatim.xml
+ robots.txt
+ taginfo.json
+ )
+
+ foreach (webfile ${WEBSITEFILES})
+ configure_file(${PROJECT_SOURCE_DIR}/website/${webfile}
+ ${PROJECT_BINARY_DIR}/website/${webfile})
+ endforeach()
+endif()
+
#-----------------------------------------------------------------------------
# Tests
#-----------------------------------------------------------------------------
if (BUILD_DOCS)
add_subdirectory(docs)
endif()
+
+ #-----------------------------------------------------------------------------
+ # Installation
+ #-----------------------------------------------------------------------------
+
+
+ include(GNUInstallDirs)
+ set(NOMINATIM_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME})
+ set(NOMINATIM_LIBDIR ${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME})
+ set(NOMINATIM_CONFIGDIR ${CMAKE_INSTALL_FULL_SYSCONFDIR}/${PROJECT_NAME})
+
+ if (BUILD_IMPORTER)
+ configure_file(${PROJECT_SOURCE_DIR}/cmake/tool-installed.tmpl installed.bin)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/installed.bin
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
+ RENAME nominatim)
+
+ install(DIRECTORY nominatim
+ DESTINATION ${NOMINATIM_LIBDIR}/lib-python
+ FILES_MATCHING PATTERN "*.py"
+ PATTERN __pycache__ EXCLUDE)
+ install(DIRECTORY lib-sql DESTINATION ${NOMINATIM_LIBDIR})
+
+ install(FILES data/country_name.sql
+ ${COUNTRY_GRID_FILE}
+ data/words.sql
+ DESTINATION ${NOMINATIM_DATADIR})
+ endif()
+
+ if (BUILD_OSM2PGSQL)
+ install(TARGETS osm2pgsql RUNTIME DESTINATION ${NOMINATIM_LIBDIR})
+ endif()
+
+ if (BUILD_MODULE)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/module/nominatim.so
+ DESTINATION ${NOMINATIM_LIBDIR}/module)
+ endif()
+
+ if (BUILD_API)
+ install(DIRECTORY lib-php DESTINATION ${NOMINATIM_LIBDIR})
+ endif()
+
+ install(FILES settings/env.defaults
+ settings/address-levels.json
+ settings/phrase_settings.php
+ settings/import-admin.style
+ settings/import-street.style
+ settings/import-address.style
+ settings/import-full.style
+ settings/import-extratags.style
+ DESTINATION ${NOMINATIM_CONFIGDIR})
--- /dev/null
+{
+ "data_format": 1,
+ "data_url": "http://nominatim.openstreetmap.org/taginfo.json",
+ "project": {
+ "name": "Nominatim",
+ "description": "OSM search engine.",
+ "project_url": "http://nominatim.openstreetmap.org",
+ "doc_url": "http://wiki.osm.org/wiki/Nominatim",
+ "contact_name": "Sarah Hoffmann",
+ "contact_email": "lonvia@denofr.de"
+ },
+ "tags": [
+ { "key" : "ref", "description": "Searchable name of the place."},
+ { "key" : "int_ref", "description": "Searchable name of the place."},
+ { "key" : "nat_ref", "description": "Searchable name of the place."},
+ { "key" : "reg_ref", "description": "Searchable name of the place."},
+ { "key" : "loc_ref", "description": "Searchable name of the place."},
+ { "key" : "old_ref", "description": "Searchable name of the place."},
+ { "key" : "iata", "description": "Searchable name of the place."},
+ { "key" : "icao", "description": "Searchable name of the place."},
+ { "key" : "pcode", "description": "Searchable name of the place."},
+ { "key" : "name", "description": "Searchable name of the place."},
+ { "key" : "int_name", "description": "Searchable name of the place."},
+ { "key" : "nat_name", "description": "Searchable name of the place."},
+ { "key" : "reg_name", "description": "Searchable name of the place."},
+ { "key" : "loc_name", "description": "Searchable name of the place."},
+ { "key" : "old_name", "description": "Searchable name of the place."},
+ { "key" : "alt_name", "description": "Searchable name of the place."},
+ { "key" : "official_name", "description": "Searchable name of the place."},
+ { "key" : "place_name", "description": "Searchable name of the place."},
+ { "key" : "short_name", "description": "Searchable name of the place."},
+ { "key" : "addr:housename", "description": "Searchable name of the place."},
+ { "key" : "operator", "description": "Searchable name for amenities and shops." },
+ { "key" : "brand", "description": "Searchable name of POI places."},
+ { "key" : "bridge:name", "description" : "Searchable name for bridges."},
+ { "key" : "tunnel:name", "description" : "Searchable name for tunnels."},
+ { "key" : "emergency", "description": "POI in the search database." },
+ { "key" : "tourism", "description": "POI in the search database." },
+ { "key" : "historic", "description": "POI in the search database." },
+ { "key" : "military", "description": "POI in the search database." },
+ { "key" : "natural", "description": "POI in the search database." },
+ { "key" : "man_made", "description": "POI in the search database." },
+ { "key" : "mountain_pass", "description": "POI in the search database." },
+ { "key" : "highway", "description": "POI or street in the search database (not added are: 'no', 'turning_circle', 'traffic_signals', 'mini_roundabout', 'crossing' and traffic signs)." },
+ { "key" : "aerialway", "description": "POI in the search database (unless value is 'no', 'pylon')." },
+ { "key" : "aeroway", "description": "POI in the search database (unless value is 'no')." },
+ { "key" : "amenity", "description": "POI in the search database (unless value is 'no')." },
+ { "key" : "boundary", "description": "Area in the search database (used to compute addresses of other places)." },
+ { "key" : "bridge", "description": "POI in the search database (unless value is 'no')." },
+ { "key" : "craft", "description": "POI in the search database (unless value is 'no')." },
+ { "key" : "leisure", "description": "POI in the search database (unless value is 'no')." },
+ { "key" : "office", "description": "POI in the search database (unless value is 'no')." },
+ { "key" : "railway", "description": "Geographic feature in the search database (unless value is 'no')." },
+ { "key" : "landuse", "description": "Geographic feature in the search database (unless value is 'no')." },
+ { "key" : "shop", "description": "POI in the search database (unless value is 'no')." },
+ { "key" : "tunnel", "description": "POI in the search database (unless value is 'no')." },
+ { "key" : "waterway", "description": "Geographic feature in the search database (unless value is 'riverbank')."},
+ { "key" : "place", "description": "Settlement on the search database (used to compute addresses of other places)." },
+ { "key" : "postal_code", "description": "Postcode in search database (used to compute postcodes of places around)." },
+ { "key" : "postcode", "description": "Postcode in search database (used to compute postcodes of places around)." },
+ { "key" : "addr:postcode", "description": "Postcode in search database (used to compute postcodes of places around)." },
+ { "key" : "tiger:zip_left", "description": "Postcode in search database (used to compute postcodes of places around)." },
+ { "key" : "tiger:zip_right", "description": "Postcode in search database (used to compute postcodes of places around)." },
+ { "key" : "addr:street", "description": "Used to determine the street of a house or POI. Note that a street with the same name must exist for the tag to be effective."},
+ { "key" : "addr:place", "description": "Used to determine the settlement of a house or POI with a street-less address."},
+ { "key" : "country_code", "description": "Used to determine the country a place is in."},
+ { "key" : "ISO3166-1", "description": "Used to determine the country a place is in."},
+ { "key" : "is_in:country_code", "description": "Used to determine the country a place is in."},
+ { "key" : "is_in:country", "description": "Used to determine the country a place is in."},
+ { "key" : "addr:country", "description": "Used to determine the country a place is in."},
+ { "key" : "addr:country_code", "description": "Used to determine the country a place is in."},
+ { "key" : "addr:housenumber", "description": "House number of the place (no ranges)."},
+ { "key" : "addr:conscriptionnumber", "description": "House number of the place (Eastern European system)."},
+ { "key" : "addr:streetnumber", "description": "House number of the place (Eastern European system)."},
+ { "key" : "addr:interpolation", "description": "Way along which house numbers are interpolated."} ,
+ { "key" : "tiger:county", "description": "Used to determine the address in the US (needs a place with the same name and a county suffix)."},
+ { "key" : "addr:suburb", "description": "Used to determine the address of a place."},
+ { "key" : "addr:city", "description": "Used to determine the address of a place."},
+ { "key" : "addr:state_code", "description": "Used to determine the address of a place."},
+ { "key" : "addr:state", "description": "Used to determine the address of a place."},
+ { "key" : "addr:province", "description": "Used to determine the address of a place."},
+ { "key" : "addr:district", "description": "Used to determine the address of a place."},
+ { "key" : "addr:region", "description": "Used to determine the address of a place."},
+ { "key" : "addr:county", "description": "Used to determine the address of a place."},
+ { "key" : "addr:municipality", "description": "Used to determine the address of a place."},
+ { "key" : "addr:hamlet", "description": "Used to determine the address of a place."},
+ { "key" : "addr:village", "description": "Used to determine the address of a place."},
+ { "key" : "addr:subdistrict", "description": "Used to determine the address of a place."},
+ { "key" : "addr:town", "description": "Used to determine the address of a place."},
+ { "key" : "addr:neighbourhood", "description": "Used to determine the address of a place."},
+ { "key" : "addr:quarter", "description": "Used to determine the address of a place."},
+ { "key" : "addr:parish", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:suburb", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:city", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:state_code", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:state", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:province", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:district", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:region", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:county", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:municipality", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:hamlet", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:village", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:subdistrict", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:town", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:neighbourhood", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:quarter", "description": "Used to determine the address of a place."},
+ { "key" : "is_in:parish", "description": "Used to determine the address of a place."},
+ { "key" : "admin_level", "description": "Determines the hierarchy for administrative boundaries."},
+ { "key" : "wikipedia", "description": "Linking to the right wikipedia article helps to guess the importance of a place, which determines how far up in the search results it appears."}
+ ]
+}