Opened 17 years ago

Closed 17 years ago

#2269 closed defect (invalid)

nquery issues MapServer CGI on Windows

Reported by: mikesaunt Owned by: sdlime
Priority: highest Milestone: 5.0 release
Component: MapServer CGI Version: 5.0
Severity: critical Keywords: nquery
Cc:

Description

Hi

I have two instances of MapServer on a Windows machine (x64 edition although I have tested on 32 xp) running under IIS. I have the same .map files running. All rendering seems to work OK but the nQuery commands seem to fail on the MapServer 5.0 version although it is fine in the MapServer 4.0. The MapServer 5.0 version have been derived from the MS4W compilation and I had to replace a lymysql.dll although things still didn't work before that on MapServer 5.0

The attached query.zip file has a .map file - query.map and also the relevant data. I have the same data in two formats (ESRI Shape and MapInfo Tab) to ensure it isn't a format issue.

The following are the URL's used. They may appear 'weird' as they point to XML templates but we use the output in .NET to create datasets very quickly. We also use mapext of a point which has never caused a problem.

http://localhost/mapserver/mapserv.exe?map=D:/Maps/astun/sample/_MapServerConfig/query.map&mode=nquery&mapxy=373494+164333&mapext=373494+164333+373494+164333&layers=Counties&map_Counties_tolerance=10&map_Counties_template=_MapServerTemplates/Counties_fields.xml

http://localhost/mapserver/mapserv.exe?map=D:/Maps/astun/sample/_MapServerConfig/query.map&mode=nquery&mapxy=373494+164333&mapext=373494+164333+373494+164333&layers=CountiesSHP&map_CountiesSHP_tolerance=10&map_CountiesSHP_template=_MapServerTemplates/CountiesSHP_fields.xml

In summary it may be a problem with the MS4W compilation but it takes a long time to build on Windows without the 'HOBU kitchen sink' build kit

Many thanks Mike Saunt mikesaunt@… +44 (788) 7777 680

Attachments (1)

query.zip (180.9 KB ) - added by mikesaunt 17 years ago.
Sample data and explanation notes

Download all attachments as: .zip

Change History (6)

by mikesaunt, 17 years ago

Attachment: query.zip added

Sample data and explanation notes

comment:1 by hobu, 17 years ago

Mike,

I can't get the nquery to return results with the shapefile. Are you seeing this too?

Howard

comment:2 by mikesaunt, 17 years ago

Hi Howard

Yes - with both either MapInfo or Shape - do you have a v4 instance of MapServer as this worked for me.

Kind regards Mike

comment:3 by hobu, 17 years ago

Ah, I somehow got confused and thought this was an ArcSDE problem. Now I see it is Steve's :)

On immediate thing I see is your query point is on the bounds of the mapext. Watching mapserv respond to this query with debug on shows that it doesn't even attempt to open the layer.

comment:4 by hobu, 17 years ago

Milestone: 5.0 release

comment:5 by sdlime, 17 years ago

Resolution: invalid
Status: newclosed

The other thing I notice is that you are setting the tolerance and template via a URL the syntax for that has changed. It should be:

...&map.layer[CountiesSHP]=TOLERANCE+10+TEMPLATE+_MapServerTemplates/CountiesSHP_fields.xml&...

You also must set a TEMPLATEPATTERN in your mapfile to allow a template to be changed via URL. I added TEMPLATEPATTERN '.' to the mapfile to allow any template.

Then using a call like:

mapserv "QUERY_STRING=map=query.map&map.layer[CountiesSHP]=TOLERANCE+10+TEMPLATE+'_MapServerTemplates/CountiesSHP_fields.xml'&mapxy=373494+164333&qlayer=CountiesSHP"

I got XML output with that. Like so:

<row LayerName="Counties">

<name><![CDATA[Avon]]></NAME> <MapSpurE>356987.293046</MapSpurE> <MapSpurN>175844.504289</MapSpurN>

</row> <row LayerName="Counties">

<name><![CDATA[Dorset]]></NAME> <MapSpurE>377788.625777</MapSpurE> <MapSpurN>100097.106756</MapSpurN>

</row> <row LayerName="Counties">

<name><![CDATA[Gloucestershire]]></NAME> <MapSpurE>389337.454004</MapSpurE> <MapSpurN>216258.290963</MapSpurN>

</row> <row LayerName="Counties">

<name><![CDATA[Gwent]]></NAME> <MapSpurE>332211.647106</MapSpurE> <MapSpurN>205574.759093</MapSpurN>

</row> <row LayerName="Counties">

<name><![CDATA[Somerset]]></NAME> <MapSpurE>327386.476571</MapSpurE> <MapSpurN>131498.298259</MapSpurN>

</row> <row LayerName="Counties">

<name><![CDATA[Wiltshire]]></NAME> <MapSpurE>405214.881593</MapSpurE> <MapSpurN>158554.028637</MapSpurN>

</row>

No idea if it's right. Note that I only return 1 row if you leave the degenerate mapext in the URL. I suppose that's because the extent takes precedence over the tolerance.

I don't think we're talking about an actual problem with the software so I'm marking as invalid so I can get it off my plate.

Steve

Note: See TracTickets for help on using tickets.