Hello dear Justin,
I want to make a time series demo with postgis+geoserver+openlayers or postgis+geoserver+mapbuilder. Is it possible to implement? Could you please give me some suggestions? Thank you very much!
sincerely yours,
Yang
Hello,
I have not actually ever done this so I am kind of guessing here. I am
sure someone else will be able to provide a better answer. However here
goes:
1. PostGIS
Set up your data so that one of the columns is some sort of timestamp.
Lets call it "time" for the sake of explanation.
2. GeoServer
Publish the postgis table as normal. Lets call the layer "timeLayer".
3. OpenLayers
Set up open layers as normal. Use the function Layer#mergeNewParams to
specify the value of a "filter" parameter. You may be able to take
advantage of cql filter support which was recently added to geoserver
(not sure if its available on 1.5.x however, Andrea?). Example:
wmsLayer.mergeNewParams( {"cql_filter": 'time = 2007-06-20 22:08:00'} );
Or just fall back on "old style" filters:
wmsLayer.mergeNewParams( {
"filter",'<Filter><PropertyIsEqualTo><PropertyName>time</PropertyName><Literal>2007-06-20
22:08:00</Literal></PropertyIsEqualTo></Filter>'} );
Once this is set up, you will need to write a simple timer (i know i did
this once in java script ), and have it call wmsLayer.mergeNewParams
with a new value of the time stamp each time it goes off, and refresh
the map layer.
Again, without actually implementing any of this I could just be plain
wrong. But if I were to go about doing it this is what I try.
If anything is unclear please just let me know.
-Justin
yangzhaohui wrote:
Hello dear Justin,
I want to make a time series demo with postgis+geoserver+openlayers
or postgis+geoserver+mapbuilder. Is it possible to implement? Could you
please give me some suggestions? Thank you very much!
sincerely yours,
Yang------------------------------------------------------------------------
梦 幻 西 游,千 万 人 的 选 择,你 的 选 择
<http://event.mail.163.com/chanel/xyq.htm?from=163_NO2>
!DSPAM:4007,4664dc0d274491096210785!------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/!DSPAM:4007,4664dc0d274491096210785!
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users!DSPAM:4007,4664dc0d274491096210785!
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
I have been using the approach described by Justin successfully
(getmap request filters are the key). However, our map display doesn't
automatically "animate" the time series--users have to click the
submit button. Would that be sufficient?
Alex
On 6/4/07, Justin Deoliveira <jdeolive@...1...> wrote:
Hello,
I have not actually ever done this so I am kind of guessing here. I am
sure someone else will be able to provide a better answer. However here
goes:1. PostGIS
Set up your data so that one of the columns is some sort of timestamp.
Lets call it "time" for the sake of explanation.2. GeoServer
Publish the postgis table as normal. Lets call the layer "timeLayer".
3. OpenLayers
Set up open layers as normal. Use the function Layer#mergeNewParams to
specify the value of a "filter" parameter. You may be able to take
advantage of cql filter support which was recently added to geoserver
(not sure if its available on 1.5.x however, Andrea?). Example:wmsLayer.mergeNewParams( {"cql_filter": 'time = 2007-06-20 22:08:00'} );
Or just fall back on "old style" filters:
wmsLayer.mergeNewParams( {
"filter",'<Filter><PropertyIsEqualTo><PropertyName>time</PropertyName><Literal>2007-06-20
22:08:00</Literal></PropertyIsEqualTo></Filter>'} );Once this is set up, you will need to write a simple timer (i know i did
this once in java script), and have it call wmsLayer.mergeNewParams
with a new value of the time stamp each time it goes off, and refresh
the map layer.Again, without actually implementing any of this I could just be plain
wrong. But if I were to go about doing it this is what I try.If anything is unclear please just let me know.
-Justin
yangzhaohui wrote:
> Hello dear Justin,
> I want to make a time series demo with postgis+geoserver+openlayers
> or postgis+geoserver+mapbuilder. Is it possible to implement? Could you
> please give me some suggestions? Thank you very much!
>
> sincerely yours,
>
> Yang
>
> ------------------------------------------------------------------------
> 梦 幻 西 游,千 万 人 的 选 择,你 的 选 择
> <http://event.mail.163.com/chanel/xyq.htm?from=163_NO2>
> !DSPAM:4007,4664dc0d274491096210785!
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
>
> !DSPAM:4007,4664dc0d274491096210785!
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
> !DSPAM:4007,4664dc0d274491096210785!--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users