Re: [MapServer-users] wms time validation of time parameter against timeextent gives unexpected results

2023-02-07 Thread Clausen Marcel via MapServer-users
Hello Steve


Thank you for your response,
we would have expected that too.

with wms 1.1 the service response is the same.

with this metadata "wms_timeextent" "2005/2022"
the service response is:

http://localhost:/local/?SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=ch.swisstopo.lubis-bildstreifen&SRS=EPSG:2056&STYLES=&WIDTH=860&HEIGHT=600&BBOX=242,105,285,135&TIME=2022-01-01/2022-12-31


http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd";>


msWMSApplyTime: WMS server error. Time value(s) 2022-01-01/2022-12-31 given is 
invalid or outside the time extent defined (2005/2022).



The only work-around we found so far is to set the time-range in the metadata 
with a date precision of day:
"wms_timeextent" "2005-01-01/2022-12-31" but then in the getcap we would have 
this information:

2005-01-01/2022-12-31

which is not representing the real nature of this dataset, the time resolution 
here should be a year.

Best regards
Marcel




Von: Steve Lime 
Gesendet: Montag, 6. Februar 2023 17:48:26
An: Clausen Marcel swisstopo
Cc: mapserver-users@lists.osgeo.org
Betreff: Re: [MapServer-users] wms time validation of time parameter against 
timeextent gives unexpected results

Does WMS 1.1 behave the same? I suppose it comes down to how 2022 is 
interpreted as part of a range, I would have expected it would mean any date in 
that year. Sounds like it's behaving like strictly less than 2022-01-01. What 
happens if you set the range using full dates, so something like: 
20050101/20221231?

--Steve

On Thu, Feb 2, 2023 at 3:33 AM Clausen Marcel via MapServer-users 
mailto:mapserver-users@lists.osgeo.org>> wrote:

Dear all

We have the following question concerning the configuration and usage of time 
enabled wms layers.

We are using the following metadata section for a time-enabled layer:

METADATA
"wms_enable_request" "*"
"wms_title" "lubis_bildstreifen"
"wms_extent" "210 105 285 140"
"wms_timeextent" "2005/2022"
"wms_timeitem" "flugdatum" # this is a date column in postgres
END


The time precision/resolution of the timeextent has to be set as year.

The validation of the time parameter against the time extent with year 
precision gives some strange results. We were using the following getmap 
request for the tests:

localhost:/local/?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=ch.swisstopo.lubis-bildstreifen&CRS=EPSG:2056&STYLES=&WIDTH=860&HEIGHT=600&BBOX=242,105,285,135&TIME=2022

parameter:  time=2005
result: returns all features of 2005
expected result:ok

parameter:  time=2022
result: returns all features of 2022
expected result:ok

parameter:  time=2023
result: returns ServiceException [1]
expected result:ok

parameter:  time=2022-01-01
result: returns ServiceException [2]
expected result:we would expect this to be a valid timestamp

parameter:  time=2022-01-01/2022-12-31
result: returns ServiceException [3]
expected result:we would expect this to be a valid timestamp

It seems that if the precision of the time parameter is of -MM or 
-MM-TT the upper bound of the defined timextent 2005/2022 is not respected 
correctly.
We got the same result with the timextent defined  as: 2005/2022/P1Y

our mapserver version is:


Does someone have some insights or hints?

Best regards
Clausen Marcel

[1]
msWMSApplyTime: WMS server 
error. Time value(s) 2023 given is invalid or outside the time extent defined 
(2005/2022).

[2]
 msWMSApplyTime: WMS server 
error. Time value(s) 2022-01-01 given is invalid or outside the time extent 
defined (2005/2022). 

[3]
 msWMSApplyTime: WMS server 
error. Time value(s) 2022-01-01/2022-12-31 given is invalid or outside the time 
extent defined (2005/2022). 









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


[MapServer-users] Using getMetadata with xml file

2023-02-07 Thread Gerhard Völkl
Hello,

I am looking for an getMetadata example

I want to call mapserver to get metadata xml file

Example:

https://mapservice.test.org/cgi-bin/mapserv?map=/data/ows/maps/metatest.map&request=GetMetadata&layer=testlayer

In the map file I used this
 
 'ows_metadataurl_href' "https://mapservice.test.org/data/Test.XML";

But it does not work.

Any examples. Perhaps with example xml file
 
 
Best Regards Gerhard

Von meinem iPad gesendet___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Using getMetadata with xml file

2023-02-07 Thread Seth G
Hi,

Did you set the metadata at the LAYER level?

LAYER
  NAME "testlayer"
  METADATA
'ows_metadataurl_href' "https://mapservice.test.org/data/Test.XML";
  END
END

Then a request to 
https://mapservice.test.org/cgi-bin/mapserv?map=/data/ows/maps/metatest.map&request=GetMetadata&layer=testlayer
 should return the following HTTP response:

Status: 301 Moved Permanently
Location: D:\TFS\PublicLighting\Main\Python\plpy\mapfiles\generated\test.xml


Seth

--
web:https://geographika.net
twitter: @geographika

On Tue, Feb 7, 2023, at 3:08 PM, Gerhard Völkl wrote:
> 
> Hello,
> __
> _I am looking for an getMetadata example_
> __
> _I want to call mapserver to get metadata xml file_
> __
> _Example:_
> __
> _https://mapservice.test.org/cgi-bin/mapserv?map=/data/ows/maps/metatest.map&request=GetMetadata&layer=testlayer_
> __
> _In the map file I used this_
>  
>  'ows_metadataurl_href' "_https://mapservice.test.org/data/Test.XML_";
> 
> But it does not work.
> 
> Any examples. Perhaps with example xml file
> 
>  
>  
> Best Regards Gerhard
> 
> Von meinem iPad gesendet
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[MapServer-users] Two regular expressions

2023-02-07 Thread Preuß , Sylvia
Hello,

is it possible to do something like that with a regular expression
MAP...
EXPRESSION ('[LANGUAGE]' eq 'GERMAN' OR '[LANGUAGE]' eq 'FRENCH')?
...END

my regular expressions include ^ and $:

EXPRESSION /^RMA$/
EXPRESSION /^RENC$/

Thanks
sylviaobk



Der E-Mail-Dienst des Oberbergischen Kreises dient ausschließlich der 
dienstlichen Kommunikation.
Senden Sie deshalb keine E-Mails privaten Inhalts an E-Mail-Adressen des 
Oberbergischen Kreises.
Es wird darauf hingewiesen, dass neben der Person, an die Ihre E-Mail gerichtet 
ist, auch deren Vertretung im Amt einen unmittelbaren Zugriff auf Ihre 
Nachricht hat. Für Berufsgeheimnisträger und besondere Funktionsträger gelten 
abweichende Regelungen.
Es wird außerdem darauf hingewiesen, dass die Kommunikation per E-Mail ohne 
Authentifizierung und Verschlüsselung unsicher ist, da für unberechtigte Dritte 
grundsätzlich die Möglichkeit der Kenntnisnahme und Manipulation besteht.
Es wird deshalb keine Verantwortung für den Inhalt dieser Nachricht übernommen, 
da eine Manipulation nicht ausgeschlossen werden kann.
Obwohl alle angemessenen Vorkehrungen getroffen wurden, um sicherzustellen, 
dass Anlagen dieser E-Mail virusgeprüft sind, wird empfohlen, anhängende 
Dateien vor dem Öffnen durch Ihr eigenes Virus-Programm zu prüfen, da keinerlei 
Haftung für Schäden übernommen wird, die infolge etwaiger Software-Viren 
entstehen könnten.
Der Inhalt dieser E-Mail ist ausschließlich für die bezeichnete Person 
bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen 
Vertretung sein sollten, beachten Sie bitte, dass jede Form der Kenntnisnahme, 
Veröffentlichung, Vervielfältigung oder Weitergabe des Inhalts dieser E-Mail 
unzulässig ist. In diesem Fall wird darum gebeten, sich mit der absendenden 
Person der E-Mail in Verbindung zu setzen.

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


Re: [MapServer-users] Using getMetadata with xml file

2023-02-07 Thread Gerhard Völkl
Hello,I tested this example and it works.Thanks.Best Regards GerhardVon meinem iPad gesendetAm 07.02.2023 um 15:41 schrieb Seth G :Hi,Did you set the metadata at the LAYER level?LAYER  NAME "testlayer"  METADATA    'ows_metadataurl_href' "https://mapservice.test.org/data/Test.XML"  ENDENDThen a request to https://mapservice.test.org/cgi-bin/mapserv?map=/data/ows/maps/metatest.map&request=GetMetadata&layer=testlayer should return the following HTTP response:Status: 301 Moved PermanentlyLocation: D:\TFS\PublicLighting\Main\Python\plpy\mapfiles\generated\test.xmlSeth--web:https://geographika.nettwitter: @geographikaOn Tue, Feb 7, 2023, at 3:08 PM, Gerhard Völkl wrote:Hello,I am looking for an getMetadata exampleI want to call mapserver to get metadata xml fileExample:https://mapservice.test.org/cgi-bin/mapserv?map=/data/ows/maps/metatest.map&request=GetMetadata&layer=testlayerIn the map file I used this  'ows_metadataurl_href' "https://mapservice.test.org/data/Test.XML"But it does not work.Any examples. Perhaps with example xml file  Best Regards GerhardVon meinem iPad gesendet___MapServer-users mailing listMapServer-users@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/mapserver-users___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users