[mapserver-users] TIme support on mapserver 5.6.3, it's working?
rai 8
max1000 at gmail.com
Tue Jul 6 02:42:03 PDT 2010
It works!!!!!!!!!!!!!!!! yeahhhhhhhhhhhh
I changed the EXTENT in the beginnig "EXTENT 199949.651166 -371954.772084
1472121.6862 632767.19157" by "EXTENT -180 -90 180 90" and also in the url
and now it works
MAP
IMAGETYPE PNG24
EXTENT -180 -90 180 90
SIZE 400 300
CONFIG "MS_ERRORFILE" "/var/log/mapserver/mapserver.log"
PROJECTION
"init=epsg:4326"
END # End of the output Projection definition ---
LAYER
NAME "time_w"
TYPE POLYGON
STATUS ON
DEBUG 3
CONNECTIONTYPE POSTGIS
CONNECTION "dbname=tile_index host=127.0.0.1 user=postgres
password=xxxxxx"
DATA "the_geom from satellite using unique oid using srid = 4326"
METADATA
"wms_title" "time_index_w"
"wms_srs" "EPSG:4326"
"wms_timeextent" "2007-01-01/2007-12-31"
# "wms_timeextent" "2007-05-11T10:00:00Z,2007-05-11T11:00:00Z"
"wms_timedefault" "2007-05-11T10:00:00Z"
"wms_timeitem" "image_time" #a column in postgis table of type
END
END
LAYER
NAME "sat_w"
STATUS ON
DEBUG 3
TYPE RASTER
METADATA
"wms_title" "Satellite"
"wms_timeextent" "2007-01-01/2007-12-31"
# "wms_extent" "-126 24 -66 50"
"wms_extent" "-180 -90 180 90"
END
PROJECTION
"init=epsg:4326"
END
TILEINDEX "time_w" # Layer name containing time index
TILEITEM "image_path" # DB column containing path to image
END
END
http://mapserver-tutorial/cgi-bin/mapserv?map=/home/vbox/Downloads/mapserver-tutorial/ms4w/apps/tutorial/htdocs/tile_time.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=time_w,sat_w&WIDTH=800&HEIGHT=400&FORMAT=image/png&TRANSPARENT=false&srs=EPSG:4326&BBOX=-180,-90,180,90&TIME=2007-05-11T10:00:00
thanks.
2010/7/6 rai 8 <max1000 at gmail.com>
> hello,
>
> I discovered a bit more about how the things works, but I'm little
> confusing with this...
>
>
> with this url
>
> http://mapserver-tutorial/cgi-bin/mapserv?map=/home/vbox/Downloads/mapserver-tutorial/ms4w/apps/tutorial/htdocs/tile_time.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=time_w,sat_w&WIDTH=800&HEIGHT=400&FORMAT=image/png&TRANSPARENT=false&srs=EPSG:4326&BBOX=-126,24,-66,50&TIME=2007-05-11T10:00:00
>
>
> looking to log I found two querys to database, the first from tile_w layer
> has a correct result if you check in postgresql directly, also in mapserver
> log says that got 1 record in the result. I changed
> 'find_srid('','satellite','the_geom'))' that appears in log by '4326'
> because in postgresql seems that it doesn't work.
>
>
> select
> "image_time",
> encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'base64')
> as geom,
> "oid"
> from satellite
> where
> the_geom &&
> GeomFromText('POLYGON((-2639868.99029283
> -2322020.83542886,-2639868.99029283 1072412.78850334,3408818.1364184
> 1072412.78850334,3408818.1364184 -2322020.83542886,-2639868.99029283
> -2322020.83542886))', 4326 ) and (date_trunc('second', image_time) =
> '2007-05-11T10:00:00')
>
> the other query from sat_w layer has no results, note that the polygon
> parameter has the same points as the url
>
> select
> "image_time",
> encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'base64')
> as geom,
> "oid" 2
>
> from satellite
> where
> the_geom &&
> GeomFromText('POLYGON((-126 24,-126 50,-66 50,-66 24,-126 24))',4326)
> and (date_trunc('second', image_time) = '2007-05-11T10:00:00')
>
>
>
>
> with this url log says that 1 result have been found in both querys, it's
> the same but changing the points of the bounding box, but it doesn't show
> any image, I think that the problem is in the coordinates or the projection
> used, in mapfile or in url.. I'll try to change something :)
>
>
>
> http://mapserver-tutorial/cgi-bin/mapserv?map=/home/vbox/Downloads/mapserver-tutorial/ms4w/apps/tutorial/htdocs/tile_time.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=time_w,sat_w&WIDTH=1000&HEIGHT=600&FORMAT=image/png&TRANSPARENT=false&srs=EPSG:4326&BBOX=-2639868.99029283,-2322020.83542886,3408818.1364184,1072412.78850334&TIME=2007-05-11T10:00:00
>
> [Tue Jul 6 10:49:01 2010].865473 msPostGISLayerWhichShapes query: select
> "image_time","image_path",encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'base64')
> as geom,"oid" from satellite where the_geom &&
> GeomFromText('POLYGON((-2639868.99029283 -2322020.83542886,-2639868.99029283
> 1072412.78850334,3408818.1364184 1072412.78850334,3408818.1364184
> -2322020.83542886,-2639868.99029283
> -2322020.83542886))',find_srid('','satellite','the_geom')) and
> (date_trunc('second', image_time) = '2007-05-11T10:00:00')
> [Tue Jul 6 10:49:01 2010].929571 msPostGISLayerWhichShapes query status: 2
> [Tue Jul 6 10:49:01 2010].929611 msPostGISLayerWhichShapes got 1 records
> in result.
> [Tue Jul 6 10:49:01 2010].929632 msPostGISLayerNextShape called.
> [Tue Jul 6 10:49:01 2010].929651 msPostGISReadShape called.
> [Tue Jul 6 10:49:01 2010].929675 msPostGISReadShape: [image_time]
> "2007-05-11 10:00:00"
> [Tue Jul 6 10:49:01 2010].929694 msPostGISReadShape: [image_path]
> "/home/vbox/Downloads/animacio/sat1.tif"
>
>
>
> thanks!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100706/ae062cd7/attachment.htm>
More information about the MapServer-users
mailing list