mesh=Select MESHID, NAME from MEDIAN.MESH
mesh_id=Select MESHID, NAME from MEDIAN.MESH where MESHID = ?



# Timeseries
timeseries_stations=SELECT tsp.FEATUREID, tsp.NAME FROM MEDIAN.TIMESERIESPOINT tsp WHERE tsp.FEATUREID IN (SELECT DISTINCT mmt.FEATUREID FROM MEDIAN.MEASUREMENT mmt  WHERE  mmt.SOURCEID IN ( 4 )) order by tsp.name
timeseries_stations_op=SELECT DISTINCT tsp.FEATUREID, tsp.NAME FROM MEDIAN.TIMESERIESPOINT tsp, MEDIAN.MEASUREMENT mmt WHERE tsp.FEATUREID =  mmt.FEATUREID AND mmt.SOURCEID IN ( 4 ) order by tsp.name
timeseries_interval=select min(tv.TIMEVALUE) MIN, max(tv.TIMEVALUE) MAX from MEDIAN.TIMESERIES t , MEDIAN.TIMESERIESVALUE tv where tv.TIMESERIESID = t.TIMESERIESID and tv.MEASUREMENTID IN ( ? ) AND t.PARAMETERID IN ( ? )


 spatial_query=SELECT FEATUREID, SHAPE FROM  MEDIAN.MESHPOINT WHERE MESHID = 3 AND KPOSITION = 1