Giter Club home page Giter Club logo

nominatim's Introduction

Build Status codecov

Nominatim

Nominatim (from the Latin, 'by name') is a tool to search OpenStreetMap data by name and address (geocoding) and to generate synthetic addresses of OSM points (reverse geocoding). An instance with up-to-date data can be found at https://nominatim.openstreetmap.org. Nominatim is also used as one of the sources for the Search box on the OpenStreetMap home page.

Documentation

The documentation of the latest development version is in the docs/ subdirectory. A HTML version can be found at https://nominatim.org/release-docs/develop/ .

Installation

The latest stable release can be downloaded from https://nominatim.org. There you can also find installation instructions for the release, as well as an extensive Troubleshooting/FAQ section.

Detailed installation instructions for current master can be found at nominatim.org as well.

A quick summary of the necessary steps:

  1. Compile Nominatim:

     mkdir build
     cd build
     cmake ..
     make
     sudo make install
    
  2. Create a project directory, get OSM data and import:

     mkdir nominatim-project
     cd nominatim-project
     nominatim import --osm-file <your planet file>
    
  3. Point your webserver to the nominatim-project/website directory.

License

The source code is available under a GPLv2 license.

Contributing

Contributions, bugreport and pull requests are welcome. For details see contribution guide.

Questions and help

For questions, community help and discussions you can use the Github discussions forum or join the geocoding mailing list.

nominatim's People

Contributors

alfmarcua avatar antojvlt avatar biswajit-k avatar darkshredder avatar daxserver avatar eyusupov avatar gemo1011 avatar irljidel avatar krahulreddy avatar lonvia avatar lujoh avatar markigail avatar matkoniecz avatar melvyn-sopacua avatar miku0 avatar mtmail avatar netsgnut avatar nslxndr avatar otbutz avatar pawel-wroniszewski avatar rhinodevel avatar robbe-haesendonck avatar roques avatar simon-will avatar strvm avatar t-tomek avatar tareqpi avatar thomasbarris avatar twain47 avatar woodpeck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nominatim's Issues

PBF support

When following the instructions and building with cee45a8 I get the error

ERROR: PBF support has not been compiled into this version of osm2pgsql, please either compile it with pbf support or use one of the other input formats
ERROR: Error executing external command: /home/pnorman/osm/nominatim/Nominatim/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 28344 -P 5432 -d nominatim /hom
e/pnorman/osm/nominatim/canada.osm.pbf
Error executing external command: /home/pnorman/osm/nominatim/Nominatim/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 28344 -P 5432 -d nominatim /home/pnorman/osm/nominatim/canada.osm.pbf

Postcode fields should be ignored in Republic of Ireland

Republic of Ireland has no postcode system (just postal districts in Dublin) leading to misuse of the OSM postcode tags. Since Dublin districts are already handled through boundaries, Notminatim should, pending introduction of real postcodes, ignore all postcode tags.

Searching with a postcode returns no results.

For example, querying the following Northern Irish address returns a single accurate result: "220 Ravenhill Avenue, Belfast".

However, if I append the correct postcode to the query (either the full postcode or the first segment), no results are returned: "220 Ravenhill Avenue, Belfast, BT6 8LL" or "220 Ravenhill Avenue, Belfast, BT6"

I have encountered similar behaviour for a number of NI addresses but have noted that this isn't always the case when searching, for example, addresses in London.

EDIT: After further digging, this appears to be due to there being no postal code information for NI.

I believe if the post code isn't one which is known, at very least, it should be omitted and results should be returned for the query sans post code.

Thoughts?

Postcode missing on country import

Fresh 2.0.1 Nominatim install with only France (using official install documentation). Next import and index Africa (using update.php). Why postcode is missing ?
Here is the result from nominatim : http://nominatim.openstreetmap.org/reverse?format=xml&lat=36.752055&lon=3.042054&zoom=18&addressdetails=1

<reversegeocode timestamp="Sat, 09 Mar 13 07:49:41 +0000" attribution="Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright" querystring="format=xml&lat=36.752055&lon=3.042054&zoom=18&addressdetails=1">
<result place_id="38273368" osm_type="way" osm_id="26250361" ref="N1" lat="36.7522705" lon="3.0413806">
Ave Merabet Athmane, El Mouradia, Daïra Sidi M'Hamed, Wilaya Alger, 16035, Algérie
</result>
<addressparts>
<road>Ave Merabet Athmane</road>
<county>El Mouradia</county>
<state>Wilaya Alger</state>
<postcode>16035</postcode>
<country>Algérie</country>
<country_code>dz</country_code>
</addressparts>
</reversegeocode>

And here is the result from my install (same coords) :

<reversegeocode timestamp="Sat, 09 Mar 13 08:49:50 +0100" attribution="Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright" querystring="format=xml&lat=36.752055&lon=3.042054&zoom=18&addressdetails=1">
<result place_id="6968854" osm_type="way" osm_id="26250361" ref="N1" lat="36.7524211871407" lon="3.04147321745573">Ave Merabet Athmane, Algérie</result>
<addressparts>
<road>Ave Merabet Athmane</road>
<country>Algérie</country>
<country_code>dz</country_code>
</addressparts>
</reversegeocode>

As you can see, postcode and state is missing on my install. Why this difference ?

Add "ref" field to JSON template

The XML template supports the "ref" field. It would be nice to also add it in the JSON formats. It's as simple as adding

if (isset($aPlace['ref'])) $aFilteredPlaces['ref'] = $aPlace['ref'];

Very Long Import Time

Facing a very long import time on a prod server, i'm asking myself if Way and Relation are required for a reverse search ?
We're using our server only for this type of operation (reverse resolution).
So if we can exclude way and relation from import, perhaps import process would be faster.
I didn't find any documentation on this.

update failed

Nominatim: 2.0.1
Server: Ubuntu 12.04.2 LTS

Update process failed since 25/03/2013. All was working well before.
Using the following command : utils/update.php --import-osmosis-all --no-npi
We got this error message :

/usr/bin/osmosis --read-replication-interval workingDirectory=/var/Nominatim-2.0.1/settings --simplify-change --write-xml-change /var/Nominatim-2.0.1/data/osmosischange.osc
Apr 5, 2013 3:38:16 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.40.1
Apr 5, 2013 3:38:16 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Apr 5, 2013 3:38:16 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Apr 5, 2013 3:38:16 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Apr 5, 2013 3:38:37 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline complete.
Apr 5, 2013 3:38:37 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Total execution time: 20550 milliseconds.
Completed for 2013-04-05T08:38:03Z in 0.35 minutes
/var/Nominatim-2.0.1/osm2pgsql/osm2pgsql -klas -C 2000 -O gazetteer -d nominatim /var/Nominatim-2.0.1/data/osmosischange.osc
Using projection SRS 4326 (Latlong)
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=2000MB, maxblocks=256001*8192, allocation method=11
Mid: pgsql, scale=10000000 cache=2000
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels

Reading in file: /var/Nominatim-2.0.1/data/osmosischange.osc
Processing: Node(30k 1.4k/s) Way(0k 0.00k/s) Relation(0 0.00/s)
............................
  Done 403 in 48 @ 8.395833 per second - ETA (seconds): 58429.820312
index_placex: UPDATE failed: ERROR:  value "2226265960" is out of range for type integer
CONTEXT:  SQL statement "SELECT place_id from placex where osm_type='W' and osm_id = substring(relation.members[i],2,200)::integer
                  and rank_search = 26"
PL/pgSQL function "placex_update" line 162 at SQL statement
Error: 1

polygon=1 does not work for Bremen boundaries (multipolygon) but polygon_text does

the returned coordinates are weird:

curl "http://nominatim.openstreetmap.org/search?format=json&limit=10&addressdetails=0&q=Bremen&polygon=1"

[{"place_id":"97588446","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright","osm_type":"relation","osm_id":"62559","boundingbox":["53.0110359191895","53.598274230957","8.48159217834473","8.99058246612549"],"polygonpoints":[["9.5499311","49.5667319"],["9.5522563","49.5679922"],["9.5518217","49.5689302"],["9.5540179","49.5694915"],["9.5564399","49.5694981"],["9.5580905","49.5694153"],["9.5584269","49.5697253"],["9.5586898","49.5700091"],["9.5590882","49.5698707"],["9.5604949","49.5699702"],["9.5616632","49.5695635"],["9.5607102","49.569066"],["9.5610369","49.5675352"],["9.5577971","49.5679002"],["9.5578046","49.5668186"],["9.5558284","49.5665107"],["9.5559142","49.5662236"],["9.555117","49.5662247"],["9.5544539","49.565937"],["9.5533457","49.5668645"],["9.5527198","49.5666703"],["9.5505432","49.5656852"],["9.5499311","49.5667319"]],"lat":"53.0758099","lon":"8.80717","display_name":"Bremen, HB, Deutschland, European Union","class":"boundary","type":"administrative","importance":0.763036457778,"icon":"http://nominatim.openstreetmap.org/images/mapicons/poi_boundary_administrative.p.20.png"},{"place_id":"97950782","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright","osm_type":"relation","osm_id":"62718","boundingbox":["53.0110359191895","53.6101875305176","8.48159217834473","8.99058246612549"],"polygonpoints":[["-86.174688","41.451801"],["-86.17463","41.452257"],["-86.174542","41.452729"],["-86.174469","41.452987"],["-86.174381","41.45319"],["-86.174364","41.45328"],["-86.171216","41.453116"],["-86.1706753","41.453088"],["-86.165223","41.452729"]....

curl "http://nominatim.openstreetmap.org/search?format=json&limit=10&addressdetails=0&q=Bremen&polygon_geojson=1"
[{"place_id":"97588446","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright","osm_type":"relation","osm_id":"62559","boundingbox":["53.0110359191895","53.598274230957","8.48159217834473","8.99058246612549"],"lat":"53.0758099","lon":"8.80717","display_name":"Bremen, HB, Deutschland, European Union","class":"boundary","type":"administrative","importance":0.763036457778,"icon":"http://nominatim.openstreetmap.org/images/mapicons/poi_boundary_administrative.p.20.png","geojson":{"type":"MultiPolygon","coordinates":[[[[8.4815929,53.2264612],[8.4821438,53.2265521],[8.4829347,53.2267185],[8.4843095,53.2270101],[8.4857372,53.2273151],[8.487138,53.227597],[8.4883678,53.22788],[8.4885416,53.2279264],[8.4886508,53.22796],[8.4888737,53.228208],[8.4894747,53.22809],[8.4895406,53.22796],[8.4894937,53.227739],[8.4894587,53.227575],[8.4894917,53.2268611],[8.4895787,53.2267011],[8.4897386,53.2266402],[8.4900386,53.2266781],[8.4909384,53.2267961],[8.4913354,53.2268461],[8.4915983,53.2268761]....

Add "local" layer in tiles.js

Hello,
I'm using nominatim in a "local" server that run directly mapnik (mapnik + apache mod_tile) so I modified tiles.js to work with this kind of installation.

I added followin code. Could be useful add this to master:

/**
 * Class: OpenLayers.Layer.OSM.Local
 *
 * Inherits from:
 *  - <OpenLayers.Layer.OSM>
 */
OpenLayers.Layer.OSM.Local = OpenLayers.Class(OpenLayers.Layer.OSM, {
    /**
     * Constructor: OpenLayers.Layer.OSM.Local
     *
     * Parameters:
     * name - {String}
     * options - {Object} Hashtable of extra options to tag onto the layer
     */
    initialize: function(name, options) {
        var url = [
            "/osm_tiles2/${z}/${x}/${y}.png"
        ];
        options = OpenLayers.Util.extend({ numZoomLevels: 19, buffer: 0 }, options);
        var newArguments = [name, url, options];
        OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
    },

    CLASS_NAME: "OpenLayers.Layer.OSM.Local"
});

highway milestones - advice needed

In the Netherlands, the emergency services often route to "milestones"(hectometerpalen in dutch). It would be great if nominatim could facilitate in finding them.

Now I am bending my head on the best way to map them as I have all milestones in the Netherlands which are available as INSPIRE open data.

The information that is available on the milestones is:
highway ref
hecto- or kilometer
side of the highway (Left/Right)

What would be a good way to tag them? And would nominatim be able to find them?

Imprecise labels can cause confusion and lack of meaning

Several labels are too short to be meaningful and some even identical causing lack of differentiation.

I've noticed highway:residential and landuse:residential both having the same label "Residential" in particular. This means that if I search for a name which is both a residential area and a residential road one can not see from the result list which is which because they will both be labeled as "Residential". Thus, the German translation is "Wohnstraße" ("living street"), the Spanish translation "Calle" ("Street"), and the Danish translation "Vej i byområder" ("Road in townareas").

A quick glance also gives this list of problematic labels:

  • Trunk
  • Primary
  • Secondary
  • Tertiary
  • Unclassified
  • Service
  • Pedestrian
  • Primary Link
  • Industrial
  • Retail
  • Commercial
  • Station
  • Convenience
  • Allotments
  • Bicycle
  • Clothes
  • Doityourself
  • Car
  • Apparel
  • Electronics
  • Books
  • Yes [!]
  • Outdoor
    .... and the list goes on

It wouldn't take too long to add "Shop", "Area", "Road", etc. where needed, but it kind of looks like the current situation is wanted.

Permission issue of .so file in Nominatim osm postgres DB

I am following the steps as described in http://wiki.openstreetmap.org/wiki/Nominatim/Installation to install the nominatim osm db on my own server. I need to create some functions before doing

./utils/setup.php --load-data

So to create those functions I am running this command:

./utils/setup.php --create-functions

But, it gives me following error:

Error in query: ERROR: could not access file "/home/nominati/public_html/Nominatim/module/nominatim.so": Permission denied

As I can see error occurs while running the following query:

CREATE OR REPLACE FUNCTION transliteration(text) RETURNS text AS '/home/nominati/public_html/Nominatim/module/nominatim.so', 'transliteration' LANGUAGE c IMMUTABLE STRICT;

I am running the commands with root user and nominatim.so file owner is also root. I already changed the file owner to postgres and tried but the same error is there. Please guide what to do?

Choose a list of countries for update

In the installation wiki it is specified that we can limit the update source range using some local settings like

 @define('CONST_Replication_Url', 'http://download.geofabrik.de/europe/france-updates');
 @define('CONST_Replication_MaxInterval', '259200');     // Process up to 3 days updates in a run
 @define('CONST_Replication_Update_Interval', '86400');  // How often upstream publishes diffs
 @define('CONST_Replication_Recheck_Interval', '900');   // How long to sleep if no update found yet

Is there any way to specify multiple country ou region ?
In fact i only need some countries in the update process.

Nominatim installation behind a proxy

I just tried to install Nominatim on a server behind a proxy. Unfortunately some of the scripts don't work out, because the proxy doesn't allow a direct connection. The following warning is reported:

Warning: file_get_contents(http://wiki.openstreetmap.org/wiki/Special:Export/Nominatim/Special_Phrases/VI): failed to open stream: Connection refused in {path to}/Nominatim-2.0.0/utils/specialphrases.php on line 55

According to the installation instructions at openstreetmap, the following commands seem to be effected:

"./utils/specialphrases.php --wiki-import > specialphrases.sql"
"./utils/update.php --import-osmosis-all --no-npi"

Is it possible to enhance the functionality to optionally enable a proxy?

Thanks!

worldboundaries.sql useless

The worldboundaries.sql fail silently on load. But missing table worldboundaries is not used.
Added for future usage ? or simple useless ?

test_token problem

Hello , installed from source, works great if querying directly the endpoint through rest calls.
when calling from web interface I get the following error:

2013-05-08 12:22:16 CEST ERROR: relation "test_token" does not exist at character 43
2013-05-08 12:22:16 CEST STATEMENT: select *,levenshtein('v scoca',word) from test_token
where (metaphone = dmetaphone('v scoca') or metaphonealt = dmetaphone('v scoca') or metaphone = dmetaphone_alt('v scoca') or metaphonealt = dmetaphone_alt('v scoca')) and len between length('v scoca')-2 and length('v scoca')+2 and levenshtein('v scoca',word) < 3 order by levenshtein('v scoca',word) asc, abs(len - length('v scoca')) asc limit 20

Have I missed something during the install phase ?

Wrong street type preventing to find the right place

This is an enhancement request...

Search for "Verulam Street, london" => OK.
Search for "Verulam Lane, london" => KO.
Search for "Rue du Coteau, Betton" => OK
Search for "Avenue du Coteau, Betton" => KO

When you don't enter the exact street/road type, you cannot find your place with Nominatim.
But when you do such imprecise searches on Google Maps, of course, it works...

If you could improve in this area, it would be great.

Use json_encode instead of own function to encode generate valid JSON string

First of all: Thanks for providing and supporting this great service!

When using the Nominatim API with JSON format I ran into a few problems parsing the results. Most concerned wrong / missing escaping of special characters. \> should be escaped as \\> for example.

Have you considered using PHP built-in function "json_encode" for converting OSM data into a valid JSON string? Should be available as of PHP 5.2.0 or alternatively as a PECL module.

Is there a special reason why a home-grown is used for this? I guess json_encode would ease things here.

Reverse Geocoding XML type Error

Hi, I'm trying to use the XML format for reverse Geocoding, the problem is when I try to get it with the format XML, I don't have any problem with JSON o JSONV2..I know that because compared it with mapquestapi reverse geocoding an it give to me the same resault.

When i Try to get it (in my server) with XML i get this:


This page contains the following errors:

error on line 1 at column 6: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.


Any idea about what could be the problem?

BTW: I don't have any problems when I trry to find an adress...just the problem with the reverse geocoding with XML format.

Than you.

Consistently times out on a bad search query

I'm geocoding user-submitted locations so they are often not actual places or not well formatted. The expected result for a bad query is no results: [].

When searching for:
손무.순자.민주주의.정의.자유.평등.대한민, Nominatim takes an extremely long time to get a result and often times out with an HTTP Error 500.

I have tested on the OSM install and on Mapquest's.

After testing several hundred thousand unique queries, this is the only one observed with the extended delay.

prefix search on Nominatim

Hello,

I'm trying to perform some prefix search query (trying to implement an autocomplete function on my own server), but I can't find the right way to do it.

What should I do to make it work ? I saw that it should be implemented in Nominatim V2 (Indexing support for autocomplete text entry (prefix search)) but I can't find any reference nor any hints on the code itself...

Thanks guys.

"Technological refresh" of the user interface

Enhancement / Pull request

Seaching with Nominatim, I wanted to see the results as markers on the map.
So I developed a new Web user interface to Nominatim.

It's based on Leaflet and Jquery, and is accessing Nominatim service with Ajax json calls. So the user interface is completely distinct from the Nominatim service, which is quite good I think.

This can be tested here: http://comob.free.fr/nominatim/
The whole source code is in index.html (so, easily accessible with a "View source code").

Nominatim developers can use it as a starting base, if they want.

Add "name" field to reverse geocode output

Currently the API returns "display_name" which is a concatenation of all the available address objects and the object's "name" field, if that is available.

It would be useful for [http://bikechi.com/chicago](my app) if the API also returned the object's name. I want my app to show the name on a separate line, like so:

Name
Address
City, State

Instead of:

[name], Address, City, State

Shorten language from HTTP accept-language header

Nominatim currently uses the full language string from the HTTP Accept-Language header which mostly includes the language variant (eg. en-gb), while language prefixes in OSM almost exclusively use the ISO two-letter code only (ie. en). Consequently, most of the entries in PreferredLanguages never match. It would be nice to get rid of those.

It's probably be save (and won't change current behaviour) to simply ignore all languages in the Accept-Language header that have a variant. Browsers are supposed to always sent the specific language with variant as well as the general version without variant. However, I tend more towards stripping the variant part from the language and always use the two-letter code only.

error on setup --load-data with postgres9.2 and postgis 2.0

I'm trying to install nominatim on ubuntu LTS 12.04 with postgres 9.2 and postgis 2.0.

I have a problem when i try to setup nominatim during load-data:
http://pastebin.com/snsypFTG

I first try with setup --all and now step by step and the error always appear on --load-data after display of "Load Data".

I didn't have this error on an old setup with postgres9.1 and postgis 1.5.

./configure failed in installation

Hi I am trying install it, but got the following error when running ./configure

Please help. Thanks a lot!

checking for unistd.h... yes
checking for geos-config... /usr/bin/geos-config
checking for geos libraries... checking geos/version.h usability... no
checking geos/version.h presence... no
checking for geos/version.h... no
configure: error: development headers for geos not found

same coordinates yield different results in Nominatim and MapQuest

Hello,

I am not sure if this really belongs to an issue here, but I think it's worth to share the following, at least to understand the differences between the aforementioned services (both relying on Nominatim).

According to Nominatim and MapQuest, the following end-points should provide the same data:

In fact

The Nominatim Search Service is similar to our MapQuest Search Service with its simple interface and powerful capabilities, but instead relies solely on data contributed to OpenStreetMap.

Therefore I would expect the two services to provide the same data, nevertheless the following query for the same coordinates (41.904163, 12.485597) yields different results:

Results:

  • Nominatim: Via Francesco Crispi
  • MapQuest: Via Gregoriana

What is the cause of this divergence?

(see http://stackoverflow.com/questions/17400781/same-coordinates-yield-different-results-in-nominatim-and-mapquest)

make fails when i don't have pg_config in path

i tried to configure under Centos, and i specified the path for pg_config with

./configure --enable-64bit-ids --with-postgresql=/usr/pgsql-9.2/bin/pg_config

it configures without any issue, but when i try to compile it:
$ make
....................
Making all in module
make[1]: pg_config: Command not found
make[1]: Entering directory /home/itavy/rpmbuild/SOURCES/Nominatim/module' make[1]: pg_config: Command not found make[1]: pg_config: Command not found make[1]: pg_config: Command not found make[1]: pg_config: Command not found make[1]: pg_config: Command not found make[1]: pg_config: Command not found make[1]: pg_config: Command not found make[1]: pg_config: Command not found make[1]: pg_config: Command not found Makefile:9: warning: overriding commands for targetinstall'
/usr/pgsql-9.2/lib/pgxs/src/makefiles/pgxs.mk:126: warning: ignoring old commands for target install' gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/include/et -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fpic -I. -I. -I/server -I/internal -I/usr/include/et -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o nominatim.o nominatim.c nominatim.c:1:22: error: postgres.h: No such file or directory nominatim.c:2:18: error: fmgr.h: No such file or directory nominatim.c:3:25: error: mb/pg_wchar.h: No such file or directory nominatim.c:10: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtransliterationâ nominatim.c:11: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âgettokenstringâ nominatim.c:15: warning: data definition has no type or storage class nominatim.c:15: warning: type defaults to âintâ in declaration of âPG_FUNCTION_INFO_V1â nominatim.c:15: warning: parameter names (without types) in function declaration nominatim.c:17: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtransliterationâ nominatim.c: In function âstr_replaceâ: nominatim.c:167: warning: implicit declaration of function âstrstrâ nominatim.c:167: warning: incompatible implicit declaration of built-in function âstrstrâ nominatim.c:173: warning: implicit declaration of function âmemmoveâ nominatim.c:173: warning: incompatible implicit declaration of built-in function âmemmoveâ nominatim.c:174: warning: implicit declaration of function âmemcpyâ nominatim.c:174: warning: incompatible implicit declaration of built-in function âmemcpyâ nominatim.c: At top level: nominatim.c:202: warning: data definition has no type or storage class nominatim.c:202: warning: type defaults to âintâ in declaration of âPG_FUNCTION_INFO_V1â nominatim.c:202: warning: parameter names (without types) in function declaration nominatim.c:204: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âgettokenstringâ make[1]: *** [nominatim.o] Error 1 make[1]: Leaving directory/home/itavy/rpmbuild/SOURCES/Nominatim/module'
make: *** [all-recursive] Error 1

if i compile it with
$ PATH=$PATH:/usr/pgsql-9.2/bin make
it goes without any problem

Unable to create database functions?

I get this when running "./utils/setup.php --create-functions":

ERROR: syntax error at or near "$1"
LINE 1: insert into location_property_tiger (place_id, $1 , $2 , h...
^
QUERY: insert into location_property_tiger (place_id, $1 , $2 , housenumber, postcode, centroid) values (nextval('seq_place'), $1 , $2 , $3 , $4 , ST_Line_Interpolate_Point( $5 , ( $3 ::float- $6 ::float)/ $7 ::float))
CONTEXT: SQL statement in PL/PgSQL function "tigger_create_interpolation" near line 75
ERROR: syntax error at or near "$1"
LINE 1: insert into location_property_aux (place_id, $1 , parent_pl...
^
QUERY: insert into location_property_aux (place_id, $1 , parent_place_id, housenumber, postcode, centroid) values (nextval('seq_place'), $1 , $2 , $3 , $4 , $5 )
CONTEXT: SQL statement in PL/PgSQL function "aux_create_property" near line 40

What did I do wrong?

Error while installing Nominatim

I am trying to install Nominatim lastest version and following the steps given on http://wiki.openstreetmap.org/wiki/Nominatim/Installation

But while importing and indexing OSM data, I am getting error - "function transliteration(text) does not exist"

Following is some part of output being displayed when this error appears:

Getting state file: http://planet.openstreetmap.org/replication/minute/000/000/001.state.txt
Updating DB status
nominatim SVN version 2.1-git-7d24737

Starting indexing rank (0 to 4) using 3 threads
Starting rank 0
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 1
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 2
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 3
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 4
Done 0 in 0 @ 0.000000 per second - FINISHED

NOTICE: no notnull values, invalid stats
ANALYZE
nominatim SVN version 2.1-git-7d24737

Starting indexing rank (5 to 25) using 3 threads
Starting rank 5
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 6
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 7
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 8
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 9
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 10
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 11
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 12
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 13
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 14
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 15
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 16
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 17
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 18
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 19
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 20
Done 0 in 0 @ 0.000000 per second - FINISHED

Starting rank 21
index_placex: UPDATE failed: ERROR: function transliteration(text) does not exist
LINE 1: SELECT gettokenstring(transliteration(name))
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT gettokenstring(transliteration(name))
CONTEXT: PL/pgSQL function "make_standard_name" line 5 at assignment
PL/pgSQL function "make_keywords" line 14 at assignment
PL/pgSQL function "placex_update" line 123 at assignment
index_placex: UPDATE failed: ERROR: function transliteration(text) does not exist
LINE 1: SELECT gettokenstring(transliteration(name))
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT gettokenstring(transliteration(name))
CONTEXT: PL/pgSQL function "make_standard_name" line 5 at assignment
PL/pgSQL function "make_keywords" line 14 at assignment
PL/pgSQL function "placex_update" line 123 at assignment
ERROR: Error executing external command: /home/local/ANT/kroshan/Nominatim/nominatim/nominatim -i -d nominatim -P 5432 -t 3 -r 5 -R 25
Error executing external command: /home/local/ANT/kroshan/Nominatim/nominatim/nominatim -i -d nominatim -P 5432 -t 3 -r 5 -R 25

Someone please help with this to get the issue resolved.

Facility search (using []) returning nothing for many values

Nominatim allows to search for a specific facility inside a bounding box, using the OSM value of the facility.
Example: http://nominatim.openstreetmap.org/search?q=[bakery]&format=xml&viewbox=1.5,48,-1.5,46&limit=50&bounded=1

This is working fine for a lot of values, not particularly related to specific keys.
Examples: bakery, bar, cafe, florist, restaurant, hotel, church, castel, monument, park, stadium, museum, ruin, zoo are all OK.

But it also doesn't work for a lot of other values...
Examples: veterinary, nightclub, fire_station, fish, picnic_site, pitch are all KO.

I've not been able to understand the reason/logic behind.

Most surprising: the non-working examples are easily found using Special Phrases.
Example:
Searching “Poissonneries” (in french) get a lot of objects with class=”shop”, type=”fish”. Fine.
But searching with “[fish]” get nothing!

Search issue

If I query for : 'Seegasse, Gemeinde Wieselburg-Land'
I get the result:
'Seepromenade, Gemeinde Wieselburg-Land, Bezirk Scheibbs, Niederösterreich, 3250, Österreich'
But if I search for: either 'Seegasse, Wieselburg-Land' or 'Seegasse, Wieselburg'
I get NO results at all.
IMO "Gemeinde" (=Village) shouldn't be necessary ...

Table search_name empty on setup

Since commit b0242c7 use calculated_country_code for postcodes from 2012-10-09 22:05:37

On setup, table search_name is now empty and cause many trouble on new instance.

"La" is wrongly removed from lots of places

In France, lots of places have "la" removed from their name. Here are a few examples:

  • "La Ferté Saint Cyr" can only be found by searching for "Ferté Saint Cyr";
  • "Saint Germain la Chambotte" can only be found by searching for "Saint Germain Chambotte".

Wrong country for "border" cities

as reported in http://forum.openstreetmap.org/viewtopic.php?pid=241120#p241120:

"Basically everything works, but I have a strange issue with cities on a or very close to a country border, e.g. "Oberaudorf,Deutschland" or "Kiefersfelden,Deutschland". http://nominatim.openstreetmap.org/search reports them correctly to be in <country_code>de</country_code> etc. while my server reports them to be in <country_code>at</country_code>. All other searches I tested on my server are working fine. I'm using a recent planet area extract for testing - it includes areas on both sides of the German/Austrian border."

Response from twain:
"It looks like a problem with a recent commit that removed some required country code information. I've not committed a fix yet - but I'm working on it."

Makefile.in with svnversion

The nominatim/Makefile.in is a bit incorrect if you get the sources from git. The version is set using svnversion:

SVN:=$(shell svnversion) CFLAGS += -DVERSION=\"$(VERSION)-$(SVN)\"

Means, if sources are from git and svnversion is installed on system, CFLAGS on make is set to -DVERSION="0.1-Unversioned directory". Here GCC fails with following message as it treats the string as 2 separate words:

gcc: error: directory": No such file or directory

System:
gcc (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5)
svn, version 1.7.4 (r1295709)
Linux 3.4.0-1.fc17.x86_64
Fedora 17

Postgis2.0

Hey,

I've installed nominatim with postgis 2.0. After the import of data was successful, I can't do any searches, 'cause of database errors. The problem is that some functions have been renamed in postgis 2.0.

Here are my changes in search.php to solve this problem: andreek@444f485

My question is, how we can build a solution in search.php supporting both versions of postgis? (<2.0 & 2.0)

Best regards,
Andree

House number interpolation does not work for one particular way

House numbers in this particular way are not retrieved by Nominatim: http://www.openstreetmap.org/browse/way/215665429

I thought it was maybe related to the transition from 4 to 5-digit numbers. To test this, I tried adding numbers 9998 and 10000 manually and splitting the way. It worked, all interpolated house numbers could be located. Then I merged the two house number nodes without combining the ways, leaving only number 9998. Still worked. Then I deleted the node for number 9998 (bringing it back to its original state) and it stopped working.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.