MapServer PostGIS connection: oids an gids to build a query

Fabio D'Ovidio dovidio at PLANETEK.IT
Wed May 23 09:10:57 PDT 2007


I agree with you ! It is right!!

The problem is: a customer has sent me the database dump and the original data come 
from sensors in automatic way. This is the reason for which database structure is so bad !!

I don't want to change it, so I have asked u a solution.

Thanks



On 23 May 2007 at 9:50, Gregor Mosheh wrote:

> > I have imported some geographical data (POINT) and their alphanumeric information in 
> > PostgreSQL\PostGIS database. The structure of the database is WITHOUT OIDS and there 
> > are no GIDs in the tables. So PK and FK are not numerical keys: they are string type keys!.
> 
> Ouch! Mapserver does use the oid, and having an index on the oid is very 
> helpful for performance. (this was the case with 4.8 anyway, has it 
> changed in 4.10?)
> 
> 
> > So MapServer is able only to query data if they have integer ids in 
> > PostGIS structure. WHY ??
> 
> Mapserver/PostGIS queries by coordinate. "select where the_geom 
> intersects" blah blah blah. I don't know about the other GIS software, 
> but a unique identifier field, a primary key, is a pretty standard 
> expectation.
> 
> I'd say to always have numeric fields for both PKs and FKs, but that's 
> just me talking on general principle.
> 
> -- 
> Gregor Mosheh / Greg Allensworth
> System Administrator, HostGIS cartographic development & hosting services
> http://www.HostGIS.com/
> 
> "Remember that no one cares if you can back up,
>   only if you can restore." - AMANDA

--
Ing. Fabio D'Ovidio

Staff Web GIS
Planetek Italia s.r.l.
Via Massaua 12, I-70123 Bari 
Tel.: +39 080 5343750 Fax: +39 080 5340280 
dovidio at planetek.it - http://www.planetek.it 
--



More information about the MapServer-users mailing list