[mapserver-users] Projection and queries - msQueryByPoint(): Search returned no results

Mapserver account for mailing list mapserver at peligroso.gaiaenv.com
Tue Nov 19 21:24:35 EST 2002


Hi all,

I am having difficulties with, what I believe to be, Proj4 inside MS. 

~~~~~~~ SETUP ~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~
(these are the relevant packages)

Linux
MS 3.6.3
proj-4.4.5 
gd-2.0.4
                

~~~~~~~ SITUATION ~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~
My map object contains the following projection object:

PROJECTION
 "proj=tmerc"
 "lat_0=50.000000000"
 "lon_0=-96.000000000"
 "k=0.998000"
 "x_0=3000000.000"
 "y_0=1000000.000"
 "ellps=GRS80"
 "units=m"
END

I have narrowed my map file to two single layers.  The layer I am querying contains the following projection definition:

 PROJECTION
  "proj=latlong"
  "ellps=GRS80"
 END

I am attempting to execute a query on a layer object using QLAYER CGI directive.  


~~~~~~~  PROBLEM~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
I believe I am receiving "msQueryByPoint(): Search returned no results" unjustly.  The same polygon can return successful results sometimes, and not others.  I suppose I would need to pass the actual coords (the same pixel location) to make sure it is not purely random.


~~~~~~~ SLEUTHING~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~
1)	Checked the archived mailing list
    a.	saw some tolerance stuff and played with the settings (both TOLERANCE and TOLERANCEUNITS)
    b.	No dice
2)	Stripped out projection object and definition in the layer object
    a.	QUERY WORKS!!!!

I have deduced the issue lies with my projecting.  Anyone else come across this issue?  Yes, the Proj4 lib pointer reside in /etc/ld.so.conf and the version in lib shows libproj.so.0.3.1.  I needed to add the install path /usr/local/bin/proj to  /etc/ld.so.conf prior to getting proj to work (this didn't seem to make senseand may not have made any difference as we were heavily dicking with SDE at the time).  It seems like the image coordinates are not being transformed correctly.

Thanks for any insight.


Cheers,
Jim



More information about the mapserver-users mailing list