Commit Graph

162 Commits

Author SHA1 Message Date
Oleksandr Shulgin
ab47773604 Add polygon simplification
New query string parameter polygon_threshold=<0.0..1> is introduced.
The float value of this parameter (defaults to 0) is passed to
ST_SimplifyPreserveTopology() on geometry we're about to output in
one (or many) requested formats such as GeoJSON, KML, etc.

This is useful when getting border polygons for whole countries, but
rendering them at large scale, when most of the high resolution details
cannot be seen anyway.  For example, the unsimplified polygon data for
Germany in GeoJSON format currently makes for about 3 MB response body.
With use of this new parameter, the application can greatly reduce the
amount of downloaded data and server response time while providing its
users with the same picture.  On a typical laptop screen resolution,
zooming out to fit the whole country borders on screen, only 1/100 amount
of details could be well enough.
2015-04-27 15:16:38 +02:00
Sarah Hoffmann
133dd2e974 make sure place exists before printing hierarchy 2015-03-29 19:03:51 +02:00
Sarah Hoffmann
753227ae25 more strict parameter checking for reverse 2015-03-17 21:06:58 +01:00
Sarah Hoffmann
02c219d40e PATH_INFO is delivered URL encoded on newer apache 2.4 2014-10-16 00:33:56 +02:00
Sarah Hoffmann
bc27cb2bd8 introduce util function to query db from command line 2014-03-03 20:02:24 +01:00
Sarah Hoffmann
be858d56ca make website work with https without browser complaints 2014-02-20 19:46:41 +01:00
Brian Quinion
2df5d391de return a 500 error on bad status 2014-01-23 16:48:20 +00:00
Brian Quinion
f56cae4291 validate postgresql module / functions 2014-01-23 16:06:43 +00:00
Brian Quinion
47fdb33adf nominatim fallback mode for structured queries 2014-01-23 14:40:37 +00:00
Sarah Hoffmann
c574c933e4 reenable reverse order queries, leave disabled for structured queries 2013-09-16 00:05:26 +02:00
Brian Quinion
a974d25092 fix structured and batch mode. Add constant to disable batch mode by default 2013-09-12 16:16:08 +01:00
Brian Quinion
a2ba8708cb add a json output format for hierarchy 2013-09-09 15:55:30 +01:00
Brian Quinion
28a5ef899e Test code for creating osm breadcrumbs and hierarchy 2013-09-09 14:09:28 +01:00
Brian Quinion
6a337f13d0 XML and JSON map 'ploygon' param to AsPoints 2013-09-06 09:47:46 +01:00
Brian Quinion
b3ed566d15 Test for polygon param correctly 2013-09-06 09:47:46 +01:00
Brian Quinion
cdd129de70 fix viewbox issues 2013-09-06 09:47:46 +01:00
Brian Quinion
eb793ae26e Fix for regressions: broken bounded search, error on country codes 2013-09-06 09:47:46 +01:00
Brian Quinion
662af78319 batch mode for json only 2013-09-06 09:47:45 +01:00
Brian Quinion
91d72617e6 Use correct value for html ploygons 2013-09-06 09:47:45 +01:00
Brian Quinion
4429121341 move more code into library 2013-09-06 09:47:45 +01:00
Sarah Hoffmann
ea761a15b6 more restrictive parsing of lat/lon
Require a decimal point in both numbers to avoid cases like
https://trac.openstreetmap.org/ticket/4884
2013-07-07 16:44:37 +02:00
Sarah Hoffmann
3ccf466e2f fix error output 2013-07-04 17:52:25 +02:00
Sarah Hoffmann
d5e9fc4a03 support for partial matching of US ZIP+4 codes 2013-06-19 22:58:46 +02:00
Brian Quinion
c5c44f9a07 missed some postcode use cases 2013-06-13 17:19:27 +01:00
Brian Quinion
464fb913a8 Allow for tiger addresses when filtering by rank 2013-06-11 17:28:30 +01:00
Brian Quinion
e26da936b3 recheck the rank limits before dropping out of the search loop - otherwise we can drop out too soon 2013-06-11 17:13:37 +01:00
Brian Quinion
aa8c6e5f13 Try alternative orderings of structured queries that include postal codes 2013-06-11 14:56:50 +01:00
Brian Quinion
5413abfb1e remove the structuredAddressElement function from search that was moved to lib.php 2013-06-07 16:23:37 +01:00
Sarah Hoffmann
9cec989882 remove suggestion code, no longer works 2013-05-08 20:23:47 +02:00
Brian Quinion
93b1089866 Only use placex that are fully indexed for reverse geocoding 2013-05-08 12:16:45 +01:00
Sarah Hoffmann
0e6cfed1a4 remove debug putput 2013-05-06 21:33:01 +02:00
Sarah Hoffmann
3ec91d267b fix missing number conversion for coordinates 2013-05-06 21:19:12 +02:00
Sarah Hoffmann
ea48296eed fix 500 on reverse via search without result
e.g. /search?q=1,1
2013-05-06 21:04:09 +02:00
Sarah Hoffmann
ddc46acd26 add support for house numbers without street 2013-04-27 00:57:18 +02:00
Sarah Hoffmann
2df0cafb24 fix inconsistency between getNearestNamendRoadFeature() and house number search 2013-04-23 21:25:56 +02:00
Sarah Hoffmann
b4c87a09a1 restrict depth of word set calculation 2013-04-20 00:18:08 +02:00
Sarah Hoffmann
fb0d219c7b harmonize formatting of frontend php 2013-04-12 22:45:24 +02:00
Sarah Hoffmann
2f88e7ceab adapt status page to new word table layout 2013-04-10 19:50:38 +02:00
Sarah Hoffmann
23d303124e remove unused columns from word and search_name_* tables
Removes 'trigram' and 'location' from word.
  Removes 'address', 'importance' and 'country_code' from search_name_*.
  Use full geometry in centroid column of search_name_*.

  Requires migration of existing tables. For more info see pull request
  https://github.com/twain47/Nominatim/pull/45
2013-04-09 22:44:05 +02:00
Sarah Hoffmann
4d2b88dd3e allow any unicode letter and spaces in special terms
Allows to search for things like [fish shop].
2013-04-07 17:53:34 +02:00
Sarah Hoffmann
a1670fa5a7 correct rank_address range for postalcodes 2013-04-03 22:29:47 +02:00
Brian Quinion
b980f8e4e1 Import class:type from linked features to the extratags files. Use place tags (in extratags) as well as rank to determine feature type. i.e. allow a admin_level=6 feature also tagged as a place=city to still be found when doing a city search. 2013-02-28 12:50:47 +00:00
Sarah Hoffmann
917d4f691c remove full-word constraint for possible main words
Reversing the address did not work most of the time because
the address normally only contains the partial version of the word only.

See also
https://help.openstreetmap.org/questions/16317/warum-werden-straen-bei-suche-nicht-gefunden
2013-02-24 22:55:43 +01:00
Sarah Hoffmann
705bcf80fb Merge branch 'address-importance' of https://github.com/lonvia/Nominatim 2013-02-13 22:10:28 +01:00
Sarah Hoffmann
463ef857c8 increase initial search radius for reverse lookups
On the osm.org instance, this saves 2 psql queries for about 87% of
reverse requests consequently increasing throughput significantly. A lower
value might make sense if an instance is used only in areas with very
high mapping density but for standard usage this one should be better
suited.
2013-02-12 19:10:36 +01:00
Brian Quinion
e891aa3041 include the type (not just class) in the dedupe 2013-02-07 18:41:17 +00:00
Brian Quinion
7a4d550c7a more debug in reverse geocoding 2013-02-07 18:41:17 +00:00
Sarah Hoffmann
364855c8a5 split query as utf8 string to avoid splitting on non-ascii characters 2013-01-31 20:52:04 +01:00
Sarah Hoffmann
13fff85415 stack importance instead of multiplying it for order 2013-01-31 20:11:40 +01:00
Sarah Hoffmann
f172d7b01e order results by importance of address parts 2013-01-31 20:10:58 +01:00