Closed h4ck3rm1k3 closed 12 years ago
I wrote the code based on sqlite with rtree. I thought you were running ubuntu or some other debian based distro(?) and that usually has rtree enabled at compile time. SpatiaLite looks very interesting. I am not sure at this stage what benefit it will have but it might be worth forking the sqlite code to better use SpatiaLite functions.
Can you try to run checkrtree.php ? This will probably have the same "no such modile: rtree" error...
It seems that apache needs to be configured to use SpatiaLite. It would be better if it worked without configuration, which is the whole point of sqlite based approaches!
I am not running in apache, but on the command line. I am running ubuntu precise.
On Sun, Sep 30, 2012 at 7:48 PM, Tim Sheerman-Chase < notifications@github.com> wrote:
I wrote the code based on sqlite with rtree. I thought you were running ubuntu or some other debian based distro(?) and that usually has rtree enabled at compile time. SpatiaLite looks very interesting. I am not sure at this stage what benefit it will have but it might be worth forking the sqlite code to better use SpatiaLite functions.
Can you try to run checkrtree.php ? This will probably have the same "no such modile: rtree" error...
It seems that apache needs to be configured to use SpatiaLite. It would be better if it worked without configuration, which is the whole point of sqlite based approaches!
— Reply to this email directly or view it on GitHubhttps://github.com/TimSC/microcosm/issues/7#issuecomment-9015999.
James Michael DuPont Member of Free Libre Open Source Software Kosova http://flossk.org Saving wikipedia(tm) articles from deletion http://SpeedyDeletion.wikia.com Contributor FOSM, the CC-BY-SA map of the world http://fosm.org Mozilla Rep https://reps.mozilla.org/u/h4ck3rm1k3 Free Software Foundation Europe Fellow http://fsfe.org/support/?h4ck3rm1k3
ok it looks like this was an issue with /usr/local/bin/php, i will remove that and check it all again.
Ah yes, I keep forgetting you are using the console. checkrtree.php should have some SQL that will verify if rtree is working. I assume you fixed it somehow, since you closed the issue!
When I insert data to a rtree table in sqlite using java code,I get the same error: no such module:rtree, any ideas to fix that?
@buffon The most likely scenario is that sqlite has not been compiled with the RTREE module enabled. It is included as part of the sqlite "amalgamation" but is disabled by default. Try to recompile the library or get a copy which has this enabled. FYI see section 2 of https://www.sqlite.org/rtree.html
Tim
Tim,I get another problem here. As I use Rtree in sqlite,there is a requirement: while I have a center point,I want to find the points in the given distance from the center point and the points found out is by the order of distance from the center point. Is there any method to achive that? Thanks.
@buffon As far as I know, R*Tree only provides a spatial index but no other functions like distance sorting. You might try SpatiaLite which as more spatial features. I have not used it though.
Yes,I have searched SpatiaLite from this morning,but there seems no enough document on line,I am trying my best to look into it .
Anyway,thanks for your suggestion.
in my branch : 1) test::testMapQuery Exception: SELECT id FROM position WHERE minLat > 0 and maxLat < 0 and maxLon < 0 and minLon > 0;,no such module: rtree
/home/mdupont/experiments/fosm/microcosm/model-sqlite-opt.php:509 /home/mdupont/experiments/fosm/microcosm/model-sqlite.php:387 /home/mdupont/experiments/fosm/microcosm/modelfactory.php:124 /home/mdupont/experiments/fosm/microcosm/model-common.php:76 /home/mdupont/experiments/fosm/microcosm/modelfactory.php:148 /home/mdupont/experiments/fosm/microcosm/messagepump.php:130 /home/mdupont/experiments/fosm/microcosm/messagepump.php:141 /home/mdupont/experiments/fosm/microcosm/messagepump.php:162 /home/mdupont/experiments/fosm/microcosm/querymap.php:28 /home/mdupont/experiments/fosm/microcosm/test/001_microcosm.php:23 /usr/local/bin/phpunit:46
I guess sqlite/spatialite is not setup properly. any ideas?