Hi,  how to generate a custom sql view, for example my wms request

*http://192.168.56.101:8084/geoserver/poc_otmis_net_ws/wms?service=WMS&version=1.1.0&request=GetMap&layers=poc_otmis_net_ws:teste_view&styles=
<http://192.168.56.101:8084/geoserver/poc_otmis_net_ws/wms?service=WMS&version=1.1.0&request=GetMap&layers=poc_otmis_net_ws:teste_view&styles=>*
*&bbox=-52.3464683333333,-13.95897,-52.3352233333333,-13.949755*
*&width=512&height=419&srs=EPSG:4326*
*&VIEWPARAMS=where_users:WHERE  id_client in
(5\,3\,4\,1\,2);where_range:WHERE  timerange \&\&
tstzrange(to_timestamp(1.396656E9)\, to_timestamp(1.396745940999E9)
)&format=image%2Fjpeg*

And into geoserver this is my sql view, it is possible, concatenate sql
wheres in viewparam, thx

*select id_sequence, speed_m_s as speed, geom_sl, id_machine from
onetgeo.sentence_line as sl *
*NATURAL JOIN (SELECT id_sequence, id_machine FROM (*
* SELECT bounding,tstzrange(to_timestamp((timestamp_init / 1000)), *
* to_timestamp((timestamp_end / 1000))) as timerange,*
* (date_part('hour', to_timestamp((timestamp_init/1000)) AT TIME ZONE
'BRT'))  as time_h, *
* date_part('doy', timezone('BRT', to_timestamp((services.timestamp_init /
1000)))) + *
* date_part('year', timezone('BRT', to_timestamp((services.timestamp_init /
1000)))) * 366 AS day,  *
* date_part('month', timezone('BRT', to_timestamp((services.timestamp_init
/ 1000)))) + *
* date_part('year', timezone('BRT', to_timestamp((services.timestamp_init /
1000)))) * 12 AS month,*
*id_machine,id_sequence,timestamp_init,timestamp_end FROM onetgeo.services
where id_machine in (SELECT id_machine FROM otmisnet.machine *
* %where_users%*
* )) as s *
* %where_range%*
*)as a*


-- 
Att...
Jairo de Almeida
email: jairodealme...@gmail.com
nome skype: jairodealmeida
------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to