Re: [WDB-Users] wci.addplacepoint
Brought to you by:
falkenroth,
michaeloa
From: Vegard B. <veg...@me...> - 2012-05-16 08:40:56
|
Strangely, this works for me: wdb=# SELECT wci.begin('wdb'); begin ------- (1 row) wdb=# SELECT wci.addPlacePoint('prova_point', ST_GeomFromText('Point(10 10)', 4030)); addplacepoint --------------- 126 (1 row) wdb=# SELECT * FROM wci_int.placename WHERE placename in ('prova_point', 'bar'); placeid | placenamespaceid | placename ---------+------------------+------------- 126 | 88 | prova_point (1 row) Regarding namespaces, it allows places and such to have the different names in different contexts. In theory, you can ignore it. In that case, just call wci.begin without any other arguments than the provider name. One thing you can do: execute SELECT * FROM wdb_int.placename WHERE placeid=28; 28 is the value returned by addPlacePoint. If that returns no rows, the name has not been registered properly (and you may have found a bug - congratulations ;) Also, what happens if you simply try to execute the same all over again? VG ----- Original Message ----- Fra: "Filippo Locci" <fil...@gm...> Til: wdb...@li... Sendt: 15. mai 2012 11:06:07 Emne: [WDB-Users] wci.addplacepoint Hi, following ISSUE wci.addPlacePoint quietly overwrites old place names in https://github.com/wdb/wdb/issues/21 I try to create a new place point 'prova_point', and also added a data provider 'prova': wdb=# SELECT wci.begin('wdb'); begin ------- (1 riga) SELECT wci.addPlacePoint('prova_point', ST_GeomFromText('Point(10 10)', 4030)); addplacepoint --------------- 28 (1 riga) wdb=# SELECT * FROM wci_int.placename WHERE placename in ('prova_point', 'bar'); placeid | placenamespaceid | placename ---------+------------------+----------- (0 righe) Then I'm loading data with a data provider 'prova' and place point 'prova_point', and an error occurred: 2012-05-15 10:52:28,194 WARN wdb.fastload.job.translate 0: Error when generating data: Not a recognized placename: prova_point (from 273.741 prova_point 2011-01-01T00:00:00Z 2011-01-01T01:00:00Z 2011-01-01T01:00:00Z air temperature height above ground 0 0) I don't understand in the the function wci.addPlacePoint('prova_point', ST_GeomFromText('Point(10 10)', 4030)); the number 4030; also I need to understand the role of namespace in the WDB structure. Thank you so much for your support! Regards Filippo ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WDB-Users mailing list WDB...@li... https://lists.sourceforge.net/lists/listinfo/wdb-users |