Opened 15 years ago
Closed 13 years ago
#3144 closed defect (fixed)
JOIN documentation for CSV files is wrong...
Reported by: | sdlime | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | 5.6 release |
Component: | Documentation - MapServer | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | havatv |
Description
The page http://mapserver.org/mapfile/join.html has a few problems with respect to CSV files. First, setting "CONNECTIONTYPE CSV" is required. Only DBF files (the default) don't need a connection type. Second, the CSV driver is really basic in that it doesn't read column names from the first row. It just uses indexes (1, 2, ... n) to reference the columns. It's ok to leave column names as the first row since they likely won't match anything but they aren't used. Typically you'd see something like "TO '1'" in the JOIN block. Then in the template you'd use [name_1], [name_2], etc...
Making the first row containing column names as required is a good 6.0 target...
Steve
Change History (6)
comment:1 by , 14 years ago
comment:3 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 13 years ago
Steve, the join.html page mentions CONNECTIONTYPE OGR .... but OGR is not a valid value in a mapfile. Should it be valid?
comment:5 by , 13 years ago
OGR shouldn't be valid. Probably a cut & paste error when that document was originally prepared. Valid connection types are CSV, POSTGRESQL (default is XBASE and there's no toen for that). Mapfile.c lists Oracle as an option, not sure why, it's not in the lexer and MySQL is gone (which I didn't think was happening). A bit of a mess.
Let me look at the doc and post more here...
Steve
comment:6 by , 13 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
I have updated the join document for 6.0 and trunk in r12049 according to what has been written above. I close the ticket - please reopen if something more needs to be done.
Great, I tought I was doing something stupid myself. On a side note, the join output routine doesn't output CONNECTIONTYPE at all, which makes using CVS even harder (when creating the mapfile on the fly using mapscript).
I've sent a patch on the mailing list for that, but I guess a new item would be worth it.