[mapserver-dev] JOIN from PostGIS to CSV

strk strk at keybit.net
Tue Apr 20 11:09:25 EDT 2010


Hi all,
I'm trying to setup a JOIN between a PostgreSQL table
and a CSV file.

Documentation [1] contains an example of Shapfile to CSV,
I tried it with POSTGIS to CSV but didn't have luck.

In particular, I get this error:

   msDBFJoinConnect(): Unable to access file.

I have NOT specified a CONNECTIONTYPE, and the documentation
says that's supposed to just work with CSV, so can't understand
why msDBFJoinConnect is being called.

I've taken a look at the mapserver trunk code and found
that a join's connectiontype is initialized to XBASE

 mapfile.c:void initJoin(joinObj *join):
   join->connectiontype = MS_DB_XBASE;

So I tried explicitly asking for CSV instead, adding a CONNECTIONTYPE
string. BUT, I'm doing the mapfile using mapscript and I don't
find the CONNECTIONTYPE part in the resulting mapfile after save.
No wonder, as the JOIN writer isn't writing anything for that !

 ref: mapfile.c:static void writeJoin(joinObj *join, FILE *stream)

Can we call it a couple of bugs ?


[1] http://mapserver.org/mapfile/join.html


--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html


More information about the mapserver-dev mailing list