Re: [MapServer-users] WMS GetFeatureInfo default FEATURE COUNT

2024-05-03 Thread Rahkonen Jukka via MapServer-users
Hi,

In the WMS standard the FeatureCount parameter is defined to be optional, and 
the default is one.

"Number of features about which to return information (default=1)"

What you ask would be against the standard.

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Andrew Harfoot via MapServer-users
Lähetetty: perjantai 3. toukokuuta 2024 16.43
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] WMS GetFeatureInfo default FEATURE COUNT

Hi list,

In a WMS GetFeatureInfo request, if the client does not include the 
FEATURECOUNT parameter then MapServer appears to default to FEATURECOUNT=1. Is 
there any way to override this default in the server configuration?

Thanks,

Andy


___
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


Re: [MapServer-users] From OpenLayers to Mapfile

2024-04-04 Thread Rahkonen Jukka via MapServer-users
Hi,

See https://mapserver.org/cgi/runsub.html#basic-example.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
gorouter via MapServer-users
Lähetetty: torstai 4. huhtikuuta 2024 1.57
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] From OpenLayers to Mapfile

Hi.

Is it possible that, for example, the year is chosen by a user from the wms 
client and this value is used to generate the SQL query in the mapfile?

I am not sure if this is possible from openlayers and also if it is necessary 
to create a wms server with mapscript to capture parameters and regenerate the 
query in the DATA field.
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] CGI variable "map" fails to validate

2024-02-07 Thread Rahkonen Jukka via MapServer-users
Hi,

"." works for me.

I have a Windows env set first as
set MAPSERVER_CONFIG_FILE=\ms4w\ms4w.conf
These are the meaningful lines in the "ms4w.conf" file.
CONFIG
  ENV
   MS_MAP_PATTERN "."
  END
END

Test proves that validation is successful

http://localhost:8060/cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map
msLoadMap(): Unable to access file. (f:\IMS_Maps\Client\projectarea.map)

-Jukka Rahkonen-


-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Lernout, Matthew via MapServer-users
Lähetetty: keskiviikko 7. helmikuuta 2024 19.01
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] CGI variable "map" fails to validate

I've ensured I am restarting the mapserv process with each config change - a 
quick test of commenting out the MS_MAP_PATTERN variable confirmed that is 
enough to refresh the config via error.

Here's a snippet of a sample request. It works with my running instance of 
Mapserver 7.6.2 but doesn't pass validation (pattern '.') in MapServer 8.0.1.

/cgi-bin/mapserv.exe?map=f:\IMS_Maps\Client\projectarea.map

Matt

-Original Message-
From: Seth G 
Sent: Wednesday, February 7, 2024 11:48 AM
To: Lernout, Matthew ; MapServer Users 

Subject: Re: [MapServer-users] CGI variable "map" fails to validate

[You don't often get email from se...@geographika.co.uk. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

Hi Matthew,

The CONFIG file I think is only reloaded when IIS or the Application Pool is 
restarted, so some changes to the regex may have been ignored.
Do you have a sample request with the = parameter? Is there anything in a 
web.config file that could be stripping these out or modifying them?

Seth

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

On Wed, Feb 7, 2024, at 5:33 PM, Lernout, Matthew via MapServer-users wrote:
> MS_MAP_PATTERN '.' also results in the same failed validation error,
> which is what makes me think the issue may be with another config
> setting. '.' should match any input, right?
>
> Just to make sure my config file was being loaded, I commented out the
> MS_MAP_PATTERN entry entirely, and got the error "msCGILoadMap(): Web
> application error. Required configuration value MS_MAP_PATTERN not set."
>
> Matt
>
> -Original Message-
> From: MapServer-users  On
> Behalf Of Jörg Thomsen (WhereGroup) via MapServer-users
> Sent: Wednesday, February 7, 2024 3:24 AM
> To: mapserver-users@lists.osgeo.org
> Subject: Re: [MapServer-users] CGI variable "map" fails to validate
>
> [You don't often get email from mapserver-users@lists.osgeo.org. Learn
> why this is important at https://aka.ms/LearnAboutSenderIdentification
> ]
>
> Hi,
>
> I'm not sure whether the pattern is correct. Shouldn't ist start with ^?
>
> Have yout tried
> MS_MAP_PATTERN '.'? (not for production, just as a test)
>
> Jörg
>
> Am 06.02.24 um 20:12 schrieb Lernout, Matthew via MapServer-users:
>> Hi,
>>
>> Having trouble making requests since updating to 8.0.1 from 7.6.2.
>> Mapserver is running in IIS using FastCGI and the configuration steps
>> from:
>> https://maps/
>> erver.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40sta
>> n
>> tec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b4
>> d
>> 80281e7%7C0%7C0%7C638428910243090792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi
>> M
>> C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7
>> C
>> =dh%2BpgGwk5996f0GEMeX7O8rcv5J81TnPzeFNZ9XoVLs%3D=0
>> > server.org%2Finstallation%2Fiis.html=05%7C02%7Cmatt.lernout%40st
>> a
>> ntec.com%7C34322cf56ae745f61ae908dc27b617c5%7C413c6f2c219a469297d3f2b
>> 4
>> d80281e7%7C0%7C0%7C638428910243098246%7CUnknown%7CTWFpbGZsb3d8eyJWIjo
>> i
>> MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%
>> 7
>> C=OIoWHSlKZJrXWspqwVfY5jhX4lzBcQuI%2Bw5IeOVtXBA%3D=0>
>>
>> A new config file was added to the filesystem and server Environment
>> variables as per documented requirements added since 7.6.3, but
>> having trouble validating any map arguments. All requests return the
>> error "CGI variable "map" fails to validate" even though regexp
>> should pass based on expression tests.
>>
>> Here is the full config file in use:
>>
>> CONFIG
>>ENV
>>  MS_MAP_PATTERN "\.map$"
>>  PROJ_LIB "F:/MapServer/bin/proj7/SHARE"
>>  CURL_CA_BUNDLE "F:\MapServer\bin\curl\curl-ca-bundle.crt"
>>END
>>
>>
>>PLUGINS
>>  "mssql" "F:/MapServer/bin/ms/plugins/mssql2008/msplugin_mssql2008.dll"
>>  "oci" "F:/MapServer/bin/ms/plugins/oci/msplugin_oracle.dll"
>>END
>> END
>>
>> The current MS_MAP_PATTERN is just a simplified test to confirm 8.0.1
>> working before I update to the real regexp, and my understanding is
>> it should map anything that ends in .map? But every map argument I
>> throw in (including verified working arguments for 7.6.2) result in a
>> failure to validate. Are there other crucial configurations 

Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?

2024-02-06 Thread Rahkonen Jukka via MapServer-users
Hi,

If spatial index is needed depends on the data. It is certainly needed when the 
table is large (million features or so) and requests typically cover a small 
area. If for example 1000 features gets selected it means that the spatial 
index can filter out 999 thousand features. If the table is small like one 
thousand features, then it is not so expensive to read everything without 
spatial filter.

You are giving us little by little more information. I do not believe that the 
PostgreSQL 13 vs version 11 is the main thing at all. However, I do not have 
databases hosted on AWS and I can not make tests in the similar environment 
that you have.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Rob Dennett via MapServer-users
Lähetetty: tiistai 6. helmikuuta 2024 21.53
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in 
Postgres 11?

Both DBs are hosted on AWS Aurora.  The old one is serverless v1 and the new 
one is serverless v2.  We were thinking that perhaps the geom column for my 
table needed a spatial index even though the old db doesn't have one.  Is that 
possible?  Also, would it make sense that the same query run on both should 
take the same amount of time (roughly)?

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


Re: [MapServer-users] CGI variable "map" fails to validate

2024-02-06 Thread Rahkonen Jukka via MapServer-users
Hi,

This one that is slightly edited from the MS4W config file works for me

MS_MAP_PATTERN 
"^(C:)?\/ms4w_data\/((?!\.{2})[_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.(map))$"

I am not a regexp expert but it seems like a slash must be escaped with a 
backslash.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Lernout, Matthew via MapServer-users
Lähetetty: tiistai 6. helmikuuta 2024 21.13
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] CGI variable "map" fails to validate

Hi,

Having trouble making requests since updating to 8.0.1 from 7.6.2.
Mapserver is running in IIS using FastCGI and the configuration steps from: 
https://mapserver.org/installation/iis.html

A new config file was added to the filesystem and server Environment variables 
as per documented requirements added since 7.6.3, but having trouble validating 
any map arguments. All requests return the error "CGI variable "map" fails to 
validate" even though regexp should pass based on expression tests.

Here is the full config file in use:

CONFIG
  ENV
MS_MAP_PATTERN "\.map$"
PROJ_LIB "F:/MapServer/bin/proj7/SHARE"
CURL_CA_BUNDLE "F:\MapServer\bin\curl\curl-ca-bundle.crt"
  END

  PLUGINS
"mssql" "F:/MapServer/bin/ms/plugins/mssql2008/msplugin_mssql2008.dll"
"oci" "F:/MapServer/bin/ms/plugins/oci/msplugin_oracle.dll"
  END
END

The current MS_MAP_PATTERN is just a simplified test to confirm 8.0.1 working 
before I update to the real regexp, and my understanding is it should map 
anything that ends in .map? But every map argument I throw in (including 
verified working arguments for 7.6.2) result in a failure to validate. Are 
there other crucial configurations missing that are necessary to pass 
validation?

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


Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?

2024-02-06 Thread Rahkonen Jukka via MapServer-users
Hi,

I made a test with a PostGIS on my own laptop. My versions are:
"POSTGIS=""3.4.1 3.4.1"" [EXTENSION] PGSQL=""160"" GEOS=""3.12.1-CAPI-1.18.1"" 
SFCGAL=""SFCGAL 1.5.0, CGAL 5.6, BOOST 1.78.0"" PROJ=""8.2.1

The polygon layer has 215000 lake polygons. My BBOX select 73 polygons. It 
takes 66 milliseconds.
My query and the execution plan are as follows:

select * from jarvinemo
where "geom" &&
ST_GeomFromText(
'POLYGON (( 314728.6874003611 6936494.124854623, 314728.6874003611 
6946067.332484153, 327290.0638853506 6946067.332484153, 327290.0638853506 
6936494.124854623, 314728.6874003611 6936494.124854623 ))');

"Bitmap Heap Scan on jarvinemo  (cost=4.58..155.40 rows=39 width=588) (actual 
time=0.048..0.076 rows=73 loops=1)"
"  Recheck Cond: (geom && 
'0103000100050059E1E5BFA23513413F9EFD87EB755A4159E1E5BFA23513419D6B47D5447F5A414E296B41E8F913419D6B47D5447F5A414E296B41E8F913413F9EFD87EB755A4159E1E5BFA23513413F9EFD87EB755A41'::geometry)"
"  Heap Blocks: exact=64"
"  ->  Bitmap Index Scan on jarvinemo_geom_geom_idx  (cost=0.00..4.58 rows=39 
width=0) (actual time=0.039..0.039 rows=73 loops=1)"
"Index Cond: (geom && 
'0103000100050059E1E5BFA23513413F9EFD87EB755A4159E1E5BFA23513419D6B47D5447F5A414E296B41E8F913419D6B47D5447F5A414E296B41E8F913413F9EFD87EB755A4159E1E5BFA23513413F9EFD87EB755A41'::geometry)"
"Planning Time: 0.142 ms"
"Execution Time: 0.106 ms"

I can see that the bbox (POLYGON) in your query is big, something like 
1500-2500 kilometres wide, and covers almost the whole EXTENT of your data. 
That means that the spatial filter is ineffective because it does not filter 
out anything. Have a try with a small polygon as a filter and compare the 
execution plan with the one that my database makes. That helps you to find out 
if the spatial index kicks in at some time. Of course, that does not help when 
the map covers the whole area. Then all the data must be read. But spending 5 
seconds (the old db) or 15 seconds (the new db) for that as you have written 
before feels very slow. I wonder if the slowness comes from the connection to 
the database rather than from the database itself. It is some hosted database, 
cartodb perhaps by some logs that you have showed. Have you made any tests with 
a local db?

-Jukka Rahkonen-


Lähettäjä: MapServer-users  Puolesta 
Rob Dennett via MapServer-users
Lähetetty: tiistai 6. helmikuuta 2024 21.02
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in 
Postgres 11?


So, I ran explain analyze, and got different results when run against the old 
and new db.  I ran VACUUM on the table (which ran in less than ½ a second) and 
checked the query plans again.  They're now the same except for the time 
estimates and against the new db they're still much slower.

We ran across a StackExchange article about performance degradation after 
upgrading to postgres 13 and postgis 3.4 
(https://dba.stackexchange.com/questions/300292/why-is-my-spatial-query-slower-in-postgres-13-than-in-postgres-11)
  and they mention a change in the way postgis works, but since these queries 
are generated by mapserver, I am not sure what I can do on my end.  Is there a 
version of MapServer that's recommended for Postgres 13/PostGIS 3?
[https://cdn.sstatic.net/Sites/dba/Img/apple-touch-i...@2.png?v=246e2cb2439c]
Why is my spatial query slower in Postgres 13 than in Postgres 
11?
Postgres versions PostgreSQL 13.2 on x86_64-pc-linux-musl, compiled by gcc 
(Alpine 10.2.1_pre1) 10.2.1 20201203, 64-bit PostgreSQL 11.11 (Debian 
11.11-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled ...
dba.stackexchange.com



From: Travis Kirstine 
mailto:traviskirst...@gmail.com>>
Sent: Monday, February 5, 2024 10:50 AM
To: Rob Dennett mailto:rob.denn...@twdb.texas.gov>>
Cc: mapserver-users@lists.osgeo.org 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in 
Postgres 11?


External: Beware of links/attachments.

Not sure I understand the issue with the polygons.   The polygon value in the 
select statement will change based on the client's view extent, for example if 
the users moves the map a new request with a different polygon / bbox would be 
issued to mapserver and through to postgres. The EXTENT value defined in the 
mapfile defines the extent of the map or layer coverage.

I would try running EXPLAIN ANALYZE on the same query on both versions of 
Postgres and see what the differences are.

explain analyze select 

Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?

2024-02-04 Thread Rahkonen Jukka via MapServer-users
Hi,

See https://mapserver.org/input/vector/postgis.html, there is an example about 
how to define the SRID on the DATA line:
DATA "the_geom from the_database using unique gid using srid=4326"

The SRID value to use is the native SRID of the PostGIS table.
What Mapserver does here is that with “&&” operator it selects those features 
from the table which intersect with the reference geometry and because of that 
it needs to know the SRID of the table. The reference geometry (POLYGON) is 
either the BBOX of the request or the EXTENT used in the mapfile, I cannot say 
for sure with this information. I believe that find_srid is rather fast but it 
is good to include “using srid=” anyway. Adding “unique” for defining the 
primary key of the table cannot make any harm either.
You wrote “There are 8 select statements in each, but the statements aren't the 
same” and then you showed one of the statements. It would help to see also the 
other statement. But if the tables have the same data and the output from the 
new db is much larger, and there is no other filter in the SQL query than the 
&&, then I quess that the reference polygon of the latter case is bigger for 
some reason.

-Jukka Rahkonen-

Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Rob Dennett via MapServer-users
Lähetetty: maanantai 5. helmikuuta 2024 2.54
Vastaanottaja: 
mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in 
Postgres 11?

I don't think so.  These queries are generated somehow.  Here's what the 
PolygonSources layer looks like, and as you can see, the query I am specifying 
is just "geom from the_table_in_question":

  LAYER
NAME "PolygonSources"
CONNECTIONTYPE POSTGIS
CONNECTION "xx"
TYPE POLYGON
STATUS ON
DATA "geom FROM the_table_in_question"
UTFITEM   "cartodb_id"
UTFDATA   
"{\"cartodb_id\":\"[cartodb_id]\",\"sourceid\":\"[sourceid]\",\"name\":\"[name]\",\"sourcetype\":\"[sourcetype]\",\"drawingord\":\"[drawingord]\",\"featuretyp\":\"[featuretyp]\",\"isnew\":\"[isnew]\"}"
TEMPLATE WMSGetFeatureInfo
FILTERITEM "featuretyp"
CLASSITEM "sourceid"
FILTER "polygon"
CLASS
  NAME "polygon"
  EXPRESSION ([sourceid] != 169 AND [sourceid] != 412 AND [sourceid] != 820 
AND [sourceid] != 1067)
  STYLE
COLOR "#0B3A71B3"
OUTLINECOLOR  "#AFBFD0B3"
OUTLINEWIDTH1.5
  END
END
METADATA
  "wms_title" "Polygon Source Features"
  "wms_include_items" "all"
  "wms_abstract" "Layer of all polygon geometry sources."
  "wfs_title" "Polygon Source Features"
  "wfs_srs"   "EPSG:3857 EPSG:4326"
  "wfs_enable_request" "*"
  "wfs_abstract" "Layer of all polygon geometry sources."
  "gml_include_items" "all"
  "gml_featureid" "cartodb_id"
END
PROJECTION
  "init=epsg:3857"
END
PROCESSING "CLOSE_CONNECTION=DEFER"
  END

From: James Gardner mailto:j...@internode.on.net>>
Sent: Sunday, February 4, 2024 6:44 PM
To: Rob Dennett mailto:rob.denn...@twdb.texas.gov>>
Cc: Travis Kirstine 
mailto:traviskirst...@gmail.com>>; 
mapserver-users@lists.osgeo.org 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in 
Postgres 11?


External: Beware of links/attachments.

Could you try replacing find_srid with a hard coded srid... I found it had to 
run find_srid on every tuple...
-James Gardner

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


Re: [MapServer-users] getting incomplete parts of a geometry

2024-01-31 Thread Rahkonen Jukka via MapServer-users
Hi,

The client is making tiled requests like this:

https://ibm-test.containers.wur.nl/mapserver/?map=%2Fetc%2Fmapserver%2FFood_Forest.map=WMS=mapserver=WMS=1.3.0=GetMap=image%2Fpng=true=true=mapserver=Food_Forest_layers=Food_Forest=EPSG%3A3857_FORMAT=text%2Fhtml=256=256==664084.9017416127%2C6758256.292862143%2C664696.3979678941%2C6758867.789088425

This tile contains most part of the parcel. What might happen is that when the 
client is asking for the next tile to the left, then the BBOX is partially 
outside the EXTENT that you have configured for the layer. Maybe Mapserver 
considers that the request is off-site and does not render anything.
Make your extent bigger or comment it out altogether. Also check the extent at 
the MAP level. It should cover the whole area where you possibly have data.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Eloi Ribeiro via MapServer-users
Lähetetty: keskiviikko 31. tammikuuta 2024 21.33
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] getting incomplete parts of a geometry

Hi,

That I don't know, but I'll check tomorrow with my colleague that is doing the 
front-end.
The URL is https://ibm.wur.nl/ and the Basemap and the layer is Food_Forest.
Eloi


On Wednesday, January 31st, 2024 at 20:29, Rahkonen Jukka 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:

Hi,

How about the client, what is the BBOX that it is using in the WMS GetMap 
request that it creates?

-Jukka Rahkonen-

Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Eloi Ribeiro via MapServer-users
Lähetetty: keskiviikko 31. tammikuuta 2024 21.19
Vastaanottaja: 
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: Re: [MapServer-users] getting incomplete parts of a geometry

Hi Jukka,

Thanks for your email. I got the extent from the geometry it self. Like so:
  ogrinfo PG:"host=px port=5432 dbname=px user=px" ibm.food_forest 
-summary
  INFO: Open of `PG:host=px port=5432 dbname=px user=px'
using driver `PostgreSQL' successful.

  Layer name: ibm.food_forest
  Geometry: Polygon
  Feature Count: 1
  Extent: (194914.00, 420110.00) - (195152.00, 420307.00)
(...)


Eloi


On Wednesday, January 31st, 2024 at 19:58, Rahkonen Jukka 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

Does the rendered part perhaps match with the extent that you have configured 
for the layer "EXTENT 194914 420110 195152 420307"?

-Jukka Rahkonen-

Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Eloi Ribeiro via MapServer-users
Lähetetty: keskiviikko 31. tammikuuta 2024 19.27
Vastaanottaja: 
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: [MapServer-users] getting incomplete parts of a geometry

Hi all,

I'm using Mapserver 8.0 and I'm getting incomplete parts of a geometry, either 
if is TYPE LINE or POLYGON. Please, see pictures 
https://pasteboard.co/ToPTZ6OnjPaJ.png.
I wonder if I'm missing something in the mapfile. The LAYER part of the mapfile 
looks like this:

  LAYER
  TEMPLATE "X.tmpl"
  NAME "Food_Forest"
  STATUS ON
  TYPE LINE
  PROJECTION #source
"init=epsg:28992"
  END # PROJECTION
  CONNECTIONTYPE POSTGIS
  CONNECTION "host=X port=X dbname=X user=X password=X"
  DATA "geom FROM X.X USING UNIQUE X_id USING srid=28992"
  EXTENT 194914 420110 195152 420307
  PROCESSING "CLOSE_CONNECTION=DEFER"
  CLASS
NAME "Food_Forest"
STYLE
  COLOR 255 0 0
  OUTLINEWIDTH 1
END # STYLE
  END # CLASS
  END # LAYER

Thanks!

Cheers,
Eloi



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


Re: [MapServer-users] getting incomplete parts of a geometry

2024-01-31 Thread Rahkonen Jukka via MapServer-users
Hi,

How about the client, what is the BBOX that it is using in the WMS GetMap 
request that it creates?

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Eloi Ribeiro via MapServer-users
Lähetetty: keskiviikko 31. tammikuuta 2024 21.19
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] getting incomplete parts of a geometry

Hi Jukka,

Thanks for your email. I got the extent from the geometry it self. Like so:
  ogrinfo PG:"host=px port=5432 dbname=px user=px" ibm.food_forest 
-summary
  INFO: Open of `PG:host=px port=5432 dbname=px user=px'
using driver `PostgreSQL' successful.

  Layer name: ibm.food_forest
  Geometry: Polygon
  Feature Count: 1
  Extent: (194914.00, 420110.00) - (195152.00, 420307.00)
(...)


Eloi


On Wednesday, January 31st, 2024 at 19:58, Rahkonen Jukka 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:

Hi,

Does the rendered part perhaps match with the extent that you have configured 
for the layer "EXTENT 194914 420110 195152 420307"?

-Jukka Rahkonen-

Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Eloi Ribeiro via MapServer-users
Lähetetty: keskiviikko 31. tammikuuta 2024 19.27
Vastaanottaja: 
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: [MapServer-users] getting incomplete parts of a geometry

Hi all,

I'm using Mapserver 8.0 and I'm getting incomplete parts of a geometry, either 
if is TYPE LINE or POLYGON. Please, see pictures 
https://pasteboard.co/ToPTZ6OnjPaJ.png.
I wonder if I'm missing something in the mapfile. The LAYER part of the mapfile 
looks like this:

  LAYER
  TEMPLATE "X.tmpl"
  NAME "Food_Forest"
  STATUS ON
  TYPE LINE
  PROJECTION #source
"init=epsg:28992"
  END # PROJECTION
  CONNECTIONTYPE POSTGIS
  CONNECTION "host=X port=X dbname=X user=X password=X"
  DATA "geom FROM X.X USING UNIQUE X_id USING srid=28992"
  EXTENT 194914 420110 195152 420307
  PROCESSING "CLOSE_CONNECTION=DEFER"
  CLASS
NAME "Food_Forest"
STYLE
  COLOR 255 0 0
  OUTLINEWIDTH 1
END # STYLE
  END # CLASS
  END # LAYER

Thanks!

Cheers,
Eloi


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


Re: [MapServer-users] getting incomplete parts of a geometry

2024-01-31 Thread Rahkonen Jukka via MapServer-users
Hi,

Does the rendered part perhaps match with the extent that you have configured 
for the layer "EXTENT 194914 420110 195152 420307"?

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Eloi Ribeiro via MapServer-users
Lähetetty: keskiviikko 31. tammikuuta 2024 19.27
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] getting incomplete parts of a geometry

Hi all,

I'm using Mapserver 8.0 and I'm getting incomplete parts of a geometry, either 
if is TYPE LINE or POLYGON. Please, see pictures 
https://pasteboard.co/ToPTZ6OnjPaJ.png.
I wonder if I'm missing something in the mapfile. The LAYER part of the mapfile 
looks like this:

  LAYER
  TEMPLATE "X.tmpl"
  NAME "Food_Forest"
  STATUS ON
  TYPE LINE
  PROJECTION #source
"init=epsg:28992"
  END # PROJECTION
  CONNECTIONTYPE POSTGIS
  CONNECTION "host=X port=X dbname=X user=X password=X"
  DATA "geom FROM X.X USING UNIQUE X_id USING srid=28992"
  EXTENT 194914 420110 195152 420307
  PROCESSING "CLOSE_CONNECTION=DEFER"
  CLASS
NAME "Food_Forest"
STYLE
  COLOR 255 0 0
  OUTLINEWIDTH 1
END # STYLE
  END # CLASS
  END # LAYER

Thanks!

Cheers,
Eloi

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


Re: [MapServer-users] Speeding up msDrawMap() for shapefiles

2023-12-08 Thread Rahkonen Jukka via MapServer-users
Hi,

You should test the same shapefiles locally for understanding where the time 
gets spent. Normal time with simple styles is perhaps up to 300 ms. The 
optimization hints were written long before there were S3 or Amazon (the 
company).
Unfortunately I don't know how to optimize access to S3.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Matthew Graber via MapServer-users
Lähetetty: perjantai 8. joulukuuta 2023 21.47
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] Speeding up msDrawMap() for shapefiles

Hi,

I'm trying to speed up the time required for msDrawMap() to execute for 
rendering shapefiles. Currently, according to the mapserver logs, it's taking 
2.5-3.5 seconds, sometimes up to 5 seconds for it to execute:

[Wed Dec  6 18:43:47 2023].699791 CGI Request 53 on process 2641
[Wed Dec  6 18:43:47 2023].717216 msDrawMap(): rendering using outputformat 
named png (AGG/PNG).
[Wed Dec  6 18:43:52 2023].299580 msDrawMap(): Layer 1010 (Shapefile_Layer), 
4.582s
[Wed Dec  6 18:43:52 2023].299792 msDrawMap(): Drawing Label Cache, 0.000s
[Wed Dec  6 18:43:52 2023].299803 msDrawMap() total time: 4.584s
[Wed Dec  6 18:43:52 2023].310853 msSaveImage(stdout) total time: 0.011s
[Wed Dec  6 18:43:52 2023].310883 mapserv request processing time (msLoadMap 
not incl.): 4.611s

The mapfile is currently set up using "CONNECTIONTYPE OGR" and "CONNECTION" to 
access the shapefiles from an S3 bucket as follows:

CONNECTIONTYPE OGR
CONNECTION'/vsis3/s3_bucket_path/my_shapefile%.shp'

I noticed at https://mapserver.org/input/vector/shapefiles.html that it says 
"Shapefile access is built directly into MapServer. It is also available 
through OGR, but direct access without OGR is recommended and discussed here."
So I tried removing "CONNECTIONTYPE OGR" and changing "CONNECTION" to "DATA" as 
follows:

 DATA'/vsis3/s3_bucket_path/my_shapefile%.shp'

I haven't been able to observe any definitive speed improvements by doing this 
yet, although I can't say for sure that there aren't any.

Based on https://mapserver.org/optimization/vector.html, I also tried using the 
shptree command to create a spatial index and the coshp command to sort the 
shapefile and index. Even after doing that, I still see load msDrawMap() times 
of up to 5 seconds.

Does anyone know of any other optimizations that could be made here? Or if not, 
would using shptree and coshp on the shapefile and then accessing it in the 
mapfile using "DATA" to take it from S3 be the optimal way to set things up?

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


Re: [MapServer-users] multiple shapepaths

2023-12-06 Thread Rahkonen Jukka via MapServer-users
Hi,

Or write the DATA with full-path into an INCLUDE file if there are loads of 
mapfiles using the same paths. Then there would be much less editing when the 
paths change.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Lime, Steve D (MNIT) via MapServer-users
Lähetetty: keskiviikko 6. joulukuuta 2023 21.59
Vastaanottaja: j.l.h.hartm...@gmail.com; Steve Lime 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] multiple shapepaths

IMHO, if you do a SHAPEPATH at the layer level then you might as well just add 
the full-path to the DATA element. You’re not really gaining anything with the 
additional complexity. Did the idea of using runtime variables not pan out?

From: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 On Behalf Of Jan Hartmann via MapServer-users
Sent: Wednesday, December 6, 2023 1:14 AM
To: Steve Lime mailto:sdl...@gmail.com>>
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [MapServer-users] multiple shapepaths

How about a shapepath at the layer level? I am combining 20 years of working 
with old maps in three (or four :-)) different countries (Netherlands, Germany 
and Flemish and Walloon Belgium), all in their own formats, projections, 
directories an servers. It would help to keep my applications (and my mind) 
clear if I could use the appropriate shapepaths. And as to portability, it is 
essential to use relative paths. Just try to move a website to a new server 
with a differently named filesystem, if all paths are hard coded.

Jan

Op 5 dec 2023 om 15:43 heeft Steve Lime 
mailto:sdl...@gmail.com>> het volgende geschreven:

It won’t work. A configuration is loaded in entirety first, and then applied as 
necessary.

On Tue, Dec 5, 2023 at 7:21 AM Jan Hartmann via MapServer-users 
mailto:mapserver-users@lists.osgeo.org>> wrote:
Not sure. I cannot get it working anyway. Any ideas, Steve?

On 04/12/2023 10:10, Jörg Thomsen (WhereGroup) via MapServer-users wrote:
> Hi,
>
> I am not sure, but perhaps overwriting it, would work?
>
> MAP
>
>   shapepath 'blah'
>
>   Layer 1
>   Layer 2
>
>   shapepath 'blubb'
>
>   Layer 3
>   Layer 4
>
> Jörg
>
>
>
> Am 02.12.23 um 19:32 schrieb Jan Hartmann via MapServer-users:
>> Yes, that is what I sought, didn't know it was possible. Thanks!
>>
>> Jan
>>
>> On 02/12/2023 19:29, Steve Lime wrote:
>>> One other thought, you can use multiple paths via runtime subs to
>>> approximate what I think you’re looking for, so:
>>>
>>> WEB
>>>   VALIDATION
>>> path1_default “/opt/path1”
>>> path1 “^\/opt\/path1$”
>>>   path2_default “/opt/path2”
>>>   path2 “^\/opt\/path2$”
>>>   END
>>> END
>>>
>>> Then in DATA values you’d use %path1% or %path2%. This is another
>>> use case for variables that was suggested recently. We could,
>>> perhaps, define a way to mark something as immutable via url so the
>>> regex could be simplified and only the default would ever be used
>>> (e.g. “path2” “immutable”).
>>>
>>> —Steve
>>>
>>> On Fri, Dec 1, 2023 at 11:28 PM Steve Lime 
>>> mailto:sdl...@gmail.com>> wrote:
>>>
>>> Nope, just the one value.
>>>
>>> On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users
>>> 
>>> mailto:mapserver-users@lists.osgeo.org>> 
>>> wrote:
>>>
>>> Hi,
>>>
>>> Is it possible to use multiple paths in a shapepath?
>>> ./data1:./data2
>>> does not work
>>>
>>> Jan
>>> ___
>>> 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 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


Re: [MapServer-users] Variables in mapfile

2023-11-17 Thread Rahkonen Jukka via MapServer-users
Hi,

That is an old but still relevant idea 
https://github.com/MapServer/MapServer/issues/408.
For your use case it could be enough to store the connection into a text file 
and read it with INCLUDE https://mapserver.org/mapfile/include.html.

 -Jukka Rahkonen-


-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Andrzej Kepys via MapServer-users
Lähetetty: perjantai 17. marraskuuta 2023 13.44
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] Variables in mapfile

Hi All

I'm trying to deploy mapserver on kubernetes cluster, to keep development 
separation I'm using few environments, for every of them I've got separated 
database as a source for the layers. Connection parameters 
(host/port/user/pass) are common for all solution and stored in configmaps.

I'm looking for an option to use this enviromental variables from configmaps in 
mapfile, like:

   MAP
 LAYER
 NAME "ECA"
 STATUS ON
 TYPE POLYGON
 CONNECTIONTYPE POSTGIS
 CONNECTION "host=%PGHOST% dbname=%PGDATABASE% user=%PGUSER% 
password=%PGPASSWORD% port=%PGPORT%"
 DATA "wkb from (select * from mapserver.special_areas_system where 
type_id = 1) as subquery using unique id"
 CLASS
 STYLE
 COLOR "#ff960040"
 OUTLINECOLOR "#ff9600ff"
 END
 END
 END

Is it possible? Or if not - how to deal with such case?

Thanks in advance.

Andy

--
Pozdrawiam
Andrzej Kępys
skype: jedrus305
tel: 605 997 440

___
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] Who remembers the truth about antialiasing?

2023-11-15 Thread Rahkonen Jukka via MapServer-users
Hi,

When Mapserver started to use AGG renderer everybody thought that antialiasing 
is not only the strength of the library but also the only way AGG can render. 
See https://mapserver.org/output/agg.html and 
https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html.
But then some Mapserver users noticed that AGG (and Mapnik) can also do aliased 
rendering at least for lines. Discussion on the mailing list 
https://lists.osgeo.org/pipermail/mapserver-users/2017-October/080278.html 
yielded a GitHub issue https://github.com/MapServer/MapServer/issues/5508 and a 
commit 
https://github.com/erik-h11/mapserver/commit/9ca99e763738fba7acaea6089afb5b5b7cd6e699.

However, the Mapserver documentation is unclear 
https://mapserver.org/mapfile/style.html#mapfile-style-antialias. I understand 
it so that setting antialias has not been functional since 7.0, and in 8.0 the 
whole keyword was removed.

"ANTIALIAS [true|false]
Removed in version 8.0: GD support was removed in 7.0 (and this mapfile 
parameter was removed in 8.0)
Should antialiasing be applied to the style. For line rendering only. Default 
is false."

My conclusions at the moment are:

  *   ANTIALIAS true|false does work in STYLE. It affects only lines, but 
polygon outlines are also lines. The default is TRUE.
  *   ANTIALIAS does not have an effect in other places: LABEL and SYMBOL. They 
are always antialiased.

If that is correct I may have a try with improving the documentation.

I started to experiment with antialias because I was not very satisfied with a 
very simple map that has only lines and labels. For my mind the lines on that 
map look better without antialiasing. Unfortunately I could not do anything for 
the labels. Especially dashes turn out light grey and blurry. The font is 
truetype, Vera, and the text color in the mapfile is pure black. All hints for 
making labels sharper are welcome.
[cid:image001.png@01DA1805.A8C0ED50]

-Jukka Rahkonen-



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


Re: [MapServer-users] Well-know SLD symbols

2023-11-15 Thread Rahkonen Jukka via MapServer-users
Hi,

Thank you. The SLD definitions in the standard are given in a literal form:

“The WellKnownName element gives the well-known name of the shape of the mark.
Allowed values include at least “square”, “circle”, “triangle”, “star”, “cross”,
and “x”, though map servers may draw a different symbol instead if they don't 
have a
shape for all of these.  The default WellKnownName is “square”.”

Arrow is not on the list, I think that I copied it from the Geoserver docs. If 
arrow was on the list and if your symbol looks like an arrow then it would 
match the SLD definition for sure.

-Jukka Rahkonen-

Lähettäjä: TC Haddad 
Lähetetty: keskiviikko 15. marraskuuta 2023 13.40
Vastaanottaja: Rahkonen Jukka 
Kopio: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [MapServer-users] Well-know SLD symbols


Hi Jukka,

Here are some that I have, hopefully they work for what you are looking for, I 
never compared to the SLD so I don't know if they match SLD definitions. The 
arrow for example may not.

Tanya

-fwd >>

Symbol
Name 'square'
Type VECTOR
FILLED TRUE
Points
0 1
0 0
1 0
1 1
0 1
END
END

Symbol
Name 'x'
Type VECTOR
Points
0 0
1 1
-99 -99
0 1
1 0
END
END

SYMBOL
  NAME "arrow"
  TYPE vector
  FILLED true
  POINTS
0 0.4
3 0.4
3 0
5 0.8
3 1.6
3 1.2
0 1.2
0 0.4
  END # POINTS
  ANCHORPOINT 0 0.5
END # SYMBOL

On Wed, Nov 15, 2023 at 2:33 AM Rahkonen Jukka via MapServer-users 
mailto:mapserver-users@lists.osgeo.org>> wrote:
Hi,

The SDL standard defines some well-known symbols: circle, square, triangle, 
arrow, cross, star, and x. Can I find somewhere the mapfile versions of these 
symbols? I found circle and star from GitHub 
https://github.com/MapServer/MapServer/blob/2b263e96d1b44fb74caf20581256c71419da802c/msautotest/sld/data/symbols.map.include#L11
and I also found code that probably generates the well-know symbols 
https://github.com/MapServer/MapServer/blob/2b263e96d1b44fb74caf20581256c71419da802c/src/mapogcsld.cpp#L48
 but that code is rather useless for me.

Triangle and cross can be found here 
https://mapserver.org/mapfile/symbology/examples.html If somebody has 
ready-made square,  arrow, and x and is willing to share them I would be 
grateful.

-Jukka Rahkonen-
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org<mailto: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] Well-know SLD symbols

2023-11-15 Thread Rahkonen Jukka via MapServer-users
Hi,

The SDL standard defines some well-known symbols: circle, square, triangle, 
arrow, cross, star, and x. Can I find somewhere the mapfile versions of these 
symbols? I found circle and star from GitHub 
https://github.com/MapServer/MapServer/blob/2b263e96d1b44fb74caf20581256c71419da802c/msautotest/sld/data/symbols.map.include#L11
and I also found code that probably generates the well-know symbols 
https://github.com/MapServer/MapServer/blob/2b263e96d1b44fb74caf20581256c71419da802c/src/mapogcsld.cpp#L48
 but that code is rather useless for me.

Triangle and cross can be found here 
https://mapserver.org/mapfile/symbology/examples.html If somebody has 
ready-made square,  arrow, and x and is willing to share them I would be 
grateful.

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


Re: [MapServer-users] How to cascade data from OGC API Features service?

2023-11-14 Thread Rahkonen Jukka via MapServer-users
Hi,

MS4W 5.0.0 RC1 contains GDAL version that does not include this enhancement 
https://github.com/OSGeo/gdal/issues/8522.
It means that my Mapserver was reading OGCFeat only 10 features at a time. That 
gives all too bad impression about the speed of the OGCFeat source. The VRT 
below works also with older GDAL versions, it is reading a thousand times 
bigger pages, it is faster, and it does not bloat our server logs. A hint for 
debuggers: the document 
https://mapserver.org/optimization/debugging.html#table-of-contentseven is not 
totally accurate. Even when MS_ERRORFILE is set, some debug data, including the 
outgoing http requests, go to the Apache error_log.




OAPIF:https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/
building

1
  



-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Rahkonen Jukka via MapServer-users
Lähetetty: tiistai 14. marraskuuta 2023 10.09
Vastaanottaja: Richard Greenwood 
Kopio: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [MapServer-users] How to cascade data from OGC API Features service?

Hi,

Oh yes, it was a typo. As a user who tries to be standard compliant I had 
upgraded the name in one place to match with the OGC approved abbreviation 
“OGCFeat” instead of the GDAL driver name “OAPIF”.

The MAXSCALEDENOM value 6 (naturally copy-pasted from some old mapfile) is 
all too large for that service in areas with lots of buildings. Scale 1:5000 is 
probably safe everywhere. A EPSG:3067 bbox for testing:
BBOX=390723,6671479,392177,6672231

Positive thing is that now also other Mapserver users know that it is possible 
to use OGCFeat services as source data with OGR connection. Thanks to you and 
TC Haddad who also found the typo.

-Jukka Rahkonen-

Lähettäjä: Richard Greenwood 
mailto:richard.greenw...@gmail.com>>
Lähetetty: tiistai 14. marraskuuta 2023 5.38
Vastaanottaja: Rahkonen Jukka 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
Kopio: Mapserver-Users 
(mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>) 
mailto:mapserver-users@lists.osgeo.org>>
Aihe: Re: [MapServer-users] How to cascade data from OGC API Features service?

Are you sure that you don't just have a typo? Your file is named "ogcfeat.vrt" 
but your CONNECTION "c:/ms4w_data/oapif.vrt"

I set up a quick test and I haven't gotten a map (it timed out 504 error after 
several minutes) but I didn't get an error. Maybe you could share a smaller 
test data set and a reasonable bounding box. My test:
http://localhost/cgi-bin/mapserv?map=MAP_TEST=GetMap=WMS=1.3.0=building=696=870=EPSG:3067=-359700,6615190,-359500,6615199=png

On Mon, Nov 13, 2023 at 2:48 PM Rahkonen Jukka via MapServer-users 
mailto:mapserver-users@lists.osgeo.org>> wrote:
Hi,

I tried to make a WMS layer from OGC API Features service but I did not 
success. This is my best trial so far:

I am using Mapserver from MS4W 5.0.0 RC1
I wrote this ORG VRT file (ogcfeat.vrt)




OAPIF:https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/
building



The GDAL included in MS4W reads the vrt OK with
ogrinfo ogcfeat.vrt -al -so --debug on
(there are 5 millions polygons so hit Ctrl-C if you are just testing)

I wrote a layer that can be at the bottom of this message below.  The WMS 
GetCapabilities show the new layer but GetMaps fail. The log file collects 
these errors

msDrawMap(): Image handling error. Failed to draw layer named 'building'.
msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `building'. 
 File not found or unsupported format. Check server logs.
Open failed for OGR connection in layer `building'.

Am I missing something from my configuration? My LAYER is like this

LAYER
NAME "building"
STATUS ON
CONNECTIONTYPE OGR
  CONNECTION "c:/ms4w_data/oapif.vrt"
DATA "building"
TYPE POLYGON
#DEBUG 5
UNITS METERS
SIZEUNITS PIXELS
   MAXSCALEDENOM  6
   TOLERANCE 3
TOLERANCEUNITS PIXELS
METADATA
"wms_title" "OGCFeat-building"
"wms_include_items" "all"
END #metadata
PROJECTION
"init=epsg:3067"   ##recommended
  END
  CLASS
NAME "building"
STYLE
  COLOR 200 255 200
  OUTLINECOLOR 120 120 120
END # Style
END # Class
TEMPLATE "empty" ##recommended (enable GetFeatureInfo / can point to valid 
.html template)

 END # Layer
-Jukka Rahkonen-
___
MapServer-users mailing list
MapS

Re: [MapServer-users] How to cascade data from OGC API Features service?

2023-11-14 Thread Rahkonen Jukka via MapServer-users
Hi,

Oh yes, it was a typo. As a user who tries to be standard compliant I had 
upgraded the name in one place to match with the OGC approved abbreviation 
“OGCFeat” instead of the GDAL driver name “OAPIF”.

The MAXSCALEDENOM value 6 (naturally copy-pasted from some old mapfile) is 
all too large for that service in areas with lots of buildings. Scale 1:5000 is 
probably safe everywhere. A EPSG:3067 bbox for testing:
BBOX=390723,6671479,392177,6672231

Positive thing is that now also other Mapserver users know that it is possible 
to use OGCFeat services as source data with OGR connection. Thanks to you and 
TC Haddad who also found the typo.

-Jukka Rahkonen-

Lähettäjä: Richard Greenwood 
Lähetetty: tiistai 14. marraskuuta 2023 5.38
Vastaanottaja: Rahkonen Jukka 
Kopio: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [MapServer-users] How to cascade data from OGC API Features service?

Are you sure that you don't just have a typo? Your file is named "ogcfeat.vrt" 
but your CONNECTION "c:/ms4w_data/oapif.vrt"

I set up a quick test and I haven't gotten a map (it timed out 504 error after 
several minutes) but I didn't get an error. Maybe you could share a smaller 
test data set and a reasonable bounding box. My test:
http://localhost/cgi-bin/mapserv?map=MAP_TEST=GetMap=WMS=1.3.0=building=696=870=EPSG:3067=-359700,6615190,-359500,6615199=png

On Mon, Nov 13, 2023 at 2:48 PM Rahkonen Jukka via MapServer-users 
mailto:mapserver-users@lists.osgeo.org>> wrote:
Hi,

I tried to make a WMS layer from OGC API Features service but I did not 
success. This is my best trial so far:

I am using Mapserver from MS4W 5.0.0 RC1
I wrote this ORG VRT file (ogcfeat.vrt)




OAPIF:https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/
building



The GDAL included in MS4W reads the vrt OK with
ogrinfo ogcfeat.vrt -al -so --debug on
(there are 5 millions polygons so hit Ctrl-C if you are just testing)

I wrote a layer that can be at the bottom of this message below.  The WMS 
GetCapabilities show the new layer but GetMaps fail. The log file collects 
these errors

msDrawMap(): Image handling error. Failed to draw layer named 'building'.
msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `building'. 
 File not found or unsupported format. Check server logs.
Open failed for OGR connection in layer `building'.

Am I missing something from my configuration? My LAYER is like this

LAYER
NAME "building"
STATUS ON
CONNECTIONTYPE OGR
  CONNECTION "c:/ms4w_data/oapif.vrt"
DATA "building"
TYPE POLYGON
#DEBUG 5
UNITS METERS
SIZEUNITS PIXELS
   MAXSCALEDENOM  6
   TOLERANCE 3
TOLERANCEUNITS PIXELS
METADATA
"wms_title" "OGCFeat-building"
"wms_include_items" "all"
END #metadata
PROJECTION
"init=epsg:3067"   ##recommended
  END
  CLASS
NAME "building"
STYLE
  COLOR 200 255 200
  OUTLINECOLOR 120 120 120
END # Style
END # Class
TEMPLATE "empty" ##recommended (enable GetFeatureInfo / can point to valid 
.html template)

 END # Layer
-Jukka Rahkonen-
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org<mailto:MapServer-users@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users


--
Richard W. Greenwood
www.greenwoodmap.com<http://www.greenwoodmap.com/>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[MapServer-users] How to cascade data from OGC API Features service?

2023-11-13 Thread Rahkonen Jukka via MapServer-users
Hi,

I tried to make a WMS layer from OGC API Features service but I did not 
success. This is my best trial so far:

I am using Mapserver from MS4W 5.0.0 RC1
I wrote this ORG VRT file (ogcfeat.vrt)




OAPIF:https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/
building



The GDAL included in MS4W reads the vrt OK with
ogrinfo ogcfeat.vrt -al -so --debug on
(there are 5 millions polygons so hit Ctrl-C if you are just testing)

I wrote a layer that can be at the bottom of this message below.  The WMS 
GetCapabilities show the new layer but GetMaps fail. The log file collects 
these errors

msDrawMap(): Image handling error. Failed to draw layer named 'building'.
msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `building'. 
 File not found or unsupported format. Check server logs.
Open failed for OGR connection in layer `building'.

Am I missing something from my configuration? My LAYER is like this

LAYER
NAME "building"
STATUS ON
CONNECTIONTYPE OGR
  CONNECTION "c:/ms4w_data/oapif.vrt"
DATA "building"
TYPE POLYGON
#DEBUG 5
UNITS METERS
SIZEUNITS PIXELS
   MAXSCALEDENOM  6
   TOLERANCE 3
TOLERANCEUNITS PIXELS
METADATA
"wms_title" "OGCFeat-building"
"wms_include_items" "all"
END #metadata
PROJECTION
"init=epsg:3067"   ##recommended
  END
  CLASS
NAME "building"
STYLE
  COLOR 200 255 200
  OUTLINECOLOR 120 120 120
END # Style
END # Class
TEMPLATE "empty" ##recommended (enable GetFeatureInfo / can point to valid 
.html template)

 END # Layer

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


Re: [MapServer-users] WMS with Raster Images and time Dimension

2023-11-09 Thread Rahkonen Jukka via MapServer-users
Hi,

I would read first this https://www.mapserver.org/ogc/wms_time.html.
But if you have only two alternatives midday/tomorrow then simply having two 
layers could be an option. Or use runtime substitution 
https://mapserver.org/cgi/runsub.html.
Define LAYER – DATA like
DATA "%img_time%.tif "

write the validation block and then make the WMS client to add a new parameter
…=GetMap_time=midday

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
G. Völkl via MapServer-users
Lähetetty: torstai 9. marraskuuta 2023 10.35
Vastaanottaja: MapServer-users@lists.osgeo.org
Aihe: [MapServer-users] WMS with Raster Images and time Dimension

Hi,

I want to create a WMs Service that consists of two raster files. The 
tomorrow.tif file shows the city in the morning. The file midday.tif the city 
at midday. The corresponding image should be able to be queried using the time 
parameter. Any examples with Raster images and time demension?


Best regards Gerhard





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


Re: [MapServer-users] Google maps XYZ service as a layer data source?

2023-10-16 Thread Rahkonen Jukka via MapServer-users
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

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


Re: [MapServer-users] Cluster with Oracle Spatial data

2023-10-16 Thread Rahkonen Jukka via MapServer-users
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@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@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@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@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@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@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


Re: [MapServer-users] Cluster with Oracle Spatial data

2023-10-13 Thread Rahkonen Jukka via MapServer-users
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@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@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@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@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Cluster with Oracle Spatial data

2023-10-12 Thread Rahkonen Jukka via MapServer-users
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@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@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] How to get a WMS GetFeatureInfo response with MapServer in JSON format ?

2023-09-14 Thread Rahkonen Jukka
Hi,

To those who try to help, please have a look at the same question in 
gis.stackexchange 
https://gis.stackexchange.com/questions/466896/how-to-get-a-wms-getfeatureinfo-response-with-mapserver-in-json-format/466920?
There is an answer that gives half an answer, but a remaining problem is how to 
insert raster layer attributes into a JSON template.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Julien Hubert
Lähetetty: torstai 14. syyskuuta 2023 11.26
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] How to get a WMS GetFeatureInfo response with MapServer 
in JSON format ?

Hi,
I use Mapserver with the Leaflet JS library and I want to display some 
attributes informations by clicking on the map.
Therefore I use the GetFeatureInfo WMS request in order to return these 
informations.
I managed to get the infos with the text/html format but I'd like to get a JSON 
response back in my browser, e.g :
{
"value": [value_0], // I must precise I use GetFeatureInfo on a raster
}

So I changed the wms_get_feature_info_formalist in the METADATA bloc of my 
mapfile :
"wms_getfeatureinfo_formatlist" "application/json"

Then, I edited my template as following to return the value of the pixel :

[value_0]

My GetFeatureInfo request is the one (see "application/json" specified in the 
INFO_FORMAT parameter)

http://IP/cgi-bin/mapserv?map=/var/www/html/mapfiles/test1.map=WMS=1.1.1=GetFeatureInfo=465348.6282001531,5431156.607774916,697564.3201305186,5503160.28841955=EPSG:3857=1519=471=layer1==image/png=true_LAYERS=layer1_FORMAT=application/json=766=261

But when I try the GetFeatureInfo request, my browser returns nothing (whereas 
it works with the text/html) and it downloads a file called "mapserv" with 
nothing inside :
[enter image description here]

I must explain I don't want to download a GeoJSON file but to return the 
content of a JSON response in my browser.
Do you know how I could get my JSON response ? Is it possible to make it work ?
Any help would be greatly appreciated, thanks !

--
Julien H
Back-end developper
Forum des Marais Atlantiques
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Speed of WMS vs Speed of WCS; How to speed up WCS service?

2023-07-27 Thread Rahkonen Jukka
Hi,

Mapserver is not clever at all when it finds many overlapping images. It 
renders them all one by one. If the list of images is sorted correctly then the 
end result is what was desired, but with all too much work. See 
https://github.com/MapServer/MapServer/issues/5899.
We use two tricks:
1) We have computed the time range of validity for each image and we save the 
start data and end date into two attributes in the tileindex table in a 
database. Start date is the acquisition date of the image, and end date is the 
date when the last pixel of the image gets covered by some newer image. If the 
requested time is not within the range of validity then the image is skipped. 
Skipping is based on the SQL query that is used as DATA for the tileindex layer.
2) Because time is not supported as a dimension we have written a small utility 
that is manipulating the incoming http GetCoverage requests before they are 
sent to Mapserver. The utility converts the time subset, for example 
SUBSET=time("2012-12-31T02:00:00Z") into something like 
"_date<2012-12-31T02:00:00Z_date>2012-12-31T02:00:00Z. The start_date 
and end_date variables are defined and validated in the mapfile.

As a result Mapserver usually does not get overlapping images from the 
tileindex so it does not need to spend time for multiple rendering either. We 
have typically about 10 aerial photos from different times at each place and 
without the above mentioned tweaks the service was all too slow.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: torstai 27. heinäkuuta 2023 12.26
Vastaanottaja: MapServer Users 
Aihe: Re: [MapServer-users] Speed of WMS vs Speed of WCS; How to speed up WCS 
service?

Hello Jukka,

Yup I guess that's the case, I assumed that WCS has the same capabilities as 
WMS when it comes to handling time dimension and it would use the default time 
from mapfile while requesting the data.
This is my mapserv log file from one getCoverage request (very small, that's 
why It took only 30 sec to process it). It would be great if you check it :
https://s3.waw3-1.cloudferro.com/swift/v1/Julien/log2.txt

as you can see mapserver lists all of tile item objects (or at least I guess it 
does haha) which intersect with requested BBOX. So, this is the problem, that's 
why it takes so long to generate file. I've got to pass somehow time parameter 
to request, or at least to query(?) to reduce number of returning shapes.

You mentioned your own supporting time WCS service, is it open source? If not, 
can you give me advice on how to start writing my own? Just some basics ^^

Thanks for your complex answer it helped a lot,
Marcin


____
From: Rahkonen Jukka 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
Sent: Thursday, July 27, 2023 12:05 AM
To: Marcin Niemyjski 
mailto:mniemyj...@cloudferro.com>>; MapServer Users 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: [MapServer-users] Speed of WMS vs Speed of WCS; How to speed up 
WCS service?


Hi,



Does the tileindex query ” DATA 'geometry from (select * from plua order by 
"maxCC" desc) “ return several images from the requested BBOX?



I know that MapServer WCS can be fast and we have also a demo at 
https://beta-karttakuva.maanmittauslaitos.fi/demo/ortokuvat_ja_korkeusmallit/#15.05/67.01553/27.16873

but unfortunately the user interface is only in Finnish. The source images 
(maybe 10 TB or so) are GeoTIFFs and they are not in the cloud. The time for 
downloading a small GetCoverage response as GeoTIFF seems to take around 400 
milliseconds. We had to write a small service that makes our WCS service to 
support time as a dimension because MapServer does not support it with WCS 
https://www.mail-archive.com/mapserver-users@lists.osgeo.org/msg26265.html.



-Jukka Rahkonen-





Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Marcin Niemyjski via MapServer-users
Lähetetty: keskiviikko 26. heinäkuuta 2023 15.06
Vastaanottaja: MapServer Users 
mailto:mapserver-users@lists.osgeo.org>>
Aihe: Re: [MapServer-users] Speed of WMS vs Speed of WCS; How to speed up WCS 
service?



Hi Seth,



as you suggested, I've added the Extent parameter to all of my layers, and it 
resulted in decreasing time to 5m33.534s. But still, it's quite a lot of time 
for generating 1.5 MiB file.



Any other suggestions?
Maybe there is something wrong with projection so beyond just serving data 
mapserver have to reproject it multiple times? (more than one time by using 
tilesrs option)?



Thanks,

Marcin





From: Seth G mailto:se...@geographika.co.uk>>
Sent: Wednesday, July 26, 2023 12:58 PM
To: Marcin Niemyjski 
mailto:mniemyj...@cloudferro.com>>; MapServer Users 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: [MapServer-users] Speed of WMS vs Speed of WCS; How to speed up

Re: [MapServer-users] Speed of WMS vs Speed of WCS; How to speed up WCS service?

2023-07-26 Thread Rahkonen Jukka
Hi,

Does the tileindex query " DATA 'geometry from (select * from plua order by 
"maxCC" desc) " return several images from the requested BBOX?

I know that MapServer WCS can be fast and we have also a demo at 
https://beta-karttakuva.maanmittauslaitos.fi/demo/ortokuvat_ja_korkeusmallit/#15.05/67.01553/27.16873
but unfortunately the user interface is only in Finnish. The source images 
(maybe 10 TB or so) are GeoTIFFs and they are not in the cloud. The time for 
downloading a small GetCoverage response as GeoTIFF seems to take around 400 
milliseconds. We had to write a small service that makes our WCS service to 
support time as a dimension because MapServer does not support it with WCS 
https://www.mail-archive.com/mapserver-users@lists.osgeo.org/msg26265.html.

-Jukka Rahkonen-


Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: keskiviikko 26. heinäkuuta 2023 15.06
Vastaanottaja: MapServer Users 
Aihe: Re: [MapServer-users] Speed of WMS vs Speed of WCS; How to speed up WCS 
service?

Hi Seth,

as you suggested, I've added the Extent parameter to all of my layers, and it 
resulted in decreasing time to 5m33.534s. But still, it's quite a lot of time 
for generating 1.5 MiB file.

Any other suggestions?
Maybe there is something wrong with projection so beyond just serving data 
mapserver have to reproject it multiple times? (more than one time by using 
tilesrs option)?

Thanks,
Marcin


From: Seth G mailto:se...@geographika.co.uk>>
Sent: Wednesday, July 26, 2023 12:58 PM
To: Marcin Niemyjski 
mailto:mniemyj...@cloudferro.com>>; MapServer Users 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: [MapServer-users] Speed of WMS vs Speed of WCS; How to speed up 
WCS service?

Hi Marcin,

As a first test I'd recommend adding in EXTENTs to all your layers (and 
ensuring they are correct):

EXTENT 1334552.857598 5342648.587634 4715044.821842 7547620.486088

If these are missing MapServer will often try and calculate these from the 
datasource automatically. Depending on the request type this calculation could 
be made multiple times.

Seth

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

On Wed, Jul 26, 2023, at 11:53 AM, Marcin Niemyjski via MapServer-users wrote:
Hello,

I have a problem, Namely, I have created a WCS and here is its mapfile:
https://pastecode.io/s/6v3qfssb

For a better understanding, here is a view of the tileindex through which the 
data is served:
https://pasteboard.co/ydgvDiqxz4lf.png

I am connecting to files located in a private bucket, so I am using vsis3.

The WMS loads quite fast, but the issue arises with the time it takes to 
generate a requested WCS tile:
 https://pasteboard.co/8G8uF41jqgHc.png

It takes almost 5 minutes to generate the tile, and the received data is 1.5 
MiB (which is it's actual size).

Additionally, I am sending you URLs to sample data:
https://s3.waw3-1.cloudferro.com/swift/v1/Julien/Data/T34UFD_20230708T093549_TCI_60m.jp2
https://s3.waw3-1.cloudferro.com/swift/v1/Julien/Data/T37TCN_20220605T083559_TCI_60m.jp2

The case is - how to speed it up? Am I making any goofy mistakes?
I would be grateful for any recommendations or if you notice any errors, I 
might be making :)

Best,
Marcin
___
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


Re: [MapServer-users] Suppress queryable=1 for wms_layer_group [SEC=OFFICIAL]

2023-07-06 Thread Rahkonen Jukka
Hi,

Do you use the same mapfile? There is a difference in GetCapabilities


Radar
Radar

If layer has just a title but no name it is not queryable, nor does it support 
GetMaps. This applies to group layers as well. But it may be that since version 
7.2 it is not possible to configure a WMS group without a name 
https://mapserver.org/ogc/wms_server.html.

-Jukka Rahkonen-




Lähettäjä: MapServer-users  Puolesta 
Kathleen Hirst
Lähetetty: torstai 6. heinäkuuta 2023 8.29
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] Suppress queryable=1 for wms_layer_group [SEC=OFFICIAL]

Hi,

In the previous version of Mapserver when using wms_layer_group, the groups 
were not queryable in the GetCapabilities. In following examples, the 
configuration is

LAYER>METADATA> OWS_LAYER_GROUP "/Radar/Australia"


Version 6.4.2


Radar

Australia

IDR9
Radar Offline | Australia
Radar Offline | Australia
EPSG:4283


In the latest version 8.0.0, all the groups are queryable


Radar
Radar

Australia
Australia

IDR9
Radar Offline | Australia
Radar Offline | Australia
EPSG:4283

Is there a way to not have the group queryable, as it is causing issues with 
some web applications eg picking up the wrong layer within a group or listing 
the group as well as the layer

Thanks

Kathleen













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


Re: [MapServer-users] FlatGeobuf as output format

2023-06-22 Thread Rahkonen Jukka
Hi,

GDAL gives typically that kind of multipolygon error when the driver tries to 
insert a multipolygon into a layer that is created to accept only polygons. In 
that case casting all geometries into multipolygons really helps: the layer 
gets created to accept multipolygons, simple polygons are converted into 
multipolygons with one member, and multipolygons are saved as they are. I am 
not sure if this is the problem that you have, just want to clarify that the 
suggested fix makes sense. See also https://github.com/OSGeo/gdal/issues/2828


By reading https://mapserver.org/output/ogr_output.html the geometry type could 
be set at LAYER level with
"ows_geomtype" "MultiPolygon"

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Benedek Petrovicz
Lähetetty: torstai 22. kesäkuuta 2023 11.17
Vastaanottaja: Scott 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] FlatGeobuf as output format

I'm not trying to create any fgb-s, but MapServer is.
And the issue is with MultiPolygons, so converting everything to that type 
doesn't help.

The data source is not fgb. It can be anything.
It is an MSSQL DB in my instance.

Btw, converting the same dataset to fgb manually with ogr2ogr does work, and it 
doesn't require any extra parameters.
Isn't MapServer using ogr2ogr functionality for OGR based OUTPUTFORMATs?

I feel like it could handle it, but just hangs up because it sees MultiPolygon 
when checking the type.

On Wed, Jun 21, 2023 at 6:43 PM Scott 
mailto:pub...@postholer.com>> wrote:
I'm not sure how you're creating your fgb's, but from an ogr2ogr context
try promoting all geoms to multi:

-nlt PROMOTE_TO_MULTI

On 6/21/23 07:50, Benedek Petrovicz wrote:
> Hi!
>
> I'm trying to integrate OGR's FlatGeobuf driver as an output format in
> my mapfiles.
> It works for the most part and it's awesome, but it fails immediately
> when I feed some MultiPolygons into it.
>
> The geometries are queried from an MSSQL DB.
>
> I get the following error:
> msOGRWriteShape(): OGR error. Attempt to write feature failed (code=6):
> ICreateFeature: Mismatched geometry type msCalculateScale(): General
> error message. Invalid image width or height.
>
> I found a little note in the docs which corresponds with this issue
> (https://mapserver.org/input/vector/ogr.html
> ):
> /"Even though MapInfo and other OGR data sources may support layers with
> mixed geometry types (e.g. points, lines and polygons in the same file)
> this is not yet supported in MapServer. So you still have to define a
> layer ‘TYPE’ and make sure that all the shapes in the OGR data source
> are compatible with that layer type, otherwise MapServer may produce an
> error about incompatible geometry types at runtime."/
> /
> /
> So it fails for me when I have Polygons and MultiPolygons in the table
> I'm querying.
> But it also fails if it includes MultiPolygons only. So with no mixing
> of types.
>
> I'm using the POLYGON type for my layer in the mapfile.
>
> The same dataset works fine when I'm using the GML2 output format. Even
> with mixing Polygons and MultiPolygons.
>
> Am I doing something wrong here?
> Is it a known limitation for MultiPolygons?
> Is there a way to bypass the issue while retaining the geometries in the DB?
>
> Thank you
> Petrovicz
>
> ___
> 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 mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] mapserver 5 installation

2023-06-20 Thread Rahkonen Jukka
Hi,

A clarification about the version numbers. I believe that the writers in this 
thread are aware of them but all the readers necessarily not: the discussion is 
about MS4W version 5 beta that contains MapServer 8 and that lives in 
https://ms4w.com/release/experimental/.

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Jörg Thomsen (WhereGroup)
Lähetetty: tiistai 20. kesäkuuta 2023 9.55
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] mapserver 5 installation

Hi Valeri,

don't know where to find the config file in ms4w, but you will find the 
documentation with an example at https://mapserver.org/mapfile/config.html
The 'original' conf is saved at
https://github.com/MapServer/MapServer/blob/main/etc/mapserver-sample.conf

btw: You can find non-beta versions of MS5 at
https://www.gisinternals.com/release.php an in osgeo4w:
https://trac.osgeo.org/osgeo4w/

Jörg


Am 19.06.23 um 15:51 schrieb Liandres, Valeri:
> Hello We are trying to install mapserver 5.0.beta2 on Windows-IIS.
> Although we diligently completed all installation points, it remains
> impossible to find mapserv.exe's own configuration file.It gives the
> impression of FastSGI not working properly.
>
> Can anyone help us?
>
> Valeri
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://list/
> s.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-users=05%7C01%7Cjukk
> a.rahkonen%40maanmittauslaitos.fi%7C30b0fd2842f347718e6d08db715b54e1%7
> Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C0%7C638228409306891013%7CUnkno
> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL
> CJXVCI6Mn0%3D%7C3000%7C%7C%7C=qmDa1X1%2FizHH8hbQoVND5CS54LXfFYED
> REkL9VKqAco%3D=0

--
Viele Grüße,
Jörg Thomsen
-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der http://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.thom...@wheregroup.com
http://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@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


Re: [MapServer-users] breaking changes in branch-7-6 after commit of experimental changes from branch-8-0

2023-05-30 Thread Rahkonen Jukka
Hi,

It looks like Steve Lime was reading the text in the paragraph and not the line 
the defines the synopsis and thought that the documentation was explicit  
https://github.com/MapServer/MapServer/issues/6463#issuecomment-1025938850
“since style-level angle documentation refers specifically to 0-360 I think we 
should limit from 0-360 if there are no objections”. Or maybe he was 
remembering what he was thinking when writing the original code?

Please make a pull request for improving the documentation, for my mind it is 
vague now.

-Jukka Rahkonen-



Lähettäjä: Oliver Christen 
Lähetetty: tiistai 30. toukokuuta 2023 15.21
Vastaanottaja: Rahkonen Jukka 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] breaking changes in branch-7-6 after commit of 
experimental changes from branch-8-0

before that commit, the following code was working:

STYLE
  COLOR 255 255 255
  SYMBOL "rectangle3"
  ANGLE -45
  SIZE 8
  GAP 10
END

after that commit, it no longer works, as ANGLE -45 is not accepted anymore, 
instead it had to be changed to

STYLE
  COLOR 255 255 255
  SYMBOL "rectangle3"
  ANGLE 315
  SIZE 8
  GAP 10
END

the documentation https://mapserver.org/mapfile/style.html say it must be of 
type DOUBLE, but double can be negative and nothing say explicitly in the 
documentation that the value can not be negative.

I see this discussion here:
https://github.com/MapServer/MapServer/issues/6463
but no comment if something was done or agreed on about this.
A note should be added to the documentation to make that clear, as it was done 
for label size (see below).
I can do a PR if that would be acceptable ?

for label size, I see that a note was added saying the value must be greater 
than zero on 26 january 2022, so I guess this is on me for not noticing it (but 
im not alone not noticing it so I guess it wasnt clearly stated/announced 
either)

Best regards
Oliver






On Tue, May 30, 2023 at 1:27 PM Rahkonen Jukka 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

Maybe the commit could be adjusted in Mapserver 7. Out of curiosity, what is 
the use case for zero sized labels and symbols? To disable them, or? About the 
angle, by the Mapserver 7.0 documentation, doesn’t it feel like negative angles 
were not thought to work ever?

“Angle, given in degrees, to rotate the symbol (counter clockwise). Default is 
0 (no rotation). If you have an attribute that specifies angles in a clockwise 
direction (compass direction), you have to adjust the angle attribute values 
before they reach MapServer (360-ANGLE), as it is not possible to use a 
mathematical expression for ANGLE.”

-Jukka Rahkonen-

Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Oliver Christen
Lähetetty: tiistai 30. toukokuuta 2023 13.59
Vastaanottaja: 
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: [MapServer-users] breaking changes in branch-7-6 after commit of 
experimental changes from branch-8-0

Dear Mapserver commiters

this commit there:
https://github.com/MapServer/MapServer/pull/6818

broke a lot of things,
like style angles not supporting negative values anymore or label size 
mandatorily greater than zero (also possibly for symbol)

Im not against changes, but changes should be:
a) documented
b) announced with preferably a deprecation period

so, please revert that commit or provide adequate change/documentation for all 
the breaking changes.

Thank you
Best regards
Oliver Christen

--


[https://lh5.googleusercontent.com/4RpzNqlUvMoqWPtwuUWigz1_dKPkUN4OQOKshy_zixf9Gi6JzQJRjs3oHwxYaiADK7htQjUTodRa-OUr4YEKbgs9SsmqPG6QYjqKj3wbXoQ6snhaqq2eEJTeB1FZHKK7SApWcSZk45Fe3w4grA]<https://www.camptocamp.com/en/news-events/camptocamp-flagship-office-bussigny>

New address from 1st September 2022


Camptocamp SA

Route de la Chaux 4

1030 Bussigny

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


Re: [MapServer-users] breaking changes in branch-7-6 after commit of experimental changes from branch-8-0

2023-05-30 Thread Rahkonen Jukka
Hi,

Maybe the commit could be adjusted in Mapserver 7. Out of curiosity, what is 
the use case for zero sized labels and symbols? To disable them, or? About the 
angle, by the Mapserver 7.0 documentation, doesn't it feel like negative angles 
were not thought to work ever?

"Angle, given in degrees, to rotate the symbol (counter clockwise). Default is 
0 (no rotation). If you have an attribute that specifies angles in a clockwise 
direction (compass direction), you have to adjust the angle attribute values 
before they reach MapServer (360-ANGLE), as it is not possible to use a 
mathematical expression for ANGLE."

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Oliver Christen
Lähetetty: tiistai 30. toukokuuta 2023 13.59
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] breaking changes in branch-7-6 after commit of 
experimental changes from branch-8-0

Dear Mapserver commiters

this commit there:
https://github.com/MapServer/MapServer/pull/6818

broke a lot of things,
like style angles not supporting negative values anymore or label size 
mandatorily greater than zero (also possibly for symbol)

Im not against changes, but changes should be:
a) documented
b) announced with preferably a deprecation period

so, please revert that commit or provide adequate change/documentation for all 
the breaking changes.

Thank you
Best regards
Oliver Christen

--


[https://lh5.googleusercontent.com/4RpzNqlUvMoqWPtwuUWigz1_dKPkUN4OQOKshy_zixf9Gi6JzQJRjs3oHwxYaiADK7htQjUTodRa-OUr4YEKbgs9SsmqPG6QYjqKj3wbXoQ6snhaqq2eEJTeB1FZHKK7SApWcSZk45Fe3w4grA]

New address from 1st September 2022


Camptocamp SA

Route de la Chaux 4

1030 Bussigny

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


Re: [MapServer-users] is it possible to use other attributes stored on tileindex and querry dataset using them?

2023-05-26 Thread Rahkonen Jukka
Hi,


  *   is there possibility to add new parameter to url request based on another 
attribute in vector index file, for example max_cloud_cover or 
polarization_type?

Simple. Add query parameters into the DATA of the tileindex layer.

So instead of
DATA "tile-index"
use
DATA "select * from tile-index where max_cloud_cover<%maxcc% and  
polarization_type='%polcode%'"

Read https://mapserver.org/cgi/runsub.html about validation and defaults. And 
finally for filtering create GetMap requests so that they include 
=80=A

Utilizing the extra parameters with standard clients like QGIS can make some 
headache especially if it should be possible to change them dynamically. 
Half-dynamic method it to include the extra parameters into the WMS connection 
string and configure QGIS to “Ignore GetMap URI reported in capabilities”. With 
some other clients it is possible to configure vendor parameters which are then 
appended into GetMap. And I have seen that some clever servers are configured 
to manipulate the GetCapabities answer so that extra parameters (access_token 
etc) which are used in GetCapabilities request are added into the GetMap link 
in the response.

-Jukka Rahkonen-





Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: perjantai 26. toukokuuta 2023 12.22
Vastaanottaja: Marcin Niemyjski via MapServer-users 

Aihe: Re: [MapServer-users] is it possible to use other attributes stored on 
tileindex and querry dataset using them?


Jukka,

you were right! Now it works like a charm! Big thank you! And Thanks Tanya for 
a suggestion.

But in reference to my first mail - is there possibility to add new parameter 
to url request based on another attribute in vector index file, for example 
max_cloud_cover or polarization_type? :D

Best,
Marcin
Marcin Niemyjski
Junior Data Scientist
CloudFerro sp z o.o.
office: Fabryczna 5  m: +48 695 831 753
00-446 Warszawa, Poland    e: 
mniemyj...@cloudferro.com<mailto:mniemyj...@cloudferro.com>
[https://i.imgur.com/jlLouj5.png]<https://cloudferro.com/>

[cid:image001.png@01D98FCE.104C2180]<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae9486487...@cloudferro.com?anonymous=signature>
Book time to meet with 
me<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae9486487...@cloudferro.com?anonymous=signature>
____
From: Rahkonen Jukka 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
Sent: Thursday, May 25, 2023 6:27 PM
To: Marcin Niemyjski 
mailto:mniemyj...@cloudferro.com>>; Marcin Niemyjski 
via MapServer-users 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: is it possible to use other attributes stored on tileindex and 
querry dataset using them?


Hi,



Read the whole documentation page. Mapserver is implementing the WMS-T standard 
and in the standard the time parameter is named “TIME”. See examples 
https://mapserver.org/ogc/wms_time.html#supported-time-requests. So even the 
timeitem in your tileindex is “timestamp”, the parameter to use in GetMap is 
=



-Jukka Rahkonen-





Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Marcin Niemyjski via MapServer-users
Lähetetty: torstai 25. toukokuuta 2023 17.54
Vastaanottaja: Marcin Niemyjski via MapServer-users 
mailto:mapserver-users@lists.osgeo.org>>
Aihe: [MapServer-users] is it possible to use other attributes stored on 
tileindex and querry dataset using them?





Hello,



I've managed to find solution similar solution to what I looked for in pervious 
mail at 
https://mapserver.org/ogc/wms_time.html#example-of-wms-t-with-postgis-tile-index-for-raster-imagery



but when using below GetMap url request, Mapserver keeps returning data for 
default timestamp parameter value (which is 2023-02-02) although I'm passing 
new value in url:



GetMap:

http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/TileIndex.map=WMS=1.3.0=GetMap=1685028.275800409261,1801821.474313705694,6595587.571330638602,9965795.399527186528=EPSG:3857=726=1207=Sentinel%202%20Ukraine%20TileIndex%20GPKG==image/png=157_RESOLUTION=157_OPTIONS=dpi:157=TRUE=2023-02-05



can you please take a look at my mapfile? -> https://pastecode.io/s/oxvnycg3



Any suggestions?

Marcin

Marcin Niemyjski
Junior Data Scientist
CloudFerro sp z o.o.

office: Fabryczna 5  m: +48 695 831 753
00-446 Warszawa, Poland    e: 
mniemyj...@cloudferro.com<mailto:mniemyj...@cloudferro.com>

[https://i.imgur.com/jlLouj5.png]<https://cloudferro.com/>



[cid:image001.png@01D98FCE.104C2180]<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae9486487...@cloudferro.com?anonymous=signature>

Book time to meet with 
me<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae9486487...@cloudferro.com?anonymous=signature>


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


Re: [MapServer-users] is it possible to use other attributes stored on tileindex and querry dataset using them?

2023-05-25 Thread Rahkonen Jukka
Hi,

Read the whole documentation page. Mapserver is implementing the WMS-T standard 
and in the standard the time parameter is named “TIME”. See examples 
https://mapserver.org/ogc/wms_time.html#supported-time-requests. So even the 
timeitem in your tileindex is “timestamp”, the parameter to use in GetMap is 
=


-Jukka Rahkonen-


Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: torstai 25. toukokuuta 2023 17.54
Vastaanottaja: Marcin Niemyjski via MapServer-users 

Aihe: [MapServer-users] is it possible to use other attributes stored on 
tileindex and querry dataset using them?


Hello,

I've managed to find solution similar solution to what I looked for in pervious 
mail at 
https://mapserver.org/ogc/wms_time.html#example-of-wms-t-with-postgis-tile-index-for-raster-imagery

but when using below GetMap url request, Mapserver keeps returning data for 
default timestamp parameter value (which is 2023-02-02) although I'm passing 
new value in url:

GetMap:
http://localhost/cgi-bin/mapserv?map=/var/www/mapbender/TileIndex.map=WMS=1.3.0=GetMap=1685028.275800409261,1801821.474313705694,6595587.571330638602,9965795.399527186528=EPSG:3857=726=1207=Sentinel%202%20Ukraine%20TileIndex%20GPKG==image/png=157_RESOLUTION=157_OPTIONS=dpi:157=TRUE=2023-02-05

can you please take a look at my mapfile? -> https://pastecode.io/s/oxvnycg3

Any suggestions?
Marcin
Marcin Niemyjski
Junior Data Scientist
CloudFerro sp z o.o.
office: Fabryczna 5  m: +48 695 831 753
00-446 Warszawa, Poland    e: 
mniemyj...@cloudferro.com
[https://i.imgur.com/jlLouj5.png]

[cid:image001.png@01D98F3E.49094970]
Book time to meet with 
me

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


Re: [MapServer-users] Layer is opaque

2023-04-20 Thread Rahkonen Jukka
Hi,

Work for me in two different ways with this test layer

LAYER
  NAME "layername"
  TYPE POLYGON
  FEATURE
  POINTS 10 5 15 10 5 10 10 5 END
  END #feature
# opacity defined with COMPOSITE
  COMPOSITE
  OPACITY 70
 END # COMPOSITE

  METADATA
  'wms_title' 'layername'
  "wms_srs" "EPSG:4326"
  END #metadata
CLASS
STYLE
#alternatively opacity defined in style
#OPACITY 80
COLOR  210 155 100
END #style
END #class
END #layer

The outputformat must be png, jpeg does not support opacity/transparency.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Atlanta Geek
Lähetetty: torstai 20. huhtikuuta 2023 16.03
Vastaanottaja: mapserver 
Aihe: [MapServer-users] Layer is opaque

I am trying to use mapserver to display some data but unfortunately the map in 
not visible below the layer. My configuration of my mapserver is below. Any 
guidance would be appreciated.

MAP
IMAGETYPE png
MAXSIZE 4000
SIZE 800 800
EXTENT -9583207 3548826 -8999182 4183713
UNITS meters
IMAGECOLOR "#FF00"
WEB
   METADATA
  "wfs_title" "mapserverdemo"
  "wfs_enable_request" "*"
  "wfs_onlineresource" 
"http://localhost:8080/mapserv?map=/etc/mapserver/wms.map;
  "ows_enable_request" "*"
  "wms_srs" "EPSG:3857 EPSG:4326"
  "wfs_srs" "EPSG:3857 EPSG:4326"
  "labelcache_map_edge_buffer" "-1"
  "wms_title" "OpenStreetMap"
  "wms_feature_info_mime_type" "text/plain text/html application/json"
   END
   IMAGEPATH "/ms4w/tmp/ms_tmp/"
   IMAGEURL "/ms_tmp/"
END
DEBUG 1
CONFIG "MS_ERRORFILE" "stderr"
PROJECTION
   "init=epsg:3857"
END
OUTPUTFORMAT
  NAME "jpeg_png"
  MIMETYPE "image/vnd.jpeg-png"
  DRIVER AGG/MIXED
  IMAGEMODE RGBA
  FORMATOPTION "TRANSPARENT_FORMAT=png"
  FORMATOPTION "OPAQUE_FORMAT=jpeg"
END


LAYER
STATUS DEFAULT
TYPE POLYGON
NAME "h3_polygons"
GROUP "h3"
CONNECTIONTYPE postgis
CONNECTION "host=host.docker.internal dbname=h3demo user=postgres 
password=postgres port=5432"
DATA "geom from pop6 using unique fld using srid=4326"
COMPOSITE
  OPACITY 70
END # COMPOSITE
CLASS
  STYLE
 OUTLINECOLOR 0 0 255
 WIDTH 3
  END
  STYLE
 COLOR 255 0 0
 OPACITY 10
  END
   END



  PROJECTION #source
"init=epsg:4326"
  END
END

END

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


Re: [MapServer-users] Is it possible to pass variables to a mapfile DATA parameter?

2023-03-08 Thread Rahkonen Jukka
Hi,

I think that your question belongs rather to OpenLayers forums. On the 
Mapserver side you can use run-time substitution in LAYER-DATA 
https://mapserver.org/cgi/runsub.html#parameters-supported.
DATA "geom FROM %table% USING srid=32636 USING UNIQUE fid"

What OpenLayers need to do is to add “=xxyy” to the GetFeature requests.

-Jukka Rahkonen-



Lähettäjä: MapServer-users  Puolesta 
Neil Underhill
Lähetetty: keskiviikko 8. maaliskuuta 2023 23.47
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] Is it possible to pass variables to a mapfile DATA 
parameter?

Hi all,

I am using mapserver to allow WFS in Openlayers to access point data held in a 
PostgreSQL / PostGIS database. The mapfile includes the following statement:

...
INCLUDE "readonly.config"
DATA "geom FROM table USING srid=32636 USING UNIQUE fid"
...

Currently I make a new mapfile for each site visit to each project. However 
this means every time a new site visit or project is made, I have to create a 
new mapfile, and the only thing that changes is the "table" part of the 
statement. All the styling info is in the Openlayers WFS statements.

Is it possible to get Openlayers to pass variables to the DATA parameter (e.g. 
a different table name) when called so that I can reuse the same mapfile for 
different WFS calls?
Or alternatively, could store the point data in the same PostgreSQL table and 
have some other way of filtering the data (e.g. on timestamp)
Am I misunderstanding how I should be using mapfiles?

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


Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS request URL with MapServer 8

2023-02-22 Thread Rahkonen Jukka
Hi,

About the SLD, opacity appears in stroke, fill, graphic, and raster in SLD 1.0.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Steve Lime
Lähetetty: keskiviikko 22. helmikuuta 2023 17.47
Vastaanottaja: Matthew Graber 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS 
request URL with MapServer 8

Hi Matthew: That functionality was indeed removed as part of 8.0. I kind of 
expect that we might build back something for more limited use cases if 
necessary, Does SLD support opacity/transparency?

--Steve


On Tue, Feb 21, 2023 at 10:52 AM Matthew Graber 
mailto:graber...@gmail.com>> wrote:
Hello all!

With MapServer 8, I'm wondering what the proper way to change the opacity of a 
single layer in a multilayer WMS request is.

For example, the following URL excerpt shows the old way of accomplishing this 
that worked while using MapServer 7:

SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b]=OPACITY+50

My understanding is that this would have the same effect as adding "OPACITY 50" 
to the test_b layer in the mapfile. The mapfile containing test_a and test_b 
did not have OPACITY included when they were written. Obviously, this no longer 
works with MapServer 8, and now that request has the same results as omitting 
the "[test_b]=OPACITY+50" portion entirely.

Based on 
https://mapserver.org/fr/MIGRATION_GUIDE.html,
 I see that OPACITY now belongs inside a COMPOSITE object. I tried the 
following modifications to the request URL:

SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite=OPACITY+50
SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite[0]=OPACITY+50

I also tried this both with the mapfile left as-is, and with an empty COMPOSITE 
object being included in each layer object, and each time I got the same 
unsuccessful result as before.

Is there a way to accomplish this in MapServer 8?

Also, does this map.layer[layername]=... syntax still work in MapServer 8? The 
documentation at 
https://mapserver.org/cgi/controls.html#using-mapserver-version-8
 suggests it might no longer work for MapServer 8 (based on the heading "Using 
MapServer version < 8"), but the documentation at 
https://mapserver.org/pdf/MapServer.pdf
 shows the same examples with the heading "Using MapServer version <= 8" on 
page 1065 of the PDF, so I'm unsure if this is still intended to work in 
MapServer 8.

Thank you,
Matt
___
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


Re: [MapServer-users] MapServer-users Digest, Vol 180, Issue 14

2023-01-24 Thread Rahkonen Jukka
Hi,

Read the JMeter section from this tutorial and consider if you are interested 
or not 
https://cs-geonode.readthedocs.io/en/2.8_a/tutorials/advanced/geonode_production/adv_gsconfig/jmeter/index.html

BTW the mailing list prevents direct reply because the body of the message is 
too long. Please remove some unnecessary contents.

-Jukka Rahkonen-


Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Marcin Niemyjski via MapServer-users
Lähetetty: tiistai 24. tammikuuta 2023 13.16
Vastaanottaja: Roman Bamio Gonzalez 
mailto:roman.ba...@juntadeandalucia.es>>; 
mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] MapServer-users Digest, Vol 180, Issue 14


Roman,

are you talking about something like this 
https://svn.osgeo.org/osgeo/foss4g/benchmarking/wms/2011/jmeter/mapserver/linux/
 ?
I'm not fammilliar with .jmx file or jmeter itself, could you pleas provide me 
some example / further explenation?

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


Re: [MapServer-users] GetMap request inside python script; measuring speed of WMS?

2023-01-24 Thread Rahkonen Jukka
Hi,

If you want to use less time for programming, then JMeter is widely used for 
that kind of testing and it was also used in the FOSS4G benchmarks 
https://wiki.osgeo.org/wiki/FOSS4G_Benchmark. Maybe you can get some 
inspiration from the wiki. The subversion repository is also alive and I think 
that for example the directories for years 2010 and 2011 may contain something 
interesting and re-usable https://svn.osgeo.org/osgeo/foss4g/benchmarking/wms/

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: tiistai 24. tammikuuta 2023 12.36
Vastaanottaja: Marcin Niemyjski via MapServer-users 

Aihe: [MapServer-users] GetMap request inside python script; measuring speed of 
WMS?

Hello,

I want to measure how long does it takes for my WMS to response to GetMap 
request. I have prepared list of extents in form of python list for example:
['38.04778703973034,-17.714089101743628,39.04778703973034,-16.714089101743628', 
'38.04778703973034,-17.714089101743628,39.04778703973034,-16.714089101743628'...]

I'm aiming into itterating over this list and passing it's elements into GetMap 
request inside python script and then request GetMap and measure how long does 
it takes to perfome it.

Here starts my question: How to do GetMap request inside python script, is it 
possible? The question is not about creating the url but about function wich 
does request.
Maybe somebody can recommend me some other way of measuring speed of WMS?

I would like show my k8s cluster service as use-case at FOSS4G 2023 and i need 
some statistics for presentation 

Best,
Marcin

[cid:image001.png@01D92FF2.521D8E00]
Book time to meet with 
me

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


Re: [MapServer-users] accessing mapfiles that are not directly on host server via apache2 aliases?

2023-01-09 Thread Rahkonen Jukka
Hi,

I have not been thinking about your use case, it may be reasonable and safe, 
but generally speaking we have just added more control to the access to 
mapfiles due to security issues. See 
https://www.mapserver.org/optimization/limit_mapfile_access.html#limit-mapfile-access.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: maanantai 9. tammikuuta 2023 11.48
Vastaanottaja: Marcin Niemyjski via MapServer-users 

Aihe: [MapServer-users] accessing mapfiles that are not directly on host server 
via apache2 aliases?

Hello,

If the possibility of accessing mapfiles that are not directly on host server 
via apache2 aliases or redirect or any other way sounds like a good idea and 
maybe, considered as future update?

As a daily user of Mapserver, I think this would be a great and powerful 
functionality.

Example of how I tried that (I know it is not possible):

https://pasteboard.co/tEUSonRE5IeC.png

Best,
Marcin


[cid:image001.png@01D92422.072F7920]
Book time to meet with 
me

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


Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers

2022-12-20 Thread Rahkonen Jukka
Hi,

The time is not a constant (number of layers * x milliseconds). For example, it 
is faster to generate the layer BoundingBox into GetCapabilities if the 
wms_extent metadata is set for the layer 
https://www.mapserver.org/ogc/wms_server.html but how much faster it is depends 
on the data source.

I think that instead of 1200 layers you could have just one time enabled layer 
https://www.mapserver.org/ogc/wms_time.html.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: tiistai 20. joulukuuta 2022 16.18
Vastaanottaja: Oskar Ravhed ; 
mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] Failed to download capabilities:Download of 
capabilities failed: Connection on mapfile with more than 1000 layers


Great advice, thank you Oskar.

Could you tell me how long it takes to load the WMS into qgis or GetCap with 
that many layers?
I am also interested in what purpose you are using the WMS with this amount of 
data. Could you share it? In my case it is daily Sentinel-1 imagery for the 
whole world from the beginning of 2021.

Merry Christmas to all,
Marcin


From: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 on behalf of Oskar Ravhed 
mailto:oskar.rav...@t-kartor.com>>
Sent: Tuesday, December 20, 2022 1:08 PM
To: mapserver-users@lists.osgeo.org 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: [MapServer-users] Failed to download capabilities:Download of 
capabilities failed: Connection on mapfile with more than 1000 layers

Hello!

I have 3234 layers in a service and it works fine. also works fine with
10.000 layers

1 try the getcap in browser
2a if step 1 is success change network timeout in qgis
2b if step 1 does not work change timeouts on server and check mapserver
log

On 20/12/2022 09:59, Jörg Thomsen (WhereGroup) wrote:
> Hi,
>
> funny, how you type twelve.
>
> 1200 are very much and I guess no one has tried this before.
> So to your question: I would say yes.
>
> I suggest to split it into several services / mapfiles. The
> capability-xml ist very big I think and most clients will habe
> problems with it. The usability is bad, the users have to scroll
> through 1200 Layers, puh. And I don't know whether a getMap with
> http-get will work (is there a current length-limit in http-get?).
>
>
> Jörg
>
>
>  Am 20.12.22 um 09:42 schrieb Marcin Niemyjski via MapServer-users:
>> Hello,
>>
>> I have a mapfile which constist of 1200 layers. While loading to qgis
>> error "Failed to download capabilities:Download of capabilities
>> failed: Connection" is recived.
>>
>> Does this happen becaues of quantitu of layers in mapfile? Is there
>> any workaround?
>>
>> Best,
>> Marcin
>>
>> ___
>> 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 mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Failed to download capabilities:Download of capabilities failed: Connection on mapfile with more than 1000 layers

2022-12-20 Thread Rahkonen Jukka
Hi,

With that information we cannot really say. Can you get the GetCapabilities 
document by making the request with a browser or with curl? Is QGIS happy with 
500 layers? I suppose that the default request timeout of Apache http server 
(do you use it?) is 60 seconds, have you tried to increase that?

Are you sure that you are trying to correct the right thing? Do you really need 
more than 1000 layers? Could you perhaps do the same thing with less layers 
with filtering?  If you need +1000 layers you could consider saving the 
GetCapabilities response into a static file that is much faster to serve. Just 
remember to update the static file when your layers change.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: tiistai 20. joulukuuta 2022 10.42
Vastaanottaja: Marcin Niemyjski via MapServer-users 

Aihe: [MapServer-users] Failed to download capabilities:Download of 
capabilities failed: Connection on mapfile with more than 1000 layers

Hello,

I have a mapfile which constist of 1200 layers. While loading to qgis error 
"Failed to download capabilities:Download of capabilities failed: Connection" 
is recived.

Does this happen becaues of quantitu of layers in mapfile? Is there any 
workaround?

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


Re: [MapServer-users] Tileindex in format different than SHP?

2022-12-14 Thread Rahkonen Jukka
Hi,

You are wrong, a GeoPackage layer as a tileindex is about as fast as a 
shapefile in common bbox filtering that WMS is, and faster than shapefile index 
if you want to filter or sort the data by other attributes. That is based on my 
measurements from some years ago with an orthophoto layer having about 8 
rows in the index. Your data can be different but make a proper test and then 
jugde by the facts. There is no need to render the tileindex layer once you 
have made it to work. However, it does offer a handy way for letting your users 
to query metadata from the individual images with GetFeatureInfo if you happen 
to have that kind of needs.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: keskiviikko 14. joulukuuta 2022 15.08
Vastaanottaja: Jeff McKenna ; 
mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] Tileindex in format different than SHP?

Jeff,
I checked TILEINDEX documentation before writing to you. I found no 
information's about other formats except that shapefile is usually used.

Jukka,
I created an extra layer as you suggested, thanks - it works, but I will stay 
with Shapefiles on this one. When working with tileindex as extra layer it 
takes 2x more time for mapserver to render the layer.

Thank you all,
Marcin

From: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 on behalf of Jeff McKenna 
mailto:jmcke...@gatewaygeomatics.com>>
Sent: Wednesday, December 14, 2022 1:51 PM
To: mapserver-users@lists.osgeo.org 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: [MapServer-users] Tileindex in format different than SHP?

I had recently spent a few weeks of effort on updating the documentation
for TILEINDEX, with many examples, see :
https://mapserver.org/optimization/tileindex.html

-jeff


--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/



On 2022-12-14 7:23 a.m., Marcin Niemyjski via MapServer-users wrote:
> Hello,
>
> Can I use format different than SHP while using tileindex of rasters?
>
> When using Mapfile with configuration as below:
>
> LAYER
>  NAME "2021-01-02_high"
>  STATUS ON
>  TILEINDEX "/DyskPlanetiler/Sentinel1COG/2021/01/02/2021-01-02.gpkg"
>  TILEITEM "location"
>  TYPE RASTER
>  MAXSCALEDENOM 400
>  GROUP "2021-01-02"
>  PROJECTION
>  "init=epsg:4326"
>  END
> END
>
> error is recived:
> msShapefileOpen(): Unable to access file.
> (/DyskPlanetiler/Sentinel1COG/2021/01/01/2021-01-01.gpkg)
>
> is there a way to use geopackage or flatgeobuf as indexes or do I have
> to go back to shp?
>
> Best,
> Marcin
>
> ___
> 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 mailing list

Re: [MapServer-users] Tileindex in format different than SHP?

2022-12-14 Thread Rahkonen Jukka
Hi,

We should improve our documentation about tileindexes and differences between 
raster tileindex and OGR tileindex, and shapefile index and indexes using other 
formats. At least I do not find correct information easily even after using 
tileindexes for 15 years or more.

For rasters, if the tileindex in not SHP then user must first create a vector 
layer from the tileindex source. Then this layer is used as a tileindex for the 
raster layer.

I found this example from the wiki 
https://trac.osgeo.org/mapserver/wiki/DatabaseTileIndex
It should be clear enough to be used as a template if you don’t pay attention 
to Oracle raster specific details.

I recommend to publish the vector layer first into WMS and check with a WMS 
client that the layer really works and you can see the footprints of the images 
first. Make also sure that the LOCATION gets selected. With GeoPackage you 
should have something like this in your mapfile

CONNECTIONTYPE OGR
CONNECTION "path/to/geopackage.gpkg"
#DATA "my_layer"
or if you want more control to the layer
DATA "SELECT geometry, location FROM my_layer"

If you now read carefully LAYER — MapServer 8.0.0 
documentation from the TILEINDEX 
keyword again 
you do see the information about two alternatives filename|layername, and that 
a filename works only for shapefiles.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: keskiviikko 14. joulukuuta 2022 13.23
Vastaanottaja: Marcin Niemyjski via MapServer-users 

Aihe: [MapServer-users] Tileindex in format different than SHP?

Hello,

Can I use format different than SHP while using tileindex of rasters?

When using Mapfile with configuration as below:

LAYER
    NAME "2021-01-02_high"
STATUS ON
TILEINDEX "/DyskPlanetiler/Sentinel1COG/2021/01/02/2021-01-02.gpkg"
TILEITEM "location"
TYPE RASTER
MAXSCALEDENOM 400
GROUP "2021-01-02"
PROJECTION
"init=epsg:4326"
END
END

error is recived:
msShapefileOpen(): Unable to access file. 
(/DyskPlanetiler/Sentinel1COG/2021/01/01/2021-01-01.gpkg)

is there a way to use geopackage or flatgeobuf as indexes or do I have to go 
back to shp?

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


Re: [MapServer-users] Slow Point Cluster Loading

2022-12-09 Thread Rahkonen Jukka
Hi,

Of course you get that message from Mapserver because that is just the WMS base 
url. You or rather your WMS client like QGIS must add some WMS parameters to 
the request.

http://64.225.130.48/?map=/etc/mapserver/aed_world.map=GetMap=WMS=1.3.0=1000=505=Latest=TRUE=image%2Fpng=-3.97009900990099E7,-2.0049E7,3.97009900990099E7,2.0049E7=EPSG:3857=default


-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
jbo-...@mailo.com
Lähetetty: perjantai 9. joulukuuta 2022 17.02
Vastaanottaja: Marcin Niemyjski via MapServer-users 

Aihe: Re: [MapServer-users] Slow Point Cluster Loading

I got: "mapserv(): Web application error. Traditional BROWSE mode requires a 
TEMPLATE in the WEB section, but none was provided."



De : Marcin Niemyjski via MapServer-users 
mailto:mapserver-users@lists.osgeo.org>>
À : Marcin Niemyjski via MapServer-users 
mailto:mapserver-users@lists.osgeo.org>>
Sujet : [MapServer-users] Slow Point Cluster Loading
Date : 09/12/2022 15:56:45 Europe/Paris
Hello,

I would like to ask you to try out my newest WMS which is produced in 
partnership with OSM Poland.

WMS link: 
http://64.225.130.48/?map=/etc/mapserver/aed_world.map

What I would appreciate the most is advice how to speed up loading of WMS on 
low zoom levels, as you can see clustering of so many points take times.

Thank you for your help,
Marcin
___
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


Re: [MapServer-users] Mapcache s3 - server replied: Not Found

2022-12-09 Thread Rahkonen Jukka
Hi,

It seems that you have tried to make a new WMS connection but you do not run 
any WMS server in s3. Instead, you have there tiles. Try this XYZ approach 
https://silverspringenergy.com/adding-xyz-tiles-to-a-qgis-project/.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: perjantai 9. joulukuuta 2022 16.02
Vastaanottaja: Marcin Niemyjski via MapServer-users 

Aihe: [MapServer-users] Mapcache s3 - server replied: Not Found

Hello,

my mapcache xml to s3 bucket is working now but while trying to connect it to 
qgis using url created in xml 
(https://s3.waw3-1.cloudferro.com/mapcache/{tileset}/{grid}/{z}/{x}/{y}/{ext})
 qgis returns:

Failed to download capabilities:
Download of capabilities failed: Error transferring 
https://s3.waw3-1.cloudferro.com/mapcache/%7Btileset%7D/%7Bgrid%7D/%7Bz%7D/%7Bx%7D/%7By%7D/%7Bext%7D?SERVICE=WMS=GetCapabilities
 - server replied: Not Found

How can I start using my tiles?
Best,
Marcin
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR

2022-12-07 Thread Rahkonen Jukka
Hi,

We are using the ”layer-as-a-tileindex” method right now with a bit older 
Mapserver version and with native POSTGIS connection type. In the orthophoto 
layer we use

LAYER
GROUP "ortokuva"
NAME "ortokuva_r16"
STATUS ON
TILEINDEX "ortokuva_r16_postgis_tileindex"
TILESRS "crs"

and in the "ortokuva_r16_postgis_tileindex" layer

LAYER
NAME "ortokuva_r16_postgis_tileindex"
STATUS ON
TYPE POLYGON
UNITS METERS
SIZEUNITS PIXELS
CONNECTIONTYPE POSTGIS
CONNECTION "dbname=db user=user password=password"
DATA "the_geom from (SELECT fid, '/beginning/of/path/'||location as 
location, crs, resolution, the_geom FROM ortokuva_16m) as subquery using unique 
fid"

I hope that this still works with Mapserver 8. It would be nice if you could 
make a test and compare OGR vs POSTGIS connection types.

-Jukka Rahkonen-


Lähettäjä: Peter Schmitt 
Lähetetty: torstai 8. joulukuuta 2022 2.32
Vastaanottaja: Even Rouault 
Kopio: Rahkonen Jukka ; Mapserver-Users 
(mapserver-users@lists.osgeo.org) 
Aihe: Re: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR

On Wed, Dec 7, 2022 at 4:17 PM Even Rouault 
mailto:even.roua...@spatialys.com>> wrote:
How do I specify such a query using the OGR PG driver as a Mapserver layer to 
be used as a TILEINDEX of OGR vector files?
A potential solution would be to create a OGR VRT file that contains your SQL 
request, and reference that VRT file in the TILEINDEX

Brilliant!  This indeed works:

LAYER
NAME "vector_via_vrt"
TYPE POLYGON
TILEINDEX "


PG:host='localhost' user='postgres' dbname='mydatabase' 
password='mypwd'
SELECT * FROM testtable

"
CONNECTIONTYPE OGR
STATUS OFF
END

and now requests like 
http://localhost:8000/wfs?service=WFS=1.0.0=getfeature=/app/mapfiles/test.map=vector_via_vrt=geojson
 return the vectors pointed by the vector tileindex of vectors.  I will attempt 
to submit a PR to add this example to the docs when I can.

VRTs:  Is there anything they can't do!?

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


Re: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR

2022-12-07 Thread Rahkonen Jukka
Hi,

I made some tests and noticed that the OGR tileindex does not need to be a 
shapefile but GeoPackage worked as well. Actully what did not work was to make 
a vector layer from tileindex that was saved into GeoPackage and to use that 
layer in TILEINDEX. And then I noticed that this behavior is documented in 
https://www.mapserver.org/input/vector/ogr.html#tileindex-with-ogr:

"OGR layers can utilize tile indexes in a similar fashion to Shapefile based 
layers. The TILEINDEX keyword should contain the connection string for the tile 
index file. The tile index file may be any supported OGR format, including 
shapefiles."

So this is what I used in LAYER and it worked both for WMS and WFS:

CONNECTIONTYPE OGR
TILEINDEX "c:\data\000\mapservertest\tindex.gpkg"

I do not know when and if this behavior has changed. I thought as well that the 
layer-as-a-tileindex would be the way to follow if tileindex is not in 
shapefile format.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Peter Schmitt
Lähetetty: keskiviikko 7. joulukuuta 2022 19.08
Vastaanottaja: Schylberg Lars 
Kopio: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [MapServer-users] [EXTERNAL] Vector tileindex with connectiontype OGR

On Wed, Dec 7, 2022 at 1:16 AM Schylberg Lars 
mailto:lars.schylb...@saabgroup.com>> wrote:
> The important thing is to have a one layer for the actual tile index, that 
> has status off and one layer that is using the tile index layer.

Thanks for the message, Lars!  This gave me another idea to debug.

When I set DEBUG 5 and request

 mapserv -nh 
QUERY_STRING='service=WFS=1.0.0=getfeature=/app/mapfiles/test2.map=vector_via_ogr=geojson'

then the log contains

OGROPen(tindex_ogr)
msOGRFileOpen(): OGR error. Open failed for OGR connection in layer 
`vector_via_ogr'.  File not found or unsupported format. Check server logs.
Open failed for OGR connection in layer `vector_via_ogr'.

with the layers
LAYER
DEBUG 5
NAME "tindex_ogr"
TYPE POLYGON
CONNECTIONTYPE OGR
CONNECTION "/app/mapfiles/tindex.geojson"
STATUS OFF
END

LAYER
DEBUG 5
NAME "vector_via_ogr"
TYPE POLYGON
TILEINDEX tindex_ogr
CONNECTIONTYPE OGR
STATUS OFF
END

This log line

OGROPen(tindex_ogr)

makes me suspect the following lines of code are setting the OGR dataset name 
to "tindex_ogr", whereas I expect it to do something like use the value from 
CONNECTION in the layer with name "tindex_ogr".
https://github.com/MapServer/MapServer/blob/71ecf4028b0769027df3a970a36d56feb1d46ab6/mapogr.cpp#L1205-L1238

In other words, I expect the log line to read

OGROPen(/app/mapfiles/tindex.geojson)

and not

OGROPen(tindex_ogr)

This seems to be unique for a vector tile index of vectors.  This otherwise 
works fine when using a vector tileindex of rasters.  So if I make a bogus 
raster layer like

LAYER
DEBUG 5
NAME "bogus_raster"
TYPE RASTER
TILEINDEX tindex_ogr
STATUS OFF
PROJECTION
"init=epsg:3857"
END
END

and then issue a bogus request like

curl 
'http://localhost:8000/wms?SERVICE=WMS=1.3.0=GetMap=image/png=true=/app/mapfiles/test2.map=bogus_raster=256=256=EPSG:3857==4163066.308523841,5943743.319455305,4167958.2783340923,5948635.289265556'

Then the log line includes

 msOGRFileOpen(/app/mapfiles/tindex.geojson)...
 OGROPen(/app/mapfiles/tindex.geojson)
 msConnPoolRegister(tindex_ogr,/app/mapfiles/tindex.geojson,0x556aba222630)

and _not_

 msOGRFileOpen(tindex_ogr)...

like I see for a vector tile index of vectors.

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


Re: [MapServer-users] Shapefile data source doesn't work

2022-11-29 Thread Rahkonen Jukka
Hi,

I can see blue dots with this request

http://localhost:8060/cgi-bin/mapserv.exe?
map=c:/ms4w_data/aed.map&
REQUEST=GetMap&
SERVICE=WMS&
VERSION=1.3.0&
WIDTH=1000&
HEIGHT=525&
LAYERS=Latest&
TRANSPARENT=TRUE&
FORMAT=image%2Fpng&
BBOX=1532552.9142224141,6681474.69119125,2571584.460843797,7226966.2531674765&
CRS=EPSG:3857&
STYLES=default

by using a mapfile that I slightly modified for my local MS4W. I am not sure 
what is the difference and I let you to find it out.

MAP
NAME "AED"
EXTENT 1584202.7350061805918813 6301803.1952485935762525 
2675789.3720532376319170  7329216.3261622246354818

UNITS METERS
SIZE 512 512
IMAGETYPE PNG
SHAPEPATH "/data/"
CONFIG "MS_ERRORFILE" "c:\ms4w_data\aed.txt"

PROJECTION
"init=epsg:3857"
END
WEB
   # IMAGEPATH "/tmp/"
   # IMAGEURL "/tmp/"
METADATA
  "wms_title"   "AED"
  "wms_onlineresource"  "***" #must change mapfile path
  "wms_srs" "EPSG:3857"
  "wms_enable_request"  "*"
  "wms_server_version" "1.3.0"
  "wms_feature_info_mime_type" "text/html"
  "wms_include_items" "all"
  "wms_getcapabilities_version" "1.3.0"
END
END

  SYMBOL
NAME "circlef"
TYPE ellipse
FILLED true
POINTS
10 10
END # POINTS
  END # SYMBOL


LAYER
  NAME "Latest"
  STATUS ON
  TYPE POINT
  DEBUG 5
  DATA "C:\ms4w_data\syf\aed_poland.shp"
  PROJECTION
"init=epsg:3857"
  END
  CLASS
  NAME "AED"
  STYLE
COLOR 0 0 255
        SYMBOL "circlef"
SIZE 10
  END
END
END
END
END

-Jukka Rahkonen-

Lähettäjä: Marcin Niemyjski 
mailto:mniemyj...@cloudferro.com>>
Lähetetty: tiistai 29. marraskuuta 2022 18.29
Vastaanottaja: Rahkonen Jukka 
mailto:jukka.rahko...@maanmittauslaitos.fi>>;
 joerg.thom...@wheregroup.com<mailto:joerg.thom...@wheregroup.com>; Marcin 
Niemyjski via MapServer-users 
mailto:mapserver-users@lists.osgeo.org>>
Aihe: Re: [MapServer-users] Shapefile data source doesn't work

of course, and thank you for helping!
link:
https://cloudferro-my.sharepoint.com/:f:/p/mniemyjski/Es6KvPu4ETtKvOJjs2p7ztkBLIIBjdm1aVU3epU5Sa11LQ?e=x5IYRs<https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcloudferro-my.sharepoint.com%2F%3Af%3A%2Fp%2Fmniemyjski%2FEs6KvPu4ETtKvOJjs2p7ztkBLIIBjdm1aVU3epU5Sa11LQ%3Fe%3Dx5IYRs=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C4cc17fc7cc3e48a4789f08dad226c6ff%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C1%7C638053361243558379%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C=6ewjeBbvrEbvlOygzPUXyNlqRdgfqjsHV7NQ1DMaa0s%3D=0>

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


Re: [MapServer-users] Shapefile data source doesn't work

2022-11-29 Thread Rahkonen Jukka
Hi,

Can you share also the shapefile?

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: tiistai 29. marraskuuta 2022 18.10
Vastaanottaja: Jörg Thomsen (WhereGroup) ; Marcin 
Niemyjski via MapServer-users 
Aihe: Re: [MapServer-users] Shapefile data source doesn't work

okey, I corrected mapfile according to your tips, but result remain the same.

mapfile:
https://pastebin.com/3yfVaF7Q

I also tired GetMap request - all white box was returned.

Attribute table of shp layer:
https://pasteboard.co/5uEnUYnP7NjP.png

and Layers properties from qgis:
https://pasteboard.co/Dibb2L5aICrP.png

Best,
Marcin


From: Jörg Thomsen (WhereGroup) 
mailto:joerg.thom...@wheregroup.com>>
Sent: Tuesday, November 29, 2022 4:31 PM
To: Marcin Niemyjski 
mailto:mniemyj...@cloudferro.com>>; Marcin Niemyjski 
via MapServer-users 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: [MapServer-users] Shapefile data source doesn't work

the pastebin-mapfile has no class and styling information. you need at
least one class with one style.

-> 
https://mapserver.org/tutorial/example1-2.html

Jörg



Am 29.11.22 um 16:20 schrieb Marcin Niemyjski:
> Jörg,
>
> I meant that when checking in qgis no data is rendered, nothing is
> shown. I just tried:
> https://pastebin.com/zgNes8PD
>  
> >
> QGIS connects with layer, but it seems like there is no data.
> and result remain the same - nothing was received.
>
> Thank you for fast reply,
> Marcin
> 
> *From:* MapServer-users 
> mailto:mapserver-users-boun...@lists.osgeo.org>>
>  on
> behalf of Jörg Thomsen (WhereGroup) 
> mailto:joerg.thom...@wheregroup.com>>
> *Sent:* Tuesday, November 29, 2022 4:08 PM
> *To:* mapserver-users@lists.osgeo.org 
> mailto:mapserver-users@lists.osgeo.org>>
> *Subject:* Re: [MapServer-users] Shapefile data source doesn't work
> Hi,
>
> for shp you don't need connectiontype and connection, only data is
> required. Try the absoulte path to your shp.
>
> Wht do you mean with 'map does not show'? white / blank image? This is
> often caused by a mismatsch bewtween epsg und extent. Or an error-msg?
> what does it say?
>
> Jörg
>
> Am 29.11.22 um 15:52 schrieb Marcin Niemyjski via MapServer-users:
>> Hello,
>>
>> I have a problem rendering vector layer. The data does not show. My mapfile:
>>
>> MAP
>> NAME "AED"
>> EXTENT 1584202.7350061805918813 6301803.1952485935762525
>> 

Re: [MapServer-users] Shapefile data source doesn't work

2022-11-29 Thread Rahkonen Jukka
Hi,

Please show the extent of the shapefile as ogrinfo shows it. Verify that 
EPSG:3857 is correct for the data. And capture the GetMap request that QGIS is 
sending.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: tiistai 29. marraskuuta 2022 17.21
Vastaanottaja: Jörg Thomsen (WhereGroup) ; Marcin 
Niemyjski via MapServer-users 
Aihe: Re: [MapServer-users] Shapefile data source doesn't work

Jörg,

I meant that when checking in qgis no data is rendered, nothing is shown. I 
just tried:
https://pastebin.com/zgNes8PD
QGIS connects with layer, but it seems like there is no data.
and result remain the same - nothing was received.

Thank you for fast reply,
Marcin

From: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 on behalf of Jörg Thomsen (WhereGroup) 
mailto:joerg.thom...@wheregroup.com>>
Sent: Tuesday, November 29, 2022 4:08 PM
To: mapserver-users@lists.osgeo.org 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: [MapServer-users] Shapefile data source doesn't work

Hi,

for shp you don't need connectiontype and connection, only data is
required. Try the absoulte path to your shp.

Wht do you mean with 'map does not show'? white / blank image? This is
often caused by a mismatsch bewtween epsg und extent. Or an error-msg?
what does it say?

Jörg

Am 29.11.22 um 15:52 schrieb Marcin Niemyjski via MapServer-users:
> Hello,
>
> I have a problem rendering vector layer. The data does not show. My mapfile:
>
> MAP
> NAME "AED"
> EXTENT 1584202.7350061805918813 6301803.1952485935762525
> 2675789.3720532376319170  7329216.3261622246354818
> UNITS METERS
> SIZE 512 512
> IMAGETYPE PNG
> SHAPEPATH "/data/"
>
> PROJECTION
>  "init=epsg:3857"
> END
> WEB
>  IMAGEPATH "/tmp/"
>  IMAGEURL "/tmp/"
>  METADATA
>"wms_title"   "AED"
>"wms_onlineresource"  "***" #must change mapfile path
>"wms_srs" "EPSG:3857"
>"wms_enable_request"  "*"
>"wms_server_version" "1.3.0"
>"wms_feature_info_mime_type" "text/html"
>"wms_include_items" "all"
>"wms_getcapabilities_version" "1.3.0"
>  END
> END
>
>
> LAYER
>NAME "my_shapefile"
>STATUS ON
>TYPE POINT
>STATUS ON
>CONNECTIONTYPE OGR
>CONNECTION "/DyskPlanetiler/OSM/aed_poland.shp"
>DATA "aed_poland"
>CLASS
>NAME "AED"
>STYLE
>  COLOR 246 241 223
>  OUTLINECOLOR 255 0 0
>  SYMBOL 'circle'
>  SIZE 20
>END
>  END
>END
>
> END
>
> I will be grateful for any tips.
> Best,
> Marcin
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users

--
Viele Grüße,
Jörg Thomsen

-
Where2B Konferenz 2022
15. Dezember 2022 in Bonn und Online
where2b-conference.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.thom...@wheregroup.com
www.wheregroup.com

Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885

---
Folgen Sie der WhereGroup auf twitter: 

Re: [MapServer-users] Distinguish between pixels outside of SCALE range and nodata pixels

2022-11-28 Thread Rahkonen Jukka
Hi,

What is your nodata value and the datatype of the source raster? If you deal 
with byte or int16 data and the nodata value is 0, you can keep it unaltered in 
your LUT, then map values 1-9 into 1 that is almost black, range 10-19 as you 
wish, and 20 and above into white.

-Jukka Rahkonen-

Lähettäjä: Mallinger, Bernhard 
Lähetetty: maanantai 28. marraskuuta 2022 16.53
Vastaanottaja: Rahkonen Jukka 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] Distinguish between pixels outside of SCALE range 
and nodata pixels

Thank you for the suggestion, I have tried it now.
Since the values below the minimum scale is mapped to 0, i tried using the 
following instruction:

PROCESSING "LUT=0:1"
This actually maps the values below the minimum to 1, but also the no data 
values. Do you know if there's a way where I can distinguish between those two 
using LUT?
Best,
Bernhard


On Mon, Nov 28, 2022 at 3:26 PM Rahkonen Jukka 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

Have you tried the LUT processing option 
https://mapserver.org/input/raster.html<https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmapserver.org%2Finput%2Fraster.html=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C046212920572444ef6f008dad1504c07%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C0%7C638052440048006207%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=hvl4h66%2BfJZhlIiyZKx10SqqwPXyFdyfIZgEooRMqjY%3D=0>?

-Jukka Rahkonen-

Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Mallinger, Bernhard
Lähetetty: maanantai 28. marraskuuta 2022 15.35
Vastaanottaja: 
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: [MapServer-users] Distinguish between pixels outside of SCALE range and 
nodata pixels

Hello,
We have maps where we want the color scale go from e.g. 10 to 20, so we are 
using this directive:

PROCESSING "SCALE_1=10.0,20.0"
This works great by itself, however it also means that pixels with values of 
e.g. 5 are rendered as transparent, which is the same as the nodata pixels. So 
in the final image, you can't tell if data is present but the values are too 
low, or if there just isn't any data.
So the behaviour we would like is that values below 10 are rendered as black 
and values over 20 are rendered as white.
Is this somehow possible with mapscript?


We tried to have a look in the source code, and there is this line, which 
effectively assigns 0 to pixels below the minimum:
https://github.com/MapServer/MapServer/blob/main/mapdrawgdal.c#L1555<https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMapServer%2FMapServer%2Fblob%2Fmain%2Fmapdrawgdal.c%23L1555=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C046212920572444ef6f008dad1504c07%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C0%7C638052440048006207%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=eGNr6SWL6I0yQbse%2F5SAuV7QjISOBoyi30BxYB13C9Y%3D=0>

It turns out that this small code change actually produces the desired behavior:

   fScaledValue = (float) ((pafRawData[i]-dfScaleMin)*dfScaleRatio);



   if( fScaledValue < 0.0 )

-pabyBuffer[i] = 0;

+if (pafRawData[i] > 0) {

+pabyBuffer[i] = 1;

+} else {

+pabyBuffer[i] = 0;

+}

(I.e. if the original value was greater than 0, then assign 1 to this pixel 
such that it will be black and not transparent.)

If this behavior can't yet be configured via mapscript, we could work on a pull 
request to implement this behavior, which would then be activated via a new 
configuration option.
Do you have any thoughts on this? Does this make sense to you as a feature?

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


Re: [MapServer-users] Distinguish between pixels outside of SCALE range and nodata pixels

2022-11-28 Thread Rahkonen Jukka
Hi,

Have you tried the LUT processing option 
https://mapserver.org/input/raster.html?

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Mallinger, Bernhard
Lähetetty: maanantai 28. marraskuuta 2022 15.35
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] Distinguish between pixels outside of SCALE range and 
nodata pixels

Hello,
We have maps where we want the color scale go from e.g. 10 to 20, so we are 
using this directive:

PROCESSING "SCALE_1=10.0,20.0"
This works great by itself, however it also means that pixels with values of 
e.g. 5 are rendered as transparent, which is the same as the nodata pixels. So 
in the final image, you can't tell if data is present but the values are too 
low, or if there just isn't any data.
So the behaviour we would like is that values below 10 are rendered as black 
and values over 20 are rendered as white.
Is this somehow possible with mapscript?


We tried to have a look in the source code, and there is this line, which 
effectively assigns 0 to pixels below the minimum:
https://github.com/MapServer/MapServer/blob/main/mapdrawgdal.c#L1555

It turns out that this small code change actually produces the desired behavior:

   fScaledValue = (float) ((pafRawData[i]-dfScaleMin)*dfScaleRatio);



   if( fScaledValue < 0.0 )

-pabyBuffer[i] = 0;

+if (pafRawData[i] > 0) {

+pabyBuffer[i] = 1;

+} else {

+pabyBuffer[i] = 0;

+}

(I.e. if the original value was greater than 0, then assign 1 to this pixel 
such that it will be black and not transparent.)

If this behavior can't yet be configured via mapscript, we could work on a pull 
request to implement this behavior, which would then be activated via a new 
configuration option.
Do you have any thoughts on this? Does this make sense to you as a feature?

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


Re: [MapServer-users] Redirecting to s3 via apache2 redirect/alias/proxy

2022-10-24 Thread Rahkonen Jukka
Hi,

I am not sure how well redirect plays together with MS_MAP_PATTERN 
https://www.mapserver.org/optimization/limit_mapfile_access.html#limit-mapfile-access
 but maybe you could test it by redirecting locally and trying to access a 
mapfile from a directory that does not match with MS_MAP_PATTERN. If that 
requires Apache admin rights then maybe it does not bring back 
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-32062.

If having mapfiles in s3 feels like an option that Mapserver should support 
then perhaps RFC 56 
https://www.mapserver.org/development/rfc/ms-rfc-56.html#rfc56 should be 
reviewed.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: maanantai 24. lokakuuta 2022 12.13
Vastaanottaja: Marcin Niemyjski via MapServer-users 

Aihe: [MapServer-users] Redirecting to s3 via apache2 redirect/alias/proxy

Hello,

coming back to you with one more question about s3, namely:

As I wrote before - I want to keep my mapfiles on buckets but I also want to 
access them without need to mount buckets to VMs, so I've came up with this:

https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_p
https://mapserver.org/ogc/wms_server.html#changing-the-online-resource-url

generaly I want to do this:

ProxyPass/martest/ https://s3.amazon.com/Bucket/Key
ProxyPassReverse /martest/ 
https://s3.amazon.com/Bucket/Key

or

RewriteEngine on
RewriteRule /martest/ 
https://s3.amazon.com/Bucket/

so, while using WMS online resource url 
https://www.lpis.pl/cgi-bin/mapserv?map=/martest/jrc.map
 i would connect to mapfile on s3.

But it doesn't seem to be working. Is this even possible to connect mapserver 
and s3 this way?

As always thank you for your help and time,
Marcin

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


Re: [MapServer-users] Projection confusion and output image format

2022-10-13 Thread Rahkonen Jukka
Hi,

You will see the srs metadata in GetCapabilities, WMS clients can build a menu 
according to the list, and Mapserver will reproject the maps. At least if you 
make a list that makes sense, it is not possible to transform EPSG:3067 into 
all coordinate systems of the World.

-Jukka-

-Alkuperäinen viesti-
Lähettäjä: Stefan Gofferje  

> So just to be sure: "wms_srs" is not only setting metadata but actually also 
> configuring what reprojections mapserver will do?

-Stefan

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


Re: [MapServer-users] Projection confusion and output image format

2022-10-13 Thread Rahkonen Jukka
Hi,

About adding new SRS into WMS give a list like here for the Web Mercator and 
the Finnish GK zones
"wms_srs""EPSG:3067 EPSG:3857 EPSG:3873 EPSG:3874 EPSG:3875 EPSG:3876 
EPSG:3877 EPSG:3878 EPSG:3879 EPSG:3880 EPSG:3881 EPSG:3882 EPSG:3883 EPSG:3884 
EPSG:3885 EPSG:4326 EPSG:3045"

Mapserver has a set of default outputformats and normally they all appear in 
the GetCapabilities. For giving your own list use
wms_getmap_formatlist Description: (Optional) A comma-separated list of valid 
formats for a WMS GetMap request as documented in 
https://mapserver.gis.umn.edu/ogc/wms_server.html.

-Jukka Rahkonen-


-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Stefan Gofferje
Lähetetty: torstai 13. lokakuuta 2022 10.21
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] Projection confusion and output image format

Good morning all!

thanks  to some  extra free time and  some good pointers from this list, I got 
my mapserver up  and running from zero  within  6 or so hours yesterday.
What's left is some detail work, writing some scripts,  creating a docker file 
and so on.

And...  projection confusion...

So my data is  in EPSG:3067. At the moment, I have it configured so in MAP and 
in LAYER:

   PROJECTION
 "init=epsg:3067"
   END

I also have the wms config set to EPSG:3067 only:

   "wms_srs" "EPSG:3067"

EXTENT in MAP is set to:

   EXTENT 2.00 6594000.00 74.00 7794000.00

So, if I want to offer EPSG:3857 in addition to EPSG:3067 what do I change?


The other thing is that in MAP I have set

   IMAGETYPE PNG8

mostly to speed things up  and reduce file size. However, in a GetCapabilities 
reply, I get


image/png; mode=8bit
image/png
image/jpeg
image/vnd.jpeg-png
image/vnd.jpeg-png8
application/x-pdf
image/svg+xml
image/tiff
application/vnd.google-earth.kml+xml
application/vnd.google-earth.kmz
application/vnd.mapbox-vector-tile
application/x-protobuf
application/json

...



WHat am I missing here?

-Stefan

-- 
  (o_   Stefan Gofferje| SCLT, MCP, CCSA
  //\   Reg'd Linux User #247167   | VCP #2263
  V_/_  
https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.gofferje.net%2Fdata=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C854929e934b349c7575008daaceb8906%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C0%7C638012424873234098%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=D%2BIHtncNkd%2FhNh%2FvBZ4eRJp7FqMlUL2JgjhTawX1tyM%3Dreserved=0
   | 
https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.saakeskus.fi%2Fdata=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C854929e934b349c7575008daaceb8906%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C0%7C638012424873234098%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=mrKcqosVlAXFCRuqUq17%2BavecPoahq59a3x272inS08%3Dreserved=0

___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-usersdata=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C854929e934b349c7575008daaceb8906%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C0%7C638012424873390379%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=79Trwkvfi12x6Lp7cpWXmeeGkDFsoCQnyQopd9A%2F9QU%3Dreserved=0
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] WCS 2.0.1 GetCoverage request results in corrupted geotiff

2022-08-26 Thread Rahkonen Jukka
Hi,

Your question is exceptionally detailed but because the issue happens only with 
a certain Docker image maybe you should contact the authors of the image 
https://github.com/PDOK/mapserver-docker/. But you seem to be one of the 
contributors yourself 
https://github.com/PDOK/mapserver-docker/graphs/contributors. Generally 
speaking, if one Docker works while another one does not I think I would start 
by studying how they differ.

-Jukka Rahkonen-


Lähettäjä: MapServer-users  Puolesta 
Bakker, Anton via MapServer-users
Lähetetty: perjantai 26. elokuuta 2022 19.20
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] WCS 2.0.1 GetCoverage request results in corrupted 
geotiff

Hi all,

I am running into a curious issue in which WCS 2.0.1 getcoverage requests 
produces a corrupted geotiff (which is bad) and WCS 1.0.0 getcoverage requests 
produce valid geotiffs (which is good). This behaviour occurs with our 
https://hub.docker.com/r/pdok/mapserver
 Docker image. I could not reproduce the behaviour with 
https://hub.docker.com/r/camptocamp/mapserver/
 Docker image.

On top of that; I can only reproduce this issue when running with docker. When 
running the same example with docker-compose it works fine.

I detailed the full issue description and steps to reproduce in this 
gist.
  If anyone has any suggestions or ideas what might be causing it I would be 
grateful for a response.

Kind regards,

[https://github.githubassets.com/images/modules/gists/gist-og-image.png]
MapServer WCS 2.0.1 GetCoverage request results in corrupt 
geotiff
MapServer WCS 2.0.1 GetCoverage request results in corrupt geotiff - README.md
gist.github.com


​Anton Bakker


Disclaimer:
De inhoud van deze e-mail is vertrouwelijk en uitsluitend bestemd voor de 
geadresseerde(n).
Gebruik, openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van 
deze informatie aan derden is niet toegestaan.
Op al onze producten en diensten zijn onze algemene leveringsvoorwaarden van 
toepassing
[https://www.kadaster.nl/algemene-leveringsvoorwaarden].

Disclaimer:
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient, you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.
Our general terms and conditions of delivery apply to all our products and 
services
[https://www.kadaster.com/general-terms-and-conditions].
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Content of WMS based on attribute

2022-08-19 Thread Rahkonen Jukka
Hi,

The standard WMS way would be to use SLD or SLD_BODY with a filter 
https://mapserver.org/ogc/sld.html.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: perjantai 19. elokuuta 2022 15.31
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MapServer-users] Content of WMS based on attribute

Hello,

I am wondering if it is possible to modify the GetMap request so that it 
displays elements of the Postgresql database based on the value of their 
attributes, e.g., having a set of polygons representing fields by writing crop 
= sunflower in the GetMap request, the polygons representing that crop will be 
returned.

Thanks,
Marcin

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


Re: [mapserver-users] Fwd: MapServer 7 arithmetic expressions do not work on STYLE attributes?

2022-06-16 Thread Rahkonen Jukka
Hi,

Adding a link to the same question asked earlier in gis.stackexchange: 
https://gis.stackexchange.com/questions/433659/mapserver-7-arithmetic-expressions-do-not-work-on-style-attributes/433664#433664.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Andi p3 Domi
Lähetetty: torstai 16. kesäkuuta 2022 12.05
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Fwd: MapServer 7 arithmetic expressions do not work on 
STYLE attributes?


I am trying to port my code from MapServer 5 (Oracle) to MapServer 7 
(PostgreSQL), but I am encountering an issue when trying to apply arithmetic 
expressions in the style class. So previously in MapServer 5 I would have 
something like:

DATA "geom from (select pk, geom, size from sizes_of_thing) USING srid 3788 
version 11g"

CLASS

MAXSCALEDENOM 5001

STYLE

COLOR [size*2]

Which worked perfectly fine: But if I convert it to MapServer 7 and PostgreSQL 
like:

DATA "geom from (select pk, geom, size from sizes_of_thing sot) USING unique pk 
USING srid=3788"

CLASS

STYLE

COLOR [size*2]

Throws an error such as:

msPostGISLayerWhichShapes(): Error (ERROR:  column "size*2" does not exist

By any chance are these expressions not supported anymore in MapServer 
7/PostGIS or am I doing something wrong?

What I have tried so far is to write something like

SIZE [size]*2

SIZE ([size]*2)

create an expression like:

EXPRESSION ("size2" "[size]*2")

And use it in something like:

SIZE [size2]

create a validation variable such as:

VALIDATION

"size2" '[size]*2'

and then

SIZE [size2]

But it seems like none of them work.

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


Re: [mapserver-users] Same database connection across multiple layers

2022-05-13 Thread Rahkonen Jukka
Hi,

Write the connection into a separate file that you can INCLUDE into the main 
mapfile  https://mapserver.org/mapfile/include.html

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Atlanta Geek
Lähetetty: perjantai 13. toukokuuta 2022 16.14
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Same database connection across multiple layers

Is there a way to set the db connection only once for multiple layers.
We have a very dynamic mapfile with lots of layers and its a pain to replace 
the db name when doing development or changing for a customer.  We are running 
ms4w as well.


In addition to this is it possible to set the connection string outside the 
mapfile.  Maybe as an option to the cgi script or something.

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


Re: [mapserver-users] Any trick to buffer labelpoly?

2022-05-02 Thread Rahkonen Jukka (MML)
Hi Steve,

That's not my problem, I just wondered if we could help the original poster. 
But the OP was clever enough to use a wide outline with the fill color and that 
probably gives a satisfactory result though not perfect. The wide line grows 
both outwards and inwards and the partial transparency is not perfect where the 
fill meets the outline. And when a  colored outline is widened it starts to 
paint over the label text.

-Jukka-

Lähettäjä: Steve Lime 
Lähetetty: perjantai 29. huhtikuuta 2022 17.07
Vastaanottaja: Rahkonen Jukka (MML) 
Kopio: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [mapserver-users] Any trick to buffer labelpoly?

Looks like there were some new responses on the post referenced. Will those 
work for you? Otherwise we'd have to re-think the label poly geomtranform to 
either allow an argument or be embedded in a more complex expression.

On Fri, Apr 29, 2022 at 1:24 AM Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

There is a wish to buffer the labelpoly in 
https://gis.stackexchange.com/questions/429779/mapserver-background-buffer-around-labels-geomtransform-labelpoly<https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgis.stackexchange.com%2Fquestions%2F429779%2Fmapserver-background-buffer-around-labels-geomtransform-labelpoly=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C41747ae5ae97406b35c508da29e98c3e%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C1%7C637868380312962065%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C=PQavu5kTy4oQgV1U4MK12%2B4JNw4dVVmmVG7%2B43czZaM%3D=0>
 but it does not seem to be supported directly. Can anybody suggest a trick or 
workaround?

-Jukka Rahkonen-

___
MapServer-users mailing list
MapServer-users@lists.osgeo.org<mailto:MapServer-users@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users<https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-users=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C41747ae5ae97406b35c508da29e98c3e%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C1%7C637868380312962065%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C=WukR0hkd5yI%2FcKeZsOyriJHnvs90feXuy2HwQw2wvYI%3D=0>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Any trick to buffer labelpoly?

2022-04-29 Thread Rahkonen Jukka (MML)
Hi,

There is a wish to buffer the labelpoly in 
https://gis.stackexchange.com/questions/429779/mapserver-background-buffer-around-labels-geomtransform-labelpoly
 but it does not seem to be supported directly. Can anybody suggest a trick or 
workaround?

-Jukka Rahkonen-

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


Re: [mapserver-users] Floating point exception

2022-04-08 Thread Rahkonen Jukka (MML)
Hi,

Mapserver 8 has increased security and requires a special config file. The best 
link for the documentation at the moment is probably  
https://mapserver.org/development/rfc/ms-rfc-135.html (The message "See 
mapserver.org/config_file.html for more information" points to non-existing 
location).

Why did you select "Floating point exception" as the title of your message?

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Luca Delucchi
Lähetetty: perjantai 8. huhtikuuta 2022 11.39
Vastaanottaja: Jeff McKenna 
Kopio: MapServer 
Aihe: Re: [mapserver-users] Floating point exception

Hi,

I compiled the github master version and used map2img, the output is not 
helping so much...

map2img -m eurodeer_new.map -o eurodeer.png -all_debug 5 Cannot open 
configuration file /usr/local/etc/mapserver.conf.
msLoadConfig(): Unable to access file. See mapserver.org/config_file.html for 
more information.
msDrawMap(): Image handling error. Failed to draw layer named 'Research 
groups'. 
msPostGISLayerWhichShapes(): Query error. Failed to build query SQL. 
msPostGISBuildSQL(): General error message. Failed to build SQL 'where'. 
msSearchDiskTree(): Search returned no results. Unable to open spatial index 
for 
/home/lucadelu/github/euromammals/print_maps/././data/ne_10m_admin_0_sovereignty.qix.
In most cases you can safely ignore this message, otherwise check file names 
and permissions. 
msLoadConfig(): Unable to access file. See mapserver.org/config_file.html for 
more information. 

the 'Research groups' layer is defined like this

DATA "geom from (select research_groups_id, short_name, geom from 
main.research_groups where ST_Contains(!BOX!, geom)) as subquery using unique 
research_groups_id using srid=4326"

--
ciao
Luca

www.lucadelu.org
___
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


Re: [mapserver-users] mapserver OGR does not forward BBOX at all

2022-04-01 Thread Rahkonen Jukka (MML)
Hi,

(Clipped out most of the thread because the max size of message body was 
exceeded).

That server does answer to GetCapabilities and DescribeFeatureType with WFS 
1.0.0 but not to GetFeature. It gives an error about wrong outputformat even 
that it not mandatory to the standard, and it does not accept GML2 even 
GetCapabilities is listing it as a supported format. So yes, the service is 
broken with WFS 1.0.0.

I suggested to try WFS connection and WFS 1.0.0 version as a comparison to OGR 
connection and WFS 1.1.0 but it is best to forget that test now. I don’t know 
what to suggest next. Myself I guess I would install Geoserver into localhost 
with the standard demo data and make a Mapserver layer from the topp:states 
feature type and see how it behaves. I do know that I have used Geoserver WFS 
as input for Mapserver WMS and it worked well but that was a long time ago and 
I believe I used the WFS connectiontype.

-Jukka Rahkonen-

Lähettäjä: Lars Fricke mailto:lars.fri...@skendata.de>>
Lähetetty: perjantai 1. huhtikuuta 2022 14.54
Vastaanottaja: Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>;
 mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: Re: [mapserver-users] mapserver OGR does not forward BBOX at all

Hi,
I just checked on using that server with WFS 1.0.0 but it is broken. Not even 
QGIS can open it, neither here nor in the  browser any geometry is provided.
So it looks as mapserver can not work with these?
Thanks again



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


Re: [mapserver-users] How to limit the width of the outline when the symbol size changes with the map scale?

2022-02-26 Thread Rahkonen Jukka (MML)
Hi,

Have you tried to use two filled circle symbols for making the outline effect, 
one below and the other one above? Or to use png image as a symbol?

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Kyle Qian
Lähetetty: lauantai 26. helmikuuta 2022 1.58
Vastaanottaja: Jason Snyder 
Aihe: Re: [mapserver-users] How to limit the width of the outline when the 
symbol size changes with the map scale?

The map file I used is:

CLASS
NAME "Populated Places"
STYLE
SYMBOL "PT-1"
COLOR "#00A2E8"
OPACITY 100
MINSIZE 10
MAXSIZE 30
SIZE 16.5
OFFSET 0 0
OUTLINECOLOR "#FF"
OUTLINEWIDTH 5
END
END
SYMBOLSCALEDENOM 68247.34668319309

  SYMBOL
NAME "PT-1"
TYPE ellipse
FILLED true
POINTS 5 5 END
  END

Kyle Qian mailto:kyleq...@gmail.com>> 于2022年2月26日周六 07:56写道:
Hi, when I set up a map for points, I use SYMBOLSCALEDENOM to change the size 
of points and MIN/MAXSIZE to limit it, but there seems to be no way to control 
the width of the outline of points. The outline seems to keep getting bigger as 
the map zooms in. The image below is the result map as the map zooms in:
https://pasteboard.co/JC19o7caYHHk.png
Is there any way to solve this problem?
In addition, it seems that there is no way to set the transparency of the 
outline separately. Is it necessary to use a separate STYLE to implement it 
with GEOMTRANSFORM?
Thanks.
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapserver URL request layer

2022-02-09 Thread Rahkonen Jukka (MML)
Hi,

About ows_* from https://www.mapserver.org/ogc/wms_server.html

(Note that each of the metadata below can also be referred to as ‘ows_*’ 
instead of ‘wms_*’. MapServer tries the ‘wms_*’ metadata first, and if not 
found it tries the corresponding ‘ows_*’ name. Using this reduces the amount of 
duplication in mapfiles that support multiple OGC interfaces since “ows_*” 
metadata can be used almost everywhere for common metadata items shared by 
multiple OGC interfaces.)

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Sander Pukk
Lähetetty: keskiviikko 9. helmikuuta 2022 11.26
Vastaanottaja: Jason Snyder 
Aihe: [mapserver-users] Mapserver URL request layer

Hi there!

Trying to use a geojson output from API directly in Mapserver layer.
Geojson is per standard, 4326, but my Mapserver and OL (the client) is 
configured to 3301.
We have hundreds of layers (mostly from Postgres) at the same time and the 
system works.
No other direct API ones.

The current MAP file's WEB part looks like this:

  WEB
  METADATA
"wfs_title" "title"
"wfs_enable_request""*"
"wms_enable_request""*"
"wfs_encoding"  "UTF-8"
"wms_title" "title"
"wms_encoding"  "UTF-8"
"wms_onlineresource"
"url/mapserv?map=/app/gis/infokihid/infolayers_other.map&"
"wfs_onlineresource"
"url/mapserv?map=/app/gis/infokihid/infolayers_other.map&"
"ows_srs""EPSG:3301 EPSG:3857 EPSG:4326"
"ows_enable_request""*"
"wfs_getfeature_formatlist" "gml,geojson"
"wms_feature_info_mime_type""application/json,application/json; 
subtype=geojson,application/vnd.ogc.gml,text/plain"
  END
  END

  PROJECTION
  "init=epsg:3301"
  END


And the layer:

PROJECTION
"init=epsg:4326"
END

METADATA
"wfs_srs"   "EPSG:3301"
"gml_msGeometry_type" "line"
 #"ows_extent" "40500 5993000 1064500 7017000" copy paste lon and lat 
from these 3301 coordinates from other layer's capabilites
"ows_extent" "14.9318705986602 53.7681633673032 35.1060366818735 
63.2747817924556"
"wfs_extent""14.9318705986602 53.7681633673032 35.1060366818735 
63.2747817924556"
"wms_extent""14.9318705986602 53.7681633673032 35.1060366818735 
63.2747817924556"
"ows_title" "road_restrictions"
"ows_abstract" "road_restrictions"
"ows_keywordlist" "road_restrictions"
"ows_include_items" "all"
"gml_include_items" "all"
"ows_featureid" "id"
"gml_exclude_items" "edges,geometry"
"ows_exclude_items" "edges,geometry"
END


 Couple of questions I have which I didnt really find answers for:


  1.  Had issues with 4326 to 3301 transformation,the extent and all that. 
(OpenLayers could manage but QGIS couldnt). Previously only had ows_extent.
Is ows_extent even a thing? This only shows wms_extent 
https://mapserver.org/ogc/wms_server.html#layer-object-metadata
Should you use wfs_extent and wms_extent instead?
  2.  My layer is doing an OGR connection directly to the API URL. Works fine. 
My question is, the API renews itself every 2 minutes (new data).
How does Mapserver handle the request with that connection? I move the map 
(openlayers), there's a new Mapserver request - does Mapserver make a new 
request to the API endpoint and get a new json?
Or is there some sort of cache?
  3.  Am I missing something else from the Metadata that I should consider?
With kind regards,
Sander
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Creation of raster layer legend

2022-02-04 Thread Rahkonen Jukka (MML)
Hi,

Named classes appear in the legend and add least with CLASS-KEYIMAGE you can 
define the icon for the class.
LAYER
TYPE RASTER
…
CLASS
NAME "TEST"
KEYIMAGE "c:\ms4w_data\legend.png"
…
END

-Jukka Rahkonen-



Lähettäjä: MapServer-users  Puolesta 
Ahmet Temiz
Lähetetty: perjantai 4. helmikuuta 2022 15.26
Vastaanottaja: mapserver-users 
Aihe: [mapserver-users] Creation of raster layer legend

Hi,
Is creation of raster layer legend posible ?( with or without wms)

Here is the layer part of my mapfile
  LAYER
NAME deprem

METADATA
  "wms_srs" "EPSG:3857 EPSG:4326 "
  "wms_name" "deprem"
  "wms_server_version" "1.1.1"
  "wms_format" "image/png"
END

TYPE RASTER ### required
STATUS OFF
DATA tr_dep2.tif
PROCESSING   "BANDS=1"
PROJECTION
  "init=epsg:3857"
END

COMPOSITE
  OPACITY 70
END

  CLASS
EXPRESSION ([pixel] >= 0 AND [pixel] < 0.85)
STYLE
  COLORRANGE 255 237 160  189 0 38
  DATARANGE 0.0 0.85
  RANGEITEM "pixel"
END
  END
END

regards

--
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Deprem  Dairesi Başkanlığı




Ahmet Temiz
Geological Eng.

Disaster and Emergency Management
of Presidency
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] msPostGISLayerWhichShapes() Error : java library set wrong query

2022-01-26 Thread Rahkonen Jukka (MML)
Hi,

I wonder if it could be related to which locale Java detects  on your computer 
– Italian (or Finnish) computer -> comma as a separator. Maybe something that 
deals around the same thing 
https://stackoverflow.com/questions/4713166/decimal-separator-in-numberformat.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Francesco Martinelli
Lähetetty: keskiviikko 26. tammikuuta 2022 19.00
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] msPostGISLayerWhichShapes() Error : java library set 
wrong query

Hi all,
I have a java program calling the method draw() of class 
edu.umn.gis.mapscript.mapObj
after I compiled mapserver 7.6.4 on Ubuntu 20.04

The result produce the following error:
java.lang.UnknownError: msDrawMap(): Image handling error. Failed to draw layer 
named 'MyLayer'.;msPostGISLayerWhichShapes(): Query error. Error executing 
query. Check server logs
edu.umn.gis.mapscript.mapscriptJNI.mapObj_draw(Native Method)
edu.umn.gis.mapscript.mapObj.draw(mapObj.java:397)

In mapfile I set the parameters:
CONFIG "MS_ERRORFILE" "myfile"
DEBUG 6
...
LAYER
CONNECTIONTYPE postgis
DATA "the_geom FROM (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER 
BY tipo_area DESC) AS confini USING UNIQUE gid"
CLASSITEM "my_column"
...
and in the error file I got the following message:
[Wed Jan 26 17:14:19 2022].558530 msDrawMap(): rendering using outputformat 
named png24 (AGG/PNG).
[Wed Jan 26 17:14:19 2022].569532 msPostGISLayerWhichShapes(): Error (ERROR:  
parse error - invalid geometry
HINT:  "POLYGON((774076,75" <-- parse error at position 18 within geometry
) executing query: select "my_column"::text,ST_AsBinary(("the_geom"),'NDR') as 
geom,"gid"::text from (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY 
tipo_area DESC) AS confini where "the_geom" && 
ST_GeomFromText('POLYGON((774076,75 4875124,5,774076,75 5115124,5,1014076,75 
5115124,5,1014076,75 4875124,5,774076,75 
4875124,5))',find_srid('','classi_comuni','the_geom'))
[Wed Jan 26 17:14:19 2022].569545 msPostGISLayerWhichShapes(): Query error. 
Error executing query. Check server logs
[Wed Jan 26 17:14:19 2022].569605 msDrawMap(): Image handling error. Failed to 
draw layer named 'MyLayer'.

I checked the error is caused by decimal separators being commas instead of 
dots.
As far as I understand the correct query would be (in red the changes):
select "my_column"::text,ST_AsBinary(("the_geom"),'NDR') as geom,"gid"::text 
from (SELECT * FROM classi_comuni WHERE tipo_area = 2 ORDER BY tipo_area DESC) 
AS confini where "the_geom" && ST_GeomFromText('POLYGON((774076.75 
4875124.5,774076.75 5115124.5,1014076.75 5115124.5,1014076.75 
4875124.5,774076.75 4875124.5))',find_srid('','classi_comuni','the_geom'))


I think I should set something during the compilation of java mapserver library.
Please can someone drive me on how to solve it?


Thank you,
Francesco



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


Re: [mapserver-users] LUT file too long, what to do?

2022-01-26 Thread Rahkonen Jukka (MML)
Hi Thomas,

It appeared that GIMP has invented a new format for saving the curves since the 
Mapverver LUT processing option was introduced in 2006 and the new format is 
not supported anyway. GIMP can still export the old compact format and for that 
the 2500 character limit may be realistic.

-Jukka-

Lähettäjä: thomas bonfort 
Lähetetty: keskiviikko 26. tammikuuta 2022 12.19
Vastaanottaja: Rahkonen Jukka (MML) 
Kopio: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [mapserver-users] LUT file too long, what to do?

Hi Jukka,
Unfortunately it's hardcoded: 
https://github.com/MapServer/MapServer/blob/2d73b379284aa12a2013929dfb6cdc244ae60994/mapdrawgdal.c#L1064
 but it shouldn't be very difficult for you to apply a local patch fixing that.
regards,
thomas

On Wed, Jan 26, 2022 at 11:11 AM Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

I am trying to adjust satellite image colors with a GIMP curve file but trial 
fails because the file is too long

[Wed Jan 26 12:03:52 2022].708000 msDrawRasterLayerLow(sentinel_lut): entering.
[Wed Jan 26 12:03:52 2022].713000 drawGDAL(): Unable to access file. LUT 
definition from file c:\ms4w_data\sentinel_malli_a.crv longer than maximum 
buffer size (2500 bytes).

Is this a hard coded limit or can user override it somehow? The .crv file has 
26000 characters and it is using ridiculous precision in entries 
(0.9826558159707) but it is not easy to shrink it into 2500 characters.

-Jukka Rahkonen-
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org<mailto: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] LUT file too long, what to do?

2022-01-26 Thread Rahkonen Jukka (MML)
Hi,

I am trying to adjust satellite image colors with a GIMP curve file but trial 
fails because the file is too long

[Wed Jan 26 12:03:52 2022].708000 msDrawRasterLayerLow(sentinel_lut): entering.
[Wed Jan 26 12:03:52 2022].713000 drawGDAL(): Unable to access file. LUT 
definition from file c:\ms4w_data\sentinel_malli_a.crv longer than maximum 
buffer size (2500 bytes).

Is this a hard coded limit or can user override it somehow? The .crv file has 
26000 characters and it is using ridiculous precision in entries 
(0.9826558159707) but it is not easy to shrink it into 2500 characters.

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


Re: [mapserver-users] WCS layer units question...

2022-01-13 Thread Rahkonen Jukka (MML)
Hi,

I can only tell that with these metadata settings in my mapfile

METADATA
  "wcs_label""orto_vv"  ### required
  "wcs_resolution" "0.5 0.5"
  "wcs_imagemode" "BYTE"
  "wcs_bandcount" "3"
  "wcs_band_names" "Band1 Band2 Band3"
  "wcs_timeposition" "2000-11-11T11:11:11Z,2001-11-11T11:11:11Z"
  "Band1_band_description""NIR range 700-900 nm"
  "Band2_band_description""Red range 600-700 nm"
  "Band3_band_description""Green range 500-600"
  "Band1_band_uom" "foo"
  "Band2_band_uom" "bar"
  "Band3_band_uom" "foobar"
  "wcs_rangeset_axis" "E,N"

  "wcs_extent"  "212000.000 6762000.000 218000.000 
6768000.000"
  "wcs_rangeset_name"   "Range 1"  ### required to support 
DescribeCoverage request
  "wcs_rangeset_label"  "My Label" ### required to support 
DescribeCoverage request
END

I can see for example this in DescribeCoverage


Green range 500-600



I have the same version 7.7.0-dev (MS4W 4.0.5).

-Jukka Rahkonen-




Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Carl Godkin
Lähetetty: torstai 13. tammikuuta 2022 2.45
Vastaanottaja: Mapserver-Users 
(mapserver-users@lists.osgeo.org) 
mailto:mapserver-users@lists.osgeo.org>>
Aihe: Re: [mapserver-users] WCS layer units question...

Hi Jukka,

Thanks for the documentation pointer.  I have attached a .map file in which I 
have all three of the possibilities

  # Trying all three.  My single band is called "band"
  "wcs_band_uom"  "m"
  "ows_band_uom"  "m"
  "band_band_uom"  "m"

but I still only see



from DescribeCoverage.  I am very curious to know what I've overlooked!

By the way, I'm running MapServer from the "camptocamp" docker image.  It 
appears to by MapServer 7.7-dev.

Thanks so much,
carl

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


Re: [mapserver-users] WCS layer units question...

2022-01-12 Thread Rahkonen Jukka (MML)
Hi,

Sorry, I thought that our service is open. This should work 
https://demo.mapserver.org/cgi-bin/wcs?SERVICE=wcs=2.0.0=DescribeCoverage=modis

The default value of uom is documented in 
https://www.mapserver.org/ogc/wcs_server.html
“If no specific or default value is given, the output is dependent on the 
metadata key. The UOM, for example will be set to ‘W.m-2.Sr-1’”

WCS metadata keywords, including “{band_name}_band_uom” work for us. I am sure 
that you will make it to work as well but if you won’t, show us your mapfile.

-Jukka Rahkonen-


Lähettäjä: MapServer-users  Puolesta 
Carl Godkin
Lähetetty: keskiviikko 12. tammikuuta 2022 17.13
Vastaanottaja: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [mapserver-users] WCS layer units question...

Thanks for the reply, Jukka.

I found "wcs_band_uom" in the docs but I can't seem to make the value I put 
into my map file appear in the DescribeCoverage output.  (The link you sent 
doesn't work for me.)

I do see this though:







-3.4028e+38 3.4028e+38
12





The "swe:uom code" would seem to be what I want to affect.  For some reason I 
see the value "watts per square meter per steradian" which appears nowhere in 
my map file so I wonder if it's some sort of default baked into the code or 
something.  (I had seen that before but hadn't bothered to try to figure out 
what it was until just now.  That's weird.)

Thanks for your help,

carl



On Tue, Jan 11, 2022 at 11:57 PM Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

WCS users are supposed to read the metadata with DescribeCoverage, for example 
https://avoin-visukuva.nls.fi/ortokuvat-ja-korkeusmallit/wcs/v1?service=WCS=2.0.1=DescribeCoverage=ortokuva_vari
The units can be configured in the mapfile with “wcs_band_uom”. I do not know 
if it is possible to configure the outputformat to write uom also into the 
TIFF. That is something that GDAL should do.

-Jukka Rahkonen-



Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Carl Godkin
Lähetetty: keskiviikko 12. tammikuuta 2022 3.58
Vastaanottaja: Mapserver-Users 
(mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>) 
mailto:mapserver-users@lists.osgeo.org>>
Aihe: [mapserver-users] WCS layer units question...

Hi,

I have a local WCS & WMS server.

I am trying to figure out if I can somehow define the Z units of a terrain 
layer I'm serving.

The single band from the individual GeoTIFF files providing the terrain data 
looks like this (from gdalinfo):

Band 1 Block=512x512 Type=Float32, ColorInterp=Gray
  Description = Layer_1
  NoData Value=-99
  Unit Type: m <= units are meters
  Metadata:
LAYER_TYPE=athematic
RepresentationType=ATHEMATIC

but when I download a GeoTIFF using a WCS GetCoverage request on this layer, 
the GeoTIFF's single band just looks like this:

Band 1 Block=571x3 Type=Float32, ColorInterp=Gray

without "Unit Type."

I also tried using
   UNITS Meters
in my LAYER definition in my map file (copying an example I found among the 
case studies on the web site) but it didn't seem to have any effect.

Is there some way to define and retrieve the Z units for a WCS server?

Thanks very much.

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


Re: [mapserver-users] WCS layer units question...

2022-01-11 Thread Rahkonen Jukka (MML)
Hi,

WCS users are supposed to read the metadata with DescribeCoverage, for example 
https://avoin-visukuva.nls.fi/ortokuvat-ja-korkeusmallit/wcs/v1?service=WCS=2.0.1=DescribeCoverage=ortokuva_vari
The units can be configured in the mapfile with “wcs_band_uom”. I do not know 
if it is possible to configure the outputformat to write uom also into the 
TIFF. That is something that GDAL should do.

-Jukka Rahkonen-



Lähettäjä: MapServer-users  Puolesta 
Carl Godkin
Lähetetty: keskiviikko 12. tammikuuta 2022 3.58
Vastaanottaja: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: [mapserver-users] WCS layer units question...

Hi,

I have a local WCS & WMS server.

I am trying to figure out if I can somehow define the Z units of a terrain 
layer I'm serving.

The single band from the individual GeoTIFF files providing the terrain data 
looks like this (from gdalinfo):

Band 1 Block=512x512 Type=Float32, ColorInterp=Gray
  Description = Layer_1
  NoData Value=-99
  Unit Type: m <= units are meters
  Metadata:
LAYER_TYPE=athematic
RepresentationType=ATHEMATIC

but when I download a GeoTIFF using a WCS GetCoverage request on this layer, 
the GeoTIFF's single band just looks like this:

Band 1 Block=571x3 Type=Float32, ColorInterp=Gray

without "Unit Type."

I also tried using
   UNITS Meters
in my LAYER definition in my map file (copying an example I found among the 
case studies on the web site) but it didn't seem to have any effect.

Is there some way to define and retrieve the Z units for a WCS server?

Thanks very much.

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


Re: [mapserver-users] security problem?

2021-12-14 Thread Rahkonen Jukka (MML)
Hi,

Of course people may use log4j2 in their own code but  Mapserver project does 
not deliver log4j nor is it used in any of the examples 
https://github.com/MapServer/MapServer/tree/main/mapscript/java.

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: Bjørn Ove Grøtan  
Lähetetty: tiistai 14. joulukuuta 2021 17.08
Vastaanottaja: Rahkonen Jukka (MML) 
Kopio: Zimmer Rene ; 
'mapserver-users@lists.osgeo.org' 
Aihe: Re: [mapserver-users] security problem?

Uhm - guess not many are using the Mapscript Java-binding then? (I don't, so 
haven't tested) https://mapserver.org/ogc/mapscript.html

But as Jukka said, Mapserver in itself is not written in Java.
If you are using Mapscript w/Java bindings, you have to check for yourself what 
you do in your own code.

According to https://trac.osgeo.org/mapserver/wiki/JavaMapscriptUsing
commons-logging is being used, not log4j - if you are indeed using 
Mapscript-Java.

-Bjørn 

Rahkonen Jukka (MML):
> Hi,
> 
> Log4j is a Java library, Mapserver is not Java. You can feel safe with this 
> issue.
> 
> -Jukka Rahkonen-
> 
> Lähettäjä: MapServer-users  
> Puolesta Zimmer Rene
> Lähetetty: tiistai 14. joulukuuta 2021 15.36
> Vastaanottaja: 'mapserver-users@lists.osgeo.org' 
> 
> Aihe: [mapserver-users] security problem?
> 
> Hello everybody,
> 
> when using Mapserver, is there also a security problem with log4j?
> 
> Is it used?
> 
> If so, how can the gap be closed?
> 
> 
> Thanks,
> 
> Rene
> 
> 
> 
> 
> --
> 
> This email was Anti Virus checked by Astaro Security Gateway.
> 
> 
> 
> Geprüft und getestet

> ___
> 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


Re: [mapserver-users] security problem?

2021-12-14 Thread Rahkonen Jukka (MML)
Hi,

Log4j is a Java library, Mapserver is not Java. You can feel safe with this 
issue.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Zimmer Rene
Lähetetty: tiistai 14. joulukuuta 2021 15.36
Vastaanottaja: 'mapserver-users@lists.osgeo.org' 

Aihe: [mapserver-users] security problem?

Hello everybody,

when using Mapserver, is there also a security problem with log4j?

Is it used?

If so, how can the gap be closed?


Thanks,

Rene




--

This email was Anti Virus checked by Astaro Security Gateway.



Geprüft und getestet
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] How to Turn off a Layer when other specific Layer is ON in a map file ?

2021-11-25 Thread Rahkonen Jukka (MML)
Hi Jeff,

I wonder how REQUIRES works/should work with other services. I think that with 
WCS it cannot work and makes no sense either, with WFS it could work (same 
effect than modifying the = ) but maybe does not make sense, but how 
about vector tiles?

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Jeff McKenna
Lähetetty: keskiviikko 24. marraskuuta 2021 21.18
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] How to Turn off a Layer when other specific Layer 
is ON in a map file ?

Ah!  Boy this was tricky to get working.  In my tests, it is the logical 
operators AND and OR that are not working, with MapServer 8.0-dev (I tested 
mode=map, map2img/shp2img, WMS GetMap, and PHP MapScript).  But the great news 
is that something like the following works well, in all modes :

  LAYER
..
REQUIRES "![yourlayername]"
  END


not working: REQUIRES "![yourlayername] OR ![someotherlayername]"

I'll add these notes to the docs today...   Thanks for the nudge on this 
Carlos!

-jeff




On 2021-11-23 6:07 p.m., Jeff McKenna wrote:
> Indeed I think my testing was wrong, as mode=map and layers= was 
> overriding the REQUIRES parameter, as I see that in msautotest things 
> are working with shp2img.  So, maybe I should not have sent these 
> messages ha.
> 
> -jeff
> 
> 
> 
> On 2021-11-23 5:42 p.m., Rahkonen Jukka (MML) wrote:
>> Hi Jeff,
>>
>> I know REQUIRES has worked in a positive way (show copyright when a 
>> layer is on) because I have used that feature but I do not admin that 
>> service any more and I can't check the details. Probably I used 
>> version 6.x then.
>>
>> -Jukka Rahkonen-
>>
>> -Alkuperäinen viesti-
>> Lähettäjä: MapServer-users 
>> Puolesta Jeff McKenna
>> Lähetetty: tiistai 23. marraskuuta 2021 23.35
>> Vastaanottaja: mapserver-users@lists.osgeo.org
>> Aihe: Re: [mapserver-users] How to Turn off a Layer when other 
>> specific Layer is ON in a map file ?
>>
>> To give a more detailed example of what *should* work:
>>
>>     LAYER
>>   ..
>>   REQUIRES "![modis] OR ![someotherlayername]"
>>     END
>>
>> I'll continue my 8.0-dev testing...
>>
>>
>> -jeff
>>
>>
>>
>> --
>> Jeff McKenna
>> GatewayGeo: Developers of MS4W, MapServer Consulting and Training 
>> co-founder of FOSS4G http://gatewaygeo.com/
>>
>>
>> On 2021-11-23 5:29 p.m., Jeff McKenna wrote:
>>> Hi Carlos,
>>>
>>> I had a great answer drafted for you, tooting my own horn on the 
>>> recent MapServer tutorial updates for MapServer 8.x, and the demo 
>>> server updates...as by chance the tutorial mentions that the 
>>> parameter "REQUIRES" at the LAYER level should do exactly what you need, 
>>> super :
>>> but sadly my tests now fail with MapServer 8.0-dev, I cannot get 
>>> REQUIRES to work, such as:
>>>
>>>     LAYER
>>>      ..
>>>      REQUIRES "![modis]"
>>>     END
>>>
>>>    where modis is another layer name.
>>>
>>> Since I hadn't been testing this feature, and it is only briefly 
>>> mentioned in the tutorial (and not part of the live demo), I have no 
>>> way of saying when this should have worked, for what MapServer 
>>> version.  It is part of the tutorial mapfiles, but the functionality 
>>> is not working, for my local tests.
>>>
>>> But your question has made me see more room for improvement in the 
>>> tutorial, and its mapfiles, so your question has helped.
>>>
>>> Sorry for my non-news, ha.
>>>
>>> I'll do more testing on this feature and report back.
>>>
>>> -jeff
>>>
>>>
>>>
>>
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
> 
> 


--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of 
FOSS4G http://gatewaygeo.com/ ___
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


Re: [mapserver-users] WFS bbox/intersect etc query from custom projection to EPSG:4326

2021-11-25 Thread Rahkonen Jukka (MML)
(resending to the list without the original mail, list has rather (too?) strict 
size limits, 40 KB)

Hi,

Perhaps you fell into the infamous axis order trap. With WFS 1.1.x and 2.0 the 
coordinates of EPSG:4326 most be in latitude-longiture oreder. I modified you 
mapfile a bit for my test data that are in EPSG:3067, and this request
http://localhost:8060/cgi-bin/mapserv.exe?map=c:/ms4w_data/wfstest.map=WFS=2.0.0=GetFeature=ms:testi_virolaisille=60.1870614692821,24.9810192523929,60.2794267964524,25.1561900521738,urn:ogc:def:crs:EPSG::4326
finds buildings from the database.  The SQL that Mapserver generates is:

[Thu Nov 25 10:23:51 2021].654000 msPostGISLayerWhichShapes query: SELECT 
"fid"::text,"id"::text,"mtk_id"::text,"sijaintitarkkuus"::text,"aineistolahde"::text,"alkupvm"::text,"kohdeluokka"::text,"korkeustarkkuus"::text,"kayttotarkoitus"::text,"kerrosluku"::text,"pohjankorkeus"::text,"korkeusarvo"::text,ST_AsBinary(("geom"),'NDR')
 as geom,"fid"::text FROM rakennus WHERE "geom" && 
ST_GeomFromText('POLYGON((388034.2 6673671.81841385,388034.2 
6684239.6439825,398034 6684239.6439825,398034 6673671.81841385,388034.2 
6673671.81841385))',3067)

Notice that the re-projected polygon seems to be the envelope of the rotated 
bbox from the transformation and therefore it is bigger than the polygon that 
would be achieved by connecting the projected corner points as this test with 
gdaltranform shows.

gdaltransform -s_srs epsg:4326 -t_srs epsg:3067
24.9810192523929 60.1870614692821
388034.2 6673956 0
25.1561900521738 60.279426796452
398033.9 6683955.9996 0

I add also my mapfile, I apologize that it is just a fast modification of some 
old mapfile and is not the cleanest possible.

MAP

CONFIG "MS_ERRORFILE" "/ms4w_data/ms_error.txt"
EXTENT 19970 6597278 749676 7785300
PROJECTION
"init=epsg:3067"
END

OUTPUTFORMAT
NAME "OGRGML"
DRIVER "OGR/GML"
FORMATOPTION "STORAGE=stream"
FORMATOPTION "LCO:COORDINATE_PRECISION=10"
  END

  OUTPUTFORMAT
  NAME "GeoJSON"
  DRIVER "OGR/GEOJSON"
  MIMETYPE "application/json; subtype=geojson; charset=utf-8"
  FORMATOPTION "STORAGE=stream"
  FORMATOPTION "FORM=SIMPLE"
  FORMATOPTION "LCO:COORDINATE_PRECISION=10"
  END



LAYER
NAME "testi_virolaisille"
STATUS ON
DEBUG 10
TYPE polygon

PROJECTION
  "init=epsg:3067"
END

METADATA
  "ows_title" "viro_testi"
  "ows_abstract" "viro_testi"
  "wfs_getfeature_formatlist" "GeoJSON"
   #   "gml_featureid" "id"
  "gml_include_items" "all"
   #   "gml_types" "auto"
  "wfs_srs"  "EPSG:3067 EPSG:3857 EPSG:4326"
END
CONNECTIONTYPE POSTGIS
CONNECTION "host=localhost port=5432 dbname= user= password= "
DATA "geom from rakennus using SRID=3067"
CLASS
STYLE
COLOR 255 0 0
END
END
END
WEB
MINSCALE 10
MAXSCALE 155
METADATA
"wms_title" "wfs_test"
"wfs_onlineresource"  
http://localhost:8060/cgi-bin/mapserv.exe?map=c:\ms4w_data\wfstest.map
"wms_srs" "EPSG:4326 EPSG:900913 EPSG:3857 EPSG:31370"
"wms_enable_request" "*"
"wms_feature_info_mime_type" "text/html"
"wms_format" "image/png"
"wfs_title" "wfs_test"
"wfs_srs" "EPSG:3067 EPSG:3857 EPSG:4326"
"wfs_enable_request" "*"
"wfs_precision" "10"
#"wfs_feature_info_mime_type" "text/html"
END

END
END

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


Re: [mapserver-users] How to Turn off a Layer when other specific Layer is ON in a map file ?

2021-11-23 Thread Rahkonen Jukka (MML)
Hi Jeff,

I know REQUIRES has worked in a positive way (show copyright when a layer is 
on) because I have used that feature but I do not admin that service any more 
and I can't check the details. Probably I used version 6.x then.

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Jeff McKenna
Lähetetty: tiistai 23. marraskuuta 2021 23.35
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] How to Turn off a Layer when other specific Layer 
is ON in a map file ?

To give a more detailed example of what *should* work:

   LAYER
 ..
 REQUIRES "![modis] OR ![someotherlayername]"
   END

I'll continue my 8.0-dev testing...


-jeff



--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of 
FOSS4G http://gatewaygeo.com/


On 2021-11-23 5:29 p.m., Jeff McKenna wrote:
> Hi Carlos,
> 
> I had a great answer drafted for you, tooting my own horn on the recent 
> MapServer tutorial updates for MapServer 8.x, and the demo server 
> updates...as by chance the tutorial mentions that the parameter 
> "REQUIRES" at the LAYER level should do exactly what you need, super : 
> but sadly my tests now fail with MapServer 8.0-dev, I cannot get 
> REQUIRES to work, such as:
> 
>    LAYER
>     ..
>     REQUIRES "![modis]"
>    END
> 
>   where modis is another layer name.
> 
> Since I hadn't been testing this feature, and it is only briefly 
> mentioned in the tutorial (and not part of the live demo), I have no way 
> of saying when this should have worked, for what MapServer version.  It 
> is part of the tutorial mapfiles, but the functionality is not working, 
> for my local tests.
> 
> But your question has made me see more room for improvement in the 
> tutorial, and its mapfiles, so your question has helped.
> 
> Sorry for my non-news, ha.
> 
> I'll do more testing on this feature and report back.
> 
> -jeff
> 
> 
> 

___
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


Re: [mapserver-users] How to Turn off a Layer when other specific Layer is ON in a map file ?

2021-11-23 Thread Rahkonen Jukka (MML)
Hi,

I would try LAYER - REQUIRES that is documented in 
https://mapserver.org/mapfile/layer.html#labelrequires

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Carlos Neves (LREC)
Lähetetty: tiistai 23. marraskuuta 2021 21.46
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] How to Turn off a Layer when other specific Layer is ON 
in a map file ?

Hi List,

It seems to be simple, but I can't find a way. How to turn off a Layer in 
MAPSERVER when a specific Layer is ON in a MAP file?

Any Help would be appreciated.

Best Regards

Carlos


___
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


Re: [mapserver-users] Trouble with OpenStreetMap data in MapServer

2021-11-19 Thread Rahkonen Jukka (MML)
Hi,

I agree with Jörg. The polygon that is used in the query is about 19000 km 
wide. Run shp2img with for smaller bbox with -e switch 
https://mapserver.org/utilities/shp2img.html. However, there may be something 
to improve in the mapfile and layer maxscaledenom because it does not make 
sense to render buildings at that scale.

-Jukka Rahkonen-


-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Jörg Thomsen (WhereGroup)
Lähetetty: perjantai 19. marraskuuta 2021 10.01
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Trouble with OpenStreetMap data in MapServer

Hello Carl,

what about the error-message
> out of memory for query result ?

I guess the buildings of the whole USA need a lot of space (talking about your 
database and memory not the real world ;) ) I tink theres nothing wrong with 
your MapServer-Configuration, loks more like a message from PostGIS. Have you 
looked into the pg-log? you might check the memory-usage in taskmannager during 
the request.
Have you tried the sql-query directly in pg (psql, pg-admin)? You also coud try 
to test a smaller bbox.

Jörg

Am 18.11.21 um 23:03 schrieb Carl Godkin:
> Hi,
> 
> I am following the instructions for using OpenStreetMap data in 
> MapServer here:
> 
> https://github.com/mapserver/mapserver/wiki/RenderingOsmDataWindows
> 
> 
> I've been almost all the way through the steps getting everything to 
> work until I reached the step "Testing with shp2img" which says to run this:
> 
>           shp2img -m osm-google.map -o output.png -map_debug 3
> 
> It fails, like this:
> 
> msDrawMap(): rendering using outputformat named png (AGG/PNG).
> msDrawMap(): WMS/WFS set-up and query, 0.000s
> msPostGISLayerWhichShapes(): Error (out of memory for query result
> ) executing query: SELECT "name"::text,ST_AsBinary(("geometry"),'NDR')
> as geom,"osm_id"::text FROM (select geometry,osm_id, name as name from
> osm_new_buildings) as foo WHERE "geometry" &&
> ST_GeomFromText('POLYGON((-20037508.3427892
> -3113412.49464005,-20037508.3427892 15861721.9613068,-1062373.88684241
> 15861721.9613068,-1062373.88684241 -3113412.49464005,-20037508.3427892
> -3113412.49464005))',3857)
> msPostGISLayerWhichShapes(): Query error. Error executing query. Check 
> server logs
> msDrawMap(): Image handling error. Failed to draw layer named 'buildings3'.
> msDrawMap(): Image handling error. Failed to draw layer named 
> 'buildings3'. 
> msPostGISLayerWhichShapes(): Query error. Error executing query. Check 
> server logs 
> 
> --
> I don't see anything in the MapServer logs and don't really understand 
> what is wrong.
> 
> I tried specifying individual layers with "-l " to the 
> shp2img command and most of them work, which I find encouraging.
> Specifying layer "buildings3" which failed above still fails when 
> specified individually.
> 
> I'm using Postgres 14, MS4W 4.0.5, MapServer 7.6.4 on Windows 10.
> 
> Inspecting the "osm-google.map" file doesn't show me anything very 
> strange but I'm no expert.  I pasted the LAYER section for "buildings3"
> at the bottom in case someone spots anything.
> (The process used to generate this file is ... well ... amazing!)
> 
> I am using data from geofabric.de  for the USA 
> (http://download.geofabrik.de/north-america/us-latest.osm.pbf
> )
> downloaded two days ago.
> 
> Does anyone have any suggestions on getting to the bottom of this?  I 
> feel like I'm tantalizingly close!
> 
> Thanks a lot,
> 
> carl
> 
> ---
> LAYER
>     STATUS ON
>     PROJECTION
>         "init=epsg:3857"
>     END
>     GROUP "default"
>     NAME "buildings3"
>     TYPE POLYGON
>     CONNECTIONTYPE postgis
>     CONNECTION "host=localhost dbname=osm user=postgres 
> password=postgres port=5432"
>     DATA "geometry from (select geometry,osm_id, name as name from
> osm_new_buildings) as foo using unique osm_id using srid=3857"
>     LABELITEM "name"
>     PROCESSING "LABEL_NO_CLIP=ON"
>     PROCESSING "CLOSE_CONNECTION=DEFER"
>     MAXSCALEDENOM 83202051
>     MINSCALEDENOM 41601025
>     CLASS
>       STYLE
>          COLOR "#bb"
>          OPACITY 50
>       END
>       STYLE
>          OUTLINECOLOR "#33"
>          WIDTH 0
>       END
>    END
> END
> 
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


--
Viele Grüße,
Jörg Thomsen

-
Schon gewusst?

In unserem Blog geben wir Tipps & Tricks zu  Open-Source-GIS-Software und 
berichten aus unserem Experten-Alltag:
https://wheregroup.com/blog/
-

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.thom...@wheregroup.com

Re: [mapserver-users] Running on Mac Apache with Hombrew Install of Mapserver 7.6.4

2021-11-18 Thread Rahkonen Jukka (MML)
Hi,

I have env setting at the top level in httpd.conf. On my Windows I have there 
also things like
SetEnv PROJ_LIB "/ms4w/proj/nad/"
SetEnv GDAL_DATA "/ms4w/gdaldata"

but you may have those set already as generic environmental variables on your 
Mac. And you do not need to have directory /opt/mapserver for your mapfiles, 
you can store them anywhere you want, but MS_MAP_PATTERN must validate the path 
that you are using.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Kenneth Kniel via MapServer-users
Lähetetty: torstai 18. marraskuuta 2021 17.14
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Running on Mac Apache with Hombrew Install of Mapserver 
7.6.4

Working through server issues have not really begun to see maps yet but have 
verified mapserver is running.

Latest issues  is that I am getting the

 msCGILoadMap(): Web application error. CGI variable "map" fails to validate.

When I try access demo example-1

I believe I need to add this statement to my http.conf file


SetEnv MS_MAP_PATTERN 
"^\/opt\/mapserver\/([^\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.(map))$"


Maybe I have not looked hard enough but cannot find a /opt/mapserver/ directory 
in my Homebrew install?

Does it natter where in the https.conf  you place this statement?


Anyone dealt with this?

Gettin so close I can almost see a map….:)

Thanks in advance.




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


Re: [mapserver-users] msCGILoadMap(): Web application error. CGI variable "map" is not set

2021-11-15 Thread Rahkonen Jukka (MML)
Hi,

Please use “Reply all” for sending mail to the list as well. If your trouble 
gets solved the mailing list archives may help other Mapserver users later.

You have such a new Mapserver version that you must take care of some 
additional security settings 
https://www.mapserver.org/optimization/limit_mapfile_access.html#limit-mapfile-access

Have a look at your Apache httpd.conf file. Do you see a configuration of 
environment variable MS_MAP_PATTERN there? I am sorry but I cannot help with 
writing correct regexp, I do not really understand it myself. It takes me 
usually a few copy-paste-edit-test rounds to make the regexp work.

-Jukka Rahkonen-

Lähettäjä: Kenneth Kniel 
Lähetetty: maanantai 15. marraskuuta 2021 21.37
Vastaanottaja: Rahkonen Jukka (MML) 
Aihe: Re: [mapserver-users] msCGILoadMap(): Web application error. CGI variable 
"map" is not set

Thank you sir.

Now I have Bobb's problem  a permissions issue I believe.

msLoadMap(): Unable to access file. (/ms4w/apps/tutorial/htdocs/example1-1.map)



On Nov 15, 2021, at 2:03 PM, Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:

Hi,

You seem to have an extra space character in your url after /mapserv?. See %20 
in that place, it is space as url-encoded.

-Jukka Rahkonen-


Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Kenneth Kniel via MapServer-users
Lähetetty: maanantai 15. marraskuuta 2021 20.19
Vastaanottaja: 
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: [mapserver-users] msCGILoadMap(): Web application error. CGI variable 
"map" is not set

Mac OS 11.6.1
Mapserver 7.6.4. Homebrew install

Working my way through the tutorial.  Going slow a lot of permission issues.

The Mapserver is running I go the no query response when I access from the 
server.


Trying to run the first example
//localhost/cgi-bin/mapserv?%20map=/ms4w/apps/tutorial/htdocs/example1-1.map=states=map<http://localhost/cgi-bin/mapserv?%20map=/ms4w/apps/tutorial/htdocs/example1-1.map=states=map>

Getting error in subject line above.

Thoughts?

Thanks in advance.

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


Re: [mapserver-users] msCGILoadMap(): Web application error. CGI variable "map" is not set

2021-11-15 Thread Rahkonen Jukka (MML)
Hi,

You seem to have an extra space character in your url after /mapserv?. See %20 
in that place, it is space as url-encoded.

-Jukka Rahkonen-


Lähettäjä: MapServer-users  Puolesta 
Kenneth Kniel via MapServer-users
Lähetetty: maanantai 15. marraskuuta 2021 20.19
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] msCGILoadMap(): Web application error. CGI variable 
"map" is not set

Mac OS 11.6.1
Mapserver 7.6.4. Homebrew install

Working my way through the tutorial.  Going slow a lot of permission issues.

The Mapserver is running I go the no query response when I access from the 
server.


Trying to run the first example
//localhost/cgi-bin/mapserv?%20map=/ms4w/apps/tutorial/htdocs/example1-1.map=states=map

Getting error in subject line above.

Thoughts?

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


Re: [mapserver-users] Point query from Mapserver raster

2021-11-02 Thread Rahkonen Jukka (MML)
Hi,

Yes, it is a useful hack. The same hack works with Geoservers but then 
GetFeatureInfo returns the values that are scaled to 0-255 for GetMaps instead 
of the raw values and that is not especially useful if you have a DEM layer. So 
be warned and stay with Mapserver.
None of the existing OGC standards suits well for point queries from rasters 
but the coming OGC API Coverages standard should support those 
https://github.com/opengeospatial/ogcapi-coverages/issues/112.

-Jukka-

Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Carl Godkin
Lähetetty: tiistai 2. marraskuuta 2021 18.04
Vastaanottaja: 
mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Point query from Mapserver raster

Thanks for the quick response, Jukka.

I did not realize that X/Y had been replaced by I/J.  I just tried that instead 
and it still worked (of course) but I still get the warning message.

I had also been trying WMS 1.1.0 and 1.1.1 earlier and I am unable to find any 
combination of versions and other query parameters to quiet the warning message.

Regarding the BBOX range, I opened the range to a full degree in each direction 
and still get the warning.  I think I will stick with the query I posted 
originally (with 1.3.0) since it works and just ignore the messages in the log.

This seems like sort of a hack to me (asking for a box when I want a point, 
etc.) which is why I asked my question in the first place.  But it works fine 
so I'm happy!

Thanks again,

carl

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


Re: [mapserver-users] Point query from Mapserver raster

2021-11-02 Thread Rahkonen Jukka (MML)
Hi,

(Had to clip some text from the bottom because of the size limit of this list)

You do not seem to do anything wrong. Your WMS 1.3.0 EPSG:4326 lat-long 
BBOX=42.94,-122.09,42.95,-122.08& gets converted into long-lat order and for 
some reason the lower and higher values are equal 
{-122.082500,42.942500,-122.082500,42.942500}, thus this is no more a box but a 
point.
GetFeatureInfo with a small bbox and width=2 and height=2 is a trick that is 
certainly not heavily tested because the corresponding GetMap is pretty odd 
despite being valid.  Maybe using slightly bigger BBOX makes Mapserver to query 
the backend raster with a rectangle instead of a point.
BTW X=1 and Y=1 are not valid in WMS 1.3.0, you are supposed to use i= and j= 
instead. That makes me think that maybe you could have a try with a full and 
valid WMS 1.1.0 GetFeatureInfo request with SRS= and BBOX in long-lat order and 
see if it has any effect on the msProjectRect()

-Jukka Rahkonen-

Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Carl Godkin
Lähetetty: tiistai 2. marraskuuta 2021 17.06
Vastaanottaja: 
mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Point query from Mapserver raster

Hi,

Following Jukka's advice on my elevation point query, I am trying to use WMS 
GetFeatureInfo,

I've mostly got it working but have a few more questions.  (I am using MS4W 
4.0.5 which includes MapServer 7.7.0)

I added a LAYER to my WMS map file:

  LAYER
PROCESSING "RESAMPLE=BILINEAR"
NAME SRTM_3_arc-second_grid
METADATA
  "wms_title"   "SRTM - 3 arc-second grid"
  "ows_extent"  "-125 24 -66 50"
  "wms_include_items"   "all"
END

TYPE RASTER
STATUS ON
TILEINDEX "srtm_3_hgt-index.shp"
TILEITEM "Location"
TEMPLATE "../template.html"
PROJECTION
  "init=epsg:4326"
END
  END

and an empty template except for the



line.  Here's my query:

http://localhost:8080/wms?
  SERVICE=WMS&
  VERSION=1.3.0&
  REQUEST=GetFeatureInfo&
  LAYERS=SRTM_3_arc-second_grid&
  CRS=EPSG:4326&
  BBOX=42.94,-122.09,42.95,-122.08&
  WIDTH=2&
  HEIGHT=2&
  X=1&
  Y=1&
  QUERY_LAYERS=SRTM_3_arc-second_grid

This works fine and returns the elevation I am expecting.  However, the 
MapServer log complains about a "degenerate rect" every time:

[Tue Nov  2 07:58:44 2021].66000 msProjectRect(): Warning: degenerate rect 
{-122.082500,42.942500,-122.082500,42.942500}

What am I doing wrong here?   As I posted originally, I am really only 
interested in a point here.

Thank you very much,

carl

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


Re: [mapserver-users] Point query from Mapserver raster

2021-11-01 Thread Rahkonen Jukka (MML)
Hi,

The WMS GetFeatureInfo should work and the answer in gis.stackexhange seems to 
contain all the details that you need for making it to work.
With WCS what you did is probably the best you can do with Mapserver. With some 
other servers you may get a single pixel output by using WCS slicing 
(subset=Long(-100)=Lat(22)) or trimming with lowerlimit=upperlimit 
(subset=Long(-100,-100)=Lat(22,22)) but Mapserver does not support 
either. See https://osgeo-org.atlassian.net/browse/GEOS-9553.

I could not find a link to an answer by Stefan Meissl about why Mapserver does 
not support slicing but it was about dimensions. A raster image can be 
considered to be two dimensional even when it has only one pixel, but by the 
WCS standard each trim is removing one dimension. Slicing DEM with two axes 
must return a zero dimensional result and raster formats do not support that. I 
still think that subsets with lower=upper limits should works and return a 
single pixel output but that does not work with either Mapserver or Geoserver. 
See also 
https://www.mail-archive.com/search?l=mapserver-users%40lists.osgeo.org=subject:%22%5C%5Bmapserver%5C-users%5C%5D+WCS+GetCoverage+request+one++by+one+pixel%22=newest=1


-Jukka Rahkonen-


Lähettäjä: MapServer-users  Puolesta 
Carl Godkin
Lähetetty: lauantai 30. lokakuuta 2021 2.10
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Point query from Mapserver raster

Hi,
Now that I have my WMS and WCS servers working well (thanks, list!!), I have 
one more thing I would like to figure out how to do.

I want to do point queries on [Lat,Lon] points for their elevation from the 
terrain layer I have.

I have done some searching and come across various ideas such as Raster Query 
(https://mapserver.org/input/raster.html#raster-query) and a query template  
(https://gis.stackexchange.com/questions/167239/mapserver-raster-picking-elevation-data)
 but haven't found enough information for either to implement it.

I came up with a solution that works fine, but might be considered as going 
"All Around the Barn"   What works is to add an ASCII output format to my map 
file that serves terrain like this:

OUTPUTFORMAT
  NAME XYZ
  DRIVER "GDAL/XYZ"
  MIMETYPE "text/plain"
  IMAGEMODE FLOAT32
  EXTENSION "txt"
END

and then use GetCoverage on a small rectangle whose lower-left corner
is the point whose elevation I want:

http://localhost:8080/wcs?SERVICE=WCS=2.0.1=GetCoverage=SRTM_3_arc-second_grid=XYZ=Lat(42.948,42.958)=Lon(-122.086,-122.076)

and then take the first line of the returned output file.

What would Mapserver best practice be for a problem like this?

Thanks very much,

carl








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


Re: [mapserver-users] msCGILoadMap(): Web application error. CGI variable "map" fails to validate

2021-10-31 Thread Rahkonen Jukka (MML)
Hi,

Read https://mapserver.org/optimization/limit_mapfile_access.html and 
https://mapserver.org/development/rfc/ms-rfc-56.html and set MS_MAP_PATTERN.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Carlos Neves (LREC)
Lähetetty: lauantai 30. lokakuuta 2021 23.0
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] msCGILoadMap(): Web application error. CGI variable 
"map" fails to validate


Hi List,

I have upgrade from 7.6.1 to 7.6.3 and now I have an unexpected error message.

"msCGILoadMap(): Web application error. CGI variable "map" fails to validate"

I'm running OpenSuSE 15.3. and I'm still using "../" path  in main map file path


I have insert in Apache2 and export in OpenSuSE the environment  
MS_MAP_BAD_PATTERN to "false" with no results.

What I have missed?

Any help would be appreciated

Carlos




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


[mapserver-users] Times and axis labels in WCS 2.0.1

2021-10-26 Thread Rahkonen Jukka (MML)
Hi,

Is there any way to get the time positions of a layer advertised in WCS 2.0.1 
DescribeCoverage? They are listed with WCS 1.0.0 but as can be checked with the 
demo service:
WCS 1.0.0 with time positions 
https://demo.mapserver.org/cgi-bin/wcs?SERVICE=wcs=1.0.0=DescribeCoverage=modis
WCS 2.0.1 that is unaware of times
https://demo.mapserver.org/cgi-bin/wcs?SERVICE=wcs=2.0.1=DescribeCoverage=modis

Another service 
https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?service=WCS=2.0.1=DescribeCoverage=ortokuva__ortokuva
puts timePositions into WCS 2.0.1 like this




1985-12-31T00:00:00.000Z


I have already learned that Mapserver cannot handle time as a dimension like 
Geoserver does 
https://lists.osgeo.org/pipermail/mapserver-users/2019-January/080917.html but 
it would be nice at least to have some way to show the users which time periods 
are available.

Another little issue with Mapserver WCS 2.0.1 is that it shows the coordinate 
axis labels of EPSG:3067 this way
http://www.opengis.net/def/crs/EPSG/0/3067 axisLabels="x 
y" uomLabels="m m" srsDimension="2">

Obviously there is no way to change axisLabels into "E N" but I hope I am wrong.

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


Re: [mapserver-users] WCS Tile index question

2021-10-20 Thread Rahkonen Jukka (MML)
Hi,

I was just about to suggest to use DEBUG. GDAL does not use 
“wcs_native_format”, it is used for setting what will be written into 
DescribeCoverage.

-Jukka Rahkonen-

Lähettäjä: Carl Godkin 
Lähetetty: torstai 21. lokakuuta 2021 1.50
Vastaanottaja: Rahkonen Jukka (MML) 
Aihe: Re: [mapserver-users] WCS Tile index question

Sorry, right after I sent that last reply to the list, I thought of turning up 
the DEBUG value in the mapfile to 5 and now I see it's not finding my .hgt 
files for some reason.

I will dig into this; maybe mapserver + GDAL don't actually needs 
wcs_native_format.

More later to the list if I sort this out.  I really appreciate the help you 
and Jeff and others on the list have given me!

carl

On Tue, Oct 19, 2021 at 5:37 PM Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

Here is more accurate documentation but only in the text 
https://www.mapserver.org/ogc/wcs_server.html

“The convention is that once (wcs|ows)_extent and one of (wcs|ows)_size and 
(wcs|ows)_resolution is set in the layer metadata, all the coverage specific 
metadata will be retrieved from there. Otherwise the source image is queried 
via GDAL, if possible.”

It seems that only wcs_extent is documented in the list of metadata elements 
but this is what they do:

  *   wcs_extent defines the bounding box or your coverage -> that will go into 
DescribeCoverage
  *   wcs_size is the size of the coverage as pixels -> pixel size can be 
computed by extent and size
  *   wcs_resolution tells the pixel size explicitly -> size of the coverage in 
pixels can be computed

We have in the LAYER-METADATA:
"wcs_resolution" "0.5 0.5"
"wcs_extent"  "19970 6597278 749676 7785300"

That should be enough and Describe Coverage will have correct limits, origin, 
and offset vectors in RectifiedGrid.

-Jukka Rahkonen-


Lähettäjä: MapServer-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Carl Godkin
Lähetetty: keskiviikko 20. lokakuuta 2021 1.17
Vastaanottaja: 
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: [mapserver-users] WCS Tile index question

Hi again,

I am working with Mapserver trying to set up a WCS layer based on a large 
collection of SRTM .hgt files.

Since I have many input files instead of a single file, I want to use a tile 
index.  I know how to make and use a tile index for WMS, but there's a twist 
for WCS that I don't understand.

According to this section of the docs:
 
https://mapserver.org/optimization/tileindex.html?highlight=wcs_resolution#note-for-wcs-layers
<https://mapserver.org/optimization/tileindex.html?highlight=wcs_resolution#note-for-wcs-layers>

I need to set “wcs_extent”, “wcs_size”, and “wcs_resolution” but I don't see 
where they are defined or documented.

Can you point me to documentation?  The WCS Use Cases page gives some hints so 
I think I understand wcs_extent (though it's "ows_extent" in some examples 
there so I guess these are interchangeable?)

How are the others defined?

Thank you for your help,
carl


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


Re: [mapserver-users] WCS Tile index question

2021-10-20 Thread Rahkonen Jukka (MML)


Lähettäjä: MapServer-users  Puolesta 
Carl Godkin



>> On Tue, Oct 19, 2021 at 5:37 PM Rahkonen Jukka (MML) 
>> <mailto:jukka.rahko...@maanmittauslaitos.fi> wrote:
>> Hi,
 
>> Here is more accurate documentation but only in the text 
>> https://www.mapserver.org/ogc/wcs_server.html
 
>> “The convention is that once (wcs|ows)_extent and one of 
>> (wcs|ows)_size and (wcs|ows)_resolution is set in the layer metadata, all 
>> the coverage specific metadata will be retrieved from there. Otherwise the 
>> source image is queried via GDAL, if possible.”
 
>> It seems that only wcs_extent is documented in the list of metadata elements 
>> but this is what they do:
>> • wcs_extent defines the bounding box or your coverage -> that will 
>> go into DescribeCoverage • wcs_size is the size of the coverage as 
>> pixels -> pixel size can be computed by extent and size • 
>> wcs_resolution tells the pixel size explicitly -> size of the 
>> coverage in pixels can be computed

> Thanks a lot, Jukka.  That all makes some sense as far as it goes, but 
> I'm still not clear on a few details. I have this range of data: 24N to 50N 
> and 125W to 66W which is 26 degrees by 59 degrees.

>  Since the SRTM data has 3 arc-second spacing, that's 1200 pixels per 
> degree plus one for the extra edge so I have tried a number of things without 
> success.

What fails? Don't you get anything into DescribeCoverage or is all that you get 
wrong?

> 1. Is wcs_size the size FULL range of the tiles that I have?  And what is the 
> order?

You do not need to bother about the size if you set the resolution, but yes, it 
is the full range of the coverage. See this 
https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?service=WCS=DescribeCoverage=2.0.1=ortokuva__ortokuva

The size is converted into the pixel space of the coverage gml:GridEnvelope>
0 0
1348356 2316499
 2. Again, what is the order for wcs_resolution?  Are the units degrees since 
> the coordinate system of the original data is EPSG:4326?
With Mapserver the order is easting/longitude - northing/latitude

> I've tried all of these, one at a time, and get various errors.  (1 /
> 1200 = 0.0008...)
What errors?

>        #"wcs_resolution" "0.0008 0.0008"
Looks right
>        #"wcs_size" "70801 31201"
Looks right if you prefer to give size instead of resolution
>        "wcs_size" "31201 70801"
This is wrong.

> In case it's helpful, here's my LAYER definition (with probably extra things 
> I've tried based on my searching and trial & error):

    LAYER
      NAME SRTM_3_arc-second_grid
      METADATA
        "wcs_label"           "SRTM - 3 arc-second grid"  ### required
        "wcs_rangeset_name"   "Range 1"  ### required to support 
DescribeCoverage request
        "wcs_rangeset_label"  "Lower 48" ### required to support 
DescribeCoverage request
        "ows_extent" "-125 24 -66 50"
        #"wcs_resolution" "0.0008 0.0008"# 1/1200 for 3" spacing?
        #"wcs_size" "70801 31201"# Not sure of order
        "wcs_size" "31201 70801"
        "wcs_bandcount" "1"
        "wcs_native_format" "SRTMHGT"# What should this be?  I can't find 
examples...

It is supposed to be the native format of the layer data, format that 
theoretically requires no processing, just selecting the right pixels. In 
practice the format that you users get by default with GetCoverage. It goes 
into DescribeCoverage about this way:
image/tiff 
and it is documented in the WCS 2.0.1 Core standard:
"4.7 Native Format
encoding format where, in a GetCoverage request, the range set values can be 
obtained unaltered"

        "wcs_srs" "EPSG:4326"
      END

      TYPE RASTER ### required
      STATUS ON
      TILEINDEX "../srtm_3_hgt/srtm_3_hgt-index.shp" # Path is relative to 
SHAPEPATH
      TILEITEM "Location"
      PROJECTION
        "init=epsg:4326"
      END
    END

> I feel like I must be close.  Thanks a lot for any further pointers,

-Jukka-

> carl

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


Re: [mapserver-users] WCS Tile index question

2021-10-19 Thread Rahkonen Jukka (MML)
Hi,

Here is more accurate documentation but only in the text 
https://www.mapserver.org/ogc/wcs_server.html

“The convention is that once (wcs|ows)_extent and one of (wcs|ows)_size and 
(wcs|ows)_resolution is set in the layer metadata, all the coverage specific 
metadata will be retrieved from there. Otherwise the source image is queried 
via GDAL, if possible.”

It seems that only wcs_extent is documented in the list of metadata elements 
but this is what they do:

  *   wcs_extent defines the bounding box or your coverage -> that will go into 
DescribeCoverage
  *   wcs_size is the size of the coverage as pixels -> pixel size can be 
computed by extent and size
  *   wcs_resolution tells the pixel size explicitly -> size of the coverage in 
pixels can be computed

We have in the LAYER-METADATA:
"wcs_resolution" "0.5 0.5"
"wcs_extent"  "19970 6597278 749676 7785300"

That should be enough and Describe Coverage will have correct limits, origin, 
and offset vectors in RectifiedGrid.

-Jukka Rahkonen-


Lähettäjä: MapServer-users  Puolesta 
Carl Godkin
Lähetetty: keskiviikko 20. lokakuuta 2021 1.17
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] WCS Tile index question

Hi again,

I am working with Mapserver trying to set up a WCS layer based on a large 
collection of SRTM .hgt files.

Since I have many input files instead of a single file, I want to use a tile 
index.  I know how to make and use a tile index for WMS, but there's a twist 
for WCS that I don't understand.

According to this section of the docs:
 
https://mapserver.org/optimization/tileindex.html?highlight=wcs_resolution#note-for-wcs-layers


I need to set “wcs_extent”, “wcs_size”, and “wcs_resolution” but I don't see 
where they are defined or documented.

Can you point me to documentation?  The WCS Use Cases page gives some hints so 
I think I understand wcs_extent (though it's "ows_extent" in some examples 
there so I guess these are interchangeable?)

How are the others defined?

Thank you for your help,
carl


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


Re: [mapserver-users] Getting started with WCS on mapserver...

2021-10-18 Thread Rahkonen Jukka (MML)
Hi,

The wgs84-BoundingBox is an optional element in the CoverageSummary by the WCS 
2.0.1 standard. There may be no way to configure Mapserver to add that 
information into GetCapabilities. You must read extents coverage by coverage 
with DescribeCoverage requests. But the boundedBy in that place is using the 
native CRS of the coverage like here:


http://www.opengis.net/def/crs/EPSG/0/3067; 
axisLabels="x y" uomLabels="m m" srsDimension="2">
212000 6762000
218000 6768000



The extent that appears in DescribeCoverage can be configured with the 
“wcs_extent” metadata if it does not get generated automatically right. Having 
wgs84-BoundingBox in CoverageSummary could be useful for WCS clients but even 
the GetCapabilities example in the WCS Core 2.0.1 standard does not contain it.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Carl Godkin
Lähetetty: maanantai 18. lokakuuta 2021 21.24
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Getting started with WCS on mapserver...

Hi,

A week and a half ago I asked about using Mapserver +WMS to serve elevation 
data since I was following a tutorial that discussed WMS.

In one of the replies I received, Jeff suggested that I actually wanted WCS for 
my use case which was a forehead slap + d'oh! moment for me.  Of course I do!

Anyway, I have followed the Mapserver WCS docs and everything seems to work 
well.

However, I have one question that may be kind of niche or will perhaps betray 
my overall ignorance.

A while ago I wrote a WCS client for another project and it expects WCS version 
2.0 requests.

The map file that I made up (based closely on the one in the docs: 
https://mapserver.org/ogc/wcs_server.html#example-wcs-server-mapfile ) seems to 
work fine for WCS 1.0, 1.1, and 2.0.  However, I don't seem to get a bounding 
box from GetCapabilities in the CoverageSummary from my 2.0 requests whereas I 
certainly do from the 1.1 request:

I get this from VERSION=1.1.0:



bathymetry


-180 -90
180 90

urn:ogc:def:crs:EPSG::4326
image/tiff
bathymetry



whereas I get just this from VERSION=2.0.1:



bathymetry
RectifiedGridCoverage



Is there something I can add to my WCS map file to get the 
"ows:WGS84BoundingBox" element returned in my GetVersion?  I believe I was 
working with Geoserver sources when I wrote that client but I would really like 
to get the geographic extents.

Thank you very much for the great documentation!

carl

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


[mapserver-users] WCS: Write error at scanline xxxx

2021-10-08 Thread Rahkonen Jukka (MML)
Hi,

When I try to get any bigger output from WCS (in this case 12000x12000 pixels 
RGB) with a request like

http://localhost:8060/cgi-bin/mapserv.exe?map=c:/ms4w_data/wcs_vv_jr.map=WCS=2.0.0=GetCoverage=orto_vv=image/tiff:tiling=true:tileheight=256:tilewidth=256
I get errors like this

http://www.opengis.net/ows/2.0 
http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd>


msWCSWriteFile20(): General error message. msSaveImage() failed 
msSaveImageGDAL(): General error message. Failed to create output GTiff file. 
TIFFAppendToStrip:Write error at scanline 1024




I managed to get bigger images = more pixels by asking for compressed output 
with :compression=jpeg
I wonder what is the limiting resource and if there is something I could 
improve with some configuration. Because the output is a tiled GeoTIFF but the 
error is about writing a strip I guess that Mapserver is writing first an 
interim TIFF.

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


Re: [mapserver-users] Tile Mode Output Format

2021-09-21 Thread Rahkonen Jukka (MML)
Hi,

It seems that formats were not considered at all  
https://mapserver.org/development/rfc/ms-rfc-43.html

-Jukka Rahkonen-


Lähettäjä: MapServer-users  Puolesta 
Patrick Young
Lähetetty: tiistai 21. syyskuuta 2021 22.41
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Tile Mode Output Format

Hello,

Is it possible to change the output format returned when using tile mode via a 
query string parameter?  I've tried a few parameters (e.g. ?IMAGETYPE=jpeg) but 
no luck, it seems to always use what IMAGETYPE is set to in the map file.

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


Re: [mapserver-users] QGIS WMS SINGLE CONNECTION: MapServer Multiple Maps Request

2021-09-19 Thread Rahkonen Jukka (MML)
Hi,

WMS standard supports GetMap requests with a list of layers: =layer_1, 
layer_2, layer_3. Layers are rendered in the same order, so that layer_3 will 
be rendered on top of the others in the final map.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Atlanta Geek
Lähetetty: sunnuntai 19. syyskuuta 2021 23.31
Vastaanottaja: 1520 gis 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] QGIS WMS SINGLE CONNECTION: MapServer Multiple Maps 
Request

You can put both layers in the same group and then use their group name instead 
of layer name.

On Sun, Sep 19, 2021, 08:43 1520 gis 
mailto:juliermeopensourcedevelo...@gmail.com>>
 wrote:
Dear gentlemen,

I have two mapserver layers:

1 - 
http://acervofundiario.incra.gov.br/i3geo/ogc.php?tema=certificada_sigef_particular_pb
2 - 
http://acervofundiario.incra.gov.br/i3geo/ogc.php?tema=certificada_sigef_publico_pb

Is it possible to make a QGIS WMS single connection requesting both layers 
(making the URLs separated by comma)? Or is it possible to retrieve all the 
layers available in the server  
http://acervofundiario.incra.gov.br/i3geo/ogc.php? through a getCapabilities 
request?

Any insight to these questions will be very appreciated.

Kind regards

Julierme



___
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


Re: [mapserver-users] Asking about mapefile display

2021-09-18 Thread Rahkonen Jukka (MML)
Hi,

Show your mapfile and the requests that you are using.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Boubacar Bah
Lähetetty: lauantai 18. syyskuuta 2021 22.30
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Asking about mapefile display

good evening, recently i created a mapefile to display points with wgs84 
coordinates.  when I try to display the points in the browser, it gives me a 
blank page but when I convert the coordinates of these points to UTM I can see 
the points in the browser.  my question is why these dots are not showing up 
with wgs84 system.  and how to display them with this system.
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Float64 on WCS

2021-09-08 Thread Rahkonen Jukka (MML)
Hi,

It seems to me that there is no support for Float64 anywhere in Mapserver. See 
IMAGEMODE in https://mapserver.org/mapfile/outputformat.html.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
CASTRO, Emmanuel via MapServer-users
Lähetetty: keskiviikko 8. syyskuuta 2021 15.45
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Float64 on WCS

Hello

I am new to WCS. While testing WCS 2.0 mode on MapServer 2.18.
I noticed than WCS(1.0/2.0) only supports image mode BYTE, INT16 and FLOAT32 (I 
checked in the source mapwcs.cpp and mapwcs20.cpp). There is no support for 
FLOAT64.
Is there a specific reason for not supporting that? (GDAL supports FLOAT64 very 
well in GeoTiff).

My tests with WCS are from Grib2 data (Float64) to GeoTiff (which only produces 
Float32).

Thank you for your comments.
Emmanuel

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] How to get a single-part ASCII Grid result from WCS

2021-08-30 Thread Rahkonen Jukka (MML)
Hi,

I have been trying to configure a GDAL AAIGrid outputformat for WCS 2.0. The 
format works, but I can only get the response as a mime multipart attachment.  
I would like to get just the ASCII grid part as simple text.  I can see that 
with the OGR outputformats https://mapserver.org/output/ogr_output.html the 
FORM option can be used:

"FORM=simple/zip/multipart
Indicates whether the result should be a simple single file (simple), a mime 
multipart attachment (multipart) or a zip file (zip). "zip" is the default."

FORM=simple is what I would like to have and FORM=zip might be acceptable. But 
unfortunately it seems that FORM is not supported for GDAL raster drivers. 
Could anybody suggest a good workaround?

My outputformat with FORM experiments looks like this

OUTPUTFORMAT
NAME AAIGRID
DRIVER "GDAL/AAIGRID"
#MIMETYPE "application/x-ascii-grid"
MIMETYPE "text/plain"
IMAGEMODE FLOAT32
EXTENSION "txt"
FORMATOPTION "SIGNIFICANT_DIGITS=5"
FORMATOPTION "FORM=simple"
FORMATOPTION "FILENAME=result.txt"
END

and the response, that my MS4W server sends named as "mapserv.exe" looks like 
this

--wcs
Content-Type: text/plain
Content-Description: coverage data
Content-Transfer-Encoding: binary
Content-ID: coverage/result.txt
Content-Disposition: INLINE; filename=result.txt

ncols50
nrows50
xllcorner212000.
yllcorner6762000.
cellsize 2.
10.2 10.253 10.339 10.645 11.
...rest of the data

--wcs
Content-Type: application/octet-stream
Content-Description: coverage data
Content-Transfer-Encoding: binary
Content-ID: coverage/result.prj
Content-Disposition: INLINE; filename=result.prj

PROJCS["ETRS89_TM35FIN_E_N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",50],PARAMETER["false_northing",0],UNIT["Meter",1]]
--wcs
Content-Type: application/octet-stream
Content-Description: coverage data
Content-Transfer-Encoding: binary
Content-ID: coverage/result.txt.aux.xml
Content-Disposition: INLINE; filename=result.txt.aux.xml


  
2
72.00
72.00
  


--wcs-



-Jukka Rahkonen-





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


Re: [mapserver-users] asking help

2021-08-26 Thread Rahkonen Jukka (MML)
Hi,

MS4W certainly has support for PostGIS. That detail you can check with command

C:\ms4w\Apache\cgi-bin>mapserv -v

If you can find “INPUT=POSTGIS” then you have the support. The next thing to do 
is to read the documentation 
https://www.mapserver.org/input/vector/postgis.html.

The previous problem that you had with missing mapscript affects only the QGIS 
side. QGIS needs mapscript for creating the mapfile for Mapserver but nothing 
prevents you from writing a mapfile from a scratch with a text editor. Use for 
example mapfiles used in the ms4w demos https://ms4w.com/download.html as 
template.
-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Boubacar Bah
Lähetetty: torstai 26. elokuuta 2021 2.37
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] asking help

hello how are you ; i need your help to use postgis in mapserver; recently i 
read an article by jeff mckenna in witch he said that mapserver defaults to 
postgis database, but that it must be compiled  to work; so my question is how 
to compile postgis in mapserver since have installed the mapserver from ms4w in 
order to connect postgis to mapserver.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WFS changing NULL values to 0.

2021-08-02 Thread Rahkonen Jukka (MML)
Hi,

Attributes of type double can not really be nulls in shapefile. See 
https://desktop.arcgis.com/en/arcmap/latest/manage-data/shapefiles/geoprocessing-considerations-for-shapefile-output.htm#GUID-A10ADA3B-0988-4AB1-9EBA-AD704F77B4A2.
 A value -1.7976931348623158e+308 might work as a null but I do not consider it 
generally reliable. Use some other format as a datasource.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Marcin Grudzien
Lähetetty: maanantai 2. elokuuta 2021 15.07
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] WFS changing NULL values to 0.

Hi,

I am publishing an SHP file via the WFS service using Mapserver 7.2.2

In some cases, attributes of a type double have NULL values in the SHP. In such 
cases, MapServer is publishing them as "0" in GetFeature responses which may be 
confusing to the data users. I would like to achieve a situation that if the 
attribute value is NULLin SHP, the attribute is not published in GetFeature 
response.

For example the response instead of this




419591.224000 697399.714000


284301500
419591.224
697399.714
0
0



Should look like this




419591.224000 697399.714000


284301500
419591.224
697399.714



Can it be achieved in MapServer?

Best regards,
Marcin
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


  1   2   3   4   5   6   7   8   9   10   >