From jmckenna at gatewaygeomatics.com Fri Aug 2 10:32:50 2024 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Fri, 2 Aug 2024 14:32:50 -0300 Subject: [MapServer-users] MapCache 1.14.1 & TinyOWS 1.2.2 now available Message-ID: <87e077c3-a704-4517-821a-e9c562b14baa@gatewaygeomatics.com> The maintenance releases of MapCache 1.14.1 and TinyOWS 1.2.2 are now available. - MapCache changelog: https://mapserver.org/development/changelog/mapcache/changelog-1-14.html#changelog-mapcache-1-14 - TinyOWS changelog: https://mapserver.org/development/changelog/tinyows/changelog-1-2.html#changelog-tinyows-1-2 See downloads page: https://mapserver.org/download.html thanks, -Team MapServer From dieter.zuberbuehler at gogis.ch Wed Aug 7 05:53:56 2024 From: dieter.zuberbuehler at gogis.ch (GOGIS Dieter =?ISO-8859-1?Q?Zuberb=FChler?=) Date: Wed, 07 Aug 2024 14:53:56 +0200 Subject: [MapServer-users] Mapserver>=8.0: Layer Composite Opacity Message-ID: <0b0d008249f2771145ccd6c6f83fc93984fd32a1.camel@gogis.ch> What happend to the 'Layer Composite Opacity' in Mapserver>=8.0? I tried several versions of Mapserver 8.x on Ubuntu 22.04 and 24.04 and had always the same result: 'Opacity on Layer Level' is ignored and the background layers are not visible. I tried with map2img and phpng (swig), same result. In the documentation it is still available and the mapfile is parsed correctly. I can get and set the opacity with php and it will be written down (save to mapfile) correctly. Any hint, is this removed or a known problem? Thank you in advance, Dieter -- -+-+-+-+-+-+-+-+-+-+-+-+-+-+- GOGIS GmbH Rosenstrasse 2 CH-4142 M?nchenstein From joerg.thomsen at wheregroup.com Wed Aug 7 06:40:29 2024 From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=C3=B6rg_Thomsen_=28WhereGroup=29?=) Date: Wed, 7 Aug 2024 15:40:29 +0200 Subject: [MapServer-users] Mapserver>=8.0: Layer Composite Opacity In-Reply-To: <0b0d008249f2771145ccd6c6f83fc93984fd32a1.camel@gogis.ch> References: <0b0d008249f2771145ccd6c6f83fc93984fd32a1.camel@gogis.ch> Message-ID: <4c53872a-d8b7-406f-b9f0-86a605131df7@wheregroup.com> Hello Dieter, this works with MS 8 on debian: LAYER NAME 'buildings' TYPE POLYGON CONNECTIONTYPE postgis CONNECTION '...' DATA '...' METADATA 'ows_title' 'buildings' 'ows_srs' 'EPSG:4326' END COMPOSITE OPACITY 50 END CLASS NAME 'Geb?ude' STYLE WIDTH 1 OUTLINECOLOR 0 0 0 COLOR 255 150 50 END END END http://schulung.foss.academy/cgi-bin/mapserv?map=opacity&layers=buildings&mode=map&map_imagetype=png&mapext=413024+5318200+414246+5319422 Can you show your layer definition? regards, J?rg Am 07.08.24 um 14:53 schrieb GOGIS Dieter Zuberb?hler via MapServer-users: > What happend to the 'Layer Composite Opacity' in Mapserver>=8.0? I > tried several versions of Mapserver 8.x on Ubuntu 22.04 and 24.04 and > had always the same result: 'Opacity on Layer Level' is ignored and the > background layers are not visible. > > I tried with map2img and phpng (swig), same result. > > In the documentation it is still available and the mapfile is parsed > correctly. I can get and set the opacity with php and it will be > written down (save to mapfile) correctly. > > Any hint, is this removed or a known problem? > > Thank you in advance, > > Dieter > > -- Viele Gr??e, J?rg Thomsen *********************************************************** FOSS Academy Sommerschule: Kompaktkurs zum Aufbau einer GDI 02.-06. September 2024, Pr?senzveranstaltung in Bonn https://www.foss-academy.com/kompaktkurse *********************************************************** J?rg Thomsen WhereGroup GmbH Bundesallee 23 10717 Berlin Germany Tel: +49 (0)30 / 5130 278 74 Fax: +49 (0)30 / 5130 278 11 joerg.thomsen at wheregroup.com www.wheregroup.com Gesch?ftsf?hrer: Olaf Knopp, Peter Stamm Amtsgericht Bonn, HRB 9885 From jmckenna at gatewaygeomatics.com Wed Aug 7 07:38:27 2024 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 7 Aug 2024 11:38:27 -0300 Subject: [MapServer-users] Mapserver>=8.0: Layer Composite Opacity In-Reply-To: <0b0d008249f2771145ccd6c6f83fc93984fd32a1.camel@gogis.ch> References: <0b0d008249f2771145ccd6c6f83fc93984fd32a1.camel@gogis.ch> Message-ID: <186e2975-8fa8-407a-b00a-534d33590019@gatewaygeomatics.com> Hi Dieter, It could be possible that your MapServer installation was compiled with Pixman library support enabled in MapServer, which unfortunately causes a known bug where opacity does not work (see https://github.com/MapServer/MapServer/issues/5343 ). I believe we should completely remove Pixman support from MapServer in a future release, as so many users hit this issue each year. In other words, make sure that you set -DWITH_PIXMAN=0 when compiling MapServer from source. PS. I actually used the small mapfile included in that ticket, for testing now with today's MapServer 8.3-dev on MS4W 5, on Windows, and successfully generated a proper map image (with opacity) with map2img. thanks, -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev co-founder of FOSS4G http://gatewaygeo.com/ On 2024-08-07 9:53 a.m., GOGIS Dieter Zuberb?hler via MapServer-users wrote: > What happend to the 'Layer Composite Opacity' in Mapserver>=8.0? I > tried several versions of Mapserver 8.x on Ubuntu 22.04 and 24.04 and > had always the same result: 'Opacity on Layer Level' is ignored and the > background layers are not visible. > > I tried with map2img and phpng (swig), same result. > > In the documentation it is still available and the mapfile is parsed > correctly. I can get and set the opacity with php and it will be > written down (save to mapfile) correctly. > > Any hint, is this removed or a known problem? > > Thank you in advance, > > Dieter > > From jmckenna at gatewaygeomatics.com Wed Aug 7 07:54:44 2024 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 7 Aug 2024 11:54:44 -0300 Subject: [MapServer-users] Mapserver>=8.0: Layer Composite Opacity In-Reply-To: <186e2975-8fa8-407a-b00a-534d33590019@gatewaygeomatics.com> References: <0b0d008249f2771145ccd6c6f83fc93984fd32a1.camel@gogis.ch> <186e2975-8fa8-407a-b00a-534d33590019@gatewaygeomatics.com> Message-ID: <7cdf3d09-0916-4c85-90f2-5c82f050b258@gatewaygeomatics.com> Hi Dieter, I also just used MS4W's PHP (PHP version 8.3.9) to call the setOpacity() function, to update the layer's opacity, such as: $oPolyLayer->setOpacity(40); (see sample script at https://ms4w.com/trac/wiki/SWIGMapScriptOpacity ) -jeff On 2024-08-07 11:38 a.m., Jeff McKenna via MapServer-users wrote: > Hi Dieter, > > It could be possible that your MapServer installation was compiled with > Pixman library support enabled in MapServer, which unfortunately causes > a known bug where opacity does not work (see > https://github.com/MapServer/MapServer/issues/5343 ).? I believe we > should completely remove Pixman support from MapServer in a future > release, as so many users hit this issue each year. > > In other words, make sure that you set -DWITH_PIXMAN=0 when compiling > MapServer from source. > > PS. I actually used the small mapfile included in that ticket, for > testing now with today's MapServer 8.3-dev on MS4W 5, on Windows, and > successfully generated a proper map image (with opacity) with map2img. > > thanks, > > -jeff > > > -- Jeff McKenna GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev co-founder of FOSS4G http://gatewaygeo.com/ From dieter.zuberbuehler at gogis.ch Wed Aug 7 08:04:24 2024 From: dieter.zuberbuehler at gogis.ch (GOGIS Dieter =?ISO-8859-1?Q?Zuberb=FChler?=) Date: Wed, 07 Aug 2024 17:04:24 +0200 Subject: [MapServer-users] Mapserver>=8.0: Layer Composite Opacity In-Reply-To: <186e2975-8fa8-407a-b00a-534d33590019@gatewaygeomatics.com> References: <0b0d008249f2771145ccd6c6f83fc93984fd32a1.camel@gogis.ch> <186e2975-8fa8-407a-b00a-534d33590019@gatewaygeomatics.com> Message-ID: <98cd92667e95305258da33298cb284461af0de59.camel@gogis.ch> Hi Jeff, many thanks for this hint. -DWITH_PIXMAN=0 fixed it! Best regards, Dieter On Wed, 2024-08-07 at 11:38 -0300, Jeff McKenna via MapServer-users wrote: > Hi Dieter, > > It could be possible that your MapServer installation was compiled > with > Pixman library support enabled in MapServer, which unfortunately > causes > a known bug where opacity does not work (see > https://github.com/MapServer/MapServer/issues/5343?).? I believe we > should completely remove Pixman support from MapServer in a future > release, as so many users hit this issue each year. > > In other words, make sure that you set -DWITH_PIXMAN=0 when compiling > MapServer from source. > > PS. I actually used the small mapfile included in that ticket, for > testing now with today's MapServer 8.3-dev on MS4W 5, on Windows, and > successfully generated a proper map image (with opacity) with > map2img. > > thanks, > > -jeff > > > -- -+-+-+-+-+-+-+-+-+-+-+-+-+-+- GOGIS GmbH Rosenstrasse 2 CH-4142 M?nchenstein Tel. +4144 586 60 15 Mob. +4178 619 98 91 www.gogis.ch From trygve at aspenes.priv.no Tue Aug 13 06:36:29 2024 From: trygve at aspenes.priv.no (Trygve Aspenes) Date: Tue, 13 Aug 2024 15:36:29 +0200 Subject: [MapServer-users] Is there a way to add columns returned from a postgis connection Message-ID: <19970cb463ad75145797e22f5b9c08ce@aspenes.priv.no> I struggle to find a good subject, but here we go. I have a layer using a virtual sql call, returning various columns from a postgis db. These are used to plot the data and to style the data (using expressions) pending the values return from the db. However I can not make this call filter using BBOX from the request. The call looks like this: # CONNECTION " # # # PG:dbname=mapserver host=mapserver user=$PGSQ_USERNAME password=$PGSQ_PASSWORD port=5432 # SELECT EXTRACT(EPOCH FROM time::TIMESTAMP WITH TIME ZONE) as lxepoch,extract(epoch from '%time%'::timestamp) as request_time,latitude,longitude FROM the_table where time between '%time%'::timestamp - interval '300 seconds' and '%time%' # # WGS84 # wkbPoint # # " # DATA "the_data" So I try a postgis connection as this uses BBOX as default like this: DATA "geom from (select id,time,geom,EXTRACT(EPOCH FROM time::TIMESTAMP WITH TIME ZONE) as lxepoch from the_table where time between '%time%'::timestamp - interval '600 seconds' and '%time%') as subquery using unique id using srid=4326" Now, this returns only the geom and id columns. So my question is: Is there a way to make this call return a lxepoch column also? Testing with map2img I see msPostGISParseData: unique_column=id, srid=4326, geom_column_name=geom, table_name=(select id,time,geom,EXTRACT(EPOCH FROM time::TIMESTAMP WITH TIME ZONE) as lxepoch from the_table where time between '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' and '2024-07-10T10:35:00Z') as subquery msPostGISBuildSQL called. msPostGISBuildSQLItems called. msPostGISBuildSQLItems: 0 items requested. msPostGISBuildSQLFrom called. msPostGISReplaceBoxToken called. msPostGISBuildSQLWhere called. msPostGISBuildSQLSRID called. msPostGISBuildSQLSRID: SRID provided (4326) msPostGISBuildSQLBox called. msPostGISLayerWhichShapes query: SELECT ST_AsBinary(("geom"),'NDR') as geom,"id"::text FROM (select id,time,geom,EXTRACT(EPOCH FROM time::TIMESTAMP WITH TIME ZONE) as lxepoch from the_table where time between '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' and '2024-07-10T10:35:00Z') as subquery WHERE ST_Intersects("geom", ST_GeomFromText('POLYGON((-180 -134.887218045113,-180 134.887218045113,180 134.887218045113,180 -134.887218045113,-180 -134.887218045113))',4326)) Copy/pasting the last line into my postgis I get as expected: geom | id ----------------------------------------------+---- \x010100000066666666666624400000000000c04640 | 1 (1 row) And if I add to the select (in the same copy/paste as above) the lxepoch in by db I get: geom | id | lxepoch ----------------------------------------------+----+------------------- \x010100000066666666666624400000000000c04640 | 1 | 1720607700.000000 (1 row) So is it possible to configure the mapserver postgis data query to get this result? I had a look at the code, and a see from the log this function is called https://github.com/MapServer/MapServer/blob/main/src/mappostgis.cpp#L1651, but the logs says 0 items. I can't read from the code if it is possible to add other items. Any ideas? Thanks Trygve Aspenes From richard.greenwood at gmail.com Tue Aug 13 14:27:31 2024 From: richard.greenwood at gmail.com (Richard Greenwood) Date: Tue, 13 Aug 2024 15:27:31 -0600 Subject: [MapServer-users] Is there a way to add columns returned from a postgis connection In-Reply-To: <19970cb463ad75145797e22f5b9c08ce@aspenes.priv.no> References: <19970cb463ad75145797e22f5b9c08ce@aspenes.priv.no> Message-ID: On Tue, Aug 13, 2024 at 8:09?AM Trygve Aspenes via MapServer-users < mapserver-users at lists.osgeo.org> wrote:CONNECTIONTYPE postgis CONNECTION "user=pgselectonly password=pgSelectOnly dbname=fremontwy host=localhost port=6543"postgis > > I struggle to find a good subject, but here we go. > > I have a layer using a virtual sql call, returning various columns from > a postgis db. These are used to plot the data and to style the data > (using expressions) pending the values return from the db. > > However I can not make this call filter using BBOX from the request. > > The call looks like this: > # CONNECTION " > # > # > # PG:dbname=mapserver host=mapserver > user=$PGSQ_USERNAME password=$PGSQ_PASSWORD port=5432 > # SELECT EXTRACT(EPOCH FROM time::TIMESTAMP WITH TIME > ZONE) as lxepoch,extract(epoch from '%time%'::timestamp) as > request_time,latitude,longitude FROM the_table where time between > '%time%'::timestamp - interval '300 seconds' and '%time%' > # y='latitude'/> > # WGS84 > # wkbPoint > # > # " > # DATA "the_data" > > So I try a postgis connection as this uses BBOX as default like this: > > DATA "geom from (select id,time,geom,EXTRACT(EPOCH FROM time::TIMESTAMP > WITH TIME ZONE) as lxepoch from the_table where time between > '%time%'::timestamp - interval '600 seconds' and '%time%') as subquery > using unique id using srid=4326" > > Now, this returns only the geom and id columns. > Why don't you think lxepoch is being returned by the DATA statement above? > So my question is: Is there a way to make this call return a lxepoch > column also? > Maybe you should share your layer definition. I don't understand what you're doing with the OGRVRTDataSource and the "virtual sql call". Would something like this work for you: LAYER TYPE point VALIDATION # appropriate validation for '%time%' END CONNECTIONTYPE postgis CONNECTION "user= password= dbname= host=localhost" DATA "geom from (select id,time,geom,EXTRACT(EPOCH FROM time::TIMESTAMP WITH TIME ZONE) as lxepoch from the_table where time between '%time%'::timestamp - interval '600 seconds' and '%time%') as subquery using unique id using srid=4326" CLASSITEM "lxepoch" # this get lxepoch so that you can use it in CLASS EXPRESSIONS CLASS EXPRESSION # some expression that uses lxepoch ... END CLASS EXPRESSION # another expression that uses lxepoch ... END END > Testing with map2img I see > msPostGISParseData: unique_column=id, srid=4326, geom_column_name=geom, > table_name=(select id,time,geom,EXTRACT(EPOCH FROM time::TIMESTAMP WITH > TIME ZONE) as lxepoch from the_table where time between > '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' and > '2024-07-10T10:35:00Z') as subquery > msPostGISBuildSQL called. > msPostGISBuildSQLItems called. > msPostGISBuildSQLItems: 0 items requested. > msPostGISBuildSQLFrom called. > msPostGISReplaceBoxToken called. > msPostGISBuildSQLWhere called. > msPostGISBuildSQLSRID called. > msPostGISBuildSQLSRID: SRID provided (4326) > msPostGISBuildSQLBox called. > msPostGISLayerWhichShapes query: SELECT ST_AsBinary(("geom"),'NDR') as > geom,"id"::text FROM (select id,time,geom,EXTRACT(EPOCH FROM > time::TIMESTAMP WITH TIME ZONE) as lxepoch from the_table where time > between '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' and > '2024-07-10T10:35:00Z') as subquery WHERE ST_Intersects("geom", > ST_GeomFromText('POLYGON((-180 -134.887218045113,-180 > 134.887218045113,180 134.887218045113,180 -134.887218045113,-180 > -134.887218045113))',4326)) > > Copy/pasting the last line into my postgis I get as expected: > geom | id > ----------------------------------------------+---- > \x010100000066666666666624400000000000c04640 | 1 > (1 row) > > And if I add to the select (in the same copy/paste as above) the lxepoch > in by db I get: > geom | id | lxepoch > ----------------------------------------------+----+------------------- > \x010100000066666666666624400000000000c04640 | 1 | 1720607700.000000 > (1 row) > > > So is it possible to configure the mapserver postgis data query to get > this result? > > I had a look at the code, and a see from the log this function is called > https://github.com/MapServer/MapServer/blob/main/src/mappostgis.cpp#L1651, > > but the logs says 0 items. I can't read from the code if it is possible > to add other items. > > Any ideas? > > Thanks > > Trygve Aspenes > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -- Richard W. Greenwood www.greenwoodmap.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From trygve at aspenes.priv.no Wed Aug 14 00:13:27 2024 From: trygve at aspenes.priv.no (Trygve Aspenes) Date: Wed, 14 Aug 2024 09:13:27 +0200 Subject: [MapServer-users] Is there a way to add columns returned from a postgis connection In-Reply-To: References: <19970cb463ad75145797e22f5b9c08ce@aspenes.priv.no> Message-ID: <31a59b203daabcd1739e8a858359fc46@aspenes.priv.no> Thank you Richard Den 2024-08-13 23:27, skrev Richard Greenwood: > On Tue, Aug 13, 2024 at 8:09?AM Trygve Aspenes via MapServer-users > wrote:CONNECTIONTYPE postgis > CONNECTION "user=pgselectonly password=pgSelectOnly dbname=fremontwy > host=localhost port=6543"postgis > >> I struggle to find a good subject, but here we go. >> >> I have a layer using a virtual sql call, returning various columns >> from >> a postgis db. These are used to plot the data and to style the data >> (using expressions) pending the values return from the db. >> >> However I can not make this call filter using BBOX from the request. >> >> The call looks like this: >> # CONNECTION " >> # >> # >> # PG:dbname=mapserver host=mapserver >> user=$PGSQ_USERNAME password=$PGSQ_PASSWORD >> port=5432 >> # SELECT EXTRACT(EPOCH FROM time::TIMESTAMP WITH >> TIME >> ZONE) as lxepoch,extract(epoch from '%time%'::timestamp) as >> request_time,latitude,longitude FROM the_table where time between >> '%time%'::timestamp - interval '300 seconds' and '%time%' >> # > x='longitude' >> y='latitude'/> >> # WGS84 >> # wkbPoint >> # >> # " >> # DATA "the_data" >> >> So I try a postgis connection as this uses BBOX as default like >> this: >> >> DATA "geom from (select id,time,geom,EXTRACT(EPOCH FROM >> time::TIMESTAMP >> WITH TIME ZONE) as lxepoch from the_table where time between >> '%time%'::timestamp - interval '600 seconds' and '%time%') as >> subquery >> using unique id using srid=4326" >> >> Now, this returns only the geom and id columns. > > Why don't you think lxepoch is being returned by the DATA statement > above? When debugging with map2img I see the call send to my postgis db, and lxepoch is not included. (The call I see was included in the original email) > >> So my question is: Is there a way to make this call return a lxepoch >> >> column also? > > Maybe you should share your layer definition. > > I don't understand what you're doing with the OGRVRTDataSource and the > "virtual sql call". Would something like this work for you: > > LAYER > TYPE point > VALIDATION > # appropriate validation for '%time%' > END > CONNECTIONTYPE postgis > CONNECTION "user= password= dbname= host=localhost" > > DATA "geom from (select id,time,geom,EXTRACT(EPOCH FROM > time::TIMESTAMP > WITH TIME ZONE) as lxepoch from the_table where time between > '%time%'::timestamp - interval '600 seconds' and '%time%') as > subquery > using unique id using srid=4326" > > CLASSITEM "lxepoch" # this get lxepoch so that you can use it in > CLASS EXPRESSIONS > CLASS > EXPRESSION # some expression that uses lxepoch > ... > END > CLASS > > EXPRESSION # another expression that uses lxepoch > ... > END > END > Yes, using classitem includes lxepoch. I have looked in the documentation, but did not understand from the documentation that classitem had this effect. However, I also need another variable, and classitem can only have one. So I'm still stuck. So I guess I have to find another way. But thanks again Richard, this was useful! Trygve Aspenes >> Testing with map2img I see >> msPostGISParseData: unique_column=id, srid=4326, >> geom_column_name=geom, >> table_name=(select id,time,geom,EXTRACT(EPOCH FROM time::TIMESTAMP >> WITH >> TIME ZONE) as lxepoch from the_table where time between >> '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' and >> '2024-07-10T10:35:00Z') as subquery >> msPostGISBuildSQL called. >> msPostGISBuildSQLItems called. >> msPostGISBuildSQLItems: 0 items requested. >> msPostGISBuildSQLFrom called. >> msPostGISReplaceBoxToken called. >> msPostGISBuildSQLWhere called. >> msPostGISBuildSQLSRID called. >> msPostGISBuildSQLSRID: SRID provided (4326) >> msPostGISBuildSQLBox called. >> msPostGISLayerWhichShapes query: SELECT ST_AsBinary(("geom"),'NDR') >> as >> geom,"id"::text FROM (select id,time,geom,EXTRACT(EPOCH FROM >> time::TIMESTAMP WITH TIME ZONE) as lxepoch from the_table where time >> >> between '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' >> and >> '2024-07-10T10:35:00Z') as subquery WHERE ST_Intersects("geom", >> ST_GeomFromText('POLYGON((-180 -134.887218045113,-180 >> 134.887218045113,180 134.887218045113,180 -134.887218045113,-180 >> -134.887218045113))',4326)) >> >> Copy/pasting the last line into my postgis I get as expected: >> geom | id >> ----------------------------------------------+---- >> \x010100000066666666666624400000000000c04640 | 1 >> (1 row) >> >> And if I add to the select (in the same copy/paste as above) the >> lxepoch >> in by db I get: >> geom | id | lxepoch >> > ----------------------------------------------+----+------------------- >> \x010100000066666666666624400000000000c04640 | 1 | >> 1720607700.000000 >> (1 row) >> >> So is it possible to configure the mapserver postgis data query to >> get >> this result? >> >> I had a look at the code, and a see from the log this function is >> called >> > https://github.com/MapServer/MapServer/blob/main/src/mappostgis.cpp#L1651, >> >> but the logs says 0 items. I can't read from the code if it is >> possible >> to add other items. >> >> Any ideas? >> >> Thanks >> >> Trygve Aspenes >> _______________________________________________ >> MapServer-users mailing list >> MapServer-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- > > Richard W. Greenwood > www.greenwoodmap.com [1] > > Links: > ------ > [1] http://www.greenwoodmap.com From sethg at geographika.co.uk Wed Aug 14 01:22:06 2024 From: sethg at geographika.co.uk (Seth G) Date: Wed, 14 Aug 2024 10:22:06 +0200 Subject: [MapServer-users] Is there a way to add columns returned from a postgis connection In-Reply-To: <31a59b203daabcd1739e8a858359fc46@aspenes.priv.no> References: <19970cb463ad75145797e22f5b9c08ce@aspenes.priv.no> <31a59b203daabcd1739e8a858359fc46@aspenes.priv.no> Message-ID: <2a824f7a-a714-4798-b716-8db46bf8d7ac@app.fastmail.com> Hi, MapServer will only request the fields from the database that it needs to render the map or required by the request. If you aren't using lxepoch for labels, classitems, filters etc. then it won't be requested by MapServer. If you make a GetFeatureInfo or WFS request and ask for all items it will be requested. What do you need the lxepoch field for? Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Wed, Aug 14, 2024, at 9:13 AM, Trygve Aspenes via MapServer-users wrote: > Thank you Richard > > > Den 2024-08-13 23:27, skrev Richard Greenwood: >> On Tue, Aug 13, 2024 at 8:09?AM Trygve Aspenes via MapServer-users >> wrote:CONNECTIONTYPE postgis >> CONNECTION "user=pgselectonly password=pgSelectOnly dbname=fremontwy >> host=localhost port=6543"postgis >> >>> I struggle to find a good subject, but here we go. >>> >>> I have a layer using a virtual sql call, returning various columns >>> from >>> a postgis db. These are used to plot the data and to style the data >>> (using expressions) pending the values return from the db. >>> >>> However I can not make this call filter using BBOX from the request. >>> >>> The call looks like this: >>> # CONNECTION " >>> # >>> # >>> # PG:dbname=mapserver host=mapserver >>> user=$PGSQ_USERNAME password=$PGSQ_PASSWORD >>> port=5432 >>> # SELECT EXTRACT(EPOCH FROM time::TIMESTAMP WITH >>> TIME >>> ZONE) as lxepoch,extract(epoch from '%time%'::timestamp) as >>> request_time,latitude,longitude FROM the_table where time between >>> '%time%'::timestamp - interval '300 seconds' and '%time%' >>> # >> x='longitude' >>> y='latitude'/> >>> # WGS84 >>> # wkbPoint >>> # >>> # " >>> # DATA "the_data" >>> >>> So I try a postgis connection as this uses BBOX as default like >>> this: >>> >>> DATA "geom from (select id,time,geom,EXTRACT(EPOCH FROM >>> time::TIMESTAMP >>> WITH TIME ZONE) as lxepoch from the_table where time between >>> '%time%'::timestamp - interval '600 seconds' and '%time%') as >>> subquery >>> using unique id using srid=4326" >>> >>> Now, this returns only the geom and id columns. >> >> Why don't you think lxepoch is being returned by the DATA statement >> above? > > When debugging with map2img I see the call send to my postgis db, and > lxepoch is not included. (The call I see was included in the original > email) > >> >>> So my question is: Is there a way to make this call return a lxepoch >>> >>> column also? >> >> Maybe you should share your layer definition. >> >> I don't understand what you're doing with the OGRVRTDataSource and the >> "virtual sql call". Would something like this work for you: >> >> LAYER >> TYPE point >> VALIDATION >> # appropriate validation for '%time%' >> END >> CONNECTIONTYPE postgis >> CONNECTION "user= password= dbname= host=localhost" >> >> DATA "geom from (select id,time,geom,EXTRACT(EPOCH FROM >> time::TIMESTAMP >> WITH TIME ZONE) as lxepoch from the_table where time between >> '%time%'::timestamp - interval '600 seconds' and '%time%') as >> subquery >> using unique id using srid=4326" >> >> CLASSITEM "lxepoch" # this get lxepoch so that you can use it in >> CLASS EXPRESSIONS >> CLASS >> EXPRESSION # some expression that uses lxepoch >> ... >> END >> CLASS >> >> EXPRESSION # another expression that uses lxepoch >> ... >> END >> END >> > > Yes, using classitem includes lxepoch. I have looked in the > documentation, but did not understand from the documentation that > classitem had this effect. > > However, I also need another variable, and classitem can only have one. > So I'm still stuck. > > So I guess I have to find another way. > > But thanks again Richard, this was useful! > > Trygve Aspenes > >>> Testing with map2img I see >>> msPostGISParseData: unique_column=id, srid=4326, >>> geom_column_name=geom, >>> table_name=(select id,time,geom,EXTRACT(EPOCH FROM time::TIMESTAMP >>> WITH >>> TIME ZONE) as lxepoch from the_table where time between >>> '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' and >>> '2024-07-10T10:35:00Z') as subquery >>> msPostGISBuildSQL called. >>> msPostGISBuildSQLItems called. >>> msPostGISBuildSQLItems: 0 items requested. >>> msPostGISBuildSQLFrom called. >>> msPostGISReplaceBoxToken called. >>> msPostGISBuildSQLWhere called. >>> msPostGISBuildSQLSRID called. >>> msPostGISBuildSQLSRID: SRID provided (4326) >>> msPostGISBuildSQLBox called. >>> msPostGISLayerWhichShapes query: SELECT ST_AsBinary(("geom"),'NDR') >>> as >>> geom,"id"::text FROM (select id,time,geom,EXTRACT(EPOCH FROM >>> time::TIMESTAMP WITH TIME ZONE) as lxepoch from the_table where time >>> >>> between '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' >>> and >>> '2024-07-10T10:35:00Z') as subquery WHERE ST_Intersects("geom", >>> ST_GeomFromText('POLYGON((-180 -134.887218045113,-180 >>> 134.887218045113,180 134.887218045113,180 -134.887218045113,-180 >>> -134.887218045113))',4326)) >>> >>> Copy/pasting the last line into my postgis I get as expected: >>> geom | id >>> ----------------------------------------------+---- >>> \x010100000066666666666624400000000000c04640 | 1 >>> (1 row) >>> >>> And if I add to the select (in the same copy/paste as above) the >>> lxepoch >>> in by db I get: >>> geom | id | lxepoch >>> >> ----------------------------------------------+----+------------------- >>> \x010100000066666666666624400000000000c04640 | 1 | >>> 1720607700.000000 >>> (1 row) >>> >>> So is it possible to configure the mapserver postgis data query to >>> get >>> this result? >>> >>> I had a look at the code, and a see from the log this function is >>> called >>> >> https://github.com/MapServer/MapServer/blob/main/src/mappostgis.cpp#L1651, >>> >>> but the logs says 0 items. I can't read from the code if it is >>> possible >>> to add other items. >>> >>> Any ideas? >>> >>> Thanks >>> >>> Trygve Aspenes >>> _______________________________________________ >>> MapServer-users mailing list >>> MapServer-users at lists.osgeo.org >>> https://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> -- >> >> Richard W. Greenwood >> www.greenwoodmap.com [1] >> >> Links: >> ------ >> [1] http://www.greenwoodmap.com > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users From trygve at aspenes.priv.no Wed Aug 14 01:37:14 2024 From: trygve at aspenes.priv.no (Trygve Aspenes) Date: Wed, 14 Aug 2024 10:37:14 +0200 Subject: [MapServer-users] Is there a way to add columns returned from a postgis connection In-Reply-To: <2a824f7a-a714-4798-b716-8db46bf8d7ac@app.fastmail.com> References: <19970cb463ad75145797e22f5b9c08ce@aspenes.priv.no> <31a59b203daabcd1739e8a858359fc46@aspenes.priv.no> <2a824f7a-a714-4798-b716-8db46bf8d7ac@app.fastmail.com> Message-ID: <9bc2bd45d4622600a28d9c02e83a47c3@aspenes.priv.no> Ahhhhhhh Thanks Seth! Now I understand. Great. I have put my various styles in include files, and I skipped those when testing. So mapserver was not aware I needed those variables used in my expressions. Adding in my include files give exactly what I need. Not need to use classitem then. Thanks again Seth Trygve Aspenes Den 2024-08-14 10:22, skrev Seth G: > Hi, > > MapServer will only request the fields from the database that it needs > to render the map or required by the request. > If you aren't using lxepoch for labels, classitems, filters etc. then > it won't be requested by MapServer. If you make a GetFeatureInfo or WFS > request and ask for all items it will be requested. > What do you need the lxepoch field for? > > Seth > > -- > web:https://geographika.net & https://mapserverstudio.net > twitter: @geographika > > On Wed, Aug 14, 2024, at 9:13 AM, Trygve Aspenes via MapServer-users > wrote: >> Thank you Richard >> >> >> Den 2024-08-13 23:27, skrev Richard Greenwood: >>> On Tue, Aug 13, 2024 at 8:09?AM Trygve Aspenes via MapServer-users >>> wrote:CONNECTIONTYPE postgis >>> CONNECTION "user=pgselectonly password=pgSelectOnly dbname=fremontwy >>> host=localhost port=6543"postgis >>> >>>> I struggle to find a good subject, but here we go. >>>> >>>> I have a layer using a virtual sql call, returning various columns >>>> from >>>> a postgis db. These are used to plot the data and to style the data >>>> (using expressions) pending the values return from the db. >>>> >>>> However I can not make this call filter using BBOX from the request. >>>> >>>> The call looks like this: >>>> # CONNECTION " >>>> # >>>> # >>>> # PG:dbname=mapserver host=mapserver >>>> user=$PGSQ_USERNAME password=$PGSQ_PASSWORD >>>> port=5432 >>>> # SELECT EXTRACT(EPOCH FROM time::TIMESTAMP WITH >>>> TIME >>>> ZONE) as lxepoch,extract(epoch from '%time%'::timestamp) as >>>> request_time,latitude,longitude FROM the_table where time between >>>> '%time%'::timestamp - interval '300 seconds' and '%time%' >>>> # >>> x='longitude' >>>> y='latitude'/> >>>> # WGS84 >>>> # wkbPoint >>>> # >>>> # " >>>> # DATA "the_data" >>>> >>>> So I try a postgis connection as this uses BBOX as default like >>>> this: >>>> >>>> DATA "geom from (select id,time,geom,EXTRACT(EPOCH FROM >>>> time::TIMESTAMP >>>> WITH TIME ZONE) as lxepoch from the_table where time between >>>> '%time%'::timestamp - interval '600 seconds' and '%time%') as >>>> subquery >>>> using unique id using srid=4326" >>>> >>>> Now, this returns only the geom and id columns. >>> >>> Why don't you think lxepoch is being returned by the DATA statement >>> above? >> >> When debugging with map2img I see the call send to my postgis db, and >> lxepoch is not included. (The call I see was included in the original >> email) >> >>> >>>> So my question is: Is there a way to make this call return a lxepoch >>>> >>>> column also? >>> >>> Maybe you should share your layer definition. >>> >>> I don't understand what you're doing with the OGRVRTDataSource and >>> the >>> "virtual sql call". Would something like this work for you: >>> >>> LAYER >>> TYPE point >>> VALIDATION >>> # appropriate validation for '%time%' >>> END >>> CONNECTIONTYPE postgis >>> CONNECTION "user= password= dbname= host=localhost" >>> >>> DATA "geom from (select id,time,geom,EXTRACT(EPOCH FROM >>> time::TIMESTAMP >>> WITH TIME ZONE) as lxepoch from the_table where time between >>> '%time%'::timestamp - interval '600 seconds' and '%time%') as >>> subquery >>> using unique id using srid=4326" >>> >>> CLASSITEM "lxepoch" # this get lxepoch so that you can use it in >>> CLASS EXPRESSIONS >>> CLASS >>> EXPRESSION # some expression that uses lxepoch >>> ... >>> END >>> CLASS >>> >>> EXPRESSION # another expression that uses lxepoch >>> ... >>> END >>> END >>> >> >> Yes, using classitem includes lxepoch. I have looked in the >> documentation, but did not understand from the documentation that >> classitem had this effect. >> >> However, I also need another variable, and classitem can only have >> one. >> So I'm still stuck. >> >> So I guess I have to find another way. >> >> But thanks again Richard, this was useful! >> >> Trygve Aspenes >> >>>> Testing with map2img I see >>>> msPostGISParseData: unique_column=id, srid=4326, >>>> geom_column_name=geom, >>>> table_name=(select id,time,geom,EXTRACT(EPOCH FROM time::TIMESTAMP >>>> WITH >>>> TIME ZONE) as lxepoch from the_table where time between >>>> '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' and >>>> '2024-07-10T10:35:00Z') as subquery >>>> msPostGISBuildSQL called. >>>> msPostGISBuildSQLItems called. >>>> msPostGISBuildSQLItems: 0 items requested. >>>> msPostGISBuildSQLFrom called. >>>> msPostGISReplaceBoxToken called. >>>> msPostGISBuildSQLWhere called. >>>> msPostGISBuildSQLSRID called. >>>> msPostGISBuildSQLSRID: SRID provided (4326) >>>> msPostGISBuildSQLBox called. >>>> msPostGISLayerWhichShapes query: SELECT ST_AsBinary(("geom"),'NDR') >>>> as >>>> geom,"id"::text FROM (select id,time,geom,EXTRACT(EPOCH FROM >>>> time::TIMESTAMP WITH TIME ZONE) as lxepoch from the_table where time >>>> >>>> between '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' >>>> and >>>> '2024-07-10T10:35:00Z') as subquery WHERE ST_Intersects("geom", >>>> ST_GeomFromText('POLYGON((-180 -134.887218045113,-180 >>>> 134.887218045113,180 134.887218045113,180 -134.887218045113,-180 >>>> -134.887218045113))',4326)) >>>> >>>> Copy/pasting the last line into my postgis I get as expected: >>>> geom | id >>>> ----------------------------------------------+---- >>>> \x010100000066666666666624400000000000c04640 | 1 >>>> (1 row) >>>> >>>> And if I add to the select (in the same copy/paste as above) the >>>> lxepoch >>>> in by db I get: >>>> geom | id | lxepoch >>>> >>> ----------------------------------------------+----+------------------- >>>> \x010100000066666666666624400000000000c04640 | 1 | >>>> 1720607700.000000 >>>> (1 row) >>>> >>>> So is it possible to configure the mapserver postgis data query to >>>> get >>>> this result? >>>> >>>> I had a look at the code, and a see from the log this function is >>>> called >>>> >>> https://github.com/MapServer/MapServer/blob/main/src/mappostgis.cpp#L1651, >>>> >>>> but the logs says 0 items. I can't read from the code if it is >>>> possible >>>> to add other items. >>>> >>>> Any ideas? >>>> >>>> Thanks >>>> >>>> Trygve Aspenes >>>> _______________________________________________ >>>> MapServer-users mailing list >>>> MapServer-users at lists.osgeo.org >>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users >>> >>> -- >>> >>> Richard W. Greenwood >>> www.greenwoodmap.com [1] >>> >>> Links: >>> ------ >>> [1] http://www.greenwoodmap.com >> _______________________________________________ >> MapServer-users mailing list >> MapServer-users at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapserver-users From sethg at geographika.co.uk Wed Aug 14 02:48:05 2024 From: sethg at geographika.co.uk (Seth G) Date: Wed, 14 Aug 2024 11:48:05 +0200 Subject: [MapServer-users] Is there a way to add columns returned from a postgis connection In-Reply-To: <9bc2bd45d4622600a28d9c02e83a47c3@aspenes.priv.no> References: <19970cb463ad75145797e22f5b9c08ce@aspenes.priv.no> <31a59b203daabcd1739e8a858359fc46@aspenes.priv.no> <2a824f7a-a714-4798-b716-8db46bf8d7ac@app.fastmail.com> <9bc2bd45d4622600a28d9c02e83a47c3@aspenes.priv.no> Message-ID: <3eb82e96-9dd7-4b5d-843a-5a6fe3ee748a@app.fastmail.com> No problem Trygve. WMS requests have had this optimisation for a while, but it was further expanded in MapServer 8.0.1 with https://github.com/MapServer/MapServer/pull/6786 and also applied to WFS in https://github.com/MapServer/MapServer/pull/6785. Some MapServer layers could have 20-30 fields available for various styles, info requests etc. but by only bringing back the fields/data that would actually be used to handle the request there were big performance improvements in certain cases. Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Wed, Aug 14, 2024, at 10:37 AM, Trygve Aspenes wrote: > Ahhhhhhh > > Thanks Seth! > > Now I understand. Great. I have put my various styles in include files, > and I skipped those when testing. So mapserver was not aware I needed > those variables used in my expressions. > > Adding in my include files give exactly what I need. Not need to use > classitem then. > > Thanks again Seth > > Trygve Aspenes > > Den 2024-08-14 10:22, skrev Seth G: >> Hi, >> >> MapServer will only request the fields from the database that it needs >> to render the map or required by the request. >> If you aren't using lxepoch for labels, classitems, filters etc. then >> it won't be requested by MapServer. If you make a GetFeatureInfo or WFS >> request and ask for all items it will be requested. >> What do you need the lxepoch field for? >> >> Seth >> >> -- >> web:https://geographika.net & https://mapserverstudio.net >> twitter: @geographika >> >> On Wed, Aug 14, 2024, at 9:13 AM, Trygve Aspenes via MapServer-users >> wrote: >>> Thank you Richard >>> >>> >>> Den 2024-08-13 23:27, skrev Richard Greenwood: >>>> On Tue, Aug 13, 2024 at 8:09?AM Trygve Aspenes via MapServer-users >>>> wrote:CONNECTIONTYPE postgis >>>> CONNECTION "user=pgselectonly password=pgSelectOnly dbname=fremontwy >>>> host=localhost port=6543"postgis >>>> >>>>> I struggle to find a good subject, but here we go. >>>>> >>>>> I have a layer using a virtual sql call, returning various columns >>>>> from >>>>> a postgis db. These are used to plot the data and to style the data >>>>> (using expressions) pending the values return from the db. >>>>> >>>>> However I can not make this call filter using BBOX from the request. >>>>> >>>>> The call looks like this: >>>>> # CONNECTION " >>>>> # >>>>> # >>>>> # PG:dbname=mapserver host=mapserver >>>>> user=$PGSQ_USERNAME password=$PGSQ_PASSWORD >>>>> port=5432 >>>>> # SELECT EXTRACT(EPOCH FROM time::TIMESTAMP WITH >>>>> TIME >>>>> ZONE) as lxepoch,extract(epoch from '%time%'::timestamp) as >>>>> request_time,latitude,longitude FROM the_table where time between >>>>> '%time%'::timestamp - interval '300 seconds' and '%time%' >>>>> # >>>> x='longitude' >>>>> y='latitude'/> >>>>> # WGS84 >>>>> # wkbPoint >>>>> # >>>>> # " >>>>> # DATA "the_data" >>>>> >>>>> So I try a postgis connection as this uses BBOX as default like >>>>> this: >>>>> >>>>> DATA "geom from (select id,time,geom,EXTRACT(EPOCH FROM >>>>> time::TIMESTAMP >>>>> WITH TIME ZONE) as lxepoch from the_table where time between >>>>> '%time%'::timestamp - interval '600 seconds' and '%time%') as >>>>> subquery >>>>> using unique id using srid=4326" >>>>> >>>>> Now, this returns only the geom and id columns. >>>> >>>> Why don't you think lxepoch is being returned by the DATA statement >>>> above? >>> >>> When debugging with map2img I see the call send to my postgis db, and >>> lxepoch is not included. (The call I see was included in the original >>> email) >>> >>>> >>>>> So my question is: Is there a way to make this call return a lxepoch >>>>> >>>>> column also? >>>> >>>> Maybe you should share your layer definition. >>>> >>>> I don't understand what you're doing with the OGRVRTDataSource and >>>> the >>>> "virtual sql call". Would something like this work for you: >>>> >>>> LAYER >>>> TYPE point >>>> VALIDATION >>>> # appropriate validation for '%time%' >>>> END >>>> CONNECTIONTYPE postgis >>>> CONNECTION "user= password= dbname= host=localhost" >>>> >>>> DATA "geom from (select id,time,geom,EXTRACT(EPOCH FROM >>>> time::TIMESTAMP >>>> WITH TIME ZONE) as lxepoch from the_table where time between >>>> '%time%'::timestamp - interval '600 seconds' and '%time%') as >>>> subquery >>>> using unique id using srid=4326" >>>> >>>> CLASSITEM "lxepoch" # this get lxepoch so that you can use it in >>>> CLASS EXPRESSIONS >>>> CLASS >>>> EXPRESSION # some expression that uses lxepoch >>>> ... >>>> END >>>> CLASS >>>> >>>> EXPRESSION # another expression that uses lxepoch >>>> ... >>>> END >>>> END >>>> >>> >>> Yes, using classitem includes lxepoch. I have looked in the >>> documentation, but did not understand from the documentation that >>> classitem had this effect. >>> >>> However, I also need another variable, and classitem can only have >>> one. >>> So I'm still stuck. >>> >>> So I guess I have to find another way. >>> >>> But thanks again Richard, this was useful! >>> >>> Trygve Aspenes >>> >>>>> Testing with map2img I see >>>>> msPostGISParseData: unique_column=id, srid=4326, >>>>> geom_column_name=geom, >>>>> table_name=(select id,time,geom,EXTRACT(EPOCH FROM time::TIMESTAMP >>>>> WITH >>>>> TIME ZONE) as lxepoch from the_table where time between >>>>> '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' and >>>>> '2024-07-10T10:35:00Z') as subquery >>>>> msPostGISBuildSQL called. >>>>> msPostGISBuildSQLItems called. >>>>> msPostGISBuildSQLItems: 0 items requested. >>>>> msPostGISBuildSQLFrom called. >>>>> msPostGISReplaceBoxToken called. >>>>> msPostGISBuildSQLWhere called. >>>>> msPostGISBuildSQLSRID called. >>>>> msPostGISBuildSQLSRID: SRID provided (4326) >>>>> msPostGISBuildSQLBox called. >>>>> msPostGISLayerWhichShapes query: SELECT ST_AsBinary(("geom"),'NDR') >>>>> as >>>>> geom,"id"::text FROM (select id,time,geom,EXTRACT(EPOCH FROM >>>>> time::TIMESTAMP WITH TIME ZONE) as lxepoch from the_table where time >>>>> >>>>> between '2024-07-10T10:35:00Z'::timestamp - interval '600 seconds' >>>>> and >>>>> '2024-07-10T10:35:00Z') as subquery WHERE ST_Intersects("geom", >>>>> ST_GeomFromText('POLYGON((-180 -134.887218045113,-180 >>>>> 134.887218045113,180 134.887218045113,180 -134.887218045113,-180 >>>>> -134.887218045113))',4326)) >>>>> >>>>> Copy/pasting the last line into my postgis I get as expected: >>>>> geom | id >>>>> ----------------------------------------------+---- >>>>> \x010100000066666666666624400000000000c04640 | 1 >>>>> (1 row) >>>>> >>>>> And if I add to the select (in the same copy/paste as above) the >>>>> lxepoch >>>>> in by db I get: >>>>> geom | id | lxepoch >>>>> >>>> ----------------------------------------------+----+------------------- >>>>> \x010100000066666666666624400000000000c04640 | 1 | >>>>> 1720607700.000000 >>>>> (1 row) >>>>> >>>>> So is it possible to configure the mapserver postgis data query to >>>>> get >>>>> this result? >>>>> >>>>> I had a look at the code, and a see from the log this function is >>>>> called >>>>> >>>> https://github.com/MapServer/MapServer/blob/main/src/mappostgis.cpp#L1651, >>>>> >>>>> but the logs says 0 items. I can't read from the code if it is >>>>> possible >>>>> to add other items. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks >>>>> >>>>> Trygve Aspenes >>>>> _______________________________________________ >>>>> MapServer-users mailing list >>>>> MapServer-users at lists.osgeo.org >>>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users >>>> >>>> -- >>>> >>>> Richard W. Greenwood >>>> www.greenwoodmap.com [1] >>>> >>>> Links: >>>> ------ >>>> [1] http://www.greenwoodmap.com >>> _______________________________________________ >>> MapServer-users mailing list >>> MapServer-users at lists.osgeo.org >>> https://lists.osgeo.org/mailman/listinfo/mapserver-users From oliver.christen at camptocamp.com Wed Aug 14 05:09:20 2024 From: oliver.christen at camptocamp.com (Oliver Christen) Date: Wed, 14 Aug 2024 14:09:20 +0200 Subject: [MapServer-users] Mapserver>=8.0 problem when using FILTER in getmap with CLASS with MINSCALEDENOM/MAXSCALEDENOM Message-ID: Hello I recently upgraded Mapser from 7.6 to 8.0 in a project and I'm observing some weird behavior when specifying a FILTER= parameter in the GetMap request when the target layer has multiple CLASS with different MINSCALEDENOM/MAXSCALEDENOM. With 7.6, Mapserver was using the correct CLASS respecting the MINSCALEDENOM/MAXSCALEDENOM. With 8.0, Mapserver ignores the MINSCALEDENOM/MAXSCALEDENOM and renders the layer using the first CLASS defined in the layer. I searched if this problem has been reported before but I couldn't find anything, is this a known regression ? If yes can you point me to the related issue ? If not, I will try to create a testcase to join to a new issue. Thank you Oliver Christen -- New address from 1st September 2022 Camptocamp SA Route de la Chaux 4 1030 Bussigny Suisse -------------- next part -------------- An HTML attachment was scrubbed... URL: From Stephane.MaltaeSousa at ne.ch Thu Aug 15 02:15:04 2024 From: Stephane.MaltaeSousa at ne.ch (=?iso-8859-1?Q?Malta_e_Sousa_St=E9phane?=) Date: Thu, 15 Aug 2024 09:15:04 +0000 Subject: [MapServer-users] OGC API Features Part4 CRUD Message-ID: <550c5bf16f614adfbcd0fc4ec07e63fa@ne.ch> Hello, I hope this message finds you well. I'm inquiring whether the implementation of OGC API Features Part 4 (CRUD) is planned? I believe that MapServer does not support editing, but is there any development planned on the TinyOWS side? St?phane Malta e Sousa Responsable de projet et d?veloppement ____________________________________________________________ D?partement du d?veloppement territorial et de l'environnement Service de la g?omatique et du registre foncier https://www.ne.ch/sitn From sdlime at gmail.com Fri Aug 16 07:56:35 2024 From: sdlime at gmail.com (Steve Lime) Date: Fri, 16 Aug 2024 09:56:35 -0500 Subject: [MapServer-users] OGC API Features Part4 CRUD In-Reply-To: <550c5bf16f614adfbcd0fc4ec07e63fa@ne.ch> References: <550c5bf16f614adfbcd0fc4ec07e63fa@ne.ch> Message-ID: AFAIK nothing is planned. I think that?s probably a much more significant effort relative to the initial implementation. ?Steve On Thu, Aug 15, 2024 at 4:39?AM Malta e Sousa St?phane via MapServer-users < mapserver-users at lists.osgeo.org> wrote: > Hello, > > I hope this message finds you well. I'm inquiring whether the > implementation of OGC API Features Part 4 (CRUD) is planned? I believe that > MapServer does not support editing, but is there any development planned on > the TinyOWS side? > > St?phane Malta e Sousa > Responsable de projet et d?veloppement > ____________________________________________________________ > > D?partement du d?veloppement territorial et de l'environnement > Service de la g?omatique et du registre foncier > https://www.ne.ch/sitn > > > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Rob.Dennett at twdb.texas.gov Fri Aug 23 16:23:11 2024 From: Rob.Dennett at twdb.texas.gov (Rob Dennett) Date: Fri, 23 Aug 2024 23:23:11 +0000 Subject: [MapServer-users] Seeing Missing required parameter STYLES in some calls in the network tab Message-ID: Hi, Looking at the network tab for a page request which doesn't seem to be downloading our map following an upgrade to 8.0, I am seeing the following in the payload preview: msWMSLoadGetMapParams(): WMS server error. Missing required parameter STYLES. Note to service administrators: defining the "wms_allow_getmap_without_styles" "true" MAP.WEB.METADATA item will disable this check (backward compatibility with behaviour of MapServer < 8.0) Part of the URL is format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&layers=PolygonSources,LineSources,PointSources,AllSources And I am guessing this all has something to do with https://github.com/mapserver/mapserver/issues/6012 [https://opengraph.githubassets.com/d188ccef73ff8d7aa01a95c6437a0268e30e9267028bcb906547a2b2247562dd/MapServer/MapServer/issues/6012] MapServer treats WMS STYLES param as optional, but the WMS spec says it is mandatory ? Issue #6012 ? MapServer/MapServer We got a report that MapServer treats the WMS GetMap STYLES param as optional, but the WMS spec state that it should be mandatory. (I verified and GetMap STYLES is indeed mandatory in WMS 1.1.0, 1.... github.com The problem is that I don't know what the STYLES param is. Is this related and if so, where can I learn about this to see what changes I need to make to my .map files? Thanks, Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: From sethg at geographika.co.uk Sat Aug 24 02:45:47 2024 From: sethg at geographika.co.uk (Seth G) Date: Sat, 24 Aug 2024 11:45:47 +0200 Subject: [MapServer-users] Seeing Missing required parameter STYLES in some calls in the network tab In-Reply-To: References: Message-ID: Hi Rob, You have 2 options: 1. Update your front-end application to add &STYLES= to the querystring. This would make the requests compliant with the WMS specification. The STYLES parameter is used to select all CLASSes in a LAYER with the same CLASS GROUP - so a single layer could han have multiple styles and a front-end application can choose which one to use, Leaving STYLES= empty means the default style is used. See https://mapserver.org/mapfile/class.html#mapfile-class-group and https://mapserver.org/ogc/wms_server.html#test-with-a-getmap-request 2. Update your Mapfile to include "wms_allow_getmap_without_styles" "true" in your MAP WEB METADATA section to allow querystrings with a STYLES= parameter. E.g. MAP WEB METADATA "wms_allow_getmap_without_styles" "true" ... Seth -- web:https://geographika.net & https://mapserverstudio.net twitter: @geographika On Sat, Aug 24, 2024, at 1:23 AM, Rob Dennett via MapServer-users wrote: > Hi, > > Looking at the network tab for a page request which doesn't seem to be downloading our map following an upgrade to 8.0, I am seeing the following in the payload preview: > > > > > > msWMSLoadGetMapParams(): WMS server error. Missing required parameter STYLES. Note to service administrators: defining the "wms_allow_getmap_without_styles" "true" MAP.WEB.METADATA item will disable this check (backward compatibility with behaviour of MapServer < 8.0) > > > > Part of the URL is > format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&layers=PolygonSources,LineSources,PointSources,AllSources > > And I am guessing this all has something to do with https://github.com/mapserver/mapserver/issues/6012 > MapServer treats WMS STYLES param as optional, but the WMS spec says it is mandatory ? Issue #6012 ? MapServer/MapServer > We got a report that MapServer treats the WMS GetMap STYLES param as optional, but the WMS spec state that it should be mandatory. (I verified and GetMap STYLES is indeed mandatory in WMS 1.1.0, 1.... > github.com > > The problem is that I don't know what the STYLES param is. Is this related and if so, where can I learn about this to see what changes I need to make to my .map files? > > Thanks, > Rob > _______________________________________________ > MapServer-users mailing list > MapServer-users at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Mon Aug 26 11:18:15 2024 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 26 Aug 2024 15:18:15 -0300 Subject: [MapServer-users] Seeing Missing required parameter STYLES in some calls in the network tab In-Reply-To: References: Message-ID: <3a6d0045-5bd4-42db-8c81-4c6541ebfff4@gatewaygeomatics.com> Thanks for catching this Rob, I've tried to highlight this in the WMS docs, and have added it into the Migration Guide for 8.0 ( https://mapserver.org/MIGRATION_GUIDE.html ) -jeff -- Jeff McKenna GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev co-founder of FOSS4G http://gatewaygeo.com/ On 2024-08-23 8:23 p.m., Rob Dennett via MapServer-users wrote: > Hi, > > Looking at the network tab for a page request which doesn't seem to be > downloading our map following an upgrade to 8.0, I am seeing the > following in the payload preview: > > > wms/1.1.1/exception_1_1_1.dtd"> > > > msWMSLoadGetMapParams(): WMS server error. Missing required parameter > STYLES. Note to service administrators: defining the > "wms_allow_getmap_without_styles" "true" > MAP.WEB.METADATA item will disable this check (backward compatibility > with behaviour of MapServer < 8.0) > > > > Part of the URL is > > format=image/ > png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&layers=PolygonSources,LineSources,PointSources,AllSources > > And I am guessing this all has something to do with https://github.com/ > mapserver/mapserver/issues/6012 issues/6012> > > > MapServer treats WMS STYLES param as optional, but the WMS spec says it > is mandatory ? Issue #6012 ? MapServer/MapServer mapserver/mapserver/issues/6012> > We got a report that MapServer treats the WMS GetMap STYLES param as > optional, but the WMS spec state that it should be mandatory. (I > verified and GetMap STYLES is indeed mandatory in WMS 1.1.0, 1.... > github.com > > > The problem is that I don't know what the STYLES param is.? Is this > related and if so, where can I learn about this to see what changes I > need to make to my .map files? > > Thanks, > Rob > > From gkvoelkl at nelson-games.de Fri Aug 30 01:54:18 2024 From: gkvoelkl at nelson-games.de (=?utf-8?Q? G._V=C3=B6lkl ?=) Date: Fri, 30 Aug 2024 10:54:18 +0200 Subject: [MapServer-users] Ogc api Limited Message-ID: <7C9C17ED-5D30-4F1A-9652-C49D55C5FD5B@nelson-games.de> Hello, When I?m using OGC feature API the respons is always limited to about ten items. What should I do if I want all items as default? I do not use the limit attribut. Thanks Best regards, Gerhard Von meinem iPhone gesendet From Stephane.MaltaeSousa at ne.ch Fri Aug 30 02:04:53 2024 From: Stephane.MaltaeSousa at ne.ch (=?utf-8?B?TWFsdGEgZSBTb3VzYSBTdMOpcGhhbmU=?=) Date: Fri, 30 Aug 2024 09:04:53 +0000 Subject: [MapServer-users] Ogc api Limited In-Reply-To: <7C9C17ED-5D30-4F1A-9652-C49D55C5FD5B@nelson-games.de> References: <7C9C17ED-5D30-4F1A-9652-C49D55C5FD5B@nelson-games.de> Message-ID: <8b91829be6e74020ba29d662de85af0d@ne.ch> Hi Gerhard, You can set oga_max_limit to the limit you want in the layer metadata. For instance: LAYER NAME "fo20_desserte" METADATA "ows_title" "FO20 - Desserte foresti?re" "oga_max_limit" "20000" Best, St?phane Malta e Sousa Responsable de projet et d?veloppement https://sitn.ne.ch -----Message d'origine----- De?: MapServer-users De la part de G. V?lkl via MapServer-users Envoy??: vendredi, 30 ao?t 2024 10:54 ??: MapServer Users Objet?: [MapServer-users] Ogc api Limited [E-MAIL EXTERNE] Hello, When I?m using OGC feature API the respons is always limited to about ten items. What should I do if I want all items as default? I do not use the limit attribut. Thanks Best regards, Gerhard Von meinem iPhone gesendet _______________________________________________ MapServer-users mailing list MapServer-users at lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users