GetFeatureInfo request returns 'X and Y incorrectly specified' error

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

GetFeatureInfo request returns 'X and Y incorrectly specified' error

Tito, Joseph

I’m creating a simple GetFeatureInfo() request to grab info on points when a user clicks on my map, and GeoServer is now returning the following exception.

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://geoserver.joetito.com:80/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" > <ServiceException code="InvalidPoint"> X and Y incorrectly specified Details: org.geoserver.platform.ServiceException: X and Y incorrectly specified at org.geoserver.wms.featureinfo.GetFeatureInfoKvpReader.read(GetFeatureInfoKvpReader.java:162) at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1157) at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:488) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:231)

 

Here is how I am creating the request:

 

map.events.register('click', map, findFeaturesAtLocationOnClick);           // Register users click

 

function findFeaturesAtLocationOnClick(event) {

                                               

                mouseLocation = map.getLonLatFromPixel(event.xy);

 

                var url = events.getFullRequestString({

                                                                REQUEST: "GetFeatureInfo",

                                                                EXCEPTIONS: "application/vnd.ogc.se_xml",

                                                                BBOX: map.getExtent().toBBOX(),

                                                                X: event.xy.x,

                                                                Y: event.xy.y,

                                                                INFO_FORMAT: 'text/plain',

                                                                QUERY_LAYERS: 'events',

                                                                FEATURE_COUNT: 100,

                                                                WIDTH: map.size.w,

                                                                HEIGHT: map.size.h},

                                                                wmsURL);

 

                OpenLayers.loadURL(url, '', this, setPopupHTML);

}

 

function setPopupHTML(response) {

 

                // In this function, the response contains the exception I mentioned above

}

 

This was working a while ago, but I can’t seem to figure out what I changed that is now making this fail L

 

Joe

 


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GetFeatureInfo request returns 'X and Y incorrectly specified' error

Matt Walker-2

Hi Joe,

Have you tried rounding the x, y parameters?

Matt.

@_walkermatt


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GetFeatureInfo request returns 'X and Y incorrectly specified' error

Tito, Joseph

Matt,

 

Rounding did the trick! Thanks for the help!

 

From: Matt Walker [mailto:[hidden email]]
Sent: Friday, September 30, 2011 4:06 PM
To: [hidden email]
Subject: Re: [Geoserver-users] GetFeatureInfo request returns 'X and Y incorrectly specified' error

 

Hi Joe,

Have you tried rounding the x, y parameters?

Matt.

@_walkermatt


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GetFeatureInfo request returns 'X and Y incorrectly specified' error

surajhpatil
Hi there,
I got same problem. Can you please tell me how did this trick works for you 'coz I'm little confused with round up. Actually  i paste the error link from firebug console to my firefox browser address bar and modified X & Y values by round up the number, then the script runs.
But I'm confused that where to modify the actual script i.e. whether i have to modify the values of maxExtent or i have to modify the values of maxResolution?

I'm working on the GXP viewer and referring the 'Workshop for GXP' from OPENGEO.

Thanks and regards
Suraj Patil
Reply | Threaded
Open this post in threaded view
|

Re: GetFeatureInfo request returns 'X and Y incorrectly specified' error

triton
Using the example from above the change would be something like from:

         X: event.xy.x,
         Y: event.xy.y,
to:
         X: Math.round(event.xy.x),
         Y: Math.round(event.xy.y),

or in my case the change was from:

         map.events.register('click', map, function (e) {
             var url = wmsurl
                + "?REQUEST=GetFeatureInfo"
                + "&EXCEPTIONS=application/vnd.ogc.se_xml"
                + "&BBOX=" + map.getExtent().toBBOX()
                + "&X=" + e.xy.x
                + "&Y=" + e.xy.y
                + "&INFO_FORMAT=text/html"
         etc. etc.

to:
         map.events.register('click', map, function (e) {
             var url = wmsurl
                + "?REQUEST=GetFeatureInfo"
                + "&EXCEPTIONS=application/vnd.ogc.se_xml"
                + "&BBOX=" + map.getExtent().toBBOX()
                + "&X=" + Math.round(e.xy.x)
                + "&Y=" + Math.round(e.xy.y)
                + "&INFO_FORMAT=text/html"
         etc. etc.

Fixed the problem for me.
Reply | Threaded
Open this post in threaded view
|

Re: GetFeatureInfo request returns 'X and Y incorrectly specified' error

Bubi
Does anybody know why the error occurs now? two weeks ago the same code runs fine!
Reply | Threaded
Open this post in threaded view
|

Re: GetFeatureInfo request returns 'X and Y incorrectly specified' error

beach_defender
Hi, I get the same message:

  X and Y incorrectly specified


But in my case I am using SQLSERVER and the spatial column is geom.

I have an Easting and Northing which we compute the Point geometry from.

SO, I have no X or Y column as such.  

I have previously checked that all rows have valid geometry and they do.  

I cant change the geometry as this is a supplied data file, not ours.

Any idea where I should look?

I about to look at the full defnition of the layer in geoserver

At this stage I'm only trying to get a JSON response then I need to code the reference to that layer into the config of another app.  I can see the layer in geoserver layer preview btw.

My call looks like:

http://server/geoserver/wms?&INFO_FORMAT=application/json&
REQUEST=GetFeatureInfo&
EXCEPTIONS=application/vnd.ogc.se_xml&
SERVICE=WMS&VERSION=1.1.1&LAYERS=AW4_ASC:trees_ro&
QUERY_LAYERS=AW4_ASC:trees_ro

Reply | Threaded
Open this post in threaded view
|

Re: GetFeatureInfo request returns 'X and Y incorrectly specified' error

Brad Hards
> Hi, I get the same message:
>
>   X and Y incorrectly specified


> http://server/geoserver/wms?&INFO_FORMAT=application/json&
> REQUEST=GetFeatureInfo&
> EXCEPTIONS=application/vnd.ogc.se_xml&
> SERVICE=WMS&VERSION=1.1.1&LAYERS=AW4_ASC:trees_ro&
> QUERY_LAYERS=AW4_ASC:trees_ro
I think the error is telling you that x and y are required parts of the
GetFeatureInfo query.

Check the WMS reference in the geoserver documentation for your version.

Brad



------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users