GeoKretyMap / Api

Api for reading GeoKrety database
2 stars 2 forks source link

Updates are broken #20

Closed kumy closed 8 years ago

kumy commented 8 years ago

Since Sun 24, no more updated are done.

updates-1m

kumy commented 8 years ago

Attribute lon is duplicated in one node! And nodes are multiple :/

> xquery /gkxml/geokrety/geokret[@id=55044]
<geokret id="55044" dist="45" lat="49.71743" lon="49.81656" lon="10.98171" owner_id="16083" state="5" type="0" last_pos_id="848925" last_log_id="848925">Crusher 2016</geokret>
<geokret date="2016-01-23" id="55044" dist="65" lat="49.54068" lon="10.88878" waypoint="GC51VKH" owner_id="16083" state="5" type="0" last_pos_id="848936" last_log_id="848936">Crusher 2016</geokret>
<geokret id="55044" dist="965" lat="49.81398" lon="10.98448" waypoint="GC4T4WT" owner_id="16083" state="5" type="0" last_pos_id="849503" last_log_id="849503">Crusher 2016</geokret>
Query executed in 63.66 ms.
kumy commented 8 years ago

No update commands like are working

> run /home/gkmap/web/api.geokretymap.org/xquery/update.xq
[XUDY0021] Duplicate attribute lon.

Create a new xquery script to export the raw xml. Then manually fix the issue. And reimport...

kumy commented 8 years ago
list
drop database geokrety ; set autooptimize true ; create database geokrety /home/gkmap/XML/geokrety_full-dump.xml
list
xquery /gkxml/geokrety/geokret[@id=55044]
kumy commented 8 years ago

Fixed.

$ php update2.php 
======================================
Last update was at: 20160124173001
======================================
== Database connect
=== Count Krets: 197 to update...
=== Update GeoKrety
=== Update GeoKrety (Dates)
=== Close database
== Save last success date
======================================
End :)
======================================