problems querying ogr data source
joanne cook
j.cook at OXFORDARCH.CO.UK
Thu Nov 24 04:04:05 PST 2005
Hi Bart,
OK, well I'm stuck at that stage as I don't have the tools to compile the source code (I'm on a standard windows machine). I guess I'll just have to wait until that gets included in the binaries...
Thanks
Jo
-------------------------------------------
Joanne Cook BSc MLitt AIFA
Information Systems Coordinator
Oxford Archaeology North
-------------------------------------------
________________________________
From: Bart van den Eijnden [mailto:BEN at Syncera-ITSolutions.NL]
Sent: Thu 24/11/2005 11:59
To: MAPSERVER-USERS at LISTS.UMN.EDU; joanne cook
Subject: Re: [UMN_MAPSERVER-USERS] problems querying ogr data source
Hi Jo,
I would suggest taking the last available daily snapshot of GDAL.
You should specify the primary key of your table, and I assume it should be in the case like it is in your DB (you could use ogrinfo to check the case).
Btw, I haven't tried this myself yet, it is on my todo list.
Best regards,
Bart
Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG DELFT
tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl
>>> joanne cook <j.cook at OXFORDARCH.CO.UK> 11/24/2005 11:58:53 AM >>>
Hi Bart,
So what version of gdal/ogr would I have to upgrade to in order for this to work? Also, can I clarify- the "ID" in the CONFIG line, presumably that's the unique ID for my table. So in my case it's called "ProjectID". Does it need to be in capitals or should it be exactly as written in the database itself?
Many thanks for your help
Jo
-------------------------------------------
Joanne Cook BSc MLitt AIFA
Information Systems Coordinator
Oxford Archaeology North
-------------------------------------------
________________________________
From: Bart van den Eijnden [mailto:BEN at Syncera-ITSolutions.NL]
Sent: Thu 24/11/2005 09:24
To: MAPSERVER-USERS at LISTS.UMN.EDU; joanne cook
Subject: Re: [UMN_MAPSERVER-USERS] problems querying ogr data source
Hi Joanne,
it was also recently posted on the gdal-dev list by Frank to me:
Bart,
A few days ago I added a mechanism to specify the name of
the FID column using the ODBC_OGR_FID configuration variable.
So, in a mapfile you could put:
CONFIG "ODBC_OGR_FID" "ID"
However, this is a global setting, not layer specific. If this
won't do the trick, let me know and I will add a way to specify
the FID along with the tablename in the datasource name.
Best regards,
Bart
Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG DELFT
tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl
>>> joanne cook <j.cook at OXFORDARCH.CO.UK> 11/24/2005 10:08:34 AM >>>
Hi Frank,
Many thanks for the quick response. I should be able to upgrade to the nightly snapshot of gdal/ogr, but is there anywhere where I might find some information on the syntax of this config line? I had a look in the main mapserver and ogr/vrt documentation and couldn't find anything that specifically referred to it.
All the best
Jo
-------------------------------------------
Joanne Cook BSc MLitt AIFA
Information Systems Coordinator
Oxford Archaeology North
-------------------------------------------
________________________________
From: fwarmerdam at gmail.com on behalf of Frank Warmerdam
Sent: Wed 23/11/2005 17:13
To: joanne cook
Cc: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] problems querying ogr data source
On 11/23/05, joanne cook <j.cook at oxfordarch.co.uk> wrote:
> Hi All,
>
> I have recently upgraded to Mapserver version 4.2.5, and have come across a problem, that I'm fairly convinced I didn't have before the upgrade. I have a layer in my map file that is an ogr connection via an ovf file to a microsoft access database. I also have other standard layers based on shape files. When I am in nquery mode and I query the layer based on the access database it returns the top record from the database regardless of where on the map I am clicking. If I choose more than one point then it returns more records, working down from the first record in order. If I query an area with no points, then I get the standard error message. When I query one of the other layers the querying works properly.
>
> I would be very grateful for any thoughts that anyone has on this curious situation!
Jo,
I suspect this is a problem with the OGR ODBC driver
selecting a column as the feature id. If it ends up with the
default mechanism of assigning feature ids sequentially
to the result set, then you would see problems like the above.
I don't know why it would have worked with an older mapserver.
Are you in a position to upgrade to a nightly snapshot of GDAL/OGR?
If so, you can add a CONFIG line to your map file to force selection
of a particular column as fid.
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
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
More information about the MapServer-users
mailing list