Re: [mapserver-users] Beschriftung Objekte mit gleicher Lage
hello and a happy new year! here you can find a multilabel-example: http://mapserver.org/development/announce/6-2.html#complex-multi-label-symbol-symbology https://github.com/mapserver/msautotest/blob/branch-6-2/renderers/multilabel.map If you don't want a fixed position of the labels you can collect the attributes / labels in one text-line and use a wrap-character: CLASS NAME blah TEXT ([schild1]![schild12]![schild3]) LABEL WRAP ! TYPE truetype FONT 'verdana' END END both will cause blank lines. To avoid them, my only idea is to use a view if your data is in a database. You'll have to use conidtions like SELECT schild1 || schild2 FROM (SELECT CASE WHEN schild1 NOT NULL THEN schild1 || ! ELSE END AS schild1, CASE WHEN schild2 NOT NULL THEN schild2 || ! ELSE END AS schild2 FROM table) Jörg Am 06.01.2015 um 13:10 schrieb mark kellermann: Hallo, ich möchte Punkte (Schilder) beschriften mit Ihrer Nummer. An manchen Standorten (Masten) hängen teilweise vier Schilder. Wenn ich die Schilder Beschriftung erzwinge (FORCE TRUE), liegt die Beschriftung übereinander! Wie kann ich dies ändern, dass man die Beschriftung aller Punkte lesen kann? MfG Mark Kellermann ___ 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] Beschriftung Objekte mit gleicher Lage
Hallo, ich möchte Punkte (Schilder) beschriften mit Ihrer Nummer. An manchen Standorten (Masten) hängen teilweise vier Schilder. Wenn ich die Schilder Beschriftung erzwinge (FORCE TRUE), liegt die Beschriftung übereinander! Wie kann ich dies ändern, dass man die Beschriftung aller Punkte lesen kann? MfG Mark Kellermann ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Return pixel values from raster layers served by mapserver
Hello, I previously wrote about this issue, but have not found a solution yet. I am running Mapserver 6.4.1, and am using Postgres/Postgis to display a time series of geotiff images. I would like to know the best way for a user to submit a given x,y coordinate pair and return the pixel value for a given image. Is this possible using only the mapserver api? or must I absolutely use mapscript? Currently, I use a PostgreSQL/PostGIS time-enabled table to store the information about the location of the geotiffs and the timestamp associated with them: pm25_monthly=# \d pm25_monthly_global Table public.pm25_monthly_global Column |Type | Modifiers --+-+--- oid | integer | default nextval('pm25_monthly_seq'::regclass) rundate | timestamp with time zone | datetime| timestamp with time zone| location| text| timezone| timestamp without time zone | the_geom | geometry(MultiPolygon,4326) | Indexes: pm25_monthly_global_oid_key UNIQUE CONSTRAINT, btree (oid) The 'location' field simply gives the full path to the relevant geotiff on the file system. And, I define the index in the mapfile: #**LAYER - TILE INDEX FOR PM2.5 RASTERS (Time sensitive) LAYER STATUS ON NAME pm25_time_index TYPE POLYGON DATA the_geom from pm25_monthly_global using unique oid using SRID=4326 METADATA ows_title PM25 TIME INDEX ows_srs EPSG:4326 ows_extent -180 -90 180 90 #[minx][miny][maxx][maxy] wms_timeformat -MM-DDTHH:MM:SS wms_timeextent 2011-01-01T00:00:00/2012-12-01T00:00:00 wms_timeitem timezone wms_timedefault 2011-01-01T00:00:00 wcs_resolution '0:10 0:10' END #CONNECTION user=wilbur dbname=pm25_monthly host=localhost password=ii #CONNECTIONTYPE postgis CONNECTIONTYPE POSTGIS CONNECTION host=127.0.0.1 dbname=pm25_monthly user=wilbur password=EUR2_live port=5432 DATA the_geom from pm25_monthly_global using unique oid using srid=4326 END #***LAYER - MONTHLY PM2.5 (Time Sensitive)* LAYER NAME 'pm25_monthly' TYPE RASTER STATUS ON DEBUG OFF DUMP TRUE #TRANSPARENCY 50 #FILTER METADATA ows_keywordlist 'PM2.5 (ug/m3), Global' #wms_keywordlist (Keywordlist) ows_description Global monthly mean PM 2.5 (ug/m3)concentration ows_name Global monthly mean PM2.5 - Concentration Values (ug/m3) ows_label Global PM 2.5 (ug/m3) ows_srs EPSG:4326 EPSG:900913 ows_extent -180 -90 180 90 #[minx][miny][maxx][maxy] ows_formats GEOTIFF ows_nativeformat 8-bit GeoTIF ows_timeitem timezone wms_onlineresource http://localhost/cgi-bin/mapserv?map=/var/www/pm25_mapserver/public_html/pm25_ogc_services.map; wms_abstract 'Global monthly mean PM 2.5 (ug/m3)concentration' #wms_abstract(Abstract) wms_opaque '0' #wms_opaque(layer) wms_title Global monthly mean PM 2.5 (ug/m3)concentration ows_timeformat -MM-DDTHH:MM:SSZ ows_timeextent 2011-01-01T00:00:00Z/2012-12-01T00:00:00Z ows_timedefault 2011-01-01T00:00:00Z wms_enable_request * wcs_resolution 0:10 0:10 wcs_bandcount 1 wcs_size 3600 1800 layer_name pm25_monthly END #METADATA PROJECTION init=epsg:4326 #WGS84 Decimal Degrees END #PROJECTION TILEITEM location TILEINDEX pm25_time_index END #LAYER Thanks ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Return pixel values from raster layers served by mapserver
Hi, I guess you could get it as a normally GetFeatureInfo request. We use it usually to retrive the quote from a raster DEM. You should set a template and do a request GetFeatureInfo with output format = text/html. In the template you should retrieve : the RGB values separatelly for R,G and B or for a raster DEM the quote value. AFAIK The only relevant difference difference is the input format. Infct we use the spatialite using the OGR. But I guess it should work also with postgis provider. regards, A. 2015-01-06 15:58 GMT+01:00 Bill Hudspeth bhudsp...@edac.unm.edu: Hello, I previously wrote about this issue, but have not found a solution yet. I am running Mapserver 6.4.1, and am using Postgres/Postgis to display a time series of geotiff images. I would like to know the best way for a user to submit a given x,y coordinate pair and return the pixel value for a given image. Is this possible using only the mapserver api? or must I absolutely use mapscript? Currently, I use a PostgreSQL/PostGIS time-enabled table to store the information about the location of the geotiffs and the timestamp associated with them: pm25_monthly=# \d pm25_monthly_global Table public.pm25_monthly_global Column |Type | Modifiers --+-+--- oid | integer | default nextval('pm25_monthly_seq'::regclass) rundate | timestamp with time zone | datetime| timestamp with time zone| location| text| timezone| timestamp without time zone | the_geom | geometry(MultiPolygon,4326) | Indexes: pm25_monthly_global_oid_key UNIQUE CONSTRAINT, btree (oid) The 'location' field simply gives the full path to the relevant geotiff on the file system. And, I define the index in the mapfile: #**LAYER - TILE INDEX FOR PM2.5 RASTERS (Time sensitive) LAYER STATUS ON NAME pm25_time_index TYPE POLYGON DATA the_geom from pm25_monthly_global using unique oid using SRID=4326 METADATA ows_title PM25 TIME INDEX ows_srs EPSG:4326 ows_extent -180 -90 180 90 #[minx][miny][maxx][maxy] wms_timeformat -MM-DDTHH:MM:SS wms_timeextent 2011-01-01T00:00:00/2012-12-01T00:00:00 wms_timeitem timezone wms_timedefault 2011-01-01T00:00:00 wcs_resolution '0:10 0:10' END #CONNECTION user=wilbur dbname=pm25_monthly host=localhost password=ii #CONNECTIONTYPE postgis CONNECTIONTYPE POSTGIS CONNECTION host=127.0.0.1 dbname=pm25_monthly user=wilbur password=EUR2_live port=5432 DATA the_geom from pm25_monthly_global using unique oid using srid=4326 END #***LAYER - MONTHLY PM2.5 (Time Sensitive)* LAYER NAME 'pm25_monthly' TYPE RASTER STATUS ON DEBUG OFF DUMP TRUE #TRANSPARENCY 50 #FILTER METADATA ows_keywordlist 'PM2.5 (ug/m3), Global' #wms_keywordlist (Keywordlist) ows_description Global monthly mean PM 2.5 (ug/m3)concentration ows_name Global monthly mean PM2.5 - Concentration Values (ug/m3) ows_label Global PM 2.5 (ug/m3) ows_srs EPSG:4326 EPSG:900913 ows_extent -180 -90 180 90 #[minx][miny][maxx][maxy] ows_formats GEOTIFF ows_nativeformat 8-bit GeoTIF ows_timeitem timezone wms_onlineresource http://localhost/cgi-bin/mapserv?map=/var/www/pm25_mapserver/public_html/pm25_ogc_services.map; wms_abstract 'Global monthly mean PM 2.5 (ug/m3)concentration' #wms_abstract(Abstract) wms_opaque '0' #wms_opaque(layer) wms_title Global monthly mean PM 2.5 (ug/m3)concentration ows_timeformat -MM-DDTHH:MM:SSZ ows_timeextent 2011-01-01T00:00:00Z/2012-12-01T00:00:00Z ows_timedefault 2011-01-01T00:00:00Z wms_enable_request * wcs_resolution 0:10 0:10 wcs_bandcount 1 wcs_size 3600 1800 layer_name pm25_monthly END #METADATA PROJECTION init=epsg:4326 #WGS84 Decimal Degrees END #PROJECTION TILEITEM location TILEINDEX pm25_time_index END #LAYER Thanks ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- - Andrea Peri . . . . . . . . . qwerty àèìòù - ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] mapcache compile issue on cygwin posted on stackoverflow
On 1/5/2015 5:36 PM, Stephen Woodbridge wrote: I saw this issue come up on stackoverflow: http://stackoverflow.com/questions/27755442/compiling-error-core-c-in-mapcache-with-cygwin/27760401 Anyone have any other ideas? -Steve W ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users Yea, if he didnt have apr installed, I'd expect to see cannot find header errors. So if it found the headers .. why wouldn't the header contain apr_thread_t? Wrong version maybe? The mapcache page doesnt say anything about cygwin. They say it compiles with visual studio though. -Andy ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Return pixel values from raster layers served by mapserver
Ok, so this just a PostGIS-based tiled layer to access GeoTIFF's. You should just be able to do a normal MapServer query. e.g. http://your.server/cgi-bin/mapserv?map=your.mapmapxy=x+yqlayer=pm25_monthlymode=query You'd need to set a TEMPLATE for the pm25_monthly layer. Have you tried that? WMS should work then too but it's simpler to debug using a basic MapServer query. Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bill Hudspeth Sent: Tuesday, January 06, 2015 8:59 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Return pixel values from raster layers served by mapserver Hello, I previously wrote about this issue, but have not found a solution yet. I am running Mapserver 6.4.1, and am using Postgres/Postgis to display a time series of geotiff images. I would like to know the best way for a user to submit a given x,y coordinate pair and return the pixel value for a given image. Is this possible using only the mapserver api? or must I absolutely use mapscript? Currently, I use a PostgreSQL/PostGIS time-enabled table to store the information about the location of the geotiffs and the timestamp associated with them: pm25_monthly=# \d pm25_monthly_global Table public.pm25_monthly_global Column |Type | Modifiers --+-+--- --+-+ oid | integer | default nextval('pm25_monthly_seq'::regclass) rundate | timestamp with time zone | datetime| timestamp with time zone| location| text| timezone| timestamp without time zone | the_geom | geometry(MultiPolygon,4326) | Indexes: pm25_monthly_global_oid_key UNIQUE CONSTRAINT, btree (oid) The 'location' field simply gives the full path to the relevant geotiff on the file system. And, I define the index in the mapfile: #**LAYER - TILE INDEX FOR PM2.5 RASTERS (Time sensitive) LAYER STATUS ON NAME pm25_time_index TYPE POLYGON DATA the_geom from pm25_monthly_global using unique oid using SRID=4326 METADATA ows_title PM25 TIME INDEX ows_srs EPSG:4326 ows_extent -180 -90 180 90 #[minx][miny][maxx][maxy] wms_timeformat -MM-DDTHH:MM:SS wms_timeextent 2011-01-01T00:00:00/2012-12-01T00:00:00 wms_timeitem timezone wms_timedefault 2011-01-01T00:00:00 wcs_resolution '0:10 0:10' END #CONNECTION user=wilbur dbname=pm25_monthly host=localhost password=ii #CONNECTIONTYPE postgis CONNECTIONTYPE POSTGIS CONNECTION host=127.0.0.1 dbname=pm25_monthly user=wilbur password=EUR2_live port=5432 DATA the_geom from pm25_monthly_global using unique oid using srid=4326 END #***LAYER - MONTHLY PM2.5 (Time Sensitive)* LAYER NAME 'pm25_monthly' TYPE RASTER STATUS ON DEBUG OFF DUMP TRUE #TRANSPARENCY 50 #FILTER METADATA ows_keywordlist 'PM2.5 (ug/m3), Global' #wms_keywordlist (Keywordlist) ows_description Global monthly mean PM 2.5 (ug/m3)concentration ows_name Global monthly mean PM2.5 - Concentration Values (ug/m3) ows_label Global PM 2.5 (ug/m3) ows_srs EPSG:4326 EPSG:900913 ows_extent -180 -90 180 90 #[minx][miny][maxx][maxy] ows_formats GEOTIFF ows_nativeformat 8-bit GeoTIF ows_timeitem timezone wms_onlineresource http://localhost/cgi-bin/mapserv?map=/var/www/pm25_mapserver/public_html/pm25_ogc_services.map; wms_abstract 'Global monthly mean PM 2.5 (ug/m3)concentration' #wms_abstract(Abstract) wms_opaque '0' #wms_opaque(layer) wms_title Global monthly mean PM 2.5 (ug/m3)concentration ows_timeformat -MM-DDTHH:MM:SSZ ows_timeextent 2011-01-01T00:00:00Z/2012-12-01T00:00:00Z ows_timedefault 2011-01-01T00:00:00Z wms_enable_request * wcs_resolution 0:10 0:10 wcs_bandcount 1 wcs_size 3600 1800 layer_name pm25_monthly END #METADATA PROJECTION init=epsg:4326 #WGS84 Decimal Degrees END #PROJECTION TILEITEM location TILEINDEX pm25_time_index END #LAYER Thanks ___ 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
Re: [mapserver-users] Return pixel values from raster layers served by mapserver
If you want to use one x/y to query multiple rasters, that should be doable in straight MapServer although I guess it depends on how things are organized. I don't know how things work from a query perspective if you use your tile index as just a spatial index and not a temporal index. I'd get the one layer version working then expand it - make sure the PG tileindex works as expected with a query. -Original Message- From: William Hudspeth [mailto:bhudsp...@edac.unm.edu] Sent: Tuesday, January 06, 2015 10:02 AM To: Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Return pixel values from raster layers served by mapserver I have not yet tried a TEMPLATEideally, I am looking for a method to script a series of calls to mapserver to return a list of pixel values for a time series of rasters for a given geographic coordinate. In this case, imagine a time series of air pollution rasters where I want to collect a sequence of values for a given city or location. I want to be able to use these data points to build a time series graphAny ideas would be appreciated... Thanks! On 01/06/2015 08:44 AM, Lime, Steve D (MNIT) wrote: Ok, so this just a PostGIS-based tiled layer to access GeoTIFF's. You should just be able to do a normal MapServer query. e.g. http://your.server/cgi-bin/mapserv?map=your.mapmapxy=x+yqlayer=pm25_ monthlymode=query You'd need to set a TEMPLATE for the pm25_monthly layer. Have you tried that? WMS should work then too but it's simpler to debug using a basic MapServer query. Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bill Hudspeth Sent: Tuesday, January 06, 2015 8:59 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Return pixel values from raster layers served by mapserver Hello, I previously wrote about this issue, but have not found a solution yet. I am running Mapserver 6.4.1, and am using Postgres/Postgis to display a time series of geotiff images. I would like to know the best way for a user to submit a given x,y coordinate pair and return the pixel value for a given image. Is this possible using only the mapserver api? or must I absolutely use mapscript? Currently, I use a PostgreSQL/PostGIS time-enabled table to store the information about the location of the geotiffs and the timestamp associated with them: pm25_monthly=# \d pm25_monthly_global Table public.pm25_monthly_global Column |Type | Modifiers --+-+- --+-+-- --+-+ oid | integer | default nextval('pm25_monthly_seq'::regclass) rundate | timestamp with time zone | datetime| timestamp with time zone| location| text| timezone| timestamp without time zone | the_geom | geometry(MultiPolygon,4326) | Indexes: pm25_monthly_global_oid_key UNIQUE CONSTRAINT, btree (oid) The 'location' field simply gives the full path to the relevant geotiff on the file system. And, I define the index in the mapfile: #**LAYER - TILE INDEX FOR PM2.5 RASTERS (Time sensitive) LAYER STATUS ON NAME pm25_time_index TYPE POLYGON DATA the_geom from pm25_monthly_global using unique oid using SRID=4326 METADATA ows_title PM25 TIME INDEX ows_srs EPSG:4326 ows_extent -180 -90 180 90 #[minx][miny][maxx][maxy] wms_timeformat -MM-DDTHH:MM:SS wms_timeextent 2011-01-01T00:00:00/2012-12-01T00:00:00 wms_timeitem timezone wms_timedefault 2011-01-01T00:00:00 wcs_resolution '0:10 0:10' END #CONNECTION user=wilbur dbname=pm25_monthly host=localhost password=ii #CONNECTIONTYPE postgis CONNECTIONTYPE POSTGIS CONNECTION host=127.0.0.1 dbname=pm25_monthly user=wilbur password=EUR2_live port=5432 DATA the_geom from pm25_monthly_global using unique oid using srid=4326 END #***LAYER - MONTHLY PM2.5 (Time Sensitive)* LAYER NAME 'pm25_monthly' TYPE RASTER STATUS ON DEBUG OFF DUMP TRUE #TRANSPARENCY 50 #FILTER METADATA ows_keywordlist 'PM2.5 (ug/m3), Global' #wms_keywordlist (Keywordlist) ows_description Global monthly mean PM 2.5 (ug/m3)concentration ows_name Global monthly mean PM2.5 - Concentration Values (ug/m3) ows_label Global PM 2.5 (ug/m3) ows_srs EPSG:4326 EPSG:900913 ows_extent -180 -90 180 90 #[minx][miny][maxx][maxy] ows_formats GEOTIFF ows_nativeformat 8-bit GeoTIF ows_timeitem timezone wms_onlineresource
Re: [mapserver-users] Return pixel values from raster layers served by mapserver
I guess I am a little unclear as to how to proceed. The PG temporal index already works for WMS calls. I can pass a time stamp in the URL request, and I get the correct image. Do I still need a template for returning the x/y query? Or is there another way to return the values via a script that sequentially runs through a list of times? On 01/06/2015 09:37 AM, Lime, Steve D (MNIT) wrote: If you want to use one x/y to query multiple rasters, that should be doable in straight MapServer although I guess it depends on how things are organized. I don't know how things work from a query perspective if you use your tile index as just a spatial index and not a temporal index. I'd get the one layer version working then expand it - make sure the PG tileindex works as expected with a query. -Original Message- From: William Hudspeth [mailto:bhudsp...@edac.unm.edu] Sent: Tuesday, January 06, 2015 10:02 AM To: Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Return pixel values from raster layers served by mapserver I have not yet tried a TEMPLATEideally, I am looking for a method to script a series of calls to mapserver to return a list of pixel values for a time series of rasters for a given geographic coordinate. In this case, imagine a time series of air pollution rasters where I want to collect a sequence of values for a given city or location. I want to be able to use these data points to build a time series graphAny ideas would be appreciated... Thanks! On 01/06/2015 08:44 AM, Lime, Steve D (MNIT) wrote: Ok, so this just a PostGIS-based tiled layer to access GeoTIFF's. You should just be able to do a normal MapServer query. e.g. http://your.server/cgi-bin/mapserv?map=your.mapmapxy=x+yqlayer=pm25_ monthlymode=query You'd need to set a TEMPLATE for the pm25_monthly layer. Have you tried that? WMS should work then too but it's simpler to debug using a basic MapServer query. Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bill Hudspeth Sent: Tuesday, January 06, 2015 8:59 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Return pixel values from raster layers served by mapserver Hello, I previously wrote about this issue, but have not found a solution yet. I am running Mapserver 6.4.1, and am using Postgres/Postgis to display a time series of geotiff images. I would like to know the best way for a user to submit a given x,y coordinate pair and return the pixel value for a given image. Is this possible using only the mapserver api? or must I absolutely use mapscript? Currently, I use a PostgreSQL/PostGIS time-enabled table to store the information about the location of the geotiffs and the timestamp associated with them: pm25_monthly=# \d pm25_monthly_global Table public.pm25_monthly_global Column |Type | Modifiers --+-+- --+-+-- --+-+ oid | integer | default nextval('pm25_monthly_seq'::regclass) rundate | timestamp with time zone | datetime| timestamp with time zone| location| text| timezone| timestamp without time zone | the_geom | geometry(MultiPolygon,4326) | Indexes: pm25_monthly_global_oid_key UNIQUE CONSTRAINT, btree (oid) The 'location' field simply gives the full path to the relevant geotiff on the file system. And, I define the index in the mapfile: #**LAYER - TILE INDEX FOR PM2.5 RASTERS (Time sensitive) LAYER STATUS ON NAME pm25_time_index TYPE POLYGON DATA the_geom from pm25_monthly_global using unique oid using SRID=4326 METADATA ows_title PM25 TIME INDEX ows_srs EPSG:4326 ows_extent -180 -90 180 90 #[minx][miny][maxx][maxy] wms_timeformat -MM-DDTHH:MM:SS wms_timeextent 2011-01-01T00:00:00/2012-12-01T00:00:00 wms_timeitem timezone wms_timedefault 2011-01-01T00:00:00 wcs_resolution '0:10 0:10' END #CONNECTION user=wilbur dbname=pm25_monthly host=localhost password=ii #CONNECTIONTYPE postgis CONNECTIONTYPE POSTGIS CONNECTION host=127.0.0.1 dbname=pm25_monthly user=wilbur password=EUR2_live port=5432 DATA the_geom from pm25_monthly_global using unique oid using srid=4326 END #***LAYER - MONTHLY PM2.5 (Time Sensitive)* LAYER NAME 'pm25_monthly' TYPE RASTER STATUS ON DEBUG OFF DUMP TRUE #TRANSPARENCY 50 #FILTER METADATA ows_keywordlist 'PM2.5 (ug/m3), Global' #wms_keywordlist (Keywordlist) ows_description Global monthly mean PM 2.5 (ug/m3)concentration ows_name Global monthly mean
Re: [mapserver-users] Return pixel values from raster layers served by mapserver
I have not yet tried a TEMPLATEideally, I am looking for a method to script a series of calls to mapserver to return a list of pixel values for a time series of rasters for a given geographic coordinate. In this case, imagine a time series of air pollution rasters where I want to collect a sequence of values for a given city or location. I want to be able to use these data points to build a time series graphAny ideas would be appreciated... Thanks! On 01/06/2015 08:44 AM, Lime, Steve D (MNIT) wrote: Ok, so this just a PostGIS-based tiled layer to access GeoTIFF's. You should just be able to do a normal MapServer query. e.g. http://your.server/cgi-bin/mapserv?map=your.mapmapxy=x+yqlayer=pm25_monthlymode=query You'd need to set a TEMPLATE for the pm25_monthly layer. Have you tried that? WMS should work then too but it's simpler to debug using a basic MapServer query. Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bill Hudspeth Sent: Tuesday, January 06, 2015 8:59 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Return pixel values from raster layers served by mapserver Hello, I previously wrote about this issue, but have not found a solution yet. I am running Mapserver 6.4.1, and am using Postgres/Postgis to display a time series of geotiff images. I would like to know the best way for a user to submit a given x,y coordinate pair and return the pixel value for a given image. Is this possible using only the mapserver api? or must I absolutely use mapscript? Currently, I use a PostgreSQL/PostGIS time-enabled table to store the information about the location of the geotiffs and the timestamp associated with them: pm25_monthly=# \d pm25_monthly_global Table public.pm25_monthly_global Column |Type | Modifiers --+-+--- --+-+ oid | integer | default nextval('pm25_monthly_seq'::regclass) rundate | timestamp with time zone | datetime| timestamp with time zone| location| text| timezone| timestamp without time zone | the_geom | geometry(MultiPolygon,4326) | Indexes: pm25_monthly_global_oid_key UNIQUE CONSTRAINT, btree (oid) The 'location' field simply gives the full path to the relevant geotiff on the file system. And, I define the index in the mapfile: #**LAYER - TILE INDEX FOR PM2.5 RASTERS (Time sensitive) LAYER STATUS ON NAME pm25_time_index TYPE POLYGON DATA the_geom from pm25_monthly_global using unique oid using SRID=4326 METADATA ows_title PM25 TIME INDEX ows_srs EPSG:4326 ows_extent -180 -90 180 90 #[minx][miny][maxx][maxy] wms_timeformat -MM-DDTHH:MM:SS wms_timeextent 2011-01-01T00:00:00/2012-12-01T00:00:00 wms_timeitem timezone wms_timedefault 2011-01-01T00:00:00 wcs_resolution '0:10 0:10' END #CONNECTION user=wilbur dbname=pm25_monthly host=localhost password=ii #CONNECTIONTYPE postgis CONNECTIONTYPE POSTGIS CONNECTION host=127.0.0.1 dbname=pm25_monthly user=wilbur password=EUR2_live port=5432 DATA the_geom from pm25_monthly_global using unique oid using srid=4326 END #***LAYER - MONTHLY PM2.5 (Time Sensitive)* LAYER NAME 'pm25_monthly' TYPE RASTER STATUS ON DEBUG OFF DUMP TRUE #TRANSPARENCY 50 #FILTER METADATA ows_keywordlist 'PM2.5 (ug/m3), Global' #wms_keywordlist (Keywordlist) ows_description Global monthly mean PM 2.5 (ug/m3)concentration ows_name Global monthly mean PM2.5 - Concentration Values (ug/m3) ows_label Global PM 2.5 (ug/m3) ows_srs EPSG:4326 EPSG:900913 ows_extent -180 -90 180 90 #[minx][miny][maxx][maxy] ows_formats GEOTIFF ows_nativeformat 8-bit GeoTIF ows_timeitem timezone wms_onlineresource http://localhost/cgi-bin/mapserv?map=/var/www/pm25_mapserver/public_html/pm25_ogc_services.map; wms_abstract 'Global monthly mean PM 2.5 (ug/m3)concentration' #wms_abstract(Abstract) wms_opaque '0' #wms_opaque(layer) wms_title Global monthly mean PM 2.5 (ug/m3)concentration ows_timeformat -MM-DDTHH:MM:SSZ ows_timeextent 2011-01-01T00:00:00Z/2012-12-01T00:00:00Z ows_timedefault 2011-01-01T00:00:00Z wms_enable_request * wcs_resolution 0:10 0:10 wcs_bandcount 1 wcs_size 3600 1800 layer_name pm25_monthly END #METADATA PROJECTION init=epsg:4326 #WGS84 Decimal Degrees END #PROJECTION TILEITEM location TILEINDEX pm25_time_index END #LAYER Thanks