Re: [postgis-users] Problem with postgis querybypoint in mapserver-php
Guillermo, MapServer is the proper list for this question, but you haven't given much information on what is a complex issue... and I can't help you directly with it I'm sorry, but it might help if you gave a bit more information. Are you getting a map? Is the data correctly displayed? You could get attribute data either from the data in your query (use * in the format below if in doubt) or if you take the gid and look it up separately. The MapServer Docs at http://mapserver.org/input/vector/postgis.html show an example of a query: CONNECTIONTYPE POSTGIS CONNECTION "dbname=yourdatabasename user=yourdbusername" DATA "the_geom from (select g.gid, g.the_geom, a.attr1, a.attr2 from geotable g join attrtable a on g.gid = a.aid) as subquery unique gid using srid=4326" A common mistake is a mismatch between the projection systems - are they both displayed? Have you been logging the php and MapServer output (DEBUG level 1 or more) to see what is happening when you click on a point? Having said that, I notice you have suppressed any error messages on > @$qlayer->queryByPoint($point, MS_MULTIPLE, $radius); so you may not get much help from the php log. hopefully someone else might be able to help, good luck. cheers Ben On 17/05/2010, at 15:09 , Guillermo Tamburini Beliveau wrote: > > Hi, > > first, I would like to apologize for possible confussions with my english or > my > limitated knowledge of programming and the explanations on this. > > And second, sorry if I insist, but I trided two times in the mapserver list > and > now, the second time in this, and nobody responds me. please, if somebody > knows > anything about my question, please say something. Thank you. > > I would ask to the list if someone knows the reason of a problem that I'm > having with the php-mapscript methods for the query methods in the postgis > layers. > > Indistinctly for querybypoint or querbyrectangle, my code (different versions > of > it), works perfectly with shapes, but it always fails with the postgis layers. > When calling to the shapeindex member of the ResultCacheMemberObj obtained, it > always returns 0, as is contrary to what happens with the shapes, where it > always returns the correct shapeindex. Then, it is impossible to acces to the > desidered feature, and as you know, this are usal and simple actions. > > May I have to add more columns to the select of the .map file for getting the > features atributes like in the example (I don't think so)? > >DATA "geom FROM puntos using unique gid" > #DATA "geom FROM (select gid , nombre, tramo, geom from puntos) as foo > using > unique geom" > #DATA "geom FROM (select * from puntos) as foo using unique gid" > > Or there is some paramter in the configuration files of mapserver or php that > I > have to change. > > There is the code of the function: > > function CercaPunto($point,$map,$radius) { > > $qlayer = $map->getLayerByName('trazado'); > $qlayer->set("tolerance",$radius); > @$qlayer->queryByPoint($point, MS_MULTIPLE, $radius); > $numResults = $qlayer->getNumResults(); > if ($numResults != 0) { > for ($i = 0; $i < $numResults; $i++) { > $query_result = $qlayer->getResult($i); > $Lista_ele[$i] = $query_result->shapeindex; // Here is the error > with postgres > } > } else { > $valido =0; > $Lista_ele = ""; > } > return $Lista_ele; > } // end CercaPunto > > > Thank you very much. > > Guillermo Tamburini > > > > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > - Fin del mensaje reenviado - > > > > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Desktop GUI for using with PostgreSQL + postGIS
Oscar, If you haven't tried Quantum GIS (QGIS), I would recommend taking a look. http://www.qgis.org/ David. On Mon, May 17, 2010 at 9:29 AM, Oscar Zamudio wrote: > Hi everybody, > I want to use some GUI that can use the data I have in PostgreSQL data base > with PostGIS. The idea is to generate map images to see the data quikly and > save them as png or jp files. Can anybody give some advice? > Thanks in advance and best regards, > Oscar > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] Desktop GUI for using with PostgreSQL + postGIS
Hi everybody, I want to use some GUI that can use the data I have in PostgreSQL data base with PostGIS. The idea is to generate map images to see the data quikly and save them as png or jp files. Can anybody give some advice? Thanks in advance and best regards, Oscar ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] installation on windows
thank you everybody.I have already solve my problem with your help. Now i want to build my own map. i work with window instead of ubuntu. On ubuntu, the documentation ask to download the folder mapnik with this link: svn co http://svn.openstreetmap.org/applications/rendering/mapnik . I don't know if this folder "mapnik" can work on windows? Thank for your help Ndefo Kamgne Arnauld Cité Ettayour,Immeuble Bolbol 1,Appartement A2,Ariana 0021624249357 begin_of_the_skype_highlighting 0021624249357 end_of_the_skype_highlighting Ndefo Kamgne Arnauld Cité Ettayour,Immeuble Bolbol 1,Appartement A2,Ariana 0021624249357 ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] Problem with postgis querybypoint in mapserver-php
Hi, first, I would like to apologize for possible confussions with my english or my limitated knowledge of programming and the explanations on this. And second, sorry if I insist, but I trided two times in the mapserver list and now, the second time in this, and nobody responds me. please, if somebody knows anything about my question, please say something. Thank you. I would ask to the list if someone knows the reason of a problem that I'm having with the php-mapscript methods for the query methods in the postgis layers. Indistinctly for querybypoint or querbyrectangle, my code (different versions of it), works perfectly with shapes, but it always fails with the postgis layers. When calling to the shapeindex member of the ResultCacheMemberObj obtained, it always returns 0, as is contrary to what happens with the shapes, where it always returns the correct shapeindex. Then, it is impossible to acces to the desidered feature, and as you know, this are usal and simple actions. May I have to add more columns to the select of the .map file for getting the features atributes like in the example (I don't think so)? DATA "geom FROM puntos using unique gid" #DATA "geom FROM (select gid , nombre, tramo, geom from puntos) as foo using unique geom" #DATA "geom FROM (select * from puntos) as foo using unique gid" Or there is some paramter in the configuration files of mapserver or php that I have to change. There is the code of the function: function CercaPunto($point,$map,$radius) { $qlayer = $map->getLayerByName('trazado'); $qlayer->set("tolerance",$radius); @$qlayer->queryByPoint($point, MS_MULTIPLE, $radius); $numResults = $qlayer->getNumResults(); if ($numResults != 0) { for ($i = 0; $i < $numResults; $i++) { $query_result = $qlayer->getResult($i); $Lista_ele[$i] = $query_result->shapeindex; // Here is the error with postgres } } else { $valido =0; $Lista_ele = ""; } return $Lista_ele; } // end CercaPunto Thank you very much. Guillermo Tamburini ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users - Fin del mensaje reenviado - ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users