queryByPoint on PostGIS layers

Almudena Rueda Solache almudenarueda at INICIA.ES
Wed Jun 20 08:19:59 PDT 2007


Hi all

I´ve a problem while querying PostGIS layers using methods queryByPoint,
queryByRect always returns the first register on database. I´m using mapserver
4.10 over windows xp and javamapscript. PostgreSQL version is 8.2.3 and
i´m using the postgis version included on that distribution. 


This is the code i use:

                                                               .
                                                               .
                                                               .
                                                               .
                                                               .
                                                               .



 pointObj puntoElem = new pointObj(0,0,0);
            double dX = Double.parseDouble(request.getParameter("x"));
            double dY = Double.parseDouble(request.getParameter("y"));
            puntoElem.setX(dX);
            puntoElem.setY(dY);
 mapObj mapa = (mapObj)request.getSession(true).getAttribute("mapa");
            layerObj layer = mapa.getLayerByName("Nuevos Elementos");
           int res = layer.queryByPoint(mapa, puntoElem, mapscriptConstants.MS_SINGLE,
-1);
                                                               .
                                                               .
                                                               .
                                                               .
                                                               .
                                                               .
                                                               .



Can somebody help me?

thank in advance
Almudena

La Primitiva. El juego de toda la vida ahora más fácil que nunca.
Echa tu apuesta por Internet con Tiscali
https://www.ventura24.es/tiscali/primitiva.do?idpartner=tiscali_firma



More information about the MapServer-users mailing list