[mapserver-users] Re: Re: WMS-TIME with mysql-database

2011-10-17 Thread Katharina Sambs

Good morning,

thank you, for your answer!
I set up a wms-time service with a PostGIS database, too.
It works fine, as well as the shapefile service.
Only with the mySQL database I get a *white* result.
Does anyone know if there is a general problem with wms-time and spatial mySQL 
data?

Unfortunately, the wider extent doesn´t help.

My request:
http:...SERVICE=WMSVERSION=1.3.0REQUEST=GetMapBBOX=46.556819,5.188080,55.865300,15.00CRS=EPSG:4326WIDTH=1017HEIGHT=963
LAYERS=layerSTYLES=FORMAT=image/pngDPI=96TRANSPARENT=TRUE

My mapfile:
MAP
   NAME name
   STATUS ON
   EXTENT -180 -90 180 90
   UNITS METERS
   INCLUDE debug.map
   SYMBOLSET symbols.sym
   FONTSET fonts.list
   INCLUDE encryption.map  
   INCLUDE projection_4326.map 
   WEB
   INCLUDE image_parameter.map 
   METADATA

   OWS_ENABLE_REQUEST   *
   WMS_ONLINERESOURCE...
   WMS_TITLE...
   WMS_FEATURE_INFO_MIME_TYPEtext/html
   WMS_ABSTRACT...
   INCLUDE standard_extent_europa.map  
   INCLUDE standard_proj.map
   #INCLUDE standard_metadata.map 
   END

   END
   INCLUDE outputformat_agg.map
   INCLUDE legend.map
   LAYER
   NAME layer
   TYPE POINT
   STATUS ON
   INCLUDE debug_layer.map #2 Zeilen
   DUMP TRUE
   TOLERANCE 3
   PROCESSING CLOSE_CONNECTION=DEFER
   CONNECTIONTYPE OGR
   CONNECTION 
MYSQL:test,host=host,user=user,password=passwort,port=port,tables=tabelle
	DATA SELECT column1, column2 FROM tabelle 
   CLASS

 STYLE
   OUTLINECOLOR 100 100 100
 END
   END 
   METADATA

   WMS_TITLEtitle
   WMS_TIMEEXTENT	2011-10-13T00:00:00Z/2011-10-14T00:00:00Z   
   WMS_TIMEITEM	column1 
 	WMS_TIMEDEFAULT 2011-10-13T00:00:00Z
   
   WMS_ABSTRACT...

   INCLUDE standard_extent.map
   LAYER_TITLE ... 
   LAYER_DESC_STATUS on 
   LAYER_DESC ... 
   gml_include_items all

   END
   END #LAYER
END #MAP

Hi,

my humble suggestion is inline.
I have done WMS Time successfully for PostGIS.

Den 14.10.2011 13:55, skrev Katharina Sambs:


 Hi list,

 I would like to visualize spatial *mySQL* data through a wms-time 
 service.

 *It is possible to visualize the data without the time parameters.*
 But as soon as I add the following parameters to the mapfile, my 
 result contains only a white picture:

 LAYER
 
METADATA

WMS_TIMEEXTENT   2010-01-10T00:00:00Z
WMS_TIMEITEM   column_name
WMS_TIMEDEFAULT   2010-01-10T00:00:00Z

 There is no error message.
 *The same request works fine, while I use a shapefile as data source.*

 My second question:
 Shouldn't be there a 'where'-clause in the database selection, which 
 contain the time parameter?
  

I don't think so,


 Or works the wms-time like a Filter, which always ask all data from 
 the database.

 Only in the second step, the data is filtered for the desired time?

  
This filter should be added by Mapserver automagically when you have 
WMS_TIME* in METADATA field.



 Did anyone has an idea?

  

You extent should maybe be more wide.
From http://mapserver.org/ogc/wms_time.html
/value/ - a single value. This is not directly supported in MapServer 
but there is an easy workwound by specifying the same value as min and max.


I have always used extents similar to the example in the docs:

wms_timeextent  2004-01-01/2004-02-01


If this is not helping, you should attach (important parts of) mapfile 
and URL request.


kind regards
Jørn Vegard Røsnes




 The type of the time data in the mySQL database is DATETIME.

 mysql.log
 111014 13:27:45 4 Connect  user@server on database
  4 Query DESCRIBE `table`
  4 Query SELECT type, coord_dimension FROM geometry_columns WHERE 
 f_table_name='table'
  4 Query SELECT srid FROM geometry_columns WHERE f_table_name = 
 'table'

  4 Query SELECT column1, column2 FROM table
  4 Query SELECT type FROM geometry_columns WHERE f_table_name='table'
  4 Query SELECT srid FROM geometry_columns WHERE f_table_name = 
 'table'

  4 Query SELECT column1, column2 FROM table
  4 Quit

 mapserv.log:
 [Fri Oct  7 16:05:42 2011].982953 CGI Request 1 on process 18953
 [Fri Oct  7 16:05:42 2011].983461 msWMSLoadGetMapParams(): enabling 
 non-square pixels.
 [Fri Oct  7 16:05:42 2011].990638 msDrawMap(): kicking into non-square 
 pixel preserving mode.
 [Fri Oct  7 16:05:42 2011].991160 
 msOGRFileOpen(MYSQL:tabelle,host=host,user=user,password=passwort,port=port)...
 [Fri Oct  7 16:05:42 2011].991205 
 OGROPen(MYSQL:tabelle,host=host,user=readonly,password=readonly,port=port)
 [Fri Oct  7 16:05:43 2011].20413 
 msConnPoolRegister(layer,MYSQL:tabelle,host=host,user=readonly,password=passwort,port=port,0x5417290)
 [Fri Oct  7 16:05:43 2011].67656

[mapserver-users] WMS-TIME with mysql-database

2011-10-14 Thread Katharina Sambs

Hi list,

I would like to visualize spatial *mySQL* data through a wms-time service.
*It is possible to visualize the data without the time parameters.*
But as soon as I add the following parameters to the mapfile, my result 
contains only a white picture:

LAYER

   METADATA
   
   WMS_TIMEEXTENT   2010-01-10T00:00:00Z
   WMS_TIMEITEM   column_name
   WMS_TIMEDEFAULT   2010-01-10T00:00:00Z

There is no error message.
*The same request works fine, while I use a shapefile as data source.*

My second question:
Shouldn't be there a 'where'-clause in the database selection, which 
contain the time parameter?
Or works the wms-time like a Filter, which always ask all data from the 
database.

Only in the second step, the data is filtered for the desired time?

Did anyone has an idea?

The type of the time data in the mySQL database is DATETIME.

mysql.log
111014 13:27:45 4 Connect  user@server on database
 4 Query DESCRIBE `table`
 4 Query SELECT type, coord_dimension FROM geometry_columns WHERE 
f_table_name='table'

 4 Query SELECT srid FROM geometry_columns WHERE f_table_name = 'table'
 4 Query SELECT column1, column2 FROM table
 4 Query SELECT type FROM geometry_columns WHERE f_table_name='table'
 4 Query SELECT srid FROM geometry_columns WHERE f_table_name = 'table'
 4 Query SELECT column1, column2 FROM table
 4 Quit

mapserv.log:
[Fri Oct  7 16:05:42 2011].982953 CGI Request 1 on process 18953
[Fri Oct  7 16:05:42 2011].983461 msWMSLoadGetMapParams(): enabling 
non-square pixels.
[Fri Oct  7 16:05:42 2011].990638 msDrawMap(): kicking into non-square 
pixel preserving mode.
[Fri Oct  7 16:05:42 2011].991160 
msOGRFileOpen(MYSQL:tabelle,host=host,user=user,password=passwort,port=port)...
[Fri Oct  7 16:05:42 2011].991205 
OGROPen(MYSQL:tabelle,host=host,user=readonly,password=readonly,port=port)
[Fri Oct  7 16:05:43 2011].20413 
msConnPoolRegister(layer,MYSQL:tabelle,host=host,user=readonly,password=passwort,port=port,0x5417290)
[Fri Oct  7 16:05:43 2011].67656 
msOGRLayerClose(MYSQL:tabelle,host=host,user=readonly,password=passwort,port=port).
[Fri Oct  7 16:05:43 2011].67662 
msOGRFileClose(MYSQL:tabelle,host=host,user=readonly,password=readonly,port=port,-1).
[Fri Oct  7 16:05:43 2011].67672 
msConnPoolRelease(layer,MYSQL:tabelle,host=host,user=readonly,password=passwort,port=port,0x5417290)
[Fri Oct  7 16:05:43 2011].67675 
msConnPoolClose(MYSQL:tabelle,host=host,user=readonly,password=passwort,port=port,0x5417290)

[Fri Oct  7 16:05:43 2011].67849 msDrawMap(): Layer 2 (layer), 0.077s
[Fri Oct  7 16:05:43 2011].67867 msDrawMap(): Drawing Label Cache, 0.000s
[Fri Oct  7 16:05:43 2011].67871 msDrawMap() total time: 0.084s
[Fri Oct  7 16:05:43 2011].170031 msSaveImage() total time: 0.102s
[Fri Oct  7 16:05:43 2011].170228 mapserv request processing time 
(msLoadMap not incl.): 0.187s

[Fri Oct  7 16:05:43 2011].170234 msFreeMap(): freeing map at 0x4f6cf30.

getCapabilities:
Layer queryable=0 opaque=0 cascaded=0
Namelayer/Name
Titletitle/Title
Abstractabstract/Abstract
CRSEPSG:4326/
EX_GeographicBoundingBox
westBoundLongitude5.18808/westBoundLongitude
eastBoundLongitude15/eastBoundLongitude
southBoundLatitude46.5582/southBoundLatitude
northBoundLatitude55.8653/northBoundLatitude
/EX_GeographicBoundingBox
BoundingBox CRS=EPSG:4326 minx=46.5582 miny=5.18808 
maxx=55.8653 maxy=15/
Dimension name=time units=ISO8601 default=2010-01-10T00:00:00Z 
nearestValue=02010-01-10T00:00:00Z/Dimension

/Layer


mysql version: 5.5.10-log
MapServer version 5.6.5


--
Mit freundlichen Grüßen

Katharina Sambs



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