Fwd: OGR-join problem with DBF files
Frank Warmerdam
fwarmerdam at GMAIL.COM
Mon Mar 7 06:36:32 PST 2005
Whoops ... I accidentily neglected for cc: this reply to the list.
---------- Forwarded message ----------
From: Frank Warmerdam <fwarmerdam at gmail.com>
Date: Mon, 7 Mar 2005 09:35:41 -0500
Subject: Re: OGR-join problem with DBF files
To: Rainer Spittel <gosia.rainer at t-online.de>
On Mon, 7 Mar 2005 08:07:35 -0600, Rainer Spittel
<gosia.rainer at t-online.de> wrote:
> Hi Frank,
>
> thanks for the fast reply.
>
> I called 'ogrinfo' as you have described before and it's working fine. I
> receive a joined output of both files, the shapefile and the dbf.
>
> But the mapserver part is still not running. I added the following lines:
>
> CONNECTIONTYPE OGR
> CONNECTION "ms_wasser/baden/badeseenbremen"
> DATA "SELECT * FROM badeseenbremen LEFT JOIN bade ON
> badeseenbremen.GewaessNr = bade.GewaessNr"
>
> and receive following error message:
>
> Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named
> 'Baden'. in D:\ms4w\apps\wasser_2.0\ms_digitalmap_inc.php on line 755
>
> Warning: [MapServer Error]: msOGRFileOpen(): Open failed for OGR
> connection `ms_wasser/baden/badeseenbremen'. File not found or unsupported
> format. in D:\ms4w\apps\wasser_2.0\ms_digitalmap_inc.php on line 755
>
> Fatal error: Call to a member function on a non-object in
> D:\ms4w\apps\wasser_2.0\ms_digitalmap_inc.php on line 757
>
> When the CONNECTION tag does not link directly to a shape-file (ending
> with .shp), I get this message.
Rainer,
I would suggest using an absolute path to the directory with the .shp
files instead of a relative path. The path processing logic in mapserver
for SHAPEPATH, etc) may not work properly when referring to a
directory as we do in this case.
Also, make sure the directory does not contain any other files that
might confuse OGR. Just the shapefile and dbf files.
> I also tried to add the exact sql statement of the ogrinfo statement and
> it is not working.
> I am still not sure what I can do...
Well, the path is wrong of course.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list