3 require_once(CONST_BasePath.'/lib/init-website.php');
 
   4 require_once(CONST_BasePath.'/lib/log.php');
 
   5 require_once(CONST_BasePath.'/lib/output.php');
 
   6 ini_set('memory_limit', '200M');
 
   8 $oParams = new Nominatim\ParameterParser();
 
   9 $sOutputFormat = $oParams->getSet('format', array('json'), 'json');
 
  10 set_exception_handler_by_format($sOutputFormat);
 
  12 $oDB = new Nominatim\DB();
 
  15 $sSQL = 'select placex.place_id, country_code,';
 
  16 $sSQL .= " name->'name' as name, i.* from placex, import_polygon_delete i";
 
  17 $sSQL .= ' where placex.osm_id = i.osm_id and placex.osm_type = i.osm_type';
 
  18 $sSQL .= ' and placex.class = i.class and placex.type = i.type';
 
  19 $aPolygons = $oDB->getAll($sSQL, null, 'Could not get list of deleted OSM elements.');
 
  26 if ($sOutputFormat == 'json') {
 
  27     javascript_renderData($aPolygons);