Hi, I enabled the modules geo, geo_data, and geo_field modules, but the 'Geospatial data' admin page at /?q=admin/build/geo returns the following messages:

* Call to undefined geo operation tables
* warning: Invalid argument supplied for foreach() in D:\WWW\drupal-6.x\sites\all\modules\geo\modules\geo_data\geo_data.admin.inc on line 13.

Where did i go wrong?

Thanks,
John

Comments

allie micka’s picture

Which database are you using?

jpulles’s picture

Sorry, you probably suspect that it is postgresql, and it is. Other info: php 5.2.6, Apache 2.2.8, Drupal 6.4, Geo of 2008-Sep-23 (I now notice that there is a more recent version).

allie micka’s picture

Please use the latest version, which corrects a number of bugs and works much better with PostGIS.

However, the error you're describing suggests that postgis is not being found correctly. Line 16 of geo.inc is looking for a postgis function. If it's not found, it won't correctly include a backend ( this is arguably a bug ).

Can you try logging into your Drupal database and running the following query?

SELECT 1 FROM pg_catalog.pg_proc WHERE proname = 'postgis_version';

And also:

SELECT postgis_version();

Thanks!

jpulles’s picture

Thanks, for mentioning this! I forgot that for my drupal installation i am using a normal (= without postgis) postgresql database for the drupal database, and a postgis-enabled database for the geodata in order to keep it 'cleaner'. How much would it complicate things to provide an option to use a separate database for geo data, say be able to use $db_url['default'] for drupal tables and $db_url['geo'] for geo data?

At least, it is now clear why geo doesn't function out of the box in my setup.

allie micka’s picture

That's a worthwhile feature request for geo_data.

However, I'm not sure how well it would play with the CCK field modules and Views, which rely on having access to both geospatial data and Drupal at the same time.

jpulles’s picture

True, it may not play well with cck/views. But maybe it would eventually make sense to make a distinction between data integrated with drupal and usable in cck/views, and data in a separate database. The latter one may be more efficient when drawing maps.

Don't make it a feature request yet, it's probably more useful to play with these modules first in order to get a bigger idea.

Thanks.