[Geomoose-users] select and query in postgis layers
Luis Calisto
luis.calisto at hotmail.com
Wed Feb 20 03:49:13 PST 2013
Hi
I tried your solution and it works in postgis layers, and i get my features highlited, the features are inserted in the Sqlite and i can get a csv or report. Still i cannot do a buffer with that features and i need to make this buffer!
The query service is already running fine, the problem was with the mapfile, i changed:
DATA 'the_geom FROM "public"."pontos_sportgis" USING UNIQUE gid USING srid=4326'
to:
DATA 'the_geom from (select gid, tipo_infra, fotografia, tipo, nome, st_astext(the_geom) as wkt_geometry, the_geom from "public"."pontos_sportgis") as mytable using unique gid USING srid=4326'
Nevertheless i find it very strange the postgis layers not work with the default select service could it be something in the map file? or something in the table?
If someone else can give some help i will be very appreciated.
Thanks Luis
From: Bob.Bistrais at maine.gov
To: luis.calisto at hotmail.com; geomoose-users at lists.osgeo.org
Subject: RE: [Geomoose-users] select and query in postgis layers
Date: Tue, 19 Feb 2013 19:33:21 +0000
I have found a partial fix to the problem. I still cannot get my file GDB layer to highlight the selected shapes, but I can get a correct result for the Found
Shapes line, and the results are also inserted to the SQLite file so you can output to csv or report.
Here’s what I did: Make a backup copy of select.php. Then, in select.php, look for the following line, at or about line 262:
$results = $results . $map->processquerytemplate(array(), false);
Below that line, add the following:
for($i=0; $i<=($layer->getNumResults() - 1); $i++){
$result=$layer->getResult($i);
$myShape=$layer->getShape($result);
$foundShapes[] = $myShape;
}
-save and try that.
One thing I have not checked- if you use the same code on shapefiles, you may get duplicate results or Found Shapes may be twice what you expected, since the
result shapes are being added twice. I haven’t checked that far yet, but I think some code that will determine the file type can help eliminate such an error.
Hope this helps, but I’d still be interested in anyone else’s input.
From: geomoose-users-bounces at lists.osgeo.org [mailto:geomoose-users-bounces at lists.osgeo.org]
On Behalf Of Luis Calisto
Sent: Tuesday, February 19, 2013 1:08 PM
To: geomoose-users at lists.osgeo.org
Subject: [Geomoose-users] select and query in postgis layers
Hi
i'm working with geomoose version 2.6.1
I have some layers in shapefile but the most part is postgis.
Everything is ok except that with the postgis layers the select and the query services do not work. The select returns well the attributes but says that "Found Shapes: 0"
and does not highlight any feature. The query service return no value at all. The select and the query service is fine with the shapefile based layers and the identify service is fine with both layers.
I followed the documentation in the demo but this documentation is made for shapefiles, maybe something is missing with my config.
Anyone can help?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20130220/cb3af436/attachment.html>
More information about the Geomoose-users
mailing list