[mapserver-users] mapscript with MAX_SIZE shows "WMS server error. Image size out of range"? is a warning?

2011-01-31 Thread rai 8
Hi!,

I hae been develop with java mapscript, sometimes mapscript.so shows this
error, but the image are ok :

Content-type: application/vnd.ogc.se_xml


> 

 http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd";>





msWMSLoadGetMapParams(): WMS server error. Image size out of range, WIDTH
> and HEIGHT must be between 1 and 2048 pixels.







I set the MAX_SIZE property in map_file and in the code with
"mo.setMaxsize(1);" and still show the error, it's a warning?  there are
some way hide?

Thanks!
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: How to add attributes to feature/shape with mapscript java?

2010-12-08 Thread rai 8
Hi!,

Finaly I found the way set the id of a feature, mapscript maps the last
value set by setvalue with layer.setClassItem ,but I only can add a one
attribute with layer.setFilteritem("itemName");

// Features add
for (Iterator iterator = sites.iterator(); iterator.hasNext();) {

  Site site = (Site) iterator.next();
shapeObj shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM );
lineObj line = new lineObj();

// latlon source data
pointObj point = new pointObj( site.getLatLonPosition().getX() ,
site.getLatLonPosition().getY() , 0);

shape = point.toShape();

shape.initValues(2);
shape.setValue(0, site.getId().toString() ); // ID
layer.addFeature(shape );
 }
}

layer.setClassitem("id");

I think that the way to add many attributes is with layer.SetItems but isn't
implemented in mapscript swig, I found in maplayer.c msLayerSetItems function,
why setlayerItem is not appear in mapscript?

/*
** A helper function to set the items to be retrieved with a particular
shape. Unused at the moment but will be used
** from within MapScript. Should not need modification.
*/
int msLayerSetItems(layerObj *layer, char **items, int numitems)


Another problem that I have is to reproject the data, It seems that there is
a bug with reprojections in mapscript, if projection map and projection
layer is not the same the reprojected coordinates aren't correct. Also if I
try to reproject manualy the coordinates are wrong. I'm leaving something?

projectionObj proj4326 = new projectionObj("EPSG:4326");
projectionObj proj32631 = new projectionObj("EPSG:32631");
point.project(proj4326, proj32631);


thanks!

2010/12/6 rai 8 

>
> Hi!,
>
> I trying to add features to a layer with mapscript in a WFS server, there
> isn't any method to set attributes directly to a feature or a shape.
>
> I found initValues and setValue to set value to a shape object but in a
> xml/gml response it doesn't appear. Anyone knows a way to do this?
>
>  // add feature
> shapeObj shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM );
> shape.initValues(8);
> lineObj line = new lineObj();
> pointObj point = new pointObj(2.160690, 41.479881, 1);
> line.add(point);
> shape.add( line);
> shape.setValue(0, "attr1");
> shape.setValue(1, "attr2");
> System.out.println( shape.getValue(0) + " " + shape.getValue(1) + " " +
> shape.getValue(2) );
>  layer.addFeature(shape );
>  shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM );
> line = new lineObj();
> point = new pointObj(2.17, 41.48, 1);
> line.add(point);
> shape.add( line);
> layer.addFeature(shape );
>
> Another workaround I found is generated a dbf file with all features and
> attributes that I want and then load a mapfile pointing to this dbf file,
> but this is inefficient.
>
>
> thanks!
>
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] How to add attributes to feature/shape with mapscript java?

2010-12-06 Thread rai 8
Hi!,

I trying to add features to a layer with mapscript in a WFS server, there
isn't any method to set attributes directly to a feature or a shape.

I found initValues and setValue to set value to a shape object but in a
xml/gml response it doesn't appear. Anyone knows a way to do this?

 // add feature
shapeObj shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM );
shape.initValues(8);
lineObj line = new lineObj();
pointObj point = new pointObj(2.160690, 41.479881, 1);
line.add(point);
shape.add( line);
shape.setValue(0, "attr1");
shape.setValue(1, "attr2");
System.out.println( shape.getValue(0) + " " + shape.getValue(1) + " " +
shape.getValue(2) );
 layer.addFeature(shape );
 shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM );
line = new lineObj();
point = new pointObj(2.17, 41.48, 1);
line.add(point);
shape.add( line);
layer.addFeature(shape );

Another workaround I found is generated a dbf file with all features and
attributes that I want and then load a mapfile pointing to this dbf file,
but this is inefficient.


thanks!
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] WMS/WFS multiple output projection or select projection by SRS parameter

2010-10-19 Thread rai 8
Hi!,

I'm trying to define multiple output projections in a WMS server, but it
doesn't work, as doc says if you define "wms_srs" it's possible but
mapserver says that SRS "Invalid SRS given", I tried several ways and any
works, also in getCapabilities only show the projection section.

any ideas? it's possible without mapscript?


My mapfile looks like:

MAP
SHAPEPATH  "./images"
IMAGECOLOR 255 0 0
CONFIG "MS_ERRORFILE" "/tmp/mapserver.log"
 WEB
IMAGEPATH "/tmp"
IMAGEURL "http://localhost/tmp/";
METADATA
"wfs_title""Demo"
"wfs_onlineresource"   "http://localhost/cgi-bin/mapserv?";
"wfs_srs"   "EPSG:32631 EPSG:900913 EPSG:4326"
"ows_schemas_location" "http://ogc.dmsolutions.ca";
END
END

   PROJECTION
"init=epsg:4326"
END
 LAYER
NAME topo
DATA cat.png
   DEBUG 4

 PROJECTION
"init=epsg:32631"
END

STATUS   ON
TYPE RASTER
END
END


when I try to change the projection section with any of the three SRS it
works, I tried many combinations and any works. Also I tried with WFS and it
doesn't works.



thanks!
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] can't load img

2010-09-09 Thread rai 8
do you have permision on this directory?

you can do it with "chmod 777 /gis/tmp/"

2010/9/8 Fco. Javier GarcĂ­a Ricca 

> Hello,
>
> I am starting to work with linux and I and I have several problems to
> configure mapserver on Centos 5.5
>
> I have a init.html to call mapserver and it is working ok because it
> generates an image in the tmp folder specified in the mapfile. However I
> can't load the image in my page and I get the next error:
>
> Forbidden
>
> You don't have permission to access /gis/tmp/MS12838635944831.png on this
> server.
>
> Any help will be appreciated.
>
> Thanks
>
> --
> FJRicca
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] mapserver best practices with WFS getFeatureInfo?

2010-09-08 Thread rai 8
hi,

I'm working in a application that uses mapserver to serve images with wms
and single points with wfs, in the client side there is a openlayers script.
This already works.

Another functionality is when user selects a feature or click in a image the
aplication must show some information, like text in table next to the map,
depending on the options that user sets.

My doubt is about the way to comunicate client and server. The simpler way
is to detect with openlayer what has been selected, and send a request to
php server script with necessary parameters like id,etc...
I prefer to use WFS, with getFeatureInfo, because is more maintainable and
standard, but I don't know how to do this with mapserver.
The posibilities I think:
- create a layer for every option that user can select, every layer knows
what information has to been send.
- with openlayers send additional parameters with the url , and parse with
mapserver( I don't know if it is possible, maybe with a php_mapscript or a
filter in conection section )
- runtime substitution of the mapfile or Changing map file parameters via a
form or a URL

What is the best option?

Also, one of this information source is a java class, I must to compile
mapserver to get a Java support or is more easier to create a wfs server
with geotools?



Thank you for any answers.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] TIme support on mapserver 5.6.3, it's working?

2010-07-06 Thread rai 8
It works yea

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"
TYPEPOLYGON
STATUSON
 DEBUG 3
CONNECTIONTYPE  POSTGIS
CONNECTION"dbname=tile_index host=127.0.0.1 user=postgres
password=xx"
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
TYPERASTER
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 

> 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.788

Re: [mapserver-users] TIme support on mapserver 5.6.3, it's working?

2010-07-06 Thread rai 8
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!
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] TIme support on mapserver 5.6.3, it's working?

2010-07-05 Thread rai 8
#x27;) as geom,"oid" from satellite
where the_geom && GeomFromText('POLYGON(
(-2639868.99029283 -2322020.83542886,-2639868.99029283
1072412.78850334,3408818.1364184 1072412.78850334,3408818.1
364184 -2322020.83542886,-2639868.99029283
-2322020.83542886))',find_srid('','satellite','the_geom')) and (date_tr
unc('second', image_time) = '2007-05-11T11:00:00')
[Mon Jul  5 16:44:46 2010].352763 msPostGISLayerWhichShapes query status: 2
[Mon Jul  5 16:44:46 2010].352796 msPostGISLayerWhichShapes got 1 records in
result.
[Mon Jul  5 16:44:46 2010].352817 msPostGISLayerNextShape called.
[Mon Jul  5 16:44:46 2010].352835 msPostGISReadShape called.
[Mon Jul  5 16:44:46 2010].352858 msPostGISReadShape: [image_time]
"2007-05-11 11:00:00"


the same above but with "&mode=map" will have the same behavior than the
first url, show always the first image

when you put seconds in the url postgresql recives a query with
date_trunc('second', image_time) , If put only minute date_trunc('minute',
image_time), it seems that mapserver detect what kind of time parameter is.


It's so tricky this mapserver :/ , thanks daryl & alexander


2010/7/3 Alexander Petkov 

> I suggest that you carefully inspect your definitions in your mapfile,
> as well as the data in the Postgis DB itself.
> Turn debugging on, and inspect the log file closely.
> Also, if you already haven't, enable PostgreSQL logging, inspect
> incoming requests to your database as well.
>
> For example, one inconsistency that is evident from your map file is
> the date format--the "wms_timeextent" item for the "sat_w" layer
> contains a date range, while your Postgis data also has a timestamp
> data type with HH24:MI data. I would eliminate those inconsistensies
> first.
>
> List each time step individually (comma separated) in your mapfile ,
> since your number of records for the time being is small, rather than
> specifying a date range.
>
> Again, do not be shy about inspecting the log files. Randomly trying
> "a lot of combinations", as well as different Mapserver versions
> hoping that something will work will likely not help.
>
> Alex
>
> On Fri, Jul 2, 2010 at 6:20 AM, rai 8  wrote:
> >> Could you provide an example URL you are using to test out the WMS-T?  I
> >> am using WMS-T on 5.6.3 without any known issues.  Please note that if
> your
> >> time table gets very large, you may hit this quirk:
> >
> > I am using URL like:
> >
> http://mapserver-tutorial/cgi-bin/mapserv?map=/home/vbox/map_directory/tile_time_2.map&layer=radar&layer=time_idx_pg&mode=map&TIME=2004-01-01T10:10:00
> >
> > It shows an image but always the first ->
> > /home/vbox/Downloads/animacio/sat1.tif , that have the timestamp:
> 2007-05-11
> > 10:00Z
> >
> > My table its very little, I was wrong about the version, is the 5.4.2,
> i'll
> > try to do the same with the 5.6 but it's very strange that any
> configuration
> > that I tried doesn't work.
> >
> >> need to be in the METADATA section of the "sat_w" layer.
> >
> > I tried a lot of combinations, also with all the metadata in sat_w like
> > "official" tutorial
> >
> >
> > thanks a lot!
> >
> >
> >
> >
> > 2010/7/1 Alexander Petkov 
> >>
> >> On Thu, Jul 1, 2010 at 6:27 AM, rai 8  wrote:
> >> > Hello,
> >> >
> >> > I've been working with mapserver to get a map with time support, time
> >>  > parameter, I followed the tutorial in documetation
> >> > http://mapserver.org/ogc/wms_time.html and this post
> >> >
> >> >
> http://osgeo-org.1803224.n2.nabble.com/Accessing-images-using-time-dimension-td1991324.html#a1991324
> >> > and I can't run the mapserver to change the image with a time
> parameter.
> >> >
> >> > I test several configurations but any works, the last is the same like
> >> > the
> >> > post in the maillist, this is what i've done:
> >> >
> >> > in a postgis database
> >> >
> >> > create table satellite (image_path text, image_time timestamp);
> >> > select AddGeometryColumn('satellite', 'the_geom', 4326, 'POLYGON', 2);
> >> >
> >> > insert into satellite (image_path, image_time, the_geom)
> >> > values ('/home/vbox/Downloads/animacio/sat1.tif', '2007-05-11 10:00Z',
> >> > GeomFromText('POLYGON((-31.82 75.55, -31.82 26.5, 

Re: [mapserver-users] TIme support on mapserver 5.6.3, it's working?

2010-07-02 Thread rai 8
>
> Could you provide an example URL you are using to test out the WMS-T?  I am
> using WMS-T on 5.6.3 without any known issues.  Please note that if your
> time table gets very large, you may hit this quirk:
>

I am using URL like:
http://mapserver-tutorial/cgi-bin/mapserv?map=/home/vbox/map_directory/tile_time_2.map&layer=radar&layer=time_idx_pg&mode=map&TIME=2004-01-01T10:10:00

It shows an image but always the first ->
/home/vbox/Downloads/animacio/sat1.tif , that have the timestamp: 2007-05-11
10:00Z

My table its very little, I was wrong about the version, is the 5.4.2, i'll
try to do the same with the 5.6 but it's very strange that any configuration
that I tried doesn't work.

need to be in the METADATA section of the "sat_w" layer.
>
I tried a lot of combinations, also with all the metadata in sat_w like
"official" tutorial


thanks a lot!




2010/7/1 Alexander Petkov 

> On Thu, Jul 1, 2010 at 6:27 AM, rai 8  wrote:
> > Hello,
> >
> > I've been working with mapserver to get a map with time support, time
>  > parameter, I followed the tutorial in documetation
> > http://mapserver.org/ogc/wms_time.html and this post
> >
> http://osgeo-org.1803224.n2.nabble.com/Accessing-images-using-time-dimension-td1991324.html#a1991324
> > and I can't run the mapserver to change the image with a time parameter.
> >
> > I test several configurations but any works, the last is the same like
> the
> > post in the maillist, this is what i've done:
> >
> > in a postgis database
> >
> > create table satellite (image_path text, image_time timestamp);
> > select AddGeometryColumn('satellite', 'the_geom', 4326, 'POLYGON', 2);
> >
> > insert into satellite (image_path, image_time, the_geom)
> > values ('/home/vbox/Downloads/animacio/sat1.tif', '2007-05-11 10:00Z',
> > GeomFromText('POLYGON((-31.82 75.55, -31.82 26.5, 51.31 26.5,51.31 75.55,
> > -31.82 75.55))', 4326));
> >
> > insert into satellite (image_path, image_time, the_geom)
> > values ('/home/vbox/Downloads/animacio/sat2.tif', '2007-05-11 11:00Z',
> > GeomFromText('POLYGON((-31.82 75.55, -31.82 26.5, 51.31 26.5,51.31 75.55,
> > -31.82 75.55))', 4326));
> >
> >
> > and the map file:
> >
> >  LAYER
> > NAME"time_w"
> > TYPEPOLYGON
> > STATUSON
> > CONNECTIONTYPE  POSTGIS
> > CONNECTION"dbname=tile_index host=127.0.0.1 user=postgres
> > password=xx"
> > 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_timedefault"   "2007-05-11T11:00:00Z"
> > "wms_timeitem""image_time" #a column in postgis table of type
> > END
> >   END
> >
> >   LAYER
> > NAME"sat_w"
> > STATUS  ON
> > TYPERASTER
> > METADATA
> > "wms_title""Satellite"
> > "wms_timeextent""2007-01-01/2007-12-31"
> > END
> > PROJECTION
> >   "init=epsg:4326"
> > END
> > TILEINDEX "time_w" # Layer name containing time index
> > TILEITEM  "image_path" # DB column containing path to image
> >   END
> >
> >
> > anyone finds some error?
> >
> >
> > thanks
>
> The time-related metadata items:
>
> "wms_timeextent""2007-01-01/2007-12-31"
>"wms_timedefault"   "2007-05-11T11:00:00Z"
>"wms_timeitem""image_time" #a column in postgis table of type
>
>
> need to be in the METADATA section of the "sat_w" layer.
>
> Alex
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] TIme support on mapserver 5.6.3, it's working?

2010-07-01 Thread rai 8
Hello,

I've been working with mapserver to get a map with time support, time
parameter, I followed the tutorial in documetation
http://mapserver.org/ogc/wms_time.html and this post
http://osgeo-org.1803224.n2.nabble.com/Accessing-images-using-time-dimension-td1991324.html#a1991324and
I can't run the mapserver to change the image with a time parameter.

I test several configurations but any works, the last is the same like the
post in the maillist, this is what i've done:

in a postgis database

create table satellite (image_path text, image_time timestamp);
select AddGeometryColumn('satellite', 'the_geom', 4326, 'POLYGON', 2);

insert into satellite (image_path, image_time, the_geom)
values ('/home/vbox/Downloads/animacio/sat1.tif', '2007-05-11 10:00Z',
GeomFromText('POLYGON((-31.82 75.55, -31.82 26.5, 51.31 26.5,51.31 75.55,
-31.82 75.55))', 4326));

insert into satellite (image_path, image_time, the_geom)
values ('/home/vbox/Downloads/animacio/sat2.tif', '2007-05-11 11:00Z',
GeomFromText('POLYGON((-31.82 75.55, -31.82 26.5, 51.31 26.5,51.31 75.55,
-31.82 75.55))', 4326));


and the map file:

 LAYER
NAME"time_w"
TYPEPOLYGON
STATUSON
CONNECTIONTYPE  POSTGIS
CONNECTION"dbname=tile_index host=127.0.0.1 user=postgres
password=xx"
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_timedefault"   "2007-05-11T11:00:00Z"
"wms_timeitem""image_time" #a column in postgis table of type
END
  END

  LAYER
NAME"sat_w"
STATUS  ON
TYPERASTER
METADATA
"wms_title""Satellite"
"wms_timeextent""2007-01-01/2007-12-31"
END
PROJECTION
  "init=epsg:4326"
END
TILEINDEX "time_w" # Layer name containing time index
TILEITEM  "image_path" # DB column containing path to image
  END


anyone finds some error?


thanks
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users