Sarah Hoffmann [Sun, 1 Jul 2012 11:19:59 +0000 (13:19 +0200)]
more generalized javascript_renderData
- handles json/jsonp transparently (avoiding code duplication in templates)
- use php's internal json_encode functions (with JSON_UNESCAPED_UNICODE
for backward compatibility)
- be more liberal with what is allowed as a callback identifier
- return a 400 for illegal callbacks
- return application/javascript type when jsonp is requested
Sarah Hoffmann [Fri, 29 Jun 2012 20:11:40 +0000 (22:11 +0200)]
make sure invalid geometries are always deleted from place
This solves a bug with updating large invalid geometries. These
geometries have an entry in place but not in placex. Thus, place_insert
tries to delete the place entry and reinsert it on update. Deletion would
fail because self-intersecting polygons still have an area and large
areas are not deleted.
Sarah Hoffmann [Fri, 15 Jun 2012 23:25:16 +0000 (01:25 +0200)]
create a globale configure/make
- move the configure from nominatim out and add checks for all dependencies
- bring module under automake control
- add osm2pgsql as a submodule, configure and build with the others
Brian Quinion [Tue, 22 May 2012 14:27:42 +0000 (16:27 +0200)]
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
Sarah Hoffmann [Mon, 16 Apr 2012 22:17:05 +0000 (00:17 +0200)]
make it run with 64bit and 32bit osm2pgsql
Needs tweaking on the osm2pgsql side, too: the osmid column
needs to have the same format as in osm2pgsql. That means
that the changes are still not compatible with existing installations.
Brian Quinion [Sun, 1 Apr 2012 00:40:50 +0000 (01:40 +0100)]
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);
Brian Quinion [Thu, 22 Mar 2012 00:33:28 +0000 (00:33 +0000)]
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
Sarah Hoffmann [Tue, 20 Mar 2012 23:40:35 +0000 (00:40 +0100)]
Black/whitelisting for special phrases
Allows to restrict the special phrases imported from the wiki.
Blacklist allows to exclude certain class/type combinations.
Whitelist allows to define an allowed subset of types for a class.
Adjust to your liking in settings/phrase_settings.php before running
the specialphrases script.
Sarah Hoffmann [Fri, 9 Mar 2012 22:47:25 +0000 (23:47 +0100)]
restrict deferred delete to concerned place
Deleting by osm_type/osm_id goes wrong if the place was reimported
because of a change in geometry, admin_level etc. The newly created
place is deleted as well in this case.