Egil Kvaleberg wrote:
Following up my previous mail, I've removed the
gis_region column, and
instead added a gis_globe column, so that it is easy to make this work in
other worlds too, e.g. "Moon", "Mars" and I guess, "Sky"
for the star maps.
Neat! :)
CREATE TABLE wikipedia_gis (
gis_id int(8) unsigned NOT NULL,
gis_latitude_min real NOT NULL,
gis_latitude_max real NOT NULL,
gis_longitude_min real NOT NULL,
gis_longitude_max real NOT NULL,
gis_globe char(12) binary,
gis_type char(12) binary,
gis_type_arg char(12) binary,
KEY gis_id (gis_id),
INDEX gis_latitude_min (gis_latitude_min),
INDEX gis_latitude_max (gis_latitude_max),
INDEX gis_longitude_min (gis_longitude_min),
INDEX gis_longitude_max (gis_longitude_max)
);
How do you expect this table to be queried? Individual indexes on the
lat/long fields seem like they'd be kind of awkward, since it can only
really use one in a given query.
How to make addition of this table possible without
shell access
via the maintenance module?
Provide an .sql file with the creation commands. Those poor souls
without shell access generally have phpMyAdmin.
Should the table use article ID or title as key?
Assuming the referenced article is the one containing the item, use the
page_id number; this is preserved when pages are renamed.
Don't call it gis_id, however; under our naming conventions that would
be the name of a unique record ID within the gis table. gis_page would
be better.
How to rerieve article title based on ID in a portable
manner?
Assuming you're pulling a bunch of records, something like:
select page_namespace,page_title, gis_blah,etc
from page,gis
where page_id=gis_page
and whatever_conditions;
Any chance to test this extension on a broader scale?
When I get a few spare hours I'm going to set up a 1.5 test wiki on my
site; I'll set it up there.
-- brion vibber (brion @
pobox.com)