Commit Graph

249 Commits

Author SHA1 Message Date
Brian Quinion
d1f266509a Include the centre point on the details page 2012-12-17 15:28:37 +00:00
Brian Quinion
0dd10c3fff Change access control to implement more of CORS. Change so OPTIONS requests don't do an actual search/reverse request 2012-12-17 00:25:06 +00:00
Sarah Hoffmann
fa1f23edfb more isset checks for PHP variables 2012-12-12 18:49:21 +01:00
Brian Quinion
c98e59be03 included calculated importance on details. Change importance calc to prefer places with a wikipedia tag now that the code is better tested 2012-12-12 01:44:39 +00:00
Brian Quinion
0dafda7327 if doing structured query limit the types of osm place returned 2012-12-08 21:40:20 +00:00
Brian Quinion
274f381052 prune list of blocked items if too large, different costs for different page types 2012-12-08 21:39:24 +00:00
Brian Quinion
a276b6b53a Experimental option to dry dropping query terms as part of search plan (disabled by default) 2012-12-03 17:41:29 +00:00
Brian Quinion
cc24d998e4 move deletable and polygons into default website 2012-12-03 14:26:29 +00:00
Sarah Hoffmann
e66df16ecb add web view for import_polygon_delete 2012-11-29 21:44:59 +01:00
Brian Quinion
72fc234c50 Include the Last Updated timestamp in details 2012-11-18 14:58:46 +00:00
Sarah Hoffmann
4da0ed3204 don't search for country if house number was requested 2012-11-17 22:28:01 +01:00
Sarah Hoffmann
8d96e87b93 internally use higher result limits
Avoids that too few results are returned when there are duplicates
in the results due to linked places.
2012-11-17 21:16:47 +01:00
Sarah Hoffmann
e02c9b6e69 clean up details page
Make it pass as valid XHTML and move CSS into its own file.
2012-11-16 23:04:25 +01:00
Sarah Hoffmann
0c9630b24a clean up html for search form
- move CSS to its own file
- make it pass as valid XHTML
- move attribution into Mapnik layer definition
- remove Osmarender layer
2012-11-16 22:35:53 +01:00
Brian Quinion
9eb5b62382 Accidentally used the same variable name for 2 things - broken search by class&type 2012-11-15 17:27:08 +00:00
Sarah Hoffmann
cc3e4aa532 use geometry WKT for highlighting in search view
also cleans up unused code in details view
2012-11-09 22:35:45 +01:00
Sarah Hoffmann
4bb56d98a8 simplify geometry handling in details page
Hand the WKT directly to OpenLayers and let the client do the parsing,
it will be able to handle multipolygons as well as line strings.
Simplify geometries if they have too many points.

Also limit the number of child objects listed to 500.
2012-11-08 22:21:20 +01:00
Sarah Hoffmann
0e3ac756c9 extend error reporting for invalid geometries 2012-11-08 00:06:47 +01:00
Brian Quinion
2b6a163ef9 Get route param working again after recent changes (implies bounded=1) 2012-11-07 01:22:17 +00:00
Brian Quinion
a44f9c6aab Missing some exact name matches when searching for 'special' phrases 2012-11-07 00:48:20 +00:00
Brian Quinion
3c1b21d61c mising string concatenation (.) 2012-11-06 20:04:31 +00:00
Brian Quinion
e70dfa18fa move error messages to consistent 'userError' function and return 400 Bad Request 2012-11-06 13:16:19 +00:00
Brian Quinion
9d8ee88591 make number of polygon outputs allowed a constant 2012-11-06 13:10:25 +00:00
Brian Quinion
f942f7c3bf limit polygon output to one type as a time 2012-11-06 13:06:46 +00:00
Brian Quinion
753d2ac79f Add options to output polygon in various formats: polygon_geojson=1&polygon_svg=1&polygon_kml=1&polygon_text=1 They can be all used at the same time if prefered. Where format and polygon type are compatible output is as native type e.g. format=json&polygon_geojson=1 2012-11-06 00:08:01 +00:00
Brian Quinion
c0d9ba7e0c Handle multipolygon geometry a little bit (return first outer ring) 2012-11-05 22:47:42 +00:00
Brian Quinion
9fcec31000 remove accidentally committed exit command 2012-11-05 14:04:14 +00:00
Brian Quinion
a5d5a92304 include a bit of extra details for polygon errors in output on details.php page 2012-11-05 14:00:54 +00:00
Brian Quinion
f67b1c20e1 don't include linked_place_id places in the sql output (causes errors on paging / number of results returned) 2012-11-05 13:57:02 +00:00
Brian Quinion
a0e39b67d5 Allow option of structured search queries (params amenity,street,city,county,state,country) 2012-11-02 17:52:33 +00:00
Sarah Hoffmann
9d7c51a813 correct penalty for multi-word countries
Country name needs to be the final one within the wordset, not
in the final of all wordsets.
2012-10-14 16:13:22 +02:00
Sarah Hoffmann
a960cf6b71 use geometry column for special phrase queries
It has an index, centroid does not.
2012-10-09 23:57:54 +02:00
Sarah Hoffmann
7b78507ef9 lift restriction on special search term class
All too frequent classes are already filtered out on import of the
special search term tables.
2012-09-30 10:40:44 +02:00
Sarah Hoffmann
e73e67001e ignore frequent partial search terms
Adds word counts from a full planet to the word table. There is a
new configuration option CONST_Max_Word_Frequency which allows to
take into account the word count: the value that was set on import
is used to determine if a word is added to the search_name table.
The value during runtime determines if a single term should be
used for partial search or simply be ignored.
2012-09-25 00:36:34 +02:00
Brian Quinion
030873e0fb reduce effect of missing world now importance is better quality 2012-08-25 20:05:05 +01:00
Sarah Hoffmann
55d3f5a4b9 fix 500 on search for bounded and class query terms
Ignore bounded=1 if no viewbox parameter was given.

New centroid column in placex makes it necessary to name the table
when joining with classtype tables.
2012-08-25 01:09:52 +02:00
Daniele Forsi
38e40cd014 Fix more typos 2012-07-10 15:47:21 +02:00
Daniele Forsi
f082611e25 Fix typos found with codespell in comments 2012-07-10 15:31:01 +02:00
Daniele Forsi
ca5305661e Fix typos in function name
perl -p -e s/getPrefferedLangauges/getPreferredLanguages/ -i */*.php
2012-07-09 19:07:09 +02:00
Daniele Forsi
9549bda474 Fix wrong variable used with PEAR::IsError()
Fixes:
PHP Fatal error:  Cannot use object of type DB_Error as array in /home/daniele/Programmazione/OSM/Nominatim/website/reverse.php on line 104
2012-07-09 18:16:54 +02:00
Sarah Hoffmann
419f90ed75 ignore railways, tunnels and bridges when reverse geocoding 2012-06-28 20:39:18 +02:00
Sarah Hoffmann
f7a21d1bb7 be more strict with us state replacement hack
replace il/al/la only if they are properly separated by a comma
2012-06-25 08:46:14 +02:00
Sarah Hoffmann
a44e21de49 avoid PHP notices 2012-05-25 23:45:59 +02:00
Brian Quinion
946f35e7ff Updated reverse geocoding to improve handling of zoom=0 2012-05-24 16:54:51 +01:00
Brian Quinion
85ab12c471 Merge pull request #9 from andreek/master
Postgis 2.0 compatibility
Seems to be compatible with all recent versions of postgis
2012-05-22 10:34:04 -07:00
Brian Quinion
8d221e2c82 DB Scheme changes: alter table placex add column calculated_country_code varchar(2);
function changes:
-----------------
Move to ST_PointOnSurface from ST_Centroid in various places to avoid looking up a point outside the polygon
Move to ST_Covers from ST_Contains to include points on admin boundaries
Re-order preference for get_country_code now our data is better. country_osm_grid is now the preffered source.
Fix code to calculate country code in placex_insert, rank_search test was too early
Add extra field to placex 'calculated_country_code' to improve structure of code
Move split_geometery function out of add_location into its own function
Rewrite split_geometery to be more efficient.
Change place_insert to do more updates and less delete/inserts (delete is slow)
Include wikipedia links in details.php ouput
Cleanup no longer used geometry validation (adding overhead)
Include debug statements in function.sql (--DEBUG: ) and add flag to setup.php to turn them on

setup.php:
----------
add flag --disable-token-precalc to speed up debuging
add flag --index-noanalyse to disable analysising DB at rank 4 and 26 (previously removed, but on my local DB it seems to be required)
add flag --enable-diff-updates (modifier to --create-functions) to turn on the code required for diff updates without having to modify functions.sql
add flag --enable-debug-statements (modifier to --create-functions) to turn on debug warning statements

update.php:
-----------
added flag --no-index to import osmosis changes without indexing them
extend the hack to allow import of JOSM generated osm files

country_grid.sql - reference copy of the sql used to generate the country_osm_grid table, needs cleanup
2012-05-22 16:27:42 +02:00
Andree Klattenhoff
444f485541 Suport postgis 2.0 for search 2012-05-22 14:04:37 +02:00
Sarah Hoffmann
820b075026 fix typos in mapicons 2012-04-26 23:23:27 +02:00
Sarah Hoffmann
aaca88d5a6 allow slashes in house numbers 2012-04-16 15:33:13 +02:00
Brian Quinion
bfe5119742 Update details.php to show linked places 2012-04-01 02:38:40 +01:00
Brian Quinion
041b3edf89 Adds code to merge place polygon and points using:
label relation member
  admin_center, admin_centre relation member (with same name)
  exact name, search_rank and location match

Adding this requires a new column and index:
  SELECT AddGeometryColumn('placex', 'centroid', 4326, 'GEOMETRY', 2);
  CREATE INDEX idx_placex_linked_place_id ON placex USING BTREE (linked_place_id);
2012-04-01 01:40:50 +01:00
Brian Quinion
80cf5df1cd Merge branch 'master' of github.com:twain47/Nominatim 2012-03-26 23:57:24 +01:00
Brian Quinion
b99a043c78 Use GB postcode table as definitive source. resort by pressence of search word in output address and other misc very minor changes not commited from MQ servers 2012-03-22 00:34:56 +00:00
Sarah Hoffmann
b1e10bce0d use X/Y max/min functions instead of box making
There is a strange bug in postgis where for some coordinates
it does not make a proper box around a point.
2012-03-18 18:18:33 +01:00
Sarah Hoffmann
4d7e0d97b2 return a 500 on database error 2012-03-18 17:58:19 +01:00
Sarah Hoffmann
fa3fe7d056 restrict detection of lat/lon pairs
Only interpret numbers as geo coordinates if they are in the
actual range for latitude and longitude.
2012-03-04 14:50:26 +01:00
Sarah Hoffmann
fec4c3c301 create proper token array for unknown housenumbers 2012-03-04 14:40:13 +01:00
Sarah Hoffmann
d7e91469b7 add script to list broken polygons 2012-03-04 10:54:07 +01:00
Sarah Hoffmann
6f9d3a9d80 return a marginally better error message when query string is not in UTF-8,
force UTF-8 in search formular
2012-02-12 12:01:24 +00:00
Sarah Hoffmann
e081983bcd enable exact search of GB postcodes in aux postcode data,
partial search still disabled due to performance problems
2012-02-11 09:19:42 +00:00
Sarah Hoffmann
7239687e5b avoid warnings when geometry of object cannot be determined 2012-02-06 23:14:21 +00:00
Brian Quinion
5e2b901106 fix miss-parsed regex with - sign in lat,lon query 2011-08-02 19:39:32 +00:00
Brian Quinion
c115a53df7 over tokenising 'la' 2011-06-07 12:31:46 +00:00
Brian Quinion
e65f1c0c1a de-deplicate terms 2011-05-23 17:51:02 +00:00
Brian Quinion
616c7e2b40 allow for offset paramater in amenity searches 2011-05-23 16:36:36 +00:00
Brian Quinion
4dfbf2517b woops 2011-05-23 16:23:50 +00:00
Brian Quinion
c6982e7700 handle 'order state level queries better 2011-05-23 16:22:25 +00:00
Brian Quinion
535c3d60d1 handle 'order state level queries better 2011-05-23 16:12:54 +00:00
Brian Quinion
c8756ce921 handle 'in/near' for state and country level features differently 2011-05-23 14:30:43 +00:00
Brian Quinion
4c4798959e hack to handle state abreviations that overlap with 'the' in various non-english languages 2011-05-17 16:22:21 +00:00
Brian Quinion
6ff987322b country searches not filtered by countrycodes param, fixes #3756 2011-05-11 10:30:58 +00:00
Brian Quinion
6f946360c4 remove debuing information 2011-05-04 16:27:18 +00:00
Brian Quinion
c988be1ddf handle pure lat,lon search by passing to reverse geocoding and returning first match as a search result 2011-05-03 17:34:51 +00:00
Brian Quinion
63bc75b3dd enforce limit as maximum number of results 2011-05-03 14:22:22 +00:00
Brian Quinion
f561a3d1c7 Do not apply limit where we have a sub-search 2011-04-28 14:55:25 +00:00
Brian Quinion
2eccb0e69d return actual centroid lat,lon of reverse geocoding result 2011-04-07 15:57:57 +00:00
Brian Quinion
942ed125d4 consider possibility that values with number in near start of search might be a house number (even if we have never seen them before). Also add better label for building:yes 2011-04-05 14:51:32 +00:00
Brian Quinion
5202e86022 fallback housenumber for items containing a number - not just number only 2011-04-02 15:07:48 +00:00
Brian Quinion
6466194710 limit fallback to pure number housenumbers 2011-03-28 11:37:17 +00:00
Brian Quinion
bf0710dd64 order final data set by importance, ignore search query score (importance seems to be better) 2011-03-25 11:55:13 +00:00
Brian Quinion
6e56919962 option to get list of search keywords 2011-03-25 11:53:17 +00:00
Brian Quinion
1951fddeab add option to filter by countrycodes=gb,fr list 2011-03-23 12:50:25 +00:00
Brian Quinion
b0ed31b6d4 configure tile set 2011-03-23 12:16:57 +00:00
Brian Quinion
2767821cb0 output importance on details.php page 2011-03-20 23:34:36 +00:00
Brian Quinion
2148d81474 calculate search position based to 'importance' rather than address rank 2011-03-18 09:52:16 +00:00
Brian Quinion
95d50f35d0 deduplicate search term graph slightly earlier 2011-03-07 16:16:05 +00:00
Brian Quinion
9c41353340 better error checking for middle of the sea 2011-02-22 20:01:26 +00:00
Brian Quinion
4255f5a0d0 filter by feature rank, current options: country, state, city 2011-02-08 14:45:17 +00:00
Brian Quinion
52d6f55ea6 fix search by just country code. Re-order some search results (admin boundaries always ended up at the top) 2011-02-08 14:21:39 +00:00
Brian Quinion
10620c71bb lots of little bug fixes and missing files 2011-02-02 12:01:26 +00:00
Brian Quinion
550578b359 final result ordering, remove GB postcode hacks 2011-01-24 11:24:47 +00:00
Brian Quinion
31273a42bd aux properties, memory leaks, tweaks to search order 2011-01-21 10:40:44 +00:00
Brian Quinion
2be00f37c1 finally fix adminitrative spelling error, disable fast_update on indexes by default (performance), fixes for incremental updates on new codebase 2011-01-05 14:07:26 +00:00
Brian Quinion
631e8d09ab postcode/zipcode improvements, finish work on handling extratags 2010-12-07 13:41:02 +00:00
Brian Quinion
7df80bbc6f tigger data import 2010-11-15 16:34:27 +00:00
Brian Quinion
dcc3501357 images and javascript 2010-11-01 16:07:13 +00:00
Brian Quinion
e96b1f3242 images and javascript 2010-11-01 15:46:28 +00:00
Brian Quinion
cb40aa41d5 more partitioning work, os open data postcodes, country list fixes 2010-11-01 15:09:10 +00:00
Brian Quinion
57583f09e3 hstore names / refactoring 2010-10-27 14:05:42 +00:00