From Dominik.Froehlich at stadt.freiburg.de Fri Oct 6 07:45:08 2023
From: Dominik.Froehlich at stadt.freiburg.de (Froehlich, Dominik)
Date: Fri, 6 Oct 2023 14:45:08 +0000
Subject: [MapServer-users] Call to StoredQuery successful as GET,
but fails as POST request
In-Reply-To: <147ceef1c4c140ffa16062d9ababe86e@stadt.freiburg.de>
References: <147ceef1c4c140ffa16062d9ababe86e@stadt.freiburg.de>
Message-ID: <0843adbe1e6b4bbd884c0a6c6f9e2ebb@stadt.freiburg.de>
Dear *
I'm stuck for some time experiencing a strange behavoiur with WFS POST requests to stored querys on our mapserver (v.8.0.1/ubuntu 22.04) and can't seem to find anythin helpful in the logs or on the web. The server is public, so you can see for yourselves. To describe the issue I'll stick to our address service providing the addresses in Freiburg im Breisgau, Southwest Germany.
https://geoportal.freiburg.de/wfs/gdm_address/gdm_address?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetCapabilities
The service is supposed to answer both GET and POST requests. This does work just fine for "normal" GetFeature requests. However, there seems to be an issue with stored queries. E.g. we set up some stored query for searching addresses taking a street name and a house number as an argument. It can be easily queried by calling e.g.
https://geoportal.freiburg.de/wfs/gdm_address/gdm_address?SERVICE=WFS&version=2.0.0&REQUEST=GetFeature&StoredQuery_ID=findeStrasseHnr&strassenname=fehren&hausnummer=12
wheras "strassenname" is the street name and "hausnummer" the house number.
The GET call will return one matching feature as expected.
The same request as POST to https://geoportal.freiburg.de/wfs/gdm_address/gdm_address
fehren12
however will only return
Strange enough, it will also log some weired error at DEBUG 5:
[Fri Oct 6 14:59:29 2023].546904 msWFSParseRequest(): WFS post request: fehren12
[Fri Oct 6 14:59:29 2023].622878 FLTLayerApplyPlainFilterToLayer(): (("[strassenname]" ~* "^.*feh.*$") AND (([hausnummer] =* 12) AND ("[hausnummernzusatz]" = ""))), rect=399550,5305350,420740,5325690
[Fri Oct 6 14:59:29 2023].689509 msPostGISLayerTranslateFilter(): General error message. Translation to native SQL failed.
[Fri Oct 6 14:59:30 2023].110714 msQueryByFilter(): No matching record(s) found.[Fri Oct 6 14:59:30 2023].110799 mapserv request processing time (msLoadMap not incl.): 0.564s
The stored query itself is defined as
Stra?en- und HausnummernsucheSuche nach einem Stra?enname und einer Hausnummer im Adress-WFSms:strassenname*${strassenname}*ms:hausnummer${hausnummer}ms:hausnummernzusatzms:hausnummerASC
Am I missing something here or do you have any suggestions for me? I'm grateful for any insights! Please also let me know if you need more details on something else.
Best,
Dominik
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From sethg at geographika.co.uk Fri Oct 6 13:57:10 2023
From: sethg at geographika.co.uk (Seth G)
Date: Fri, 06 Oct 2023 22:57:10 +0200
Subject: [MapServer-users] Call to StoredQuery successful as GET,
but fails as POST request
In-Reply-To: <0843adbe1e6b4bbd884c0a6c6f9e2ebb@stadt.freiburg.de>
References: <147ceef1c4c140ffa16062d9ababe86e@stadt.freiburg.de>
<0843adbe1e6b4bbd884c0a6c6f9e2ebb@stadt.freiburg.de>
Message-ID: <780522ae-f761-408f-8be4-d2fd9fb8da12@app.fastmail.com>
Hi,
Are you able to log the SQL sent to Postgres and see the difference between the GET and POST request? Or maybe the query doesn't get to the database at all looking at that error.
It looks like the filter is failing to convert to a Postgres query.
Seth
--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika
On Fri, Oct 6, 2023, at 4:45 PM, Froehlich, Dominik via MapServer-users wrote:
> Dear *
>
>
> I'm stuck for some time experiencing a strange behavoiur with WFS POST requests to stored querys on our mapserver (v.8.0.1/ubuntu 22.04) and can't seem to find anythin helpful in the logs or on the web. The server is public, so you can see for yourselves. To describe the issue I'll stick to our address service providing the addresses in Freiburg im Breisgau, Southwest Germany.
>
> https://geoportal.freiburg.de/wfs/gdm_address/gdm_address?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetCapabilities
>
> The service is supposed to answer both GET and POST requests. This does work just fine for "normal" GetFeature requests. However, there seems to be an issue with stored queries. E.g. we set up some stored query for searching addresses taking a street name and a house number as an argument. It can be easily queried by calling e.g.
>
> https://geoportal.freiburg.de/wfs/gdm_address/gdm_address?SERVICE=WFS&version=2.0.0&REQUEST=GetFeature&StoredQuery_ID=findeStrasseHnr&strassenname=fehren&hausnummer=12
>
> wheras "strassenname" is the street name and "hausnummer" the house number.
> The GET call will return one matching feature as expected.
>
>
> The same request as POST to https://geoportal.freiburg.de/wfs/gdm_address/gdm_address
>
>
>
> fehren
> 12
>
>
>
> however will only return
>
>
> xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
> xmlns:gml="http://www.opengis.net/gml/3.2"
> xmlns:wfs="http://www.opengis.net/wfs/2.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver https://geoportal.freiburg.de/wfs/gdm_address/gdm_address?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&TYPENAME=ms:addresses&OUTPUTFORMAT=application%2Fgml%2Bxml%3B%20version%3D3.2 http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd"
> timeStamp="2023-10-05T16:10:00" numberMatched="unknown" numberReturned="0">
>
>
>
> Strange enough, it will also log some weired error at DEBUG 5:
>
> [Fri Oct 6 14:59:29 2023].546904 msWFSParseRequest(): WFS post request: fehren12
> [Fri Oct 6 14:59:29 2023].622878 FLTLayerApplyPlainFilterToLayer(): (("[strassenname]" ~* "^.*feh.*$") AND (([hausnummer] =* 12) AND ("[hausnummernzusatz]" = ""))), rect=399550,5305350,420740,5325690
> [Fri Oct 6 14:59:29 2023].689509 msPostGISLayerTranslateFilter(): General error message. Translation to native SQL failed.
> [Fri Oct 6 14:59:30 2023].110714 msQueryByFilter(): No matching record(s) found.[Fri Oct 6 14:59:30 2023].110799 mapserv request processing time (msLoadMap not incl.): 0.564s
>
>
> The stored query itself is defined as
>
>
>
> xmlns:gml="https://www.opengis.net/gml/3.2"
> id="search_street_nr">
>
> Stra?en- und Hausnummernsuche
> Suche nach einem Stra?enname und einer Hausnummer im Adress-WFS
>
>
>
>
> language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
> xmlns:ms="https://geoportal.freiburg.de/wfs/gdm_address/gdm_address_gaz"
> returnFeatureTypes="ms:addresses">
> xmlns:ogc="https://www.opengis.net/ogc"
> typeNames="ms:addresses">
>
>
>
>
>
>
> ms:strassenname
> *${strassenname}*
>
>
>
> ms:hausnummer
> ${hausnummer}
>
>
>
> ms:hausnummernzusatz
>
>
>
>
>
>
>
>
>
> ms:hausnummer
> ASC
>
>
>
>
>
>
>
>
>
> Am I missing something here or do you have any suggestions for me? I'm grateful for any insights! Please also let me know if you need more details on something else.
>
> Best,
>
> Dominik
>
>
>
> _______________________________________________
> 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 YankovI at eba.bund.de Tue Oct 10 06:50:49 2023
From: YankovI at eba.bund.de (Yankov, Ivan)
Date: Tue, 10 Oct 2023 13:50:49 +0000
Subject: [MapServer-users] Cluster with Oracle Spatial data
Message-ID:
Hi,
I have a problem with clustering a point layer (combine multiple features into a single feature based on their relative positions)
using a point datasource from an Oracle Spatial Database.
When I test the cluster feature using a point layer in Shape-Format, it works exactly as expected.
In this case I use "DATA " D:\geodata\point_layer.shp" " as my datasource and everything works just fine.
But when I change the datasource to " CONNECTIONTYPE oraclespatial " and then use the same point layer
from the Oracle Spatial Database, then nothing actually happens. I don't even get some kind of an error message.
Does anyone know the reason for this behaviour and how can I get the cluster feature to work with an Oracle Spatial datasource?
Thank you in advance!
Best Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jmckenna at gatewaygeomatics.com Tue Oct 10 12:12:12 2023
From: jmckenna at gatewaygeomatics.com (Jeff McKenna)
Date: Tue, 10 Oct 2023 16:12:12 -0300
Subject: [MapServer-users] Cluster with Oracle Spatial data
In-Reply-To:
References:
Message-ID:
Hi Ivan,
I believe this should work with any database or OGR connection (I think
my initial tests, for the docs, were with an OGR/KML connection, but I
remember testing SpatiaLite later as well for cluster).
(I'll see if I can test this with Oracle, but, it may take me a while to
setup, so someone else might have to jump in & help you here)
-jeff
--
Jeff McKenna
GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev
co-founder of FOSS4G
http://gatewaygeo.com/
On 2023-10-10 10:50 a.m., Yankov, Ivan via MapServer-users wrote:
> Hi,
>
> I have a problem with clustering a point layer (combine multiple
> features into a single feature based on their relative positions)
>
> using a point datasource from an Oracle Spatial Database.
>
> When I test the cluster feature using a point layer in Shape-Format, it
> works exactly as expected.
>
> In this case I use ?DATA " D:\geodata\point_layer.shp" ? as my
> datasource and everything works just fine.
>
> But when I change the datasource to ? CONNECTIONTYPE oraclespatial ? and
> then use the same point layer
>
> from the Oracle Spatial Database, then nothing actually happens. I don?t
> even get some kind of an error message.
>
> Does anyone know the reason for this behaviour and how can I get the
> cluster feature to work with an Oracle Spatial datasource?
>
> Thank you in advance!
>
> Best Regards
From hschiebold at codematix.de Wed Oct 11 01:08:16 2023
From: hschiebold at codematix.de (Holger Schiebold)
Date: Wed, 11 Oct 2023 10:08:16 +0200
Subject: [MapServer-users] Cluster with Oracle Spatial data
In-Reply-To:
References:
Message-ID:
Yes, that should not be a problem with oracle spatial and cluster.
Generally this works.
(https://via.bund.de/wsv/wadaba/www/wms?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0)
This service works with cluster and oracle spatial data. ( an older
service and a bit slow - the problem we had with cluster option and some
more features was primarily the performance)
I would test if your oracle features are shown without cluster option
first. Maybe it's a problem with your oracle connection setup first.
regards Holger
Am 10.10.2023 um 21:12 schrieb Jeff McKenna via MapServer-users:
> Hi Ivan,
>
> I believe this should work with any database or OGR connection (I
> think my initial tests, for the docs, were with an OGR/KML connection,
> but I remember testing SpatiaLite later as well for cluster).
>
> (I'll see if I can test this with Oracle, but, it may take me a while
> to setup, so someone else might have to jump in & help you here)
>
> -jeff
>
>
>
>
>
>
mit freundlichen Gr??en
--
Holger Schiebold
____________________
codematix GmbH
Felsbachstrasse 5/7
D-07745 Jena
Tel. +49 (3641) 3038-18
www.codematix.de
From bob.basques at ci.stpaul.mn.us Wed Oct 11 05:06:27 2023
From: bob.basques at ci.stpaul.mn.us (Bob Basques)
Date: Wed, 11 Oct 2023 12:06:27 +0000
Subject: [MapServer-users] OSGeo Local Chapter (AKA TCMUG) Meeting.
Message-ID:
All,
Normally our meeting would be this evening, but I completely spaced sending out a reminder, so pushing this meeting to next week. We'll return to the regular schedule next month.
The next OSGeo meeting will be on Oct 18th. At the Keg & Case on West 7th Street in Saint Paul. No presentations scheduled, but if anyone is interested in presenting something just let me know.
Location: Keg & Case ( https://maps.app.goo.gl/U2zMQvYGHVi6R4dt5 )
Date: Oct 18th
Time: 4:30 -6:00
bobb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 14705 bytes
Desc: not available
URL:
From joerg.thomsen at wheregroup.com Wed Oct 11 08:06:38 2023
From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=C3=B6rg_Thomsen_=28WhereGroup=29?=)
Date: Wed, 11 Oct 2023 17:06:38 +0200
Subject: [MapServer-users] symbol minsize/maxsize in mapServer 8
Message-ID:
Hello,
I am curious about min- an maxsize in MS 8.
I found in the docs:
> MAXSIZE [double]
> Removed in version 8.0.
And I know don't now how to determine the maxsize of a point Symbol.
maxsize still works, but not as expected. There is no error-message and
the maxsize auf the point-symbol is set, but when I zoom in more than
the scale of SYMBOLSCALEDENOM the outline of the symbol ist getting and
bigger.
Here are two layers I tested with and you can test the WMS with
https://schulung.foss.academy/cgi-bin/mapserv?map=minmaxsize&mode=browse&template=openlayers&layer=all
(you have to zoom in to see what happens)
LAYER
NAME 'point'
TYPE POINT
DATA 'pois_p.shp'
METADATA
'ows_title' 'Points'
END
SYMBOLSCALEDENOM 100000
CLASS
NAME 'points'
STYLE
SYMBOL 'circle'
SIZE 20
COLOR 218 247 195
OUTLINECOLOR 250 250 0
END
END
END
LAYER
NAME 'pointmaxsize'
TYPE POINT
DATA 'pois_p.shp'
METADATA
'ows_title' 'Pointsmaxsize'
END
SYMBOLSCALEDENOM 100000
CLASS
NAME 'points'
STYLE
SYMBOL 'circle'
SIZE 20
MAXSIZE 30
COLOR 100 100 250
OUTLINECOLOR 0 0 250
END
END
END
--
Viele Gr??e,
J?rg Thomsen
---------------------------------------------
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der www.foss-academy.com
---------------------------------------------
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
-------------------------------
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
From sethg at geographika.co.uk Wed Oct 11 12:36:18 2023
From: sethg at geographika.co.uk (Seth G)
Date: Wed, 11 Oct 2023 21:36:18 +0200
Subject: [MapServer-users] symbol minsize/maxsize in mapServer 8
In-Reply-To:
References:
Message-ID: <019999b3-ca1d-40d2-bad9-0f34653b9e43@app.fastmail.com>
Hi J?rg,
The STYLE MINSIZE and MAXSIZE are still valid Mapfile keywords - this was an error in the docs (and also came up on the dev list yesterday. This has now been corrected and the online docs fixed.
I'm equally as confused as how exactly to use these. In your example what is your SYMBOL definition for "circle"?
I've not seen the OpenLayers template used for awhile - if could do with an upgrade to OL7!
Seth
--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika
On Wed, Oct 11, 2023, at 5:06 PM, J?rg Thomsen (WhereGroup) via MapServer-users wrote:
> Hello,
>
> I am curious about min- an maxsize in MS 8.
>
> I found in the docs:
>> MAXSIZE [double]
>> Removed in version 8.0.
>
> And I know don't now how to determine the maxsize of a point Symbol.
>
> maxsize still works, but not as expected. There is no error-message and
> the maxsize auf the point-symbol is set, but when I zoom in more than
> the scale of SYMBOLSCALEDENOM the outline of the symbol ist getting and
> bigger.
>
> Here are two layers I tested with and you can test the WMS with
> https://schulung.foss.academy/cgi-bin/mapserv?map=minmaxsize&mode=browse&template=openlayers&layer=all
> (you have to zoom in to see what happens)
>
> LAYER
> NAME 'point'
> TYPE POINT
> DATA 'pois_p.shp'
>
> METADATA
> 'ows_title' 'Points'
> END
>
> SYMBOLSCALEDENOM 100000
> CLASS
> NAME 'points'
> STYLE
> SYMBOL 'circle'
> SIZE 20
> COLOR 218 247 195
> OUTLINECOLOR 250 250 0
> END
> END
> END
>
> LAYER
> NAME 'pointmaxsize'
> TYPE POINT
> DATA 'pois_p.shp'
>
> METADATA
> 'ows_title' 'Pointsmaxsize'
> END
>
> SYMBOLSCALEDENOM 100000
> CLASS
> NAME 'points'
> STYLE
> SYMBOL 'circle'
> SIZE 20
> MAXSIZE 30
> COLOR 100 100 250
> OUTLINECOLOR 0 0 250
> END
> END
> END
>
> --
> Viele Gr??e,
> J?rg Thomsen
> ---------------------------------------------
> Aufwind durch Wissen!
> Web-Seminare und Online-Schulungen
> bei der www.foss-academy.com
> ---------------------------------------------
>
>
> 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
>
> -------------------------------
> Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
From jmckenna at gatewaygeomatics.com Wed Oct 11 12:59:46 2023
From: jmckenna at gatewaygeomatics.com (Jeff McKenna)
Date: Wed, 11 Oct 2023 16:59:46 -0300
Subject: [MapServer-users] symbol minsize/maxsize in mapServer 8
In-Reply-To:
References:
Message-ID: <675c4c65-bab9-4ffb-9162-4a471b238037@gatewaygeomatics.com>
I'm sorry for that docs confusion J?rg. Someone found the pull request
that I had made, for the 8.0 release, and I was shocked to see all of my
changes in the docs for that release - it goes to show the effort,
behind the scenes, not just code changes, for such releases. -jeff
--
Jeff McKenna
GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev
co-founder of FOSS4G
http://gatewaygeo.com/
On 2023-10-11 12:06 p.m., J?rg Thomsen (WhereGroup) via MapServer-users
wrote:
> Hello,
>
> I am curious about min- an maxsize in MS 8.
>
> I found in the docs:
>> MAXSIZE [double]
>> Removed in version 8.0.
>
> And I know don't now how to determine the maxsize of a point Symbol.
>
> maxsize still works, but not as expected. There is no error-message and
> the maxsize auf the point-symbol is set, but when I zoom in more than
> the scale of SYMBOLSCALEDENOM the outline of the symbol ist getting and
> bigger.
>
> Here are two layers I tested with and you can test the WMS with
> https://schulung.foss.academy/cgi-bin/mapserv?map=minmaxsize&mode=browse&template=openlayers&layer=all
> (you have to zoom in to see what happens)
>
> ?? LAYER
> ????? NAME 'point'
> ????? TYPE POINT
> ????? DATA 'pois_p.shp'
>
> ????? METADATA
> ??????? 'ows_title' 'Points'
> ????? END
>
> ????? SYMBOLSCALEDENOM 100000
> ????? CLASS
> ??????? NAME 'points'
> ??????? STYLE
> ????????? SYMBOL 'circle'
> ????????? SIZE 20
> ????????? COLOR 218 247 195
> ????????? OUTLINECOLOR 250 250 0
> ??????? END
> ????? END
> ??? END
>
> ??? LAYER
> ????? NAME 'pointmaxsize'
> ????? TYPE POINT
> ????? DATA 'pois_p.shp'
>
> ????? METADATA
> ??????? 'ows_title' 'Pointsmaxsize'
> ????? END
>
> ????? SYMBOLSCALEDENOM 100000
> ????? CLASS
> ??????? NAME 'points'
> ??????? STYLE
> ????????? SYMBOL 'circle'
> ????????? SIZE 20
> ????????? MAXSIZE 30
> ????????? COLOR 100 100 250
> ????????? OUTLINECOLOR 0 0 250
> ??????? END
> ????? END
> ??? END
>
From sethg at geographika.co.uk Wed Oct 11 13:09:09 2023
From: sethg at geographika.co.uk (Seth G)
Date: Wed, 11 Oct 2023 22:09:09 +0200
Subject: [MapServer-users] symbol minsize/maxsize in mapServer 8
In-Reply-To:
References:
Message-ID:
Hi J?rg,
I've been playing around with the MINSCALE etc. When using an OUTLINECOLOR you also need to set the MINWIDTH and MAXWIDTH on the SYMBOL to change sizes with resolution. I think this is the issue you were seeing in your example.
For example to keep a constant outline width of 1 you can use the following:
STYLE
SYMBOL "circle"
SIZE 100
MAXSIZE 200
MINSIZE 12
COLOR "#F9A03F"
OUTLINECOLOR "#813405"
MINWIDTH 1
MAXWIDTH 1
END
There is a working example at https://app.mapserverstudio.net/#akyRvQvW - if you zoom in you will notice the circles get bigger (up to 200 pixels) but the outline width remains at 1 pixel.
Seth
--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika
On Wed, Oct 11, 2023, at 5:06 PM, J?rg Thomsen (WhereGroup) via MapServer-users wrote:
> Hello,
>
> I am curious about min- an maxsize in MS 8.
>
> I found in the docs:
>> MAXSIZE [double]
>> Removed in version 8.0.
>
> And I know don't now how to determine the maxsize of a point Symbol.
>
> maxsize still works, but not as expected. There is no error-message and
> the maxsize auf the point-symbol is set, but when I zoom in more than
> the scale of SYMBOLSCALEDENOM the outline of the symbol ist getting and
> bigger.
>
> Here are two layers I tested with and you can test the WMS with
> https://schulung.foss.academy/cgi-bin/mapserv?map=minmaxsize&mode=browse&template=openlayers&layer=all
> (you have to zoom in to see what happens)
>
> LAYER
> NAME 'point'
> TYPE POINT
> DATA 'pois_p.shp'
>
> METADATA
> 'ows_title' 'Points'
> END
>
> SYMBOLSCALEDENOM 100000
> CLASS
> NAME 'points'
> STYLE
> SYMBOL 'circle'
> SIZE 20
> COLOR 218 247 195
> OUTLINECOLOR 250 250 0
> END
> END
> END
>
> LAYER
> NAME 'pointmaxsize'
> TYPE POINT
> DATA 'pois_p.shp'
>
> METADATA
> 'ows_title' 'Pointsmaxsize'
> END
>
> SYMBOLSCALEDENOM 100000
> CLASS
> NAME 'points'
> STYLE
> SYMBOL 'circle'
> SIZE 20
> MAXSIZE 30
> COLOR 100 100 250
> OUTLINECOLOR 0 0 250
> END
> END
> END
>
> --
> Viele Gr??e,
> J?rg Thomsen
> ---------------------------------------------
> Aufwind durch Wissen!
> Web-Seminare und Online-Schulungen
> bei der www.foss-academy.com
> ---------------------------------------------
>
>
> 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
>
> -------------------------------
> Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
From chris.garrard at usu.edu Wed Oct 11 18:36:46 2023
From: chris.garrard at usu.edu (Chris Garrard)
Date: Thu, 12 Oct 2023 01:36:46 +0000
Subject: [MapServer-users] Using a non-static PostGIS raster
Message-ID:
Hi there,
I have a PostGIS raster that's being served as WMS. Some of the pixel values will be changing on a fairly-regular basis, but so far the only way I've gotten MapServer to pick up the changed data is to restart it.
At first I thought it was a browser cache issue, but it's definitely not. I also tried setting the ows_http_max_age metadata value, and that didn't help. I'm not using a tile cache. Is there something I'm missing that will allow MapServer to use the updated data?
Thanks!
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From YankovI at eba.bund.de Thu Oct 12 00:02:56 2023
From: YankovI at eba.bund.de (Yankov, Ivan)
Date: Thu, 12 Oct 2023 07:02:56 +0000
Subject: [MapServer-users] Cluster with Oracle Spatial data
In-Reply-To:
References:
Message-ID: <1da1eaeb4c0f48e3a5bca95a9868f3c8@eba.bund.de>
Hi Holger,
thanks for your feedback. All my services use the Oracle Spatial database, so there is no problem with the general connection to the database.
Its just that the cluster option doesn?t work for me when I use Oracle as datasource.
The shape-layer that I described was only for test purposes because I wanted to see if I can get the cluster feature working at all.
There seemed to be no issues with a shape source. The problem occurs only when I use my default datasource, which in my case is Oracle Spatial.
Regards
Ivan
-----Urspr?ngliche Nachricht-----
Von: MapServer-users Im Auftrag von Holger Schiebold via MapServer-users
Gesendet: Mittwoch, 11. Oktober 2023 10:08
An: mapserver-users at lists.osgeo.org
Betreff: Re: [MapServer-users] Cluster with Oracle Spatial data
Yes, that should not be a problem with oracle spatial and cluster.
Generally this works.
(https://via.bund.de/wsv/wadaba/www/wms?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0)
This service works with cluster and oracle spatial data. ( an older service and a bit slow - the problem we had with cluster option and some more features was primarily the performance) I would test if your oracle features are shown without cluster option first. Maybe it's a problem with your oracle connection setup first.
regards Holger
Am 10.10.2023 um 21:12 schrieb Jeff McKenna via MapServer-users:
> Hi Ivan,
>
> I believe this should work with any database or OGR connection (I
> think my initial tests, for the docs, were with an OGR/KML connection,
> but I remember testing SpatiaLite later as well for cluster).
>
> (I'll see if I can test this with Oracle, but, it may take me a while
> to setup, so someone else might have to jump in & help you here)
>
> -jeff
>
>
>
>
>
>
mit freundlichen Gr??en
--
Holger Schiebold
____________________
codematix GmbH
Felsbachstrasse 5/7
D-07745 Jena
Tel. +49 (3641) 3038-18
www.codematix.de
_______________________________________________
MapServer-users mailing list
MapServer-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
From YankovI at eba.bund.de Thu Oct 12 00:09:39 2023
From: YankovI at eba.bund.de (Yankov, Ivan)
Date: Thu, 12 Oct 2023 07:09:39 +0000
Subject: [MapServer-users] Cluster with Oracle Spatial data
In-Reply-To:
References:
Message-ID: <38f1f83546cf46239d870066321a4e6b@eba.bund.de>
Hi Jeff,
thanks for your answer. Please let me know if you can find out what the issue with the Oracle datasource may be.
Regards,
Ivan
-----Urspr?ngliche Nachricht-----
Von: MapServer-users Im Auftrag von Jeff McKenna via MapServer-users
Gesendet: Dienstag, 10. Oktober 2023 21:12
An: mapserver-users at lists.osgeo.org
Betreff: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi Ivan,
I believe this should work with any database or OGR connection (I think my initial tests, for the docs, were with an OGR/KML connection, but I remember testing SpatiaLite later as well for cluster).
(I'll see if I can test this with Oracle, but, it may take me a while to setup, so someone else might have to jump in & help you here)
-jeff
--
Jeff McKenna
GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev co-founder of FOSS4G http://gatewaygeo.com/
On 2023-10-10 10:50 a.m., Yankov, Ivan via MapServer-users wrote:
> Hi,
>
> I have a problem with clustering a point layer (combine multiple
> features into a single feature based on their relative positions)
>
> using a point datasource from an Oracle Spatial Database.
>
> When I test the cluster feature using a point layer in Shape-Format, it
> works exactly as expected.
>
> In this case I use ?DATA " D:\geodata\point_layer.shp" ? as my
> datasource and everything works just fine.
>
> But when I change the datasource to ? CONNECTIONTYPE oraclespatial ? and
> then use the same point layer
>
> from the Oracle Spatial Database, then nothing actually happens. I don?t
> even get some kind of an error message.
>
> Does anyone know the reason for this behaviour and how can I get the
> cluster feature to work with an Oracle Spatial datasource?
>
> Thank you in advance!
>
> Best Regards
_______________________________________________
MapServer-users mailing list
MapServer-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
From hschiebold at codematix.de Thu Oct 12 06:31:15 2023
From: hschiebold at codematix.de (Holger Schiebold)
Date: Thu, 12 Oct 2023 15:31:15 +0200
Subject: [MapServer-users] Cluster with Oracle Spatial data
In-Reply-To: <1da1eaeb4c0f48e3a5bca95a9868f3c8@eba.bund.de>
References:
<1da1eaeb4c0f48e3a5bca95a9868f3c8@eba.bund.de>
Message-ID:
Hi Ivan,
sounds strange. How many features are in your datasource to be
clustered? Do you see any load on your mapserver machine when you make a
request?
Maybe that's a special case with your oracle data. Would you show as
your mapfile - or the relevant parts?
The cluster option was developed by Tamas Szekeres in 2011 espacially
for the service i noticed in my last answer. We were involved in the
testing and maintained the service for a few years and had no special
problem with oracle data and the cluster option. But it's a long time
ago and maybe in newer version there is a problem.? Generally i agree
with Jeff - this should work with every datasource.
Regards Holger
Am 12.10.2023 um 09:02 schrieb Yankov, Ivan via MapServer-users:
> Hi Holger,
>
> thanks for your feedback. All my services use the Oracle Spatial database, so there is no problem with the general connection to the database.
> Its just that the cluster option doesn?t work for me when I use Oracle as datasource.
>
> The shape-layer that I described was only for test purposes because I wanted to see if I can get the cluster feature working at all.
> There seemed to be no issues with a shape source. The problem occurs only when I use my default datasource, which in my case is Oracle Spatial.
>
> Regards
> Ivan
>
> -----Urspr?ngliche Nachricht-----
> Von: MapServer-users Im Auftrag von Holger Schiebold via MapServer-users
> Gesendet: Mittwoch, 11. Oktober 2023 10:08
> An: mapserver-users at lists.osgeo.org
> Betreff: Re: [MapServer-users] Cluster with Oracle Spatial data
>
> Yes, that should not be a problem with oracle spatial and cluster.
> Generally this works.
> (https://via.bund.de/wsv/wadaba/www/wms?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0)
> This service works with cluster and oracle spatial data. ( an older service and a bit slow - the problem we had with cluster option and some more features was primarily the performance) I would test if your oracle features are shown without cluster option first. Maybe it's a problem with your oracle connection setup first.
>
> regards Holger
>
> Am 10.10.2023 um 21:12 schrieb Jeff McKenna via MapServer-users:
>> Hi Ivan,
>>
>> I believe this should work with any database or OGR connection (I
>> think my initial tests, for the docs, were with an OGR/KML connection,
>> but I remember testing SpatiaLite later as well for cluster).
>>
>> (I'll see if I can test this with Oracle, but, it may take me a while
>> to setup, so someone else might have to jump in & help you here)
>>
>> -jeff
>>
>>
>>
>>
>>
>>
> mit freundlichen Gr??en
>
> --
> Holger Schiebold
>
>
> ____________________
> codematix GmbH
> Felsbachstrasse 5/7
> D-07745 Jena
> Tel. +49 (3641) 3038-18
> www.codematix.de
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
mit freundlichen Gr??en
--
Holger Schiebold
____________________
codematix GmbH
Felsbachstrasse 5/7
D-07745 Jena
Tel. +49 (3641) 3038-18
www.codematix.de
From jukka.rahkonen at maanmittauslaitos.fi Thu Oct 12 11:27:19 2023
From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka)
Date: Thu, 12 Oct 2023 18:27:19 +0000
Subject: [MapServer-users] Cluster with Oracle Spatial data
In-Reply-To:
References:
<1da1eaeb4c0f48e3a5bca95a9868f3c8@eba.bund.de>
Message-ID:
Hi,
Could you please mention always when you speak about Oracle Spatial data also which connection type you are using:
CONNECTIONTYPE oraclespatial or CONNECTIONTYPE OGR
-Jukka Rahkonen-
-----Alkuper?inen viesti-----
L?hett?j?: MapServer-users Puolesta Holger Schiebold via MapServer-users
L?hetetty: torstai 12. lokakuuta 2023 16.31
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi Ivan,
sounds strange. How many features are in your datasource to be clustered? Do you see any load on your mapserver machine when you make a request?
Maybe that's a special case with your oracle data. Would you show as your mapfile - or the relevant parts?
The cluster option was developed by Tamas Szekeres in 2011 espacially for the service i noticed in my last answer. We were involved in the testing and maintained the service for a few years and had no special problem with oracle data and the cluster option. But it's a long time ago and maybe in newer version there is a problem.? Generally i agree with Jeff - this should work with every datasource.
Regards Holger
Am 12.10.2023 um 09:02 schrieb Yankov, Ivan via MapServer-users:
> Hi Holger,
>
> thanks for your feedback. All my services use the Oracle Spatial database, so there is no problem with the general connection to the database.
> Its just that the cluster option doesn't work for me when I use Oracle as datasource.
>
> The shape-layer that I described was only for test purposes because I wanted to see if I can get the cluster feature working at all.
> There seemed to be no issues with a shape source. The problem occurs only when I use my default datasource, which in my case is Oracle Spatial.
>
> Regards
> Ivan
From joerg.thomsen at wheregroup.com Thu Oct 12 23:41:32 2023
From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=C3=B6rg_Thomsen_=28WhereGroup=29?=)
Date: Fri, 13 Oct 2023 08:41:32 +0200
Subject: [MapServer-users] symbol minsize/maxsize in mapServer 8
In-Reply-To:
References:
Message-ID: <9346e1e1-1343-4f07-b4fc-f012c44ded36@wheregroup.com>
Thank you very much for the answers!
It was a question during a mapserver training and I could demonstrate
how useful the mailinglist is :)
Today we will talk about the config-file. I love it, was a great idea!
J?rg
Am 11.10.23 um 22:09 schrieb Seth G:
> Hi J?rg,
>
> I've been playing around with the MINSCALE etc. When using an OUTLINECOLOR you also need to set the MINWIDTH and MAXWIDTH on the SYMBOL to change sizes with resolution. I think this is the issue you were seeing in your example.
> For example to keep a constant outline width of 1 you can use the following:
>
> STYLE
> SYMBOL "circle"
> SIZE 100
> MAXSIZE 200
> MINSIZE 12
> COLOR "#F9A03F"
> OUTLINECOLOR "#813405"
> MINWIDTH 1
> MAXWIDTH 1
> END
>
> There is a working example at https://app.mapserverstudio.net/#akyRvQvW - if you zoom in you will notice the circles get bigger (up to 200 pixels) but the outline width remains at 1 pixel.
>
> Seth
>
> --
> web:https://geographika.net & https://mapserverstudio.net
> twitter: @geographika
>
> On Wed, Oct 11, 2023, at 5:06 PM, J?rg Thomsen (WhereGroup) via MapServer-users wrote:
>> Hello,
>>
>> I am curious about min- an maxsize in MS 8.
>>
>> I found in the docs:
>>> MAXSIZE [double]
>>> Removed in version 8.0.
>>
>> And I know don't now how to determine the maxsize of a point Symbol.
>>
>> maxsize still works, but not as expected. There is no error-message and
>> the maxsize auf the point-symbol is set, but when I zoom in more than
>> the scale of SYMBOLSCALEDENOM the outline of the symbol ist getting and
>> bigger.
>>
>> Here are two layers I tested with and you can test the WMS with
>> https://schulung.foss.academy/cgi-bin/mapserv?map=minmaxsize&mode=browse&template=openlayers&layer=all
>> (you have to zoom in to see what happens)
>>
>> LAYER
>> NAME 'point'
>> TYPE POINT
>> DATA 'pois_p.shp'
>>
>> METADATA
>> 'ows_title' 'Points'
>> END
>>
>> SYMBOLSCALEDENOM 100000
>> CLASS
>> NAME 'points'
>> STYLE
>> SYMBOL 'circle'
>> SIZE 20
>> COLOR 218 247 195
>> OUTLINECOLOR 250 250 0
>> END
>> END
>> END
>>
>> LAYER
>> NAME 'pointmaxsize'
>> TYPE POINT
>> DATA 'pois_p.shp'
>>
>> METADATA
>> 'ows_title' 'Pointsmaxsize'
>> END
>>
>> SYMBOLSCALEDENOM 100000
>> CLASS
>> NAME 'points'
>> STYLE
>> SYMBOL 'circle'
>> SIZE 20
>> MAXSIZE 30
>> COLOR 100 100 250
>> OUTLINECOLOR 0 0 250
>> END
>> END
>> END
>>
>> --
>> Viele Gr??e,
>> J?rg Thomsen
>> ---------------------------------------------
>> Aufwind durch Wissen!
>> Web-Seminare und Online-Schulungen
>> bei der www.foss-academy.com
>> ---------------------------------------------
>>
>>
>> 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
>>
>> -------------------------------
>> Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
>> _______________________________________________
>> MapServer-users mailing list
>> MapServer-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Viele Gr??e,
J?rg Thomsen
---------------------------------------------
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der www.foss-academy.com
---------------------------------------------
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
-------------------------------
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
From YankovI at eba.bund.de Fri Oct 13 01:16:33 2023
From: YankovI at eba.bund.de (Yankov, Ivan)
Date: Fri, 13 Oct 2023 08:16:33 +0000
Subject: [MapServer-users] Cluster with Oracle Spatial data
In-Reply-To:
References:
<1da1eaeb4c0f48e3a5bca95a9868f3c8@eba.bund.de>
Message-ID: <80bd664fcfdf4a77b15113562ca2b3c8@eba.bund.de>
Hi,
sure, here is he connection part:
include "../../db_connection/db_os.conf" -> this resolves to:
CONNECTIONTYPE PLUGIN
PLUGIN "oci"
CONNECTION "OS/***@db_name"
Regards
-----Urspr?ngliche Nachricht-----
Von: MapServer-users Im Auftrag von Rahkonen Jukka via MapServer-users
Gesendet: Donnerstag, 12. Oktober 2023 20:27
An: Holger Schiebold ; mapserver-users at lists.osgeo.org
Betreff: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi,
Could you please mention always when you speak about Oracle Spatial data also which connection type you are using:
CONNECTIONTYPE oraclespatial or CONNECTIONTYPE OGR
-Jukka Rahkonen-
-----Alkuper?inen viesti-----
L?hett?j?: MapServer-users Puolesta Holger Schiebold via MapServer-users
L?hetetty: torstai 12. lokakuuta 2023 16.31
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi Ivan,
sounds strange. How many features are in your datasource to be clustered? Do you see any load on your mapserver machine when you make a request?
Maybe that's a special case with your oracle data. Would you show as your mapfile - or the relevant parts?
The cluster option was developed by Tamas Szekeres in 2011 espacially for the service i noticed in my last answer. We were involved in the testing and maintained the service for a few years and had no special problem with oracle data and the cluster option. But it's a long time ago and maybe in newer version there is a problem.? Generally i agree with Jeff - this should work with every datasource.
Regards Holger
Am 12.10.2023 um 09:02 schrieb Yankov, Ivan via MapServer-users:
> Hi Holger,
>
> thanks for your feedback. All my services use the Oracle Spatial database, so there is no problem with the general connection to the database.
> Its just that the cluster option doesn't work for me when I use Oracle as datasource.
>
> The shape-layer that I described was only for test purposes because I wanted to see if I can get the cluster feature working at all.
> There seemed to be no issues with a shape source. The problem occurs only when I use my default datasource, which in my case is Oracle Spatial.
>
> Regards
> Ivan
_______________________________________________
MapServer-users mailing list
MapServer-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
From trygve at aspenes.priv.no Fri Oct 13 07:24:01 2023
From: trygve at aspenes.priv.no (Trygve Aspenes)
Date: Fri, 13 Oct 2023 16:24:01 +0200
Subject: [MapServer-users] mapserver legend for raster data
Message-ID: <8f0847bc085f0ff4d2294755faf1dbde@aspenes.priv.no>
Hi
I have an idea to generate some static images to be used as legend for
some RGBA geotiff raster data (already styled) available as layers in a
mapserver setup.
But I can't figure out if this is possible to do.
I had a look a layer web metadata
https://mapserver.org/ogc/wms_server.html#web-object-metadata wms_style
and the following mandatory wms_style_[style?s_name]_width,
wms_style_[style?s_name]_legendurl_height,
wms_style_[style?s_name]_legendurl_format,
wms_style_[style?s_name]_legendurl_href
So I try with name having this in the map file:
METADATA
"wms_title" "Test raster title"
"wms_timeextent" "2023-10-12T11:26:00Z/2023-10-12T11:26:00Z"
"wms_enable_request" "*"
"wms_style_raster_title" "mylayerstyletitle" #style title
"wms_style_raster_legendurl_width" "85"
"wms_style_raster_legendurl_height" "40"
"wms_style_raster_legendurl_format" "image/png"
"wms_style_raster_legendurl_href"
"http://localhost:8080/images/legend.png"
END
I verified I can reach the png.
Then I add:
classgroup "raster"
CLASS
name "TESTNAME"
group "raster"
END
using curl for getlegendgraphic I only get a small png showing
"TESTNAME", not image content of 'legend.png'.
Anyone know if this is possible achieve?
Trygve Aspenes
From jukka.rahkonen at maanmittauslaitos.fi Fri Oct 13 07:42:15 2023
From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka)
Date: Fri, 13 Oct 2023 14:42:15 +0000
Subject: [MapServer-users] Cluster with Oracle Spatial data
In-Reply-To: <80bd664fcfdf4a77b15113562ca2b3c8@eba.bund.de>
References:
<1da1eaeb4c0f48e3a5bca95a9868f3c8@eba.bund.de>
<80bd664fcfdf4a77b15113562ca2b3c8@eba.bund.de>
Message-ID:
Hi,
Please test if using OGR connectiontype makes any difference.
-Jukka Rahkonen-
-----Alkuper?inen viesti-----
L?hett?j?: MapServer-users Puolesta Yankov, Ivan via MapServer-users
L?hetetty: perjantai 13. lokakuuta 2023 11.17
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi,
sure, here is he connection part:
include "../../db_connection/db_os.conf" -> this resolves to:
CONNECTIONTYPE PLUGIN
PLUGIN "oci"
CONNECTION "OS/***@db_name"
Regards
-----Urspr?ngliche Nachricht-----
Von: MapServer-users Im Auftrag von Rahkonen Jukka via MapServer-users
Gesendet: Donnerstag, 12. Oktober 2023 20:27
An: Holger Schiebold ; mapserver-users at lists.osgeo.org
Betreff: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi,
Could you please mention always when you speak about Oracle Spatial data also which connection type you are using:
CONNECTIONTYPE oraclespatial or CONNECTIONTYPE OGR
-Jukka Rahkonen-
-----Alkuper?inen viesti-----
L?hett?j?: MapServer-users Puolesta Holger Schiebold via MapServer-users
L?hetetty: torstai 12. lokakuuta 2023 16.31
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi Ivan,
sounds strange. How many features are in your datasource to be clustered? Do you see any load on your mapserver machine when you make a request?
Maybe that's a special case with your oracle data. Would you show as your mapfile - or the relevant parts?
The cluster option was developed by Tamas Szekeres in 2011 espacially for the service i noticed in my last answer. We were involved in the testing and maintained the service for a few years and had no special problem with oracle data and the cluster option. But it's a long time ago and maybe in newer version there is a problem.? Generally i agree with Jeff - this should work with every datasource.
Regards Holger
Am 12.10.2023 um 09:02 schrieb Yankov, Ivan via MapServer-users:
> Hi Holger,
>
> thanks for your feedback. All my services use the Oracle Spatial database, so there is no problem with the general connection to the database.
> Its just that the cluster option doesn't work for me when I use Oracle as datasource.
>
> The shape-layer that I described was only for test purposes because I wanted to see if I can get the cluster feature working at all.
> There seemed to be no issues with a shape source. The problem occurs only when I use my default datasource, which in my case is Oracle Spatial.
>
> Regards
> Ivan
_______________________________________________
From wal3 at mindspring.com Sun Oct 15 06:12:36 2023
From: wal3 at mindspring.com (Worth Lutz)
Date: Sun, 15 Oct 2023 09:12:36 -0400
Subject: [MapServer-users] creating a layer with PHP MapScript - shapes do
not use classindex
Message-ID: <3e4af052-4cf1-43b9-9e41-467c2277aeb5@mindspring.com>
HI,
I'm trying to create a layer to insert into a map. I have shapes in WKT
and am trying to insert them into a layer and draw it to a pdf.
It works fine if I only have one class for the shapes. I am trying to
add several classes to the layer to draw in different colors. I cannot
get the shapes to use the proper class.
Here is what I'm doing.
After creating a layer and adding all the classes, I add the shapes.
for (i = 0, ii = count($features); $i < $ii; i++) {
??? $shape = ms_shhapeObjFrom Wkt($features[$i]->geometry);
??? $shape->set('classindex', $features[$i]->classindex);
??? $success = $layer->addFeature($shape);
}
The shapes draw but all use $class[0].
If I add this line in before the draw,
??? $layer-moveclassup(1);
all the shapes are drawn with that class.
I have been able to verify that the classes exist in the layerObj and
that the classindex in the shapeObj points to the proper class.
Does anyone have any ideas why the drawing code is not using the
classindex to draw these shapes in different colors?
What am I doing wrong?
--
*Worth Lutz*
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From YankovI at eba.bund.de Mon Oct 16 00:11:02 2023
From: YankovI at eba.bund.de (Yankov, Ivan)
Date: Mon, 16 Oct 2023 07:11:02 +0000
Subject: [MapServer-users] Cluster with Oracle Spatial data
In-Reply-To:
References:
<1da1eaeb4c0f48e3a5bca95a9868f3c8@eba.bund.de>
<80bd664fcfdf4a77b15113562ca2b3c8@eba.bund.de>
Message-ID: <0d69084d126241f1a3a3bd4cfb850b7d@eba.bund.de>
Hello,
I already tested the other oracle connection methods.
The difference with them is that the layer loads "normally" (when I use the plugin connection only the metadata part loads),
but no data is being shown.
So with the plugin connection, the data is being read, but the cluster option causes the layer not to load apart from the metadata.
With the other connection methods no data is being read.
Regards
-----Urspr?ngliche Nachricht-----
Von: Rahkonen Jukka
Gesendet: Freitag, 13. Oktober 2023 16:42
An: Yankov, Ivan ; mapserver-users at lists.osgeo.org
Betreff: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi,
Please test if using OGR connectiontype makes any difference.
-Jukka Rahkonen-
-----Alkuper?inen viesti-----
L?hett?j?: MapServer-users Puolesta Yankov, Ivan via MapServer-users
L?hetetty: perjantai 13. lokakuuta 2023 11.17
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi,
sure, here is he connection part:
include "../../db_connection/db_os.conf" -> this resolves to:
CONNECTIONTYPE PLUGIN
PLUGIN "oci"
CONNECTION "OS/***@db_name"
Regards
-----Urspr?ngliche Nachricht-----
Von: MapServer-users Im Auftrag von Rahkonen Jukka via MapServer-users
Gesendet: Donnerstag, 12. Oktober 2023 20:27
An: Holger Schiebold ; mapserver-users at lists.osgeo.org
Betreff: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi,
Could you please mention always when you speak about Oracle Spatial data also which connection type you are using:
CONNECTIONTYPE oraclespatial or CONNECTIONTYPE OGR
-Jukka Rahkonen-
-----Alkuper?inen viesti-----
L?hett?j?: MapServer-users Puolesta Holger Schiebold via MapServer-users
L?hetetty: torstai 12. lokakuuta 2023 16.31
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi Ivan,
sounds strange. How many features are in your datasource to be clustered? Do you see any load on your mapserver machine when you make a request?
Maybe that's a special case with your oracle data. Would you show as your mapfile - or the relevant parts?
The cluster option was developed by Tamas Szekeres in 2011 espacially for the service i noticed in my last answer. We were involved in the testing and maintained the service for a few years and had no special problem with oracle data and the cluster option. But it's a long time ago and maybe in newer version there is a problem.? Generally i agree with Jeff - this should work with every datasource.
Regards Holger
Am 12.10.2023 um 09:02 schrieb Yankov, Ivan via MapServer-users:
> Hi Holger,
>
> thanks for your feedback. All my services use the Oracle Spatial database, so there is no problem with the general connection to the database.
> Its just that the cluster option doesn't work for me when I use Oracle as datasource.
>
> The shape-layer that I described was only for test purposes because I wanted to see if I can get the cluster feature working at all.
> There seemed to be no issues with a shape source. The problem occurs only when I use my default datasource, which in my case is Oracle Spatial.
>
> Regards
> Ivan
_______________________________________________
From mniemyjski at cloudferro.com Mon Oct 16 00:33:38 2023
From: mniemyjski at cloudferro.com (Marcin Niemyjski)
Date: Mon, 16 Oct 2023 07:33:38 +0000
Subject: [MapServer-users] Google maps XYZ service as a layer data source?
Message-ID:
Hello,
coming back with another question, namely:
Can XYZ service be used as a LAYER data source within mapfile? I'm not talking about cashed service; I would like to directly connect to GoogleMaps. Is it possible?
Best,
Marcin
[https://res.cdn.office.net/assets/bookwithme/misc/CalendarPerson20px.png] Book time to meet with me
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jukka.rahkonen at maanmittauslaitos.fi Mon Oct 16 00:35:59 2023
From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka)
Date: Mon, 16 Oct 2023 07:35:59 +0000
Subject: [MapServer-users] Cluster with Oracle Spatial data
In-Reply-To: <0d69084d126241f1a3a3bd4cfb850b7d@eba.bund.de>
References:
<1da1eaeb4c0f48e3a5bca95a9868f3c8@eba.bund.de>
<80bd664fcfdf4a77b15113562ca2b3c8@eba.bund.de>
<0d69084d126241f1a3a3bd4cfb850b7d@eba.bund.de>
Message-ID:
Hi,
It is a long time since I used Oracle Spatial but I could certainly read data with both the OGR and the native oraclespatial connection types. I think I used MS4W on Windows Server by then.
We would need more information than just "With the other connection methods no data is being read."
Think about what other people would need for reproducing your issue and try give all that information in a systematic way.
- What Mapserver version and what GDAL (for the OGR option) you have, how did you install it?
- A simple but complete mapfile, at least a whole working LAYER block. It does not need to be the one that you use, a simplified version without irrelevant elements is always better for testing.
- Ideally test data that corresponds the LAYER.
I fear it will still be hard to find users who have Oracle available for testing.
-Jukka Rahkonen-
-----Alkuper?inen viesti-----
L?hett?j?: MapServer-users Puolesta Yankov, Ivan via MapServer-users
L?hetetty: maanantai 16. lokakuuta 2023 10.11
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [MapServer-users] Cluster with Oracle Spatial data
Hello,
I already tested the other oracle connection methods.
The difference with them is that the layer loads "normally" (when I use the plugin connection only the metadata part loads), but no data is being shown.
So with the plugin connection, the data is being read, but the cluster option causes the layer not to load apart from the metadata.
With the other connection methods no data is being read.
Regards
-----Urspr?ngliche Nachricht-----
Von: Rahkonen Jukka
Gesendet: Freitag, 13. Oktober 2023 16:42
An: Yankov, Ivan ; mapserver-users at lists.osgeo.org
Betreff: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi,
Please test if using OGR connectiontype makes any difference.
-Jukka Rahkonen-
-----Alkuper?inen viesti-----
L?hett?j?: MapServer-users Puolesta Yankov, Ivan via MapServer-users
L?hetetty: perjantai 13. lokakuuta 2023 11.17
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi,
sure, here is he connection part:
include "../../db_connection/db_os.conf" -> this resolves to:
CONNECTIONTYPE PLUGIN
PLUGIN "oci"
CONNECTION "OS/***@db_name"
Regards
-----Urspr?ngliche Nachricht-----
Von: MapServer-users Im Auftrag von Rahkonen Jukka via MapServer-users
Gesendet: Donnerstag, 12. Oktober 2023 20:27
An: Holger Schiebold ; mapserver-users at lists.osgeo.org
Betreff: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi,
Could you please mention always when you speak about Oracle Spatial data also which connection type you are using:
CONNECTIONTYPE oraclespatial or CONNECTIONTYPE OGR
-Jukka Rahkonen-
-----Alkuper?inen viesti-----
L?hett?j?: MapServer-users Puolesta Holger Schiebold via MapServer-users
L?hetetty: torstai 12. lokakuuta 2023 16.31
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [MapServer-users] Cluster with Oracle Spatial data
Hi Ivan,
sounds strange. How many features are in your datasource to be clustered? Do you see any load on your mapserver machine when you make a request?
Maybe that's a special case with your oracle data. Would you show as your mapfile - or the relevant parts?
The cluster option was developed by Tamas Szekeres in 2011 espacially for the service i noticed in my last answer. We were involved in the testing and maintained the service for a few years and had no special problem with oracle data and the cluster option. But it's a long time ago and maybe in newer version there is a problem. Generally i agree with Jeff - this should work with every datasource.
Regards Holger
Am 12.10.2023 um 09:02 schrieb Yankov, Ivan via MapServer-users:
> Hi Holger,
>
> thanks for your feedback. All my services use the Oracle Spatial database, so there is no problem with the general connection to the database.
> Its just that the cluster option doesn't work for me when I use Oracle as datasource.
>
> The shape-layer that I described was only for test purposes because I wanted to see if I can get the cluster feature working at all.
> There seemed to be no issues with a shape source. The problem occurs only when I use my default datasource, which in my case is Oracle Spatial.
>
> Regards
> Ivan
_______________________________________________
_______________________________________________
MapServer-users mailing list
MapServer-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
From jukka.rahkonen at maanmittauslaitos.fi Mon Oct 16 00:56:31 2023
From: jukka.rahkonen at maanmittauslaitos.fi (Rahkonen Jukka)
Date: Mon, 16 Oct 2023 07:56:31 +0000
Subject: [MapServer-users] Google maps XYZ service as a layer data
source?
In-Reply-To:
References:
Message-ID:
Hi,
The XYZ part of your question is relevant and I think that the answer is yes. At least I am remembering that I have cascaded some WMTS service by using a GDAL xml definition file https://gdal.org/drivers/raster/wms.html as a source for Mapserver.
I believe that the question about the Google Maps is irrelevant because you are not allowed to do that by the Map Tiles usage policies https://developers.google.com/maps/documentation/tile/policies. Make your client to connect the Google Maps API directly.
-Jukka Rahkonen-
L?hett?j?: MapServer-users Puolesta Marcin Niemyjski via MapServer-users
L?hetetty: maanantai 16. lokakuuta 2023 10.34
Vastaanottaja: Marcin Niemyjski via MapServer-users
Aihe: [MapServer-users] Google maps XYZ service as a layer data source?
Hello,
coming back with another question, namely:
Can XYZ service be used as a LAYER data source within mapfile? I'm not talking about cashed service; I would like to directly connect to GoogleMaps. Is it possible?
Best,
Marcin
[https://res.cdn.office.net/assets/bookwithme/misc/CalendarPerson20px.png]
Book time to meet with me
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From sethg at geographika.co.uk Mon Oct 16 00:59:44 2023
From: sethg at geographika.co.uk (Seth G)
Date: Mon, 16 Oct 2023 09:59:44 +0200
Subject: [MapServer-users] creating a layer with PHP MapScript - shapes
do not use classindex
In-Reply-To: <3e4af052-4cf1-43b9-9e41-467c2277aeb5@mindspring.com>
References: <3e4af052-4cf1-43b9-9e41-467c2277aeb5@mindspring.com>
Message-ID:
Hi,
The rendering code could be reassigning the classindex for the shapes based on their attributes. You will probably need to make sure the CLASS is assigned based on an attribute of the feature - e.g. add a CLASSITEM to the layer and add a value to the feature that will match the correct CLASS.
Seth
--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika
On Sun, Oct 15, 2023, at 3:12 PM, Worth Lutz via MapServer-users wrote:
> HI,
>
> I'm trying to create a layer to insert into a map. I have shapes in WKT and am trying to insert them into a layer and draw it to a pdf.
>
> It works fine if I only have one class for the shapes. I am trying to add several classes to the layer to draw in different colors. I cannot get the shapes to use the proper class.
>
> Here is what I'm doing.
>
> After creating a layer and adding all the classes, I add the shapes.
>> for (i = 0, ii = count($features); $i < $ii; i++) {
>> $shape = ms_shhapeObjFrom Wkt($features[$i]->geometry);
>> $shape->set('classindex', $features[$i]->classindex);
>> $success = $layer->addFeature($shape);
>> }
> The shapes draw but all use $class[0].
>
> If I add this line in before the draw,
>
> $layer-moveclassup(1);
>
> all the shapes are drawn with that class.
>
> I have been able to verify that the classes exist in the layerObj and that the classindex in the shapeObj points to the proper class.
>
> Does anyone have any ideas why the drawing code is not using the classindex to draw these shapes in different colors?
>
> What am I doing wrong?
>
> --
> *Worth Lutz*
>
> _______________________________________________
> 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 wal3 at mindspring.com Mon Oct 16 05:57:37 2023
From: wal3 at mindspring.com (Worth Lutz)
Date: Mon, 16 Oct 2023 08:57:37 -0400
Subject: [MapServer-users] creating a layer with PHP MapScript - shapes
do not use classindex
In-Reply-To:
References: <3e4af052-4cf1-43b9-9e41-467c2277aeb5@mindspring.com>
Message-ID: <391794e9-36a9-4eaf-8d4d-f13025266ebd@mindspring.com>
Hi,
I had thought of trying that but the attributes in the values are
read-only. Since i created the shapeObj from WTK there are no values.
I'm using v7 of MapServer and the old PHP mapscript. There does not
appear to be a way for me to set attributes on these shapes which are
being passed down from an OpenLayers client app.
I had thought of setting a single class and putting the different
colors, etc, in as attribute values in the shapeObj but cannot find a
way to write them to the object.
I'll try any suggestions given.
Thanks,
*Worth Lutz*
On 10/16/23 03:59, Seth G wrote:
> Hi,
>
> The rendering code could be reassigning the classindex for the shapes
> based on their attributes. You will probably need to make sure the
> CLASS is assigned based on an attribute of the feature - e.g. add a
> CLASSITEM to the layer and add a value to the feature that will match
> the correct CLASS.
>
> Seth
>
> --
> web:https://geographika.net & https://mapserverstudio.net
> twitter: @geographika
>
> On Sun, Oct 15, 2023, at 3:12 PM, Worth Lutz via MapServer-users wrote:
>> HI,
>>
>> I'm trying to create a layer to insert into a map. I have shapes in
>> WKT and am trying to insert them into a layer and draw it to a pdf.
>>
>> It works fine if I only have one class for the shapes. I am trying to
>> add several classes to the layer to draw in different colors. I
>> cannot get the shapes to use the proper class.
>>
>> Here is what I'm doing.
>>
>> After creating a layer and adding all the classes, I add the shapes.
>>
>> for (i = 0, ii = count($features); $i < $ii; i++) {
>> $shape = ms_shhapeObjFrom Wkt($features[$i]->geometry);
>> $shape->set('classindex', $features[$i]->classindex);
>> $success = $layer->addFeature($shape);
>> }
>>
>> The shapes draw but all use $class[0].
>>
>> If I add this line in before the draw,
>>
>> ??? $layer-moveclassup(1);
>>
>> all the shapes are drawn with that class.
>>
>> I have been able to verify that the classes exist in the layerObj and
>> that the classindex in the shapeObj points to the proper class.
>>
>> Does anyone have any ideas why the drawing code is not using the
>> classindex to draw these shapes in different colors?
>>
>> What am I doing wrong?
>>
>> --
>> *Worth Lutz*
>>
>> _______________________________________________
>> 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 sethg at geographika.co.uk Mon Oct 16 07:29:46 2023
From: sethg at geographika.co.uk (Seth G)
Date: Mon, 16 Oct 2023 16:29:46 +0200
Subject: [MapServer-users] creating a layer with PHP MapScript - shapes
do not use classindex
In-Reply-To: <391794e9-36a9-4eaf-8d4d-f13025266ebd@mindspring.com>
References: <3e4af052-4cf1-43b9-9e41-467c2277aeb5@mindspring.com>
<391794e9-36a9-4eaf-8d4d-f13025266ebd@mindspring.com>
Message-ID: <8e15822f-6ab6-43a2-bbc1-8fa2fe6bd58f@app.fastmail.com>
Hi,
You could probably achieve this with the new SWIG MapScript.
Alternatively how about creating an individual LAYER for each set of features with a single CLASS (I'm not sure how the CLASS is determined if the features have no attributes in the first place), and adding features to the relevant layer.
If you then want to combine these into a single layer you could try a UNION LAYER [1], and use the STYLEITEM AUTO to pick up the styles from the layers.
Seth
[1] https://mapserver.org/mapfile/union.html
[2] https://mapserver.org/mapfile/union.html#classes-and-styles
--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika
On Mon, Oct 16, 2023, at 2:57 PM, Worth Lutz wrote:
> Hi,
>
> I had thought of trying that but the attributes in the values are read-only. Since i created the shapeObj from WTK there are no values.
>
> I'm using v7 of MapServer and the old PHP mapscript. There does not appear to be a way for me to set attributes on these shapes which are being passed down from an OpenLayers client app.
>
> I had thought of setting a single class and putting the different colors, etc, in as attribute values in the shapeObj but cannot find a way to write them to the object.
>
> I'll try any suggestions given.
>
> Thanks,
>
> *Worth Lutz*
>
> On 10/16/23 03:59, Seth G wrote:
>> Hi,
>>
>> The rendering code could be reassigning the classindex for the shapes based on their attributes. You will probably need to make sure the CLASS is assigned based on an attribute of the feature - e.g. add a CLASSITEM to the layer and add a value to the feature that will match the correct CLASS.
>>
>> Seth
>>
>> --
>> web:https://geographika.net & https://mapserverstudio.net
>> twitter: @geographika
>>
>> On Sun, Oct 15, 2023, at 3:12 PM, Worth Lutz via MapServer-users wrote:
>>> HI,
>>>
>>> I'm trying to create a layer to insert into a map. I have shapes in WKT and am trying to insert them into a layer and draw it to a pdf.
>>>
>>> It works fine if I only have one class for the shapes. I am trying to add several classes to the layer to draw in different colors. I cannot get the shapes to use the proper class.
>>>
>>> Here is what I'm doing.
>>>
>>> After creating a layer and adding all the classes, I add the shapes.
>>>> for (i = 0, ii = count($features); $i < $ii; i++) {
>>>> $shape = ms_shhapeObjFrom Wkt($features[$i]->geometry);
>>>> $shape->set('classindex', $features[$i]->classindex);
>>>> $success = $layer->addFeature($shape);
>>>> }
>>> The shapes draw but all use $class[0].
>>>
>>> If I add this line in before the draw,
>>>
>>> $layer-moveclassup(1);
>>>
>>> all the shapes are drawn with that class.
>>>
>>> I have been able to verify that the classes exist in the layerObj and that the classindex in the shapeObj points to the proper class.
>>>
>>> Does anyone have any ideas why the drawing code is not using the classindex to draw these shapes in different colors?
>>>
>>> What am I doing wrong?
>>> --
>>> *Worth Lutz*
>>>
>>> _______________________________________________
>>> 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 wal3 at mindspring.com Mon Oct 16 09:49:18 2023
From: wal3 at mindspring.com (Worth Lutz)
Date: Mon, 16 Oct 2023 12:49:18 -0400
Subject: [MapServer-users] creating a layer with PHP MapScript - shapes
do not use classindex
In-Reply-To: <8e15822f-6ab6-43a2-bbc1-8fa2fe6bd58f@app.fastmail.com>
References: <3e4af052-4cf1-43b9-9e41-467c2277aeb5@mindspring.com>
<391794e9-36a9-4eaf-8d4d-f13025266ebd@mindspring.com>
<8e15822f-6ab6-43a2-bbc1-8fa2fe6bd58f@app.fastmail.com>
Message-ID: <59cbf7be-49a5-4cfa-8b3f-f0e5fc795357@mindspring.com>
Hi,
I've come to the same conclusion this morning about using a different
layer for each style.? It should work with the way my data is arriving
from the client. It just seems like a more complicated method.
I cannot change to the SWIG MapScript at the moment. Too much to change.
That will happen when we build the next server with an OS version jump.
Thanks for your suggestions.
*Worth Lutz*
On 10/16/23 10:29, Seth G wrote:
> Hi,
>
> You could probably achieve this with the new SWIG MapScript.
>
> Alternatively how about creating an individual LAYER for each set of
> features with a single CLASS (I'm not sure how the CLASS is determined
> if the features have no attributes in the first place), and adding
> features to the relevant layer.
>
> If you then want to combine these into a single layer you could try a
> UNION LAYER [1], and use the STYLEITEM AUTO to pick up the styles from
> the layers.
>
> Seth
>
> [1] https://mapserver.org/mapfile/union.html
> [2] https://mapserver.org/mapfile/union.html#classes-and-styles
>
>
> --
> web:https://geographika.net & https://mapserverstudio.net
> twitter: @geographika
>
> On Mon, Oct 16, 2023, at 2:57 PM, Worth Lutz wrote:
>> Hi,
>>
>> I had thought of trying that but the attributes in the values are
>> read-only. Since i created the shapeObj from WTK there are no values.
>>
>> I'm using v7 of MapServer and the old PHP mapscript. There does not
>> appear to be a way for me to set attributes on these shapes which are
>> being passed down from an OpenLayers client app.
>>
>> I had thought of setting a single class and putting the different
>> colors, etc, in as attribute values in the shapeObj but cannot find a
>> way to write them to the object.
>>
>> I'll try any suggestions given.
>>
>> Thanks,
>>
>> *Worth Lutz*
>>
>> On 10/16/23 03:59, Seth G wrote:
>>> Hi,
>>>
>>> The rendering code could be reassigning the classindex for the
>>> shapes based on their attributes. You will probably need to make
>>> sure the CLASS is assigned based on an attribute of the feature -
>>> e.g. add a CLASSITEM to the layer and add a value to the feature
>>> that will match the correct CLASS.
>>>
>>> Seth
>>>
>>> --
>>> web:https://geographika.net &
>>> https://mapserverstudio.net
>>> twitter: @geographika
>>>
>>> On Sun, Oct 15, 2023, at 3:12 PM, Worth Lutz via MapServer-users wrote:
>>>> HI,
>>>>
>>>> I'm trying to create a layer to insert into a map. I have shapes in
>>>> WKT and am trying to insert them into a layer and draw it to a pdf.
>>>>
>>>> It works fine if I only have one class for the shapes. I am trying
>>>> to add several classes to the layer to draw in different colors. I
>>>> cannot get the shapes to use the proper class.
>>>>
>>>> Here is what I'm doing.
>>>>
>>>> After creating a layer and adding all the classes, I add the shapes.
>>>>
>>>> for (i = 0, ii = count($features); $i < $ii; i++) {
>>>> $shape = ms_shhapeObjFrom Wkt($features[$i]->geometry);
>>>> $shape->set('classindex', $features[$i]->classindex);
>>>> $success = $layer->addFeature($shape);
>>>> }
>>>>
>>>> The shapes draw but all use $class[0].
>>>>
>>>> If I add this line in before the draw,
>>>>
>>>> ??? $layer-moveclassup(1);
>>>>
>>>> all the shapes are drawn with that class.
>>>>
>>>> I have been able to verify that the classes exist in the layerObj
>>>> and that the classindex in the shapeObj points to the proper class.
>>>>
>>>> Does anyone have any ideas why the drawing code is not using the
>>>> classindex to draw these shapes in different colors?
>>>>
>>>> What am I doing wrong?
>>>> --
>>>> *Worth Lutz*
>>>>
>>>> _______________________________________________
>>>> 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 bob.basques at ci.stpaul.mn.us Tue Oct 17 06:34:03 2023
From: bob.basques at ci.stpaul.mn.us (Bob Basques)
Date: Tue, 17 Oct 2023 13:34:03 +0000
Subject: [MapServer-users] [REMINDER] Re: OSGeo Local Chapter (AKA TCMUG)
Meeting.
In-Reply-To:
References:
Message-ID:
All,
Just a reminder that the meeting is tomorrow at Keg & Case on West 7th Street in St. Paul. I?ll try to get a spot upstairs.
bobb
From: GeoMoose-users on behalf of Bob Basques via GeoMoose-users
Date: Wednesday, October 11, 2023 at 7:06 AM
To: tcmug at lists.osgeo.org , geomoose-users-osgeo , mapserver-users at lists.osgeo.org
Subject: [GeoMoose-users] OSGeo Local Chapter (AKA TCMUG) Meeting.
Think Before You Click: This email originated outside our organization.
All,
The next OSGeo meeting will be on Oct 18th. At the Keg & Case on West 7th Street in Saint Paul. No presentations scheduled, but if anyone is interested in presenting something just let me know.
Location: Keg & Case ( https://maps.app.goo.gl/U2zMQvYGHVi6R4dt5 )
Date: Oct 18th
Time: 4:30 -6:00
bobb
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From j.l.h.hartmann at gmail.com Tue Oct 17 12:24:06 2023
From: j.l.h.hartmann at gmail.com (j.l.h.hartmann at gmail.com)
Date: Tue, 17 Oct 2023 21:24:06 +0200
Subject: [MapServer-users] Compiling mapserver with php in user directory
Message-ID: <3DAEB7A3-C2C0-4CFD-B37E-A6370EA9C93E@gmail.com>
Hi all,
I am trying to compile MapServer with all dependencies in a separate user-directory. Everything has been compiled with ?prefix=$INSTALLBIN. PHP has also been compiled into that directory, but I don't get MapServer to use it. It compiles against the system-php, but that is another version than the compiled one. I call CMAKE with the following options:
...
-DGDAL_LIBRARY=$INSTALLBIN/lib/libgdal.so \
-DGDAL_INCLUDE_DIR=$INSTALLBIN/include \
...
I removed the sysem-PHP, and added -DPHP_INCLUDE_DIR=$INSTALLBIN/include/php \, but that doesn't work, and I cannot find the PHP-library to add.
CMAKE ends with the message: "Configuring incomplete, errors occurred!", without giving the precise errors. In the error log I get messages of missing "strrstr", "strlcat" and strlcpy".
Can you help me?
Jan Hartmann
Amsterdam
From jmckenna at gatewaygeomatics.com Tue Oct 17 12:45:10 2023
From: jmckenna at gatewaygeomatics.com (Jeff McKenna)
Date: Tue, 17 Oct 2023 16:45:10 -0300
Subject: [MapServer-users] Compiling mapserver with php in user directory
In-Reply-To: <3DAEB7A3-C2C0-4CFD-B37E-A6370EA9C93E@gmail.com>
References: <3DAEB7A3-C2C0-4CFD-B37E-A6370EA9C93E@gmail.com>
Message-ID:
Hi Jan,
Unfortunately I have much experience tracking down CMake errors now, ha.
Instead of the error log, scroll up and read the output from your cmake
command (as it does its checks and looks for libraries), I find
examining that output is crucial (and I personally find the actual
generated log file is filled of fake/"red-herrings"). Focus instead on
going line-by-line through that cmake output, as it makes its way down
to the final "configuring incomplete" message. (for packaging, this is
what I do, line-by-line)
For example, if you are trying to enable the GEOS library, I would go
line-by-line of the output and find where it was looking for GEOS
initially, and read the messages in that section, to confirm that there
are no issues when enabling GEOS. This is crucial.
It takes much time to do this for each library.
In my case, for PHPNG support, my CMake command includes:
"-DWITH_PHPNG=1 -DPHP_EXTENSION_DIR=/usr/lib/php/20220829"
In your case I am not sure, but, I would start by examining line-by-line
the CMake output before the words "Configuring incomplete" (and totally
ignoring the generated 'output' file).
Maybe you can find the PHPNG section in your cmake command output, and
paste that here for the community to review.
-jeff
--
Jeff McKenna
GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev
co-founder of FOSS4G
http://gatewaygeo.com/
On 2023-10-17 4:24 p.m., Jan Hartmann via MapServer-users wrote:
> Hi all,
>
> I am trying to compile MapServer with all dependencies in a separate user-directory. Everything has been compiled with ?prefix=$INSTALLBIN. PHP has also been compiled into that directory, but I don't get MapServer to use it. It compiles against the system-php, but that is another version than the compiled one. I call CMAKE with the following options:
>
> ...
> -DGDAL_LIBRARY=$INSTALLBIN/lib/libgdal.so \
> -DGDAL_INCLUDE_DIR=$INSTALLBIN/include \
> ...
>
> I removed the sysem-PHP, and added -DPHP_INCLUDE_DIR=$INSTALLBIN/include/php \, but that doesn't work, and I cannot find the PHP-library to add.
>
> CMAKE ends with the message: "Configuring incomplete, errors occurred!", without giving the precise errors. In the error log I get messages of missing "strrstr", "strlcat" and strlcpy".
>
> Can you help me?
>
> Jan Hartmann
> Amsterdam
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
From jmckenna at gatewaygeomatics.com Tue Oct 17 13:08:31 2023
From: jmckenna at gatewaygeomatics.com (Jeff McKenna)
Date: Tue, 17 Oct 2023 17:08:31 -0300
Subject: [MapServer-users] Compiling mapserver with php in user directory
In-Reply-To:
References: <3DAEB7A3-C2C0-4CFD-B37E-A6370EA9C93E@gmail.com>
Message-ID:
Maybe paste all of the output from the cmake command (upto the
"configuring incomplete" message) at https://pastebin.com/ and paste
that pastebin link here for the community to examine closely.
-jeff
On 2023-10-17 4:45 p.m., Jeff McKenna via MapServer-users wrote:
> Hi Jan,
>
> Unfortunately I have much experience tracking down CMake errors now, ha.
>
> Instead of the error log, scroll up and read the output from your cmake
> command (as it does its checks and looks for libraries), I find
> examining that output is crucial (and I personally find the actual
> generated log file is filled of fake/"red-herrings").? Focus instead on
> going line-by-line through that cmake output, as it makes its way down
> to the final "configuring incomplete" message.? (for packaging, this is
> what I do, line-by-line)
>
> For example, if you are trying to enable the GEOS library, I would go
> line-by-line of the output and find where it was looking for GEOS
> initially, and read the messages in that section, to confirm that there
> are no issues when enabling GEOS.? This is crucial.
>
> It takes much time to do this for each library.
>
> In my case, for PHPNG support, my CMake command includes:
> "-DWITH_PHPNG=1 -DPHP_EXTENSION_DIR=/usr/lib/php/20220829"
>
> In your case I am not sure, but, I would start by examining line-by-line
> the CMake output before the words "Configuring incomplete" (and totally
> ignoring the generated 'output' file).
>
> Maybe you can find the PHPNG section in your cmake command output, and
> paste that here for the community to review.
>
> -jeff
>
>
>
>
--
Jeff McKenna
GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev
co-founder of FOSS4G
http://gatewaygeo.com/
From j.l.h.hartmann at gmail.com Wed Oct 18 09:39:23 2023
From: j.l.h.hartmann at gmail.com (Jan Hartmann)
Date: Wed, 18 Oct 2023 18:39:23 +0200
Subject: [MapServer-users] Compiling mapserver with php in user directory
In-Reply-To:
References: <3DAEB7A3-C2C0-4CFD-B37E-A6370EA9C93E@gmail.com>
Message-ID:
I compiled with:
?-DPHP_INCLUDE_DIR=$INSTALLBIN/include/php \
?-DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829
and got lots of error messages about missing .h files (php.h, zend.h
etc). I bulk copied them all to the directory in the build tree where
the errors came from, and got a complete build, including
"php_mapscriptng.so"
So CMAKE is still missing the php include directories. What is de
correct DEFINE for that?
After I copied php_mapscriptng.so to the correct location and filling in
php.ini, I got a warning when starting PHP :
Startup: Unable to load dynamic library 'php_mapscriptng.so' (tried:
/virdir/installbin/lib/php/extensions/no-debug-non-zts-20220829/php_mapscriptng.so
(libgeos.so.3.12.0: cannot open shared object file: No such file or
directory)
But? it *is* in that location. Any idea?
On 17/10/2023 21:45, Jeff McKenna via MapServer-users wrote:
> Hi Jan,
>
> Unfortunately I have much experience tracking down CMake errors now, ha.
>
> Instead of the error log, scroll up and read the output from your
> cmake command (as it does its checks and looks for libraries), I find
> examining that output is crucial (and I personally find the actual
> generated log file is filled of fake/"red-herrings"). Focus instead on
> going line-by-line through that cmake output, as it makes its way down
> to the final "configuring incomplete" message.? (for packaging, this
> is what I do, line-by-line)
>
> For example, if you are trying to enable the GEOS library, I would go
> line-by-line of the output and find where it was looking for GEOS
> initially, and read the messages in that section, to confirm that
> there are no issues when enabling GEOS.? This is crucial.
>
> It takes much time to do this for each library.
>
> In my case, for PHPNG support, my CMake command includes:
> "-DWITH_PHPNG=1 -DPHP_EXTENSION_DIR=/usr/lib/php/20220829"
>
> In your case I am not sure, but, I would start by examining
> line-by-line the CMake output before the words "Configuring
> incomplete" (and totally ignoring the generated 'output' file).
>
> Maybe you can find the PHPNG section in your cmake command output, and
> paste that here for the community to review.
>
> -jeff
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jmckenna at gatewaygeomatics.com Wed Oct 18 10:11:50 2023
From: jmckenna at gatewaygeomatics.com (Jeff McKenna)
Date: Wed, 18 Oct 2023 14:11:50 -0300
Subject: [MapServer-users] Compiling mapserver with php in user directory
In-Reply-To:
References: <3DAEB7A3-C2C0-4CFD-B37E-A6370EA9C93E@gmail.com>
Message-ID:
Hi Jan,
I understand that you won't listen to my advice here, no problem at all.
But I won't repeat myself here :)
Enjoy your afternoon,
-jeff
--
Jeff McKenna
GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev
co-founder of FOSS4G
http://gatewaygeo.com/
On 2023-10-18 1:39 p.m., Jan Hartmann wrote:
> I compiled with:
>
> ?-DPHP_INCLUDE_DIR=$INSTALLBIN/include/php \
> ?-DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829
>
> and got lots of error messages about missing .h files (php.h, zend.h
> etc). I bulk copied them all to the directory in the build tree where
> the errors came from, and got a complete build, including
> "php_mapscriptng.so"
>
> So CMAKE is still missing the php include directories. What is de
> correct DEFINE for that?
>
> After I copied php_mapscriptng.so to the correct location and filling in
> php.ini, I got a warning when starting PHP :
>
> Startup: Unable to load dynamic library 'php_mapscriptng.so' (tried:
> /virdir/installbin/lib/php/extensions/no-debug-non-zts-20220829/php_mapscriptng.so (libgeos.so.3.12.0: cannot open shared object file: No such file or directory)
>
> But? it *is* in that location. Any idea?
>
> On 17/10/2023 21:45, Jeff McKenna via MapServer-users wrote:
>> Hi Jan,
>>
>> Unfortunately I have much experience tracking down CMake errors now, ha.
>>
>> Instead of the error log, scroll up and read the output from your
>> cmake command (as it does its checks and looks for libraries), I find
>> examining that output is crucial (and I personally find the actual
>> generated log file is filled of fake/"red-herrings"). Focus instead on
>> going line-by-line through that cmake output, as it makes its way down
>> to the final "configuring incomplete" message.? (for packaging, this
>> is what I do, line-by-line)
>>
>> For example, if you are trying to enable the GEOS library, I would go
>> line-by-line of the output and find where it was looking for GEOS
>> initially, and read the messages in that section, to confirm that
>> there are no issues when enabling GEOS.? This is crucial.
>>
>> It takes much time to do this for each library.
>>
>> In my case, for PHPNG support, my CMake command includes:
>> "-DWITH_PHPNG=1 -DPHP_EXTENSION_DIR=/usr/lib/php/20220829"
>>
>> In your case I am not sure, but, I would start by examining
>> line-by-line the CMake output before the words "Configuring
>> incomplete" (and totally ignoring the generated 'output' file).
>>
>> Maybe you can find the PHPNG section in your cmake command output, and
>> paste that here for the community to review.
>>
>> -jeff
>>
>>
>>
>>
>
From mniemyjski at cloudferro.com Thu Oct 19 02:39:18 2023
From: mniemyjski at cloudferro.com (Marcin Niemyjski)
Date: Thu, 19 Oct 2023 09:39:18 +0000
Subject: [MapServer-users] Postgres DATA query with LIMIT 10 does not work
Message-ID:
Hello,
I encountered a problem, specifically:
This query works:
DATA 'geometry from (select * from mrc order by maxcc desc) as subquery using unique unique_id'
However, this query doesn't work:
DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as subquery using unique unique_id'
Here's the full tileindex definition:
LAYER
DEBUG 5
STATUS OFF
NAME "time_idx"
TYPE POLYGON
CONNECTIONTYPE postgis
CONNECTION "***"
DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as subquery using unique unique_id'
PROJECTION
"init=epsg:3857"
END
VALIDATION
'maxCC' '^[0-9]{1,3}$'
'default_maxCC' '100'
END
METADATA
"wms_title" "tile-index-cloud"
"wms_timeextent" "2022-02-01/2023-10-10/P1D"
"wms_timeitem" "timestamp"
"wms_timedefault" "2023-10-10"
"wms_enable_request" "!*"
END
END
My MapServer version is 7.6.4.
The query results (but returns data in Postgres
) in an empty window. I'm following the guidelines provided at https://mapserver.org/input/vector/postgis.html#data-access-connection-method.
Best,
marcin
[https://res.cdn.office.net/assets/bookwithme/misc/CalendarPerson20px.png] Book time to meet with me
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From joerg.thomsen at wheregroup.com Thu Oct 19 03:18:34 2023
From: joerg.thomsen at wheregroup.com (=?UTF-8?Q?J=C3=B6rg_Thomsen_=28WhereGroup=29?=)
Date: Thu, 19 Oct 2023 12:18:34 +0200
Subject: [MapServer-users] Postgres DATA query with LIMIT 10 does not
work
In-Reply-To:
References:
Message-ID: <2fd10505-a473-4d68-a03e-bdc37fce8512@wheregroup.com>
Hello Marcin,
sounds stupid, but are you sure the 10 datasets have geometries within
the requested bbox? I don't see any other problem/mistakes.
J?rg
Am 19.10.23 um 11:39 schrieb Marcin Niemyjski via MapServer-users:
> Hello,
>
>
> I encountered a problem, specifically:
>
> This query works:
>
> |DATA 'geometry from (select * from mrc order by maxcc desc) as subquery
> using unique unique_id' |
>
> However, this query doesn't work:
>
> |DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as
> subquery using unique unique_id' |
>
> Here's the full tileindex definition:
>
> |LAYER ?DEBUG 5 ?STATUS OFF ?NAME "time_idx" ?TYPE POLYGON
> ?CONNECTIONTYPE postgis ?CONNECTION "***" ?DATA 'geometry from (select
> * from mrc order by maxcc desc limit 10) as subquery using unique
> unique_id' ?PROJECTION ? ?"init=epsg:3857" ?END ?VALIDATION ? ? 'maxCC'
> '^[0-9]{1,3}$' ? ? 'default_maxCC' '100' ?END ?METADATA ? ?"wms_title"
> "tile-index-cloud" ? ?"wms_timeextent" "2022-02-01/2023-10-10/P1D"
> ?"wms_timeitem" "timestamp" ? ?"wms_timedefault" "2023-10-10"
> ?"wms_enable_request" "!*" ?END END |
>
> My MapServer version is 7.6.4.
>
> The query results (but returns data in Postgres
> ) in an empty window. I'm following the guidelines provided at
> https://mapserver.org/input/vector/postgis.html#data-access-connection-method .
>
>
> Best,
> marcin
>
> Book time to meet with me
>
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Viele Gr??e,
J?rg Thomsen
---------------------------------------------
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der www.foss-academy.com
---------------------------------------------
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
-------------------------------
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
From mniemyjski at cloudferro.com Thu Oct 19 03:56:40 2023
From: mniemyjski at cloudferro.com (Marcin Niemyjski)
Date: Thu, 19 Oct 2023 10:56:40 +0000
Subject: [MapServer-users] Postgres DATA query with LIMIT 10 does not
work
In-Reply-To: <2fd10505-a473-4d68-a03e-bdc37fce8512@wheregroup.com>
References:
<2fd10505-a473-4d68-a03e-bdc37fce8512@wheregroup.com>
Message-ID:
hello J?rg,
so, If there's fewer than 10 results, none will be rendered? I taught that LIMIT sets only upper border of results count.
and yup, I've just checked it:
SELECT *
FROM (
SELECT *
FROM mrc
WHERE mrc.timestamp >= '2023-08-01' AND mrc.timestamp <= '2023-08-01'
AND ST_Intersects(mrc.geometry, ST_GeomFromText('POLYGON((2791286.85068837 5622573.79066471,2791286.85068837 5638166.03910615,2805874.3941497 5638166.03910615,2805874.3941497 5622573.79066471,2791286.85068837 5622573.79066471))', 3857))
ORDER BY maxcc DESC
) AS subquery;
query results in only 2 records.
Is there any way to get only 10 or less results using postgis query in mapserver?
Best,
Marcin
[cid:3c4ade68-ed3d-4e2c-a9eb-ad74db8b6632] Book time to meet with me
________________________________
From: MapServer-users on behalf of J?rg Thomsen (WhereGroup) via MapServer-users
Sent: Thursday, October 19, 2023 12:18 PM
To: mapserver-users at lists.osgeo.org
Subject: Re: [MapServer-users] Postgres DATA query with LIMIT 10 does not work
Hello Marcin,
sounds stupid, but are you sure the 10 datasets have geometries within
the requested bbox? I don't see any other problem/mistakes.
J?rg
Am 19.10.23 um 11:39 schrieb Marcin Niemyjski via MapServer-users:
> Hello,
>
>
> I encountered a problem, specifically:
>
> This query works:
>
> |DATA 'geometry from (select * from mrc order by maxcc desc) as subquery
> using unique unique_id' |
>
> However, this query doesn't work:
>
> |DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as
> subquery using unique unique_id' |
>
> Here's the full tileindex definition:
>
> |LAYER DEBUG 5 STATUS OFF NAME "time_idx" TYPE POLYGON
> CONNECTIONTYPE postgis CONNECTION "***" DATA 'geometry from (select
> * from mrc order by maxcc desc limit 10) as subquery using unique
> unique_id' PROJECTION "init=epsg:3857" END VALIDATION 'maxCC'
> '^[0-9]{1,3}$' 'default_maxCC' '100' END METADATA "wms_title"
> "tile-index-cloud" "wms_timeextent" "2022-02-01/2023-10-10/P1D"
> "wms_timeitem" "timestamp" "wms_timedefault" "2023-10-10"
> "wms_enable_request" "!*" END END |
>
> My MapServer version is 7.6.4.
>
> The query results (but returns data in Postgres
> ) in an empty window. I'm following the guidelines provided at
> https://mapserver.org/input/vector/postgis.html#data-access-connection-method .
>
>
> Best,
> marcin
>
> Book time to meet with me
>
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Viele Gr??e,
J?rg Thomsen
---------------------------------------------
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der www.foss-academy.com
---------------------------------------------
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
-------------------------------
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
_______________________________________________
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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-xjeacwcn.png
Type: image/png
Size: 528 bytes
Desc: Outlook-xjeacwcn.png
URL:
From mniemyjski at cloudferro.com Thu Oct 19 04:16:15 2023
From: mniemyjski at cloudferro.com (Marcin Niemyjski)
Date: Thu, 19 Oct 2023 11:16:15 +0000
Subject: [MapServer-users] Postgres DATA query with LIMIT 10 does not
work
In-Reply-To:
References:
<2fd10505-a473-4d68-a03e-bdc37fce8512@wheregroup.com>
Message-ID:
Actually, no. Now I know why it's not working.
As you can see in my mapfile, I've activated the time dimension, so it's a WMS-T.
The issue looks like this: In the URL, I define the time range I'm interested in, and then I request data from DATA block, which in my case looks like this:
DATA 'geometry from (select * from mrc order by maxcc desc LIMIT 10) as subquery using unique unique_id'
In my opinion (which I just checked by querying it directly from postgres), the key is the subquery, which selects 10 records not from the query containing information about TIME and BBOX but simply from the entire table. This returns records from the beginning of the table that just don't overlap with the requested time period.
So, the problem solver is to implement the TIME parameter in the subquery. Does anyone have an idea of how to do that? The only thing that comes to mind is breaking it down into two new dimensions: start and stop.
Best regards and thanks,
Marcin
________________________________
From: MapServer-users on behalf of Marcin Niemyjski via MapServer-users
Sent: Thursday, October 19, 2023 12:56 PM
To: mapserver-users at lists.osgeo.org ; J?rg Thomsen (WhereGroup)
Subject: Re: [MapServer-users] Postgres DATA query with LIMIT 10 does not work
hello J?rg,
so, If there's fewer than 10 results, none will be rendered? I taught that LIMIT sets only upper border of results count.
and yup, I've just checked it:
SELECT *
FROM (
SELECT *
FROM mrc
WHERE mrc.timestamp >= '2023-08-01' AND mrc.timestamp <= '2023-08-01'
AND ST_Intersects(mrc.geometry, ST_GeomFromText('POLYGON((2791286.85068837 5622573.79066471,2791286.85068837 5638166.03910615,2805874.3941497 5638166.03910615,2805874.3941497 5622573.79066471,2791286.85068837 5622573.79066471))', 3857))
ORDER BY maxcc DESC
) AS subquery;
query results in only 2 records.
Is there any way to get only 10 or less results using postgis query in mapserver?
Best,
Marcin
[cid:3c4ade68-ed3d-4e2c-a9eb-ad74db8b6632] Book time to meet with me
________________________________
From: MapServer-users on behalf of J?rg Thomsen (WhereGroup) via MapServer-users
Sent: Thursday, October 19, 2023 12:18 PM
To: mapserver-users at lists.osgeo.org
Subject: Re: [MapServer-users] Postgres DATA query with LIMIT 10 does not work
Hello Marcin,
sounds stupid, but are you sure the 10 datasets have geometries within
the requested bbox? I don't see any other problem/mistakes.
J?rg
Am 19.10.23 um 11:39 schrieb Marcin Niemyjski via MapServer-users:
> Hello,
>
>
> I encountered a problem, specifically:
>
> This query works:
>
> |DATA 'geometry from (select * from mrc order by maxcc desc) as subquery
> using unique unique_id' |
>
> However, this query doesn't work:
>
> |DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as
> subquery using unique unique_id' |
>
> Here's the full tileindex definition:
>
> |LAYER DEBUG 5 STATUS OFF NAME "time_idx" TYPE POLYGON
> CONNECTIONTYPE postgis CONNECTION "***" DATA 'geometry from (select
> * from mrc order by maxcc desc limit 10) as subquery using unique
> unique_id' PROJECTION "init=epsg:3857" END VALIDATION 'maxCC'
> '^[0-9]{1,3}$' 'default_maxCC' '100' END METADATA "wms_title"
> "tile-index-cloud" "wms_timeextent" "2022-02-01/2023-10-10/P1D"
> "wms_timeitem" "timestamp" "wms_timedefault" "2023-10-10"
> "wms_enable_request" "!*" END END |
>
> My MapServer version is 7.6.4.
>
> The query results (but returns data in Postgres
> ) in an empty window. I'm following the guidelines provided at
> https://mapserver.org/input/vector/postgis.html#data-access-connection-method .
>
>
> Best,
> marcin
>
> Book time to meet with me
>
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Viele Gr??e,
J?rg Thomsen
---------------------------------------------
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der www.foss-academy.com
---------------------------------------------
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
-------------------------------
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
_______________________________________________
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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-xjeacwcn.png
Type: image/png
Size: 528 bytes
Desc: Outlook-xjeacwcn.png
URL:
From ajph at geodata.soton.ac.uk Thu Oct 19 06:50:34 2023
From: ajph at geodata.soton.ac.uk (Andrew Harfoot)
Date: Thu, 19 Oct 2023 14:50:34 +0100
Subject: [MapServer-users] Inconsistent support for template substitution
Message-ID: <1de4aa62-7c43-48ed-b57c-57493933fc97@geodata.soton.ac.uk>
Hi list,
I am setting up a WMS server using Mapserver 7.6.2 and want to return a
html response to a GetFeatureInfo request where the response contains
the coordinates of the GFI click. The WMS supports multiple coordinate
systems, so ideally I'd like to have the coordinates in a CRS that I can
predetermine.
I have a test template file as follows:
If I configure an 'old style' TEMPLATE in the map file, directly
referencing the html template as follows:
LAYER
TEMPLATE "coord_comp.html"
With a GFI request specifying a CRS of EPSG:27700:
...&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo
&BBOX=379766.9556955648586154,58602.32640402266406454,405538.15569556411355734,94300.79913129436317831
&CRS=EPSG:27700&WIDTH=649&HEIGHT=899&LAYERS=test&STYLES=&FORMAT=image/jpeg&QUERY_LAYERS=test
&INFO_FORMAT=text/html&I=268&J=647&FEATURE_COUNT=50
the output of is as follows:
Map X/Y : 390428.846605,68589.162768
Map LL : 50.516415,-2.135015
When a similar requests are made specifying a CRS of EPSG:4326:
...&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo
&BBOX=50.33460688675980776,-2.28814701603231718,50.84060858090575863,-1.92285769511938809
&CRS=EPSG:4326&WIDTH=649&HEIGHT=899&LAYERS=test&STYLES=&FORMAT=image/jpeg&QUERY_LAYERS=test
&INFO_FORMAT=text/html&I=298&J=579&FEATURE_COUNT=50
the output is as follows:
Map X/Y : 50.514437,-2.120136
Map LL : [maplon],[maplat]
The maplat and maplon templates are not substituted.
Mapserver has been compiled with PROJ support and a PROJECTION has been
defined for the layer in the map file.
The CRS of the source data is EPSG:27700
I was hoping that the maplat and maplon templates would provide me with
a consistent source of coordinate information, independent of the
request CRS. Can anybody shed any light on the observed behaviour?
Thanks,
Andy
--
Andy Harfoot
Skype: gdi_ajph
Teams:ajph at soton.ac.uk
Phone: +44 2380 590566
GeoData Institute
University of Southampton
Southampton
SO17 1BJ
www.geodata.soton.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From ajph at geodata.soton.ac.uk Thu Oct 19 06:56:47 2023
From: ajph at geodata.soton.ac.uk (Andrew Harfoot)
Date: Thu, 19 Oct 2023 14:56:47 +0100
Subject: [MapServer-users] Inconsistent support for template substitution
In-Reply-To: <1de4aa62-7c43-48ed-b57c-57493933fc97@geodata.soton.ac.uk>
References: <1de4aa62-7c43-48ed-b57c-57493933fc97@geodata.soton.ac.uk>
Message-ID:
I should have added that the behaviour is the same if the template file
is configured as an OUTPUTFORMAT.
On 19/10/2023 14:50, Andrew Harfoot via MapServer-users wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
>
> Hi list,
>
> I am setting up a WMS server using Mapserver 7.6.2 and want to return
> a html response to a GetFeatureInfo request where the response
> contains the coordinates of the GFI click. The WMS supports multiple
> coordinate systems, so ideally I'd like to have the coordinates in a
> CRS that I can predetermine.
>
> I have a test template file as follows:
>
>
>
>
> If I configure an 'old style' TEMPLATE in the map file, directly
> referencing the html template as follows:
>
> LAYER
> TEMPLATE "coord_comp.html"
>
> With a GFI request specifying a CRS of EPSG:27700:
>
> ...&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo
> &BBOX=379766.9556955648586154,58602.32640402266406454,405538.15569556411355734,94300.79913129436317831
> &CRS=EPSG:27700&WIDTH=649&HEIGHT=899&LAYERS=test&STYLES=&FORMAT=image/jpeg&QUERY_LAYERS=test
> &INFO_FORMAT=text/html&I=268&J=647&FEATURE_COUNT=50
>
> the output of is as follows:
>
> Map X/Y : 390428.846605,68589.162768
> Map LL : 50.516415,-2.135015
>
> When a similar requests are made specifying a CRS of EPSG:4326:
>
> ...&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo
> &BBOX=50.33460688675980776,-2.28814701603231718,50.84060858090575863,-1.92285769511938809
> &CRS=EPSG:4326&WIDTH=649&HEIGHT=899&LAYERS=test&STYLES=&FORMAT=image/jpeg&QUERY_LAYERS=test
> &INFO_FORMAT=text/html&I=298&J=579&FEATURE_COUNT=50
>
> the output is as follows:
>
> Map X/Y : 50.514437,-2.120136
> Map LL : [maplon],[maplat]
>
> The maplat and maplon templates are not substituted.
>
> Mapserver has been compiled with PROJ support and a PROJECTION has
> been defined for the layer in the map file.
>
> The CRS of the source data is EPSG:27700
>
> I was hoping that the maplat and maplon templates would provide me
> with a consistent source of coordinate information, independent of the
> request CRS. Can anybody shed any light on the observed behaviour?
>
> Thanks,
>
> Andy
>
> --
> Andy Harfoot
>
> Skype: gdi_ajph
> Teams:ajph at soton.ac.uk
> Phone: +44 2380 590566
>
> GeoData Institute
> University of Southampton
> Southampton
> SO17 1BJ
>
> www.geodata.soton.ac.uk
>
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Andy Harfoot
Skype: gdi_ajph
Teams:ajph at soton.ac.uk
Phone: +44 2380 590566
GeoData Institute
University of Southampton
Southampton
SO17 1BJ
www.geodata.soton.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From sethg at geographika.co.uk Thu Oct 19 08:26:51 2023
From: sethg at geographika.co.uk (Seth G)
Date: Thu, 19 Oct 2023 17:26:51 +0200
Subject: [MapServer-users] Inconsistent support for template substitution
In-Reply-To: <1de4aa62-7c43-48ed-b57c-57493933fc97@geodata.soton.ac.uk>
References: <1de4aa62-7c43-48ed-b57c-57493933fc97@geodata.soton.ac.uk>
Message-ID:
Hi,
This seems like a bug - there is a check to see if the Map projection is a geographic coordinate system [1], and if it is then it skips all the [maplon], [maplat], [minlon] etc. substitutions. If it is in another projection then the point and extent are reprojected to latlon and included in the template.
Seth
[1] https://github.com/MapServer/MapServer/blob/main/src/maptemplate.c#L4273
--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika
On Thu, Oct 19, 2023, at 3:50 PM, Andrew Harfoot via MapServer-users wrote:
> Hi list,
>
> I am setting up a WMS server using Mapserver 7.6.2 and want to return a html response to a GetFeatureInfo request where the response contains the coordinates of the GFI click. The WMS supports multiple coordinate systems, so ideally I'd like to have the coordinates in a CRS that I can predetermine.
>
> I have a test template file as follows:
>
>
>
> If I configure an 'old style' TEMPLATE in the map file, directly referencing the html template as follows:
>
> LAYER
> TEMPLATE "coord_comp.html"
> With a GFI request specifying a CRS of EPSG:27700:
>
> ...&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo
> &BBOX=379766.9556955648586154,58602.32640402266406454,405538.15569556411355734,94300.79913129436317831
> &CRS=EPSG:27700&WIDTH=649&HEIGHT=899&LAYERS=test&STYLES=&FORMAT=image/jpeg&QUERY_LAYERS=test
> &INFO_FORMAT=text/html&I=268&J=647&FEATURE_COUNT=50
>
>
>
> the output of is as follows:
>
>
> Map X/Y : 390428.846605,68589.162768
> Map LL : 50.516415,-2.135015
>
> When a similar requests are made specifying a CRS of EPSG:4326:
>
> ...&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo
> &BBOX=50.33460688675980776,-2.28814701603231718,50.84060858090575863,-1.92285769511938809
> &CRS=EPSG:4326&WIDTH=649&HEIGHT=899&LAYERS=test&STYLES=&FORMAT=image/jpeg&QUERY_LAYERS=test
> &INFO_FORMAT=text/html&I=298&J=579&FEATURE_COUNT=50
>
> the output is as follows:
>
>
>
>
> Map X/Y : 50.514437,-2.120136
> Map LL : [maplon],[maplat]
>
> The maplat and maplon templates are not substituted.
>
> Mapserver has been compiled with PROJ support and a PROJECTION has been defined for the layer in the map file.
>
> The CRS of the source data is EPSG:27700
>
> I was hoping that the maplat and maplon templates would provide me with a consistent source of coordinate information, independent of the request CRS. Can anybody shed any light on the observed behaviour?
>
> Thanks,
> Andy
>
> --
> Andy Harfoot
>
> Skype: gdi_ajph
> Teams: ajph at soton.ac.uk
> Phone: +44 2380 590566
>
> GeoData Institute
> University of Southampton
> Southampton
> SO17 1BJ
>
> www.geodata.soton.ac.uk
> _______________________________________________
> 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 j.l.h.hartmann at gmail.com Thu Oct 19 08:55:33 2023
From: j.l.h.hartmann at gmail.com (Jan Hartmann)
Date: Thu, 19 Oct 2023 17:55:33 +0200
Subject: [MapServer-users] Compiling mapserver with php in user directory
In-Reply-To:
References: <3DAEB7A3-C2C0-4CFD-B37E-A6370EA9C93E@gmail.com>
Message-ID: <61bcfc26-a83f-4afa-8aa8-81668ba56946@gmail.com>
Hi Jeff, I appreciate your advice, but I solved the problem with a hack,
and to be honest, CMAKE error handling is above me. I am still from the
./configure generation :-)
I added these two lines to MapServer's CMAKE call:
?-DPHP_INCLUDE_PATH=$INSTALLBIN/include/php/main \
-DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829
I also had to add these lines to GEOS's CMAKE, after
-DCMAKE_INSTALL_PREFIX=$INSTALLBIN? -DCMAKE_PREFIX_PATH=$INSTALLBIN \
-DCMAKE_LIBRARY_PATH=$INSTALLBIN/lib \
-DINCLUDE_DIRECTORIES=$INSTALLBIN/include \
I guess CMAKE does not propagate its dependencies very well from the
general INSTALL_PREFIX.
But this still didn't work. The php includes in other subdirectories
than main weren't found. Those subdirectories should have been added to
the include path, but weren't. So I copied the complete php include
directory to /usr/include (O horror! :-)) .
Of course a Docker installation would be easier, as you can install
everything in standard locations. But I want to have a real dedicated
server with just the software I need and nothing more. I have worked for
a long time with the UbuntuGIS packages, but they are not supported very
well.
Thanks for your advice!
Jan
On 18/10/2023 19:11, Jeff McKenna via MapServer-users wrote:
Hi Jan,
I understand that you won't listen to my advice here, no problem at all.
?But I won't repeat myself here ?
Enjoy your afternoon,
-jeff
> On 2023-10-18 1:39 p.m., Jan Hartmann wrote:
>> I compiled with:
>>
>> ??-DPHP_INCLUDE_DIR=$INSTALLBIN/include/php \
>> ??-DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829
>>
>>
>> and got lots of error messages about missing .h files (php.h, zend.h
>> etc). I bulk copied them all to the directory in the build tree where
>> the errors came from, and got a complete build, including
>> "php_mapscriptng.so"
>>
>> So CMAKE is still missing the php include directories. What is de
>> correct DEFINE for that?
>>
>> After I copied php_mapscriptng.so to the correct location and filling
>> in php.ini, I got a warning when starting PHP :
>>
>> Startup: Unable to load dynamic library 'php_mapscriptng.so' (tried:
>> /virdir/installbin/lib/php/extensions/no-debug-non-zts-20220829/php_mapscriptng.so
>> (libgeos.so.3.12.0: cannot open shared object file: No such file or
>> directory)
>>
>> But? it *is* in that location. Any idea?
>>
>> On 17/10/2023 21:45, Jeff McKenna via MapServer-users wrote:
>>> Hi Jan,
>>>
>>> Unfortunately I have much experience tracking down CMake errors now,
>>> ha.
>>>
>>> Instead of the error log, scroll up and read the output from your
>>> cmake command (as it does its checks and looks for libraries), I
>>> find examining that output is crucial (and I personally find the
>>> actual generated log file is filled of fake/"red-herrings"). Focus
>>> instead on going line-by-line through that cmake output, as it makes
>>> its way down to the final "configuring incomplete" message.? (for
>>> packaging, this is what I do, line-by-line)
>>>
>>> For example, if you are trying to enable the GEOS library, I would
>>> go line-by-line of the output and find where it was looking for GEOS
>>> initially, and read the messages in that section, to confirm that
>>> there are no issues when enabling GEOS.? This is crucial.
>>>
>>> It takes much time to do this for each library.
>>>
>>> In my case, for PHPNG support, my CMake command includes:
>>> "-DWITH_PHPNG=1 -DPHP_EXTENSION_DIR=/usr/lib/php/20220829"
>>>
>>> In your case I am not sure, but, I would start by examining
>>> line-by-line the CMake output before the words "Configuring
>>> incomplete" (and totally ignoring the generated 'output' file).
>>>
>>> Maybe you can find the PHPNG section in your cmake command output,
>>> and paste that here for the community to review.
>>>
>>> -jeff
>>>
>>>
>>>
>>>
>>
>
> _______________________________________________
> 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 ajph at geodata.soton.ac.uk Thu Oct 19 09:11:29 2023
From: ajph at geodata.soton.ac.uk (Andrew Harfoot)
Date: Thu, 19 Oct 2023 17:11:29 +0100
Subject: [MapServer-users] Inconsistent support for template substitution
In-Reply-To:
References: <1de4aa62-7c43-48ed-b57c-57493933fc97@geodata.soton.ac.uk>
Message-ID: <768ef0c6-2bc6-4b0e-9c9f-3c7b1f90ca33@geodata.soton.ac.uk>
Hi Seth,
Thanks for checking that, I see what you mean. I'll submit a pull
request to correct the logic.
Cheers,
Andy
On 19/10/2023 16:26, Seth G wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
> Hi,
>
> This seems like a bug - there is a check to see if the Map projection
> is a geographic coordinate system [1], and if it is then it skips all
> the [maplon], [maplat], [minlon] etc. substitutions. If it is in
> another projection then the point and extent are reprojected to latlon
> and included in the template.
>
> Seth
>
>
> [1]
> https://github.com/MapServer/MapServer/blob/main/src/maptemplate.c#L4273
>
> --
> web:https://geographika.net & https://mapserverstudio.net
> twitter: @geographika
>
> On Thu, Oct 19, 2023, at 3:50 PM, Andrew Harfoot via MapServer-users
> wrote:
>>
>> Hi list,
>>
>> I am setting up a WMS server using Mapserver 7.6.2 and want to return
>> a html response to a GetFeatureInfo request where the response
>> contains the coordinates of the GFI click. The WMS supports multiple
>> coordinate systems, so ideally I'd like to have the coordinates in a
>> CRS that I can predetermine.
>>
>> I have a test template file as follows:
>>
>>
>>
>>
>> If I configure an 'old style' TEMPLATE in the map file, directly
>> referencing the html template as follows:
>>
>> LAYER
>> TEMPLATE "coord_comp.html"
>>
>> With a GFI request specifying a CRS of EPSG:27700:
>>
>> ...&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo
>> &BBOX=379766.9556955648586154,58602.32640402266406454,405538.15569556411355734,94300.79913129436317831
>> &CRS=EPSG:27700&WIDTH=649&HEIGHT=899&LAYERS=test&STYLES=&FORMAT=image/jpeg&QUERY_LAYERS=test
>> &INFO_FORMAT=text/html&I=268&J=647&FEATURE_COUNT=50
>>
>>
>> the output of is as follows:
>>
>> Map X/Y : 390428.846605,68589.162768
>> Map LL : 50.516415,-2.135015
>>
>> When a similar requests are made specifying a CRS of EPSG:4326:
>>
>> ...&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo
>> &BBOX=50.33460688675980776,-2.28814701603231718,50.84060858090575863,-1.92285769511938809
>> &CRS=EPSG:4326&WIDTH=649&HEIGHT=899&LAYERS=test&STYLES=&FORMAT=image/jpeg&QUERY_LAYERS=test
>> &INFO_FORMAT=text/html&I=298&J=579&FEATURE_COUNT=50
>>
>> the output is as follows:
>>
>>
>> Map X/Y : 50.514437,-2.120136
>> Map LL : [maplon],[maplat]
>>
>> The maplat and maplon templates are not substituted.
>>
>> Mapserver has been compiled with PROJ support and a PROJECTION has
>> been defined for the layer in the map file.
>>
>> The CRS of the source data is EPSG:27700
>>
>> I was hoping that the maplat and maplon templates would provide me
>> with a consistent source of coordinate information, independent of
>> the request CRS. Can anybody shed any light on the observed behaviour?
>>
>> Thanks,
>>
>> Andy
>>
>> --
>> Andy Harfoot
>>
>> Skype: gdi_ajph
>> Teams:ajph at soton.ac.uk
>> Phone: +44 2380 590566
>>
>> GeoData Institute
>> University of Southampton
>> Southampton
>> SO17 1BJ
>>
>> www.geodata.soton.ac.uk
>> _______________________________________________
>> MapServer-users mailing list
>> MapServer-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
--
Andy Harfoot
Skype: gdi_ajph
Teams:ajph at soton.ac.uk
Phone: +44 2380 590566
GeoData Institute
University of Southampton
Southampton
SO17 1BJ
www.geodata.soton.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From j.l.h.hartmann at gmail.com Thu Oct 19 09:12:31 2023
From: j.l.h.hartmann at gmail.com (Jan Hartmann)
Date: Thu, 19 Oct 2023 18:12:31 +0200
Subject: [MapServer-users] Installing PHP-MapScript from source
Message-ID: <69ba4e0a-583b-43e2-bb90-1a0607b306bd@gmail.com>
Still not there. Everything has been installed, and phpinfo() gives:
MapServer Version MapServer version 8.0.1 PROJ version 9.3 GDAL version
3.7 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=OGCAPI_SERVER INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILE INPUT=FLATGEOBUF
But calling "$map = new mapObj('mapfile.map');" gives:
*Fatal error*: Uncaught Error: Class "mapObj" not found in
/mnt/virdir/www_root/test/test_mapscript.php:2 Stack trace: #0 {main}
thrown in*/mnt/virdir/www_root/test/test_mapscript.php*on line*2
*Any idea?
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From trygve at aspenes.priv.no Fri Oct 20 12:16:21 2023
From: trygve at aspenes.priv.no (Trygve Aspenes)
Date: Fri, 20 Oct 2023 21:16:21 +0200
Subject: [MapServer-users] How to format labels on contours
Message-ID: <4a363cbeb415e18bd389f711a5def291@aspenes.priv.no>
Hi
So I have made a contour plot from a raster. Works nicely.
Then I added labels to give context to the contours. Fine.
Now I want to format the labels.
I have found this post
https://gis.stackexchange.com/questions/350089/round-number-for-label-in-mapserver
suggesting a syntax:
TEXT (tostring(([SQKM]),"%.0f")+" km2")
Nice, but I use mapscript. And I do not understand nor find any examples
how I could do this with mapscript
I tried with:
s = mapscript.classObj(layer)
s.updateFromString('TEXT (tostring(([SQKM]),"%.0f")+" km2")')
But I get:
EOFError: loadClass(): Premature End-of-File.
So obviously not correct.
Is there someone who could suggest what could be wrong here or what else
to look at and try?
Trygve Aspenes
From j.l.h.hartmann at gmail.com Fri Oct 20 20:40:50 2023
From: j.l.h.hartmann at gmail.com (Jan Hartmann)
Date: Sat, 21 Oct 2023 05:40:50 +0200
Subject: [MapServer-users] Docker imgage for MapServer with PHP-MapScript
In-Reply-To: <69ba4e0a-583b-43e2-bb90-1a0607b306bd@gmail.com>
References: <69ba4e0a-583b-43e2-bb90-1a0607b306bd@gmail.com>
Message-ID: <1b174510-f8bc-49ab-8d64-6c93415b54dd@gmail.com>
I tried this with serveral versions of PHP and MapServer, but got always
the same result. Can anyone point me to a Docker image for MapServer +
PHP-MapScript?
Jan
On 19/10/2023 18:12, Jan Hartmann wrote:
> Still not there. Everything has been installed, and phpinfo() gives:
>
> MapServer Version MapServer version 8.0.1 PROJ version 9.3 GDAL
> version 3.7 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG
> SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
> SUPPORTS=WCS_SERVER SUPPORTS=OGCAPI_SERVER INPUT=JPEG INPUT=POSTGIS
> INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF
>
>
> But calling "$map = new mapObj('mapfile.map');" gives:
>
> *Fatal error*: Uncaught Error: Class "mapObj" not found in
> /mnt/virdir/www_root/test/test_mapscript.php:2 Stack trace: #0 {main}
> thrown in*/mnt/virdir/www_root/test/test_mapscript.php*on line*2
>
> *Any idea?
>
> Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From sethg at geographika.co.uk Sat Oct 21 00:04:51 2023
From: sethg at geographika.co.uk (Seth G)
Date: Sat, 21 Oct 2023 09:04:51 +0200
Subject: [MapServer-users] How to format labels on contours
In-Reply-To: <4a363cbeb415e18bd389f711a5def291@aspenes.priv.no>
References: <4a363cbeb415e18bd389f711a5def291@aspenes.priv.no>
Message-ID:
Hi,
The MapScript API docs are back online - see https://mapserver.org/mapscript/mapscript-api/stub/mapscript.classObj.html#mapscript.classObj
The setText() method should give you what you need. Example (using Python):
s = mapscript.classObj(layer)
# other style and label stuff
s.setText('(tostring(([SQKM]),"%.0f")+" km2")')
# check the output using
print(s.convertToString())
When using updateFromString it will replace everything in the classObj hence the error.
Seth
--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika
On Fri, Oct 20, 2023, at 9:16 PM, Trygve Aspenes via MapServer-users wrote:
> Hi
>
> So I have made a contour plot from a raster. Works nicely.
> Then I added labels to give context to the contours. Fine.
> Now I want to format the labels.
>
> I have found this post
> https://gis.stackexchange.com/questions/350089/round-number-for-label-in-mapserver
> suggesting a syntax:
> TEXT (tostring(([SQKM]),"%.0f")+" km2")
>
> Nice, but I use mapscript. And I do not understand nor find any examples
> how I could do this with mapscript
> I tried with:
> s = mapscript.classObj(layer)
>
> s.updateFromString('TEXT (tostring(([SQKM]),"%.0f")+" km2")')
>
> But I get:
> EOFError: loadClass(): Premature End-of-File.
>
> So obviously not correct.
>
> Is there someone who could suggest what could be wrong here or what else
> to look at and try?
>
> Trygve Aspenes
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
From trygve at aspenes.priv.no Sat Oct 21 01:25:32 2023
From: trygve at aspenes.priv.no (Trygve Aspenes)
Date: Sat, 21 Oct 2023 10:25:32 +0200
Subject: [MapServer-users] How to format labels on contours
In-Reply-To:
References: <4a363cbeb415e18bd389f711a5def291@aspenes.priv.no>
Message-ID:
Thanks Seth
I'm sure I did try the setText method, but I forgot to mention that in
the post.
Thanks for the tip of convertToString() method.
Using your example I get
LABEL