[postgis-users] SQL queries ( with st_intersects) : error messages

dandrigo lcelati at latitude-geosystems.com
Thu Jun 26 03:21:30 PDT 2014


Thank you!

1/Indeed, thanks to yours recommandations, my 3 sql querries fetch a result
via pgadmin without error message. ;-)

2/ Now i would like execute my python script. The result is fetch for my 1st
layer vector, for the 2nd, it appears only few geometries and a strange
message appears in the console {"attrib": "LEGUMES-FLEURS", "geom":
"MULTIPOLYGON

And for my raster DEM layer, i have always a 'bad request'. The problem
comes from probably of the way to export the result (after the querry). 

Below, i paste my python script:

web_service_test.py
<http://postgis.17.x6.nabble.com/file/n5006544/web_service_test.py>  

And beow, i paste the message fetching in my pyhton console :

--------------------------------------------------------------------------------------------------------
.866616409 6969199.10109868,686828.129216409
6969195.73239868,686821.391716409 6969190.67929868,686820.549616409
6969180.57309868),(687559.175316409 6971107.11479868,687589.855016409
6971092.38859868,687626.670616409 6971163.56539868,687594.763716409
6971179.51879868,687559.175316409 6971107.11479868))"}
SELECT ST_AsText(geom), cult_lib FROM rpg WHERE
ST_Intersects(ST_GeomFromText('POINT(%s %s)',2154), rpg.geom)
{"attrib": "LEGUMES-FLEURS", "geom": "MULTIPOLYGON(((679583.427
6970578.7998,679607.8212 6970635.531,679607.9346 6970635.531,679609.4094
6970639.1616,679772.5668 6971017.2144,679788.5646 6971055.9048,679798.3224
6971081.4336,679829.4108 6971067.9318,679896.3528 6971036.8434,679922.9028
6971024.4762,679771.4322 6970674.5616,679700.4054 6970517.1906,679583.427
6970578.7998)))"}
WITH points2d AS(SELECT ST_GeomFromText('POINT(%s %s)',2154) AS geom) SELECT
ST_Value(bd_alti_25m_somme.rast, 1, p.geom, true) AS val FROM
bd_alti_25m_somme, points2d p WHERE ST_Intersects(bd_alti_25m_somme.rast,
p.geom)
Bad request
>>> 
-------------------------------------------------------------------------------------------------------


Could you throw light for me? 

Thanks. 





--
View this message in context: http://postgis.17.x6.nabble.com/SQL-queries-with-st-intersects-error-messages-tp5006542p5006544.html
Sent from the PostGIS - User mailing list archive at Nabble.com.


More information about the postgis-users mailing list