Re: [MapServer-users] TIME dimension as runtime substitution within DATA query?

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

What does not work for you in the WMS-T support as documented in WMS Time - 
MapServer 8.0.2 documentation?

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Marcin Niemyjski via MapServer-users
Lähetetty: torstai 20. kesäkuuta 2024 13.49
Vastaanottaja: Marcin Niemyjski via MapServer-users 

Aihe: [MapServer-users] TIME dimension as runtime substitution within DATA 
query?

Hello
Is it possible to use the TIME dimension as a parameter for runtime 
substitution?
What I'm trying to achieve: I want to limit the rows in the database query by 
applying a date within the query itself. Specifically, I need to use the TIME 
dimension instead of custom parameters like start_date and stop_date to ensure 
full compatibility with the OGC WMS-T standard.
There is also the issue of parsing the TIME value into a format acceptable by 
the query. However, for now, let's assume that I'm providing a single date 
within TIME.

LAYER

DEBUG 5
STATUS OFF
NAME "stac_query"
TYPE POLYGON

CONNECTIONTYPE postgis
CONNECTION "***"

DATA "geometry from ... WHERE datetime >= %TIME% AND datetime <%TIME% AND (id = 
ANY ('{%pid%}') or '%pid%' = '-1'  AND collection = ANY ('{cryo-demo}') ) ORDER 
BY datetime DESC, id DESC) as subquerry using unique id using srid=4326"

  PROJECTION
"init=epsg:4326"
   END

VALIDATION
'pid' '^.{2,37}$'
'asset' '^.{3,6}$'

'default_pid' '-1'
'default_asset' '-1'
END

METADATA
   "wms_srs" "EPSG:3857 EPSG:4326 EPSG:2180"
   "wms_title" "stac_query"
   "wms_timeextent" "2015-01-01/2025-01-01/P1D"
   "wms_timeitem" "datetime"
   "wms_timedefault" "2024-04-08"
   "wms_enable_request" "!*"
END
PROCESSING "CLOSE_CONNECTION=DEFER"
END
Any clue?
Best,
Marcin


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


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