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


Re: [mapserver-users] SUM: MapServer PostGIS: WMS Layers Without Features

2021-06-03 Thread Rahkonen Jukka (MML) via mapserver-users
Hi,

All Mapserver admins do that error every now and then.

There is a configuration option in the QGIS WMS Connection editor “Ignore 
GetMap/GetTile/GetLegendGraphic URI reported in capabilities” that helps to 
access many misconfigured WMS servers. If you check that box the same base URL 
that is used for GetCapabilities is used also for other requests. Other clients 
may have similar configuration option, at least OpenJUMP does.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Nathan L via mapserver-users
Lähetetty: torstai 3. kesäkuuta 2021 19.15
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] SUM: MapServer PostGIS: WMS Layers Without Features

Earlier, I asked why my MapServer PostGIS implementation was producing a WMS 
service without any layers in it. The original question in detail is at the 
bottom of this summary.

The responses here and in other forums were quite helpful. It narrowed down the 
problem to about ten areas, which I dutifully examined as a checklist. Richard 
Greenwood's earliest suggestions happened to be the most helpful. He suggested 
to look at the Apache logs to see what requests QGIS or ArcGIS was sending to 
MapServer. I'm glad I did - they kept redirecting in the URL to a "wms.map" 
file at the root directory that didn't exist.

I then looked at my mapfile and lo and behold, I was the one redirecting it! I 
had taken example code from the Setup a Mapfile For Your 
WMS 
documentation and hadn't customized it to my implementation. The example code 
wasn't annotated so I didn't realize it included an example that required 
revision.

It was in the WMS Metadata of the mapfile, where:
"wms_onlineresource" "http://localhost/cgi-bin/mapserv.exe?map=wms.map&?;

I changed it to point to the actual mapfile location:
"wms_onlineresource" 
"http://localhost/cgi-bin/mapserv.exe?map=%2Fms4w%2Fapps%2Fsegis-demo%2Fmap-segis-demo.map&?;

Ironic as it was a line in the mapfile that redirected the run of the program 
away from itself. I'm so very grateful for the responses I received to help me 
solve my (self-inflicted, as many are...) problem.

Nathan Tyler Lowry
Comprehensive GIS Solutions
(719) 208-7092 Desk
(719) 963-3571 Cell
(719) 960-2084 Fax
nathan.tyler.lo...@gmail.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Styling a WFS ? or not ?

2021-05-31 Thread Rahkonen Jukka (MML) via mapserver-users
Hi,

Mapserver can serve a layers through different services. STYLE is not for WFS 
but it can be used in =map or in the WMS service.

Similarly Geoserver can deliver GML data 
http://demo.geo-solutions.it/geoserver/topp/ows?service=WFS=1.0.0=GetFeature=topp:states=50

or the same data as styled through WMS

http://demo.geo-solutions.it/geoserver/topp/wms?service=WMS=1.1.0=GetMap=topp:states==-124.7314220001,24.955967,-66.969849,49.371735=768=330=EPSG:4326=application/openlayers

-Jukka Rahkonen-


Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta mathias cunault via mapserver-users
Lähetetty: maanantai 31. toukokuuta 2021 13.21
Vastaanottaja: 
mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Styling a WFS ? or not ?

Hello,
It seems that styling a WFS is nonsense according to what I found on the net 
(?). And I couldn't do it until now. But in Mapserver doc there is an example 
with a WFS and a style https://www.mapserver.org/ogc/wfs_server.html.
So I am a bit confused : is there a way to stylize a WFS layer or I 
misunderstand the doc ?
Thanks

--
--
Mathias Cunault
référent SIG / Admin Caviar
Inrap Tours - 148 av. Maginot
37000 TOURS
06 32 05 98 96
mathias.cuna...@inrap.fr
www.inrap.fr
abonnez-vous à la lettre d'information de l'Inrap : 
http://www.inrap.fr/newsletter.php
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WFS Client returns data at random with very same call

2021-05-27 Thread Rahkonen Jukka (MML)
Hi,

Have you already tried to use WFS connection instead of OGR connection?


-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Lars Fricke
Lähetetty: torstai 27. toukokuuta 2021 14.59
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] WFS Client returns data at random with very same 
call

Dear all,
I apologize for finding and posting bits and pieces not all at one time.
I fired up 'CONFIG "CPL_DEBUG" "ON"' and there I see, that
"""
HTTP: 
Fetch(http://url-to-external-server?SERVICE=WFS=1.1.0=1000=GetFeature=dop)
"""
So there is no BBOX. On other layers I see
"""
GDALOpen(/vsicurl_streaming/https:...
"""
with BBOX.
No wonder I do not get reliable results if the server is calling some 1000 
whatsoever result objects and starts filtering the bbox after.

Any idea what is happening? Or is this something for a GDAL thread?

Best
Lars

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


Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Rahkonen Jukka (MML)
Hi,

Can someone say if the issue is already fixed or not by  
https://github.com/MapServer/MapServer/pull/6225/files

that adds:
typedef mapserver::renderer_scanline_bin_solid 
renderer_scanline_aliased;

Is this enough for turning antialiasing off and making png files with lots of 
linework smaller? Should/could there be something more for polygons which are 
rendered with plain fill without borderlines?

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: mapserver-users  Puolesta 
Eichner, Andreas - SID
Lähetetty: keskiviikko 19. toukokuuta 2021 14.39
Vastaanottaja: Richard Greenwood ; mapserver 

Aihe: Re: [mapserver-users] anti-aliasing (was differing image size with 
different mapserver versions)

What AGG does with it's sub-pixel accuracy can be viewed as computing the 
contribution of the pixels of a virtually larger image to the pixels of the 
final image. It uses a gamma function to translate the amount of virtual pixels 
into an amount of visual impact on the final pixel - both expressed as a value 
in the range 0..1. AGG's default is a linear function that proportionally maps 
the range 0..1 onto 0..1 (i.e. y=x). MapServer (where applied) uses a linear 
gamma function that proportionally maps the range 0..gamma onto 0..1. All this 
results in intermediate color values giving a smoother and visually improved 
result as in this example: 
https://commons.wikimedia.org/wiki/File:Antialiasing.png#/media/Datei:Antialiasing.png

As PNG uses lossless compression these additional information enlarges the 
resulting files. So to reduce the size of your map image files it's best to 
turn anti-aliasing off. One way is to compile a special version with modified 
typedefs in mapagg.cpp to turn AA off. With Cairo you could use the method 
cairo_set_antialias(cairo_t*, CAIRO_ANTIALIAS_NONE) to switch it off. But then 
you would loose paletted image and compression control.

With the modified AGG you should still apply the other suggestions with reduced 
palette and maximum compression.

HTH


-Ursprüngliche Nachricht-
Von: mapserver-users  Im Auftrag von 
Richard Greenwood
Gesendet: Dienstag, 18. Mai 2021 18:50
An: mapserver 
Betreff: [mapserver-users] anti-aliasing (was differing image size with 
different mapserver versions)

Thanks to several helpful replies to my previous thread I know that the 
increased image size between MapServer 6 with the GD driver and MapServer 7 
with the AGG driver is due to differences in anti-aliasing (and lack of) in the 
two drivers. (AGG features anti-aliasing and sub-pixel resolution 
 ).

Gamma setting from 0-1 affects the size of a filled polygon layer by a factor 
of almost 3x. But gamma has no effect on text, lines, and polygon outlines. So 
images comprised of these types of features are approximately 2x larger with 
the AGG/PNG8 driver than with the GD/GIF driver. 

Where else should I be looking to reduce my images sizes? I serve rural areas 
with poor internet so in my case, smaller image sizes are more important than 
higher quality images.

Thanks,
Rich

-- 

Richard W. Greenwood, PLS
www.greenwoodmap.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] differing image size with different mapserver versions

2021-05-17 Thread Rahkonen Jukka (MML)
Good news.

There seems to be more to fix in the documentation about ANTIALIAS but who 
understands how it works now in master with lines, polygons, and labels?

-Jukka Rahkonen-

Lähettäjä: Richard Greenwood 
Lähetetty: maanantai 17. toukokuuta 2021 17.11
Vastaanottaja: Eichner, Andreas - SID 
Kopio: Rahkonen Jukka (MML) ; 
Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions

Progress! Using Andreas' suggestion:

changing the typedef in line 91 of mapagg.cpp from
  typedef mapserver::renderer_scanline_aa_solid 
renderer_scanline;
to
  typedef mapserver::renderer_scanline_bin_solid 
renderer_scanline;

My test image went from 127kB down to 23.3kB!

Rich

On Mon, May 17, 2021 at 7:58 AM Eichner, Andreas - SID 
mailto:andreas.eich...@sid.sachsen.de>> wrote:
Hi Jukka,

as a result of the discussion IMO Erik created a patch to be able to switch 
AGGs anti-aliasing on and off using the ANTIALIAS keyword. This was merged by 
Even Rouault in https://github.com/MapServer/MapServer/pull/6225
It originally worked IMHO only for lines styles. But GAMMA is __not__ the way 
to turn anti-aliasing off.

Greets, Andreas

-Ursprüngliche Nachricht-
Von: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Im Auftrag von Rahkonen Jukka (MML)
Gesendet: Montag, 17. Mai 2021 15:26
An: Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>;
 Mapserver-Users 
(mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>) 
mailto:mapserver-users@lists.osgeo.org>>
Betreff: Re: [mapserver-users] differing image size with different mapserver 
versions

Hi,



Here is a long thread about turning off antialias 
http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html
 
<http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html>
 .



I had the same wrong idea about gamma=0 back then but perhaps gamma=0.01 could 
work.



-Jukka Rahkonen-



Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Rahkonen Jukka (MML)
Lähetetty: maanantai 17. toukokuuta 2021 16.06
Vastaanottaja: Mapserver-Users 
(mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>) 
mailto:mapserver-users@lists.osgeo.org>>
Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions



Hi,



(Re-sent as edited to mailing list because the body was originally too long.



Are you sure about “I actually found that 6.4 produced small, aliased images 
with both the GD and AGG drivers”.  Originally the AGG library could only do 
anti-aliasing and that affected also Mapserver 5 
https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html 
<https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html> .



I guess that Mapnik folks have since that added support for controlling 
anti-aliasing with gamma setting http://mapnik.org/mapnik-reference/.

I can see that gamma can be used also with Mapserver 
https://www.mapserver.org/mapfile/outputformat.html



Have a try with gamma=0. However, Even wrote that turning off antialiasing is 
possible only in master, so perhaps gamma=0 does not work.



The documentation for Mapserver 5 tells that “All ANTIALIAS keywords are now 
ignored". But the keyword still appears in quite a many places:

https://mapserver.org/search.html?q=antialias



Would it be time to remove them as well as now not useful references to GD 
renderer (removed by RFC 99 in 2013)?



-Jukka Rahkonen-





Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>
 
<mailto:mapserver-users-boun...@lists.osgeo.org<mailto:mapserver-users-boun...@lists.osgeo.org>>
 > Puolesta Richard Greenwood
Lähetetty: maanantai 17. toukokuuta 2021 15.26
Kopio: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org> 
<mailto:mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>>
Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions



Thanks for the suggestions. The consensus seems to be that anti-aliasing is 
causing the increased size. The documentation here 
<https://mapserver.org/output/antialias.html>  says "Since version 6.0, 
MapServer will produce aliased output for the “gd/” drivers, and antialiased 
output for the “agg/” and “cairo/” ones" and it's also mentioned here 
<https://lists.osgeo.org/pipermail/mapserver-users/2012-April/072011.html>  in 
Thomas Bonfort's reply. I actually found that 6.4 produced small, aliased 
images with both the GD and AGG drivers and regardless of my ANTIALIAS 
true/false setting.



Would anyone consider re-enabling the ANTIALIAS true/false option?



Thanks,

Rich









___
mapserver-users mailing list
mapse

Re: [mapserver-users] differing image size with different mapserver versions

2021-05-17 Thread Rahkonen Jukka (MML)
Hi,

Does it mean that Mapnik is using the many settings called *-gamma with range 
0-1 for a shortcut to adjust both the gamma and corresponding gamma method by 
the same http://mapnik.org/mapnik-reference/?

The goal of this thread is not actually to turn of antialiasing but to create 
smaller files and decreasing the antialiasing effect could probably do that. 
The original sample image "mapserv64.png" is antialiased to my eyes. Do you 
think that adjusting the gamma value alone could have an effect on the file 
size?

-Jukka Rahkonen-


-Alkuperäinen viesti-
Lähettäjä: Eichner, Andreas - SID  
Lähetetty: maanantai 17. toukokuuta 2021 16.53
Vastaanottaja: Rahkonen Jukka (MML) ; 
Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: AW: [mapserver-users] differing image size with different mapserver 
versions

Hi Jukka,

as a result of the discussion IMO Erik created a patch to be able to switch 
AGGs anti-aliasing on and off using the ANTIALIAS keyword. This was merged by 
Even Rouault in https://github.com/MapServer/MapServer/pull/6225
It originally worked IMHO only for lines styles. But GAMMA is __not__ the way 
to turn anti-aliasing off.

Greets, Andreas

-Ursprüngliche Nachricht-
Von: mapserver-users  Im Auftrag von 
Rahkonen Jukka (MML)
Gesendet: Montag, 17. Mai 2021 15:26
An: Rahkonen Jukka (MML) ; Mapserver-Users 
(mapserver-users@lists.osgeo.org) 
Betreff: Re: [mapserver-users] differing image size with different mapserver 
versions

Hi,

 

Here is a long thread about turning off antialias 
http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html
 
<http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html>
 .

 

I had the same wrong idea about gamma=0 back then but perhaps gamma=0.01 could 
work.

 

-Jukka Rahkonen-

 

Lähettäjä: mapserver-users  Puolesta 
Rahkonen Jukka (MML)
Lähetetty: maanantai 17. toukokuuta 2021 16.06
Vastaanottaja: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions

 

Hi,

 

(Re-sent as edited to mailing list because the body was originally too long.

 

Are you sure about “I actually found that 6.4 produced small, aliased images 
with both the GD and AGG drivers”.  Originally the AGG library could only do 
anti-aliasing and that affected also Mapserver 5 
https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html 
<https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html> .

 

I guess that Mapnik folks have since that added support for controlling 
anti-aliasing with gamma setting http://mapnik.org/mapnik-reference/.

I can see that gamma can be used also with Mapserver 
https://www.mapserver.org/mapfile/outputformat.html

 

Have a try with gamma=0. However, Even wrote that turning off antialiasing is 
possible only in master, so perhaps gamma=0 does not work.

 

The documentation for Mapserver 5 tells that “All ANTIALIAS keywords are now 
ignored". But the keyword still appears in quite a many places:

https://mapserver.org/search.html?q=antialias

 

Would it be time to remove them as well as now not useful references to GD 
renderer (removed by RFC 99 in 2013)?

 

-Jukka Rahkonen-

 

 

Lähettäjä: mapserver-users mailto:mapserver-users-boun...@lists.osgeo.org> > Puolesta Richard Greenwood
Lähetetty: maanantai 17. toukokuuta 2021 15.26
Kopio: mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org> 
Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions

 

Thanks for the suggestions. The consensus seems to be that anti-aliasing is 
causing the increased size. The documentation here 
<https://mapserver.org/output/antialias.html>  says "Since version 6.0, 
MapServer will produce aliased output for the “gd/” drivers, and antialiased 
output for the “agg/” and “cairo/” ones" and it's also mentioned here 
<https://lists.osgeo.org/pipermail/mapserver-users/2012-April/072011.html>  in 
Thomas Bonfort's reply. I actually found that 6.4 produced small, aliased 
images with both the GD and AGG drivers and regardless of my ANTIALIAS 
true/false setting. 

 

Would anyone consider re-enabling the ANTIALIAS true/false option?

 

Thanks,

Rich

 

 

 

 

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


Re: [mapserver-users] differing image size with different mapserver versions

2021-05-17 Thread Rahkonen Jukka (MML)
Hi,

Here is a long thread about turning off antialias 
http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html.

I had the same wrong idea about gamma=0 back then but perhaps gamma=0.01 could 
work.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Rahkonen Jukka (MML)
Lähetetty: maanantai 17. toukokuuta 2021 16.06
Vastaanottaja: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions

Hi,

(Re-sent as edited to mailing list because the body was originally too long.

Are you sure about “I actually found that 6.4 produced small, aliased images 
with both the GD and AGG drivers”.  Originally the AGG library could only do 
anti-aliasing and that affected also Mapserver 5 
https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html.

I guess that Mapnik folks have since that added support for controlling 
anti-aliasing with gamma setting http://mapnik.org/mapnik-reference/.
I can see that gamma can be used also with Mapserver 
https://www.mapserver.org/mapfile/outputformat.html

Have a try with gamma=0. However, Even wrote that turning off antialiasing is 
possible only in master, so perhaps gamma=0 does not work.

The documentation for Mapserver 5 tells that “All ANTIALIAS keywords are now 
ignored". But the keyword still appears in quite a many places:
https://mapserver.org/search.html?q=antialias

Would it be time to remove them as well as now not useful references to GD 
renderer (removed by RFC 99 in 2013)?

-Jukka Rahkonen-


Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Richard Greenwood
Lähetetty: maanantai 17. toukokuuta 2021 15.26
Kopio: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions

Thanks for the suggestions. The consensus seems to be that anti-aliasing is 
causing the increased size. The documentation 
here<https://mapserver.org/output/antialias.html> says "Since version 6.0, 
MapServer will produce aliased output for the “gd/” drivers, and antialiased 
output for the “agg/” and “cairo/” ones" and it's also mentioned 
here<https://lists.osgeo.org/pipermail/mapserver-users/2012-April/072011.html> 
in Thomas Bonfort's reply. I actually found that 6.4 produced small, aliased 
images with both the GD and AGG drivers and regardless of my ANTIALIAS 
true/false setting.

Would anyone consider re-enabling the ANTIALIAS true/false option?

Thanks,
Rich




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


Re: [mapserver-users] differing image size with different mapserver versions

2021-05-17 Thread Rahkonen Jukka (MML)
Hi,

(Re-sent as edited to mailing list because the body was originally too long.

Are you sure about “I actually found that 6.4 produced small, aliased images 
with both the GD and AGG drivers”.  Originally the AGG library could only do 
anti-aliasing and that affected also Mapserver 5 
https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html.

I guess that Mapnik folks have since that added support for controlling 
anti-aliasing with gamma setting http://mapnik.org/mapnik-reference/.
I can see that gamma can be used also with Mapserver 
https://www.mapserver.org/mapfile/outputformat.html

Have a try with gamma=0. However, Even wrote that turning off antialiasing is 
possible only in master, so perhaps gamma=0 does not work.

The documentation for Mapserver 5 tells that “All ANTIALIAS keywords are now 
ignored". But the keyword still appears in quite a many places:
https://mapserver.org/search.html?q=antialias

Would it be time to remove them as well as now not useful references to GD 
renderer (removed by RFC 99 in 2013)?

-Jukka Rahkonen-


Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Richard Greenwood
Lähetetty: maanantai 17. toukokuuta 2021 15.26
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions

Thanks for the suggestions. The consensus seems to be that anti-aliasing is 
causing the increased size. The documentation 
here says "Since version 6.0, 
MapServer will produce aliased output for the “gd/” drivers, and antialiased 
output for the “agg/” and “cairo/” ones" and it's also mentioned 
here 
in Thomas Bonfort's reply. I actually found that 6.4 produced small, aliased 
images with both the GD and AGG drivers and regardless of my ANTIALIAS 
true/false setting.

Would anyone consider re-enabling the ANTIALIAS true/false option?

Thanks,
Rich




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


Re: [mapserver-users] differing image size with different mapserver versions

2021-05-17 Thread Rahkonen Jukka (MML)
Hi,

I made a few tests with IrfanView and Gimp and it seems that the both images 
are antialized but the mapserv76 version is more fine-grained. The mapserv64 
version has also less unique colors, 217 vs 250 colors. Saving the mapserv76 
image with IrfanView or Gimp by using different settings does not reduce the 
file size much so the image obviously really has more details. Interlace mode 
(adam7) in Gimp made the image even bigger.

The visual quality of mapserv76.png is not so much better that it would justify 
the doubled file size. At least the area with dense rectangles on the right 
look better in mapserv64.png. But I fear that for any systematic further 
studies you should prepare a test case with source data and mapfile. There are 
very many small rectangles in the image and it may be that different 
antializing near the narrow black lines makes the difference. It would be 
interesting to test the output size with more typical maps.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Seth G
Lähetetty: maanantai 17. toukokuuta 2021 11.27
Vastaanottaja: Richard Greenwood 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions

Hi Richard,

In your OUTPUTFORMAT declaration maybe try setting the DRIVER to AGG/PNG8
Also  IMAGEMODE PC256 was only for GD support that was removed in 7.0. Try 
IMAGEMODE RGB (or RGBA if you want transparency).

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Sat, May 15, 2021, at 8:00 PM, Richard Greenwood wrote:
I built from main and tested with ANTIALIAS ON and ANTIALIAS OFF. Assuming that 
my mapfile syntax below is correct, there is no difference in size and the 
resulting PNG is still approximately 3x larger than the MapServer 6.4 one.
  CLASS
STYLE
  COLOR 255 255 208
  ANTIALIAS ON
END
  END
Again, thank you for your suggestions.
Rich

On Sat, May 15, 2021 at 11:21 AM Even Rouault 
mailto:even.roua...@spatialys.com>> wrote:
Actually, I just tried to open mapserv64.png with gimp, and export it as a 
non-interlaced or interlaced PNG. And the non-interlaced version is 60 kB vs 96 
kB for interlaced. So interlacing vs non-interlacing isn't the cause here.

Looking more closely at mapserv64.png  vs mapserv76.png , they are visually 
different. I suspect the rendering to be of higher quality in 7.6 due to 
anti-aliasing and perhaps better quantization to 8-bit. You could perhaps try 
to turn off antialiasing in your CLASS.STYLE. This has been re-vived very 
recently for AGG line rendering. It is master only however.
Le 15/05/2021 à 19:07, Richard Greenwood a écrit :
Even,

Thank you. I had ignored the difference in the interlacing of the two images 
because I didn't think it would have affected the size.

The maprgbapng.c file no longer exists in MapServer 6.4 or 7.6. There is an "if 
( interlaced ..." code block in mapoutput.c that is the same in 6.4 and 7.6. I 
tried forcing it ON and rebuilding 7.6 but the output image still is not 
interlaced. Maybe that code is just a left over. Or maybe AGG doesn't support 
interlacing as https://www.mapserver.org/mapfile/outputformat.html seems to 
suggest.

In any case, thanks again.
Rich



On Sat, May 15, 2021 at 9:59 AM Even Rouault 
mailto:even.roua...@spatialys.com>> wrote:

Richard,

your 6.4 image is a interlaced PNG, whereas the 7.6 is a non-interlaced one.

I see in the git history a relevant commit:


$ git show 9984b39cc8f74d60eb240728df660a172a118aad
commit 9984b39cc8f74d60eb240728df660a172a118aad
Author: Thomas Bonfort 

Date:   Sun Oct 5 15:59:44 2008 +

rgba_png: don't interlace by default


git-svn-id: http://svn.osgeo.org/mapserver/trunk@7960 
7532c77e-422f-0410-93f4-f0b67bdd69e2

diff --git a/maprgbapng.c b/maprgbapng.c
index 105d8d61..c3615edd 100644
--- a/maprgbapng.c
+++ b/maprgbapng.c
@@ -357,10 +357,13 @@ int msSaveImageRGBAQuantized(gdImagePtr img, gdIOCtx 
*ctx, outputFormatObj *form
 int bot_idx, top_idx;
 int remap[256];
 int reqcolors = atoi(msGetOutputFormatOption( format, "QUANTIZE_COLORS", 
"256"));
+const char *interlace;
 ms_png_info info;
 info.width = gdImageSX(img);
 info.height = gdImageSY(img);
-if( strcasecmp("ON", msGetOutputFormatOption( format, "INTERLACE", "ON" )) 
== 0 )
+interlace = msGetOutputFormatOption( format, "INTERLACE", "OFF" );
+if( strcasecmp("ON", interlace) == 0 || strcasecmp("YES", interlace) == 0
+|| strcasecmp("1", interlace) == 0)
 info.interlaced=1;
 else
 info.interlaced=0;



But this predates 6.4 release by several years, so this doesn't explain why you 
see a different behavior, unless something in 6.4 still turned on interlacing 
on in that configuration.

From what I can see in the doc, the interlacing mode was removed in the 7.0 
release when GD went off, so I don't think you can do much. I guess that could 
be re-added but would require some 

Re: [mapserver-users] Mapserver installation in cloud environments (kubernetes)

2021-04-28 Thread Rahkonen Jukka (MML)
Hi,

Have you tried to find an explanation for the difference between Spatialite and 
geopackage? They are both SQLite databases and there is not much difference in 
how they store the geometries into BLOBs. Does direct SQL “select * from table” 
give similar results?

I have not experienced such difference with Mapserver. In some not so 
scientific tests with 1.2 million polygons I found that shapefile was the 
fastest and Spatialite/Geopackage were slightly slower, but still faster than 
PostGIS with plain small bbox queries. The advantage of shapefile was lost when 
attribute filters were needed for more than one attribute. Comparison was made 
between a sorted shapefile and database tables with appropriate indexes. The 
BBOX queries returned typically about 10-50 polygons with simple geometries – 
agricultural parcels.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Andreas Neumann
Lähetetty: tiistai 27. huhtikuuta 2021 18.40
Vastaanottaja: Wouter Visscher 
Kopio: mapserver-users 
Aihe: Re: [mapserver-users] Mapserver installation in cloud environments 
(kubernetes)

Hi all,

Thanks for your reactions and replies to my request if there is experience in 
running UMN MapServer in the cloud. Sorry about the delay in responding.

I had a look at the MapServerless AWS Lambda Layer project and corresponding 
video. Thanks for sharing this work!

Pre-rendered tiles are of course good for background maps, but for other 
layers, esp. frequently updated layers and layers where we want to allow custom 
styling, feature info, etc. map tiles are not good alternatives.

Interesting to me was the feedback from Wouter about the Dutch NGDI (PDOK), 
which seems to be more similar to our GDIs (province level and national level 
OGC services in Switzerland). Interesting to hear that you are copying data as 
close as possible to the pods (Geopackage or by bringing Postgis really close 
to the Pods).

In the case of QGIS Server it is also interesting to see that the different 
vector data seem to matter substantially. We have a QGIS Server performance 
suite published at http://test.qgis.org/perf_test/graffiti/ --> scroll to the 
latest date. In the performance test suite there is a section comparing 
different vector data sources. See f.e. 
http://test.qgis.org/perf_test/graffiti/2021_04_27_01_00/report.html#c395b4ae16b447f1b3e6fc127a4531da
 where Postgis and SpatiaLite data sources are substantially faster than 
Shapefile and Geopackage is clearly the looser. Not sure if the same applies 
for UMN MapServer? Maybe that is a pattern that applies to QGIS Server only ...

Wouter: I would be interested in learning more about the "ogc-webservice-proxy" 
you mention for determining the size/duration/location. Do you have more to 
share regarding this proxy service? What is the purpose of it and how does it 
work? Do you also separate short-running requests (e.g. GetFeatureInfo or 
GetLegendGraphics) vs long-running requests (GetMap, printing services, report 
generation)?

Is your "traefik" load balancer using "round robin" load balancing or something 
more advanced based on system load or even by using an estimate/prediction how 
long a request might take based on the parameters submitted?

Thanks all for the interesting discussion!

Andreas



On Fri, 23 Apr 2021 at 22:07, Wouter Visscher 
mailto:wouter.vissc...@gmail.com>> wrote:
Hi Andreas,

To answer your question: "Do you know of any work "

For the Dutch National Geodata Infrastructure (PDOK) we are running now (over a 
year) hundreds of OGC WMS/WMTS/WFS servers (primarily Mapserver and Mapproxy) 
on aks (Azure kubernetes).

The challenges you are describing sound very similar to ours :)

To give some small inside on some of our solutions regarding:
deployment: kustomize and operators
cloud optimization: (regarding data) geohashes over GPKG and PostGIS tables and 
getting the data as close to the pods as possible.
load balancing: (infrastructure wise) 'standaard' loadbalancing with traefik, 
(OGC wise) we are working on a 'ogc-webservice-proxy' for determining the 
size/duration/location, basically what is going to be the impact of a request.
resource sharing: (infrastructure) ScaleSets for nodes, and ReplicaSets based 
on load, (data) because we have most of the data in GPKG we 'copy' the data 
around. So for a service that scales up to 4 pods we have 4 of the same GPKG 
copied to that node.

I will share your knowledge with my colleagues, but it seems you reached a lot 
of the same conclusions (so far I have read) we have.

On Fri, Apr 23, 2021 at 5:20 PM Andreas Neumann 
mailto:andr...@qgis.org>> wrote:
Hi,

For a small project as part of the Swiss National Geodata Infrastructure (grant 
project) several people worked on a study document called "Cloud-optimized OGC 
WMS Server" where we analyzed problems that can arise when you install an OGC 
web server in the cloud (e.g. docker image deployed via Kubernetes, OpenShift 
or the likes). This work had a 

Re: [mapserver-users] Mapserver installation in cloud environments (kubernetes)

2021-04-23 Thread Rahkonen Jukka (MML)
Hi,

I believe that not much that kind of studies about load balancing WMS servers 
have been done. If there is high load then people very soon place some tile 
cache into front line and use WMS only for seeding the cache. Sharing load 
between tile servers is rather simple because each tile is about as expensive 
to serve. But users do want more different styles, possibility to select just 
some layer, wider support for coordinate systems etc. that may mean more demand 
for traditional WMS because caching all alternatives gets unpractical.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Andreas Neumann
Lähetetty: perjantai 23. huhtikuuta 2021 18.21
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Mapserver installation in cloud environments 
(kubernetes)

Hi,

For a small project as part of the Swiss National Geodata Infrastructure (grant 
project) several people worked on a study document called "Cloud-optimized OGC 
WMS Server" where we analyzed problems that can arise when you install an OGC 
web server in the cloud (e.g. docker image deployed via Kubernetes, OpenShift 
or the likes). This work had a focus on QGIS Server with it's own set of 
problems - but some of the issues studied in this document also matter for 
other OGC WMS servers, such as UMN Mapserver or Geoserver, such as the load 
balancing problem, how to share resources, etc.

Here is the link to the document (not in final form yet, but close to being 
final): 
https://docs.google.com/document/d/1cOUWgzalRx7CHWTFgHz6-uyScsCcoaEmYC0VBHdZShQ/edit#heading=h.c7gq4lie7ys2

I wonder if any similar work has been done specifically around problems, 
challenges and solutions when you deploy UMN Mapserver in cloud environments? 
Do you know of any work?

One major problem that probably all installations of an OGC WMS server have is 
how to deploy a more intelligent load balancing system? Often, the default load 
balancer is some kind of round robin load balancer system, but often this leads 
to inferior results where "cheap and short" requests (such as a simple 
GetFeatureInfo or GetLegendGraphics request) can be queued behind a 
long-running GetMap request (potentially with many layers, many features and a 
high-dpi, such as 600dpi, where the request can take several seconds to process.

In our production system we are currently separating the requests to dedicated 
instances for short requests and potentially long requests, to avoid the above 
mentioned scenario, but we are not so satisfied with the solution, as it is  a 
bit inflexible and also a bit harder to maintain. Ideally, we would like to 
have a more intelligent load balancer with incoming queue that holds back 
requests as long as all WMS server instances are busy. This would avoid the 
situation where a "less intelligent" load balancer would simply forward the 
requests to instances based on Round-Robin principle.

Do you know of any work in the UMN Mapserver community regarding cloud 
deployment, cloud optimization, load balancing and resource sharing?

In our study document I'd like to also include the perspective of other WMS 
servers besides QGIS server, so any input would be welcome.

Thanks,
Andreas

--
Andreas Neumann
QGIS.ORG board member (treasurer)
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Missing Dynamic Charts

2021-04-15 Thread Rahkonen Jukka (MML)
Hi Sarah,

The easiest way to get the BBOX from QGIS is to open the Debugging/Development 
tools with the function key F12 or through the View-Panels menu. Start 
recording and QGIS will capture the http requests including GetMaps for you.

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: mapserver-users  Puolesta 
Jeff McKenna
Lähetetty: torstai 15. huhtikuuta 2021 16.14
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Missing Dynamic Charts

Hi Sarah,

Thanks for providing links to the data.  I've used your NaturalEarth link, and 
generated a simple test, with bogus values for the charts, you can see it in 
your browser at 
https://ms4w.dev/cgi-bin/mapserv.exe?map=/ms4w/apps/ticket-charting/charts.map=browse=openlayers=all

You can alternatively add it as a WMS (in QGIS for example) with the
onlineresource: 
https://ms4w.dev/cgi-bin/mapserv.exe?map=/ms4w/apps/ticket-charting/charts.map

You can see that I cannot replicate your issue (all pie charts show across 
Canada, with that NaturalEarth admin file).  My full mapfile contains nothing 
special, no tricks, but is available at: 
https://gatewaygeomatics.com/dl/ticket-charting.zip

Some other comments:
- remove DUMP TRUE from your mapfiles as this will break MapServer in the 
upcoming 8.0 release
- you will notice that I also have no min/max scales set
- to test your issue with your problem mapfile, get the exact problem extent 
values from QGIS, and then generate a map image with the command:
   shp2img -m mine.map -o ttt.png -map_debug 3 -e minx miny maxx maxy


Give my mapfile a test locally to see also...

Hope that helps!

and hello from the east coast.

-jeff




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


On 2021-04-14 3:15 p.m., Sarah Zwiep wrote:
> Good afternoon,
> 
> 
> I'm working on a project that's experiencing some unexpected behavior 
> with a Mapserver dynamic charts layer. Some polygons in the layer will 
> not reliably render charts. For example, at the desired chart size of 30 
> and zoom level 4, only 7 of the expected 12 charts render. If we 
> increase the zoom level then more of those missing charts will render. 
> Similarly, if we decrease the chart size more charts render. However, we 
> would like all the charts in view to render regardless of zoom level and 
> size, which I believe aligns with the expected behavior of a dynamic 
> charts layer.
> 
> 
> We have tried 2 separate vectors files (of Canadian provinces and 
> territories) from statcan 
> 
>  
> and naturalEarth 
> 
>  
> but the problem persists. Neither file has invalid geometries according 
> to OGC standards. The project previously used a vector file of Canadian 
> ecozones and the charts worked fine with that, so the problem only 
> started when we switched the file from ecozones to provinces/territories.
> 
> 
> I've listed links the layer definition, as well of screenshots of the 
> project with the missing charts at different sizes/zooms (No chart on 
> Nunavut is expected). The project is using MapServer 7.4.4 in Centos 7.9 
> and configures the project mapfile as a WMS server for a Leaflet 1.4.0 
> WMS layer.
> 
> Any guidance is much appreciated.
> 
> Best regards,
> Sarah
> 
> https://pasteboard.co/JXkbqTz.png 
> 
> https://pasteboard.co/JXkbIO4.png 
> 
> https://pasteboard.co/JXkc1t1.png
>  
> 
> https://pasteboard.co/JXkcgxh.png 
> 
> https://pastebin.com/SdudDHNX 
> 
> 
> 
> 
> 
> 
> ___
> 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] Create a tileindex for WFS

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

The results show that there is something wrong in your system but it is hard to 
say what. If Mapserver gets the 62584 features from the biggest table in 7 
seconds it should not really need many seconds more to write everything out as 
GML. Unfortunately I can’t say what to debug next.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
mathias cunault via mapserver-users
Lähetetty: keskiviikko 14. huhtikuuta 2021 12.29
Vastaanottaja: Jeff McKenna 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Create a tileindex for WFS

Hi,
Reading yours preconisations here is what I did :

  *   server side : I ran EXPLAIN ANALYZE with the two queries I get in the 
mapserver log file as suggested. These queries concerned the two layers 
partially loaded in QGIS. I ran the queries with and without the LIMIT and 
OFFSET appearing at the end of the queries. The execution times are :

 *   about 1ms / 3s for layers with 22042 rows
 *   about 300ms / 7s for layers with 62584 rows.
 *   example : EXPLAIN ANALYZE select 
"gid"::text,"numouvert"::text,"typouvert"::text,"gidoperef"::text,"contributor"::text,"creator"::text,"publisher"::text,"description_ouv"::text,"resolution_ouv"::text,"dates"::text,"source"::text,"identifier"::text,"rights"::text,"title"::text,"type_donnees"::text,"format"::text,"language"::text,"coverage"::text,ST_AsBinary(("geom"),'NDR')
 as geom,"gid"::text from (select gid, geom, numouvert, typouvert, gidoperef, 
contributor, creator,publisher,
description_ouv, resolution_ouv, dates, source, identifier, rights, title, 
type_donnees, format, language, coverage FROM cd45.ouverture) as foo where 
"geom" && ST_GeomFromText('POLYGON((529963.906053403 
6606654.86508109,529963.906053403 6880827.26326984,760155.299537431 
6880827.26326984,760155.299537431 6606654.86508109,529963.906053403 
6606654.86508109))',find_srid('','cd45.ouverture','geom'))
limit 2 offset 0;

  *   I followed steps 1 to 5 suggested by Jukka Rahkonen : step 4 without 
MAXFEATURES did not return any result after several minutes 
(http://blabla.fr/cgi-bin/mapserv.exe?MAP=C:/ms4w/Apache/site/mapfile/fond_cd45.map=WFS=getfeature=2.0.0=vestige)
If I have done the things correctly, I would say that the WFS can't get all the 
features.
Maybe because the layers features are very small polygons in large areas (?).
The WFS was the easiest solution for basic QGIS users ; giving direct access to 
Postgis layers through QGIS could be an alternative.
Unless you can suggest me something else ?
Thanks



Le lun. 12 avr. 2021 à 17:09, Jeff McKenna 
mailto:jmcke...@gatewaygeomatics.com>> a écrit :
Since you are using MS4W here are some specific steps for your PostGIS
query/speed testing (I am adding this now to the documentation on
mapserver.org also) :

- add into your MAP-level of your mapfile:

   CONFIG "CPL_DEBUG" "ON"
   CONFIG "MS_ERRORFILE" "/ms4w/tmp/ms_error.txt"
   DEBUG 5

- add into your PostGIS LAYER of your mapfile:

   DEBUG 5

- now use a WFS client such as QGIS and add your WFS PostGIS layer

- open  "/ms4w/tmp/ms_error.txt" in Notepad++

- search for "msPostGISLayerWhichShapes query:"

- that line should list the long exact query sent from MapServer to the
PostreSQL instance, it may look like:

   [Mon Apr 12 11:27:34 2021].207000 msPostGISLayerWhichShapes query:
SELECT
"gid"::text,"area"::text,"perimeter"::text,"province_"::text,"province_i"::text,"status"::text,"name"::text,"name_e"::text,"name_f"::text,"reg_code"::text,"poly_featu"::text,"island"::text,"island_e"::text,"island_f"::text,ST_AsBinary(("geom"),'NDR')
as geom,"gid"::text FROM province WHERE "geom" &&
ST_GeomFromText('POLYGON((-5814679.36987815
-1504714.04276694,-5814679.36987815 4439806.52253364,5943763.33635122
4439806.52253364,5943763.33635122 -1504714.04276694,-5814679.36987815
-1504714.04276694))',3978) LIMIT 2 OFFSET 0

- now connect to that database through psql.exe

   psql -U postgres -p 5432 -d mydb

- using that error file line, grab everything from "SELECT", and inside
your database prompt, start the command with "EXPLAIN ANALYZE" and then
paste your full query, such as:

mydb=# EXPLAIN ANALYZE SELECT
"gid"::text,"area"::text,"perimeter"::text,"province_"::text,"province_i"::text,"status"::text,"name"::text,"name_e"::text,"name_f"::text,"reg_code"::text,"poly_featu"::text,"island"::text,"island_e"::text,"island_f"::text,ST_AsBinary(("geom"),'NDR')
as geom,"gid"::text FROM province WHERE "geom" &&
ST_GeomFromText('POLYGON((-5814679.36987815
-1504714.04276694,-5814679.36987815 4439806.52253364,5943763.33635122
4439806.52253364,5943763.33635122 -1504714.04276694,-5814679.36987815
-1504714.04276694))',3978) LIMIT 2 OFFSET 0;

- the response will tell you how long that query took, such as:

   Execution time: 0.293 ms

Hope that helps you a little more,


Thank-you for using MS4W.
"MS4W: open doors as well as windows"

-jeff




--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and 

Re: [mapserver-users] Create a tileindex for WFS

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

You tables (what materialized views in fact are) are not big at all. There is 
something else wrong if your WFS is slow or fails totally. Looking at the 
tileindex is not the right thing to do.

QGIS is a rather poor WFS client, I would not use that for testing. If you 
still use, debug the http messages that it is sending, function key F12 opens 
the debugging tools. However, I would recommend to use hand written WFS 
requests instead so you can have full control on the queries. It does not take 
long to learn the basics.

  1.  Read the capabilities 
https://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS=1.0.0=GetCapabilities
  2.  Read the schema of one feature type 
https://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS=1.0.0=DescribeFeatureType=continents
  3.  Read one feature from a feature type 
https://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS=1.0.0=getfeature=continents=1
  4.  Read the whole feature type by leaving out MAXFEATURES
  5.  Read data from a small area with bbox 
https://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS=1.0.0=getfeature=continents=-60,46,-59,47



Observe if the response is fast. With your data a reasonable download time for 
the whole feature type is a few seconds, but it may be longer if your 
geometries are very big and you have lots of attributes.

If your service is fast but QGIS still gives errors I would check the data, 
especially if there happens to be topology errors in geometries.
If your service is slow turn on the logging of the SQL statements on the 
Postgresql side and execute the same SQL from PSQL prompt. If the database is 
slow it is useless to tune Mapserver. Tune the database instead. For example if 
spatial index is missing the bbox queries from big tables will be slow, even if 
the bbox is small.

General advice it to be systematic and change only one thing at a time when 
testing.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
mathias cunault via mapserver-users
Lähetetty: maanantai 12. huhtikuuta 2021 15.01
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Create a tileindex for WFS

Hello,
In a PostgreSQL 13 database, I have 3 materialized views with 2578, 22013 and 
62500 rows.
I am using MS4W 4.0.3 to generate a WFS based on these 3 views.
The aim is for users to display these WFS in QGIS.
I have other lightweight views in PostgreSQL that can be easily displayed, but 
these 3 materialized views seem to be too heavy to display because some 
messages say that Downloading the layer entities has failed or partially failed.
I wonder if using a tileindex was a good idea to speed up the display. Before 
going further in the developments, I would like your opinion about two things :

  *   I have to cut my views in "slices" before create a tileIndex for each one.
  *   The tileindex can be stored in postgis database.
Am I right?
If not is there a better solution ?
Thanks for your help
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] BINVALS is supported by PostGIS 1.5?

2021-03-26 Thread Rahkonen Jukka (MML)
Hi,

Developers have paid attention to BINDVALS recently 
https://github.com/MapServer/MapServer/issues/6236 and they should work as in 
your mapfile.

The usage example is about string   "1"  "Nova Scotia". I wonder how a numeric 
bindvalue should be expressed in mapfile. Could it be that in the "1" "10" case 
the value gets converted into SQL string '10'? 

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: mapserver-users  Puolesta 
Fujioka (Duke)
Lähetetty: perjantai 26. maaliskuuta 2021 6.01
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] BINVALS is supported by PostGIS 1.5?

Hello Mapserver experts!

I googled BINVALS but couldn't find any useful information.
What I want to achieve is to include a placeholder in DATA and substitute it 
using BINVALS.

Simplified example:
LAYER
CONNECTION "user=xxx password=xxx dbname=xxx host=xxx"
CONNECTIONTYPE POSTGIS
DEBUG 5
DATA "geom from (select column1, geom, count(*) from table1 where
column1 = $1 group by column1, geom) AS foo USING UNIQUE column1 USING 
SRID=4326"
BINDVALS
    "1"  "10"
END
END

I expect the final query would be "select ... where column1 = 10 group by ...". 
But the map image does not show anything. It's a gray image. 
When I set "DEBUG 5" at the layer level and took a look at the debug info, the 
placeholder was not substituted (it was still "where column1 = $1..."). So, it 
seems BINDVALS is not working.

Any tips on this? Does the complexity of the query matter (e.g. can't use GROUP 
BY or JOIN)? Should the query in the debug info be the final one with the 
placeholder substituted with the value specified in BINDVALS?

I use Mapserver 6.4 & PostGIS 1.5 & PostgreSQL 9.1. Is BINDVALS not supported 
for these versions?
Also, how can I change the bind value using PHP Mapscript (say, from "10" to 
"20")?

Thanks,

--

   Ei Fujioka
   Research Scientist
   Nicholas School
   Duke University

   (919) 684-3518
   efuji...@duke.edu


___
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] data parameter in tileindex

2021-03-24 Thread Rahkonen Jukka (MML)
Hi,

Obviously you are playing with vector data, not rasters, and you are trying to 
make a ogrtileindex instead of gdaltindex. I know, technically there is no 
difference.

I have used ogrtileindex with great success with shapefiles. I have never tried 
to do the same with PostGIS data and I can only wish you luck with your 
experiments. One thing that came into my mind it that perhaps OGR connection to 
PostGIS would work better than the native one with tileindex.

-Jukka Rahkonen-

Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Zmitser Kozhukh via mapserver-users
Lähetetty: keskiviikko 24. maaliskuuta 2021 9.03
Vastaanottaja: Carlos Ruiz 
mailto:boolean10...@yahoo.com>>
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] data parameter in tileindex

Dear Carlos, it is not about mapfile, it is in location cell of tileindex. It 
is one cell in table (database table, dbf file etc.), and I need to put there 
both connection and data details. The question is how to make it so that 
mapserver parses it correctly.
Sincerely, Zmitser

Среда, 24 марта 2021, 6:53 +03:00 от Carlos Ruiz 
mailto:boolean10...@yahoo.com>>:

Zmitser,

You have to have the following on a MAP file:

LAYER

...

CONNECTION "host= ... password="
CONNECTIONTYPE 
DATA " FROM  USING UNIQUE  USING SRID="

...

END

On DATA you must specify the name of the geometry column and the table, if 
you're using a database. If you are using a shape file you just have to include 
the DATA keyword with the path and the name of the SHP file.


On Tuesday, March 23, 2021, 2:34:48 AM CST, Zmitser Kozhukh via mapserver-users 
>
 wrote:


Dear mapserver users, I need to specify data parameter at the location item of 
tileindex.
So far, I have tried many possibilities but none works:
‘host=127.0.0.1 dbname=database user=admin password=admin DATA "geom from table 
using unique id using srid=4326"’
or
host=127.0.0.1 dbname=database user=admin password=admin data="geom from table 
using unique id using srid=4326"
etc.
Still I get an error :
msDrawMap(): Image handling error. Failed to draw layer named 'layer'. 
msPostGISLayerOpen(): Query error. Nothing specified in DATA statement.
Could someone please tell in which format data statement should be?
In documentation it is written vaguely:
Normally the location should contain the path to the tile file relative to the 
shapepath, not relative to the tileindex itself. If the DATA parameter contains 
a value then it is added to the end of the location.

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


--
Zmitser Kozhukh

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


Re: [mapserver-users] Hello from Finland

2021-03-16 Thread Rahkonen Jukka (MML)
Hi,

-Alkuperäinen viesti-
Stefan Gofferje wrote:

> Terve Jukka,

> On 3/16/21 12:54 PM, Rahkonen Jukka (MML) wrote:
>> When it comes to memory usage with raster files, Mapserver is reading 
>> rasters with GDAL so in this case with 
>> https://gdal.org/drivers/raster/grib.html. I have never been playing with 
>> GRIB files and I do not know how well the format is optimized for features 
>> that are needed for making fast map services: fast access to subregions and 
>> overview levels. I have no idea how well GRIB files are indexed for random 
>> access, it there is difference between png and JPEG2000 encoding, and how 
>> well the GDAL GRIB driver can utilize the possibilities that the format 
>> offer.

> That sounds good. IIRC GDAL is pretty mature with its memory management. 
>At least I haven't manged to crash it yet :D.

>> The most common raster format that Mapserver services are using is certainly 
>> GeoTIFF and when they are tiled, compressed, and have overviews they work 
>> pretty well. It is certainly an advantage if you can use the GRIB files 
>> directly without conversions. I see that you are using Mapcache in front of 
>> Mapserver and it will help a lot if you pre-seed the tiles. If you do not 
>> pre-seed then each time when the user is the first visitor on some site the 
>> bottle neck will be Mapserver.

> That is a good point! Especially as the forecast data is updated every 6 
> hours. I will have to integrate that into my update script somewhow once I 
> got there.

>> The Ls/Hs idea is interesting. I do not believe there is anything ready 
>> available but I know that my colleagues at the Finnish Geodetic Institute 
>> have made quite nice things with Mapserver and shell scripts running some 
>> GDAL commands. Should they be computed on-the-fly for the area that is 
>> visible on the map?

> I'm doing some GDAL stuff in shell scripts for beta.saakeskus.fi at the 
> moment. You can indeed do some fun stuff with the GDAL tools. In the long 
> run, I was thinking of changing from bash scripts to Python, though, because 
> then I can make some more calculations than are possible just with the GDAL 
> tools.

> Yes, I was thinking if it was possible to do that inside of mapserver. 
Finding _the_ highest and lowest point is fairly trivial with GDAL. 
IIRC, gdalinfo can output that info by default. A little more challenging is 
finding all points which are highest or lowest among their neighbors. That's 
what's needed for a weather map because usually, you have more than one high 
and one low area on one map.

Gdalinfo -stats reports the min/max values but not their locations. As far as I 
know there is no GDAL tool or Python script in the GDAL samples that can do 
that. Users have been asking for such tool in the mailing lists and in 
gis.stackexchange so if you find of create such utility please let me know.

For finding the local min/max areas you could perhaps try the gdaldem tools 
https://gdal.org/programs/gdaldem.html. Areas with slope=0 should be what you 
are searching.

-Jukka-

> -Stefan

-- 
  (o_   Stefan Gofferje| SCLT, MCP, CCSA
  //\   Reg'd Linux User #247167   | VCP #2263
  V_/_  https://www.gofferje.net   | https://www.saakeskus.fi

___
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] Hello from Finland

2021-03-16 Thread Rahkonen Jukka (MML)
 Hi Stefan,

When it comes to memory usage with raster files, Mapserver is reading rasters 
with GDAL so in this case with https://gdal.org/drivers/raster/grib.html. I 
have never been playing with GRIB files and I do not know how well the format 
is optimized for features that are needed for making fast map services: fast 
access to subregions and overview levels. I have no idea how well GRIB files 
are indexed for random access, it there is difference between png and JPEG2000 
encoding, and how well the GDAL GRIB driver can utilize the possibilities that 
the format offer.

The most common raster format that Mapserver services are using is certainly 
GeoTIFF and when they are tiled, compressed, and have overviews they work 
pretty well. It is certainly an advantage if you can use the GRIB files 
directly without conversions. I see that you are using Mapcache in front of 
Mapserver and it will help a lot if you pre-seed the tiles. If you do not 
pre-seed then each time when the user is the first visitor on some site the 
bottle neck will be Mapserver.

The Ls/Hs idea is interesting. I do not believe there is anything ready 
available but I know that my colleagues at the Finnish Geodetic Institute have 
made quite nice things with Mapserver and shell scripts running some GDAL 
commands. Should they be computed on-the-fly for the area that is visible on 
the map?

I wonder if it could be possible to query the CONTOUR layer that you already 
has https://www.mapserver.org/input/vector/contour.html and search the min/max 
values from there. Or then to improve the contouring algorithm a bit because it 
is already processing all the pixels.

-Jukka Rahkonen-

-Alkuperäinen viesti-

Lähettäjä: mapserver-users  Puolesta 
Stefan Gofferje
Lähetetty: tiistai 16. maaliskuuta 2021 12.11
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Hello from Finland

Hi Jeff,

On 3/15/21 2:35 PM, Jeff McKenna wrote:
 > Thanks Stefan for this wonderful introduction, it's nice to hear of  > 
 > positive experiences to give us all more motivation to continue to  > 
 > helping to improve MapServer!  Welcome to both you and Iliya to the  > 
 > community.  Keep us posted on your activities!
 >
 > Oh, once your MapServer backend is plugged-in be sure to add your  > weather 
 > site to the MapServer gallery, so we can help new users see  > what can be 
 > done...

Thanks for your nice words! I now have mapserver and mapcache running 
successfully and talking to each other in my home lab. I have set up a number 
of test layers from different input sources pretty successfully.
The documentation and the configuration required some adaption of my thinking 
processes because it's pretty different from anything else I have ever done 
before but I love this kind of challenges!

Currently I have only two issues which prevent me from doing the swap right 
now. Thanks to NOAA using a 0-360° grid instead of (-180)-180°, there's some 
artefacts when reprojecting to epsg:3857. For raster maps this is already 
addressed in #6106. I ran into an issue which LINE maps with a CONTOUR source 
which probably is related and opened #6261.

Then I have a question... Although it's not strictly necessary, I would like to 
paint those Hs and Ls in my atmospheric pressure map. Is there a way to run 
scripts or something like that in mapserver. I could probably run some GDAL 
stuff externally over the grid files in my download script and create some 
point overlays which could be in a GROUP with the isoline layer but doing this 
inside of mapserver would kinda be cooler.

And a second question: How is mapserver handling raster files memory-wise? Does 
it try to load the whole file to the memory at once? 
My biggest issue during the whole 14 years I run this website always has been 
balancing preprocessing and map rendering. The more preprocessing I have to do, 
the longer the whole process of map generation takes but of course I couldn't 
afford to buy a $100k top-of-the-line server with terabytes of RAM and plenty 
of CPU cores for the rendering...
I'm thinking about my input file strategy at the moment...
1.) One GRIB file for everything (around 1.9GB)
2.) One GRIB file per parameter for all time steps
3.) One GRIB file per time step including all parameters
4.) One GRIB file per parameter for each time step

4. would be the most complex to configure and also would be fun (irony!) to 
make local forecasts from but probably take the least memory.
2. and 3. are a fairly good compromise with 2 being easier for calculating 
local forecasts and 3 easier for calculating additional stuff like my "severe 
weather warning level"
1. would be easiest for rendering and calculating but even at the moment with 
GrADS I every now and then run into memory issues (leaks?).

This project really turns out to be a fun challenge!
Stefan

-- 
  (o_   Stefan Gofferje| SCLT, MCP, CCSA
  //\   Reg'd Linux User #247167   | VCP #2263
  V_/_  

Re: [mapserver-users] Fwd: MapServer PostGIS: WMS Layers Without Features

2021-03-02 Thread Rahkonen Jukka (MML)
Hi,

First thing that comes into my mind is that for some reason Mapserver may 
believe that the request is outside the area where you have data. I would 
double check the projections and extents.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Steve Lime
Lähetetty: tiistai 2. maaliskuuta 2021 17.06
Vastaanottaja: Nathan L 
Kopio: Mapserver 
Aihe: Re: [mapserver-users] Fwd: MapServer PostGIS: WMS Layers Without Features

What are you using to view the WMS service? What do you get if you take WMS 
configuration out of the equation and just do a call like so:

  
http://localhost/cgi-bin/mapserv.exe?map=[your
 mapfile]=map=all

That should get you an image with all the features in all the layers for your 
default extent.

--Steve

On Mon, Mar 1, 2021 at 1:05 PM Nathan L 
mailto:nathan.tyler.lo...@gmail.com>> wrote:

-- Forwarded message - From: Nathan L 
nathan.tyler.lo...@gmail.com Date: Tue, 
Feb 23, 2021 at 1:04 PM Subject: MapServer PostGIS: WMS Layers Without Features 
To: GISCO ListServ l...@giscolorado.org

Hi, ya'll! I'm in need of some help.

I've prepared an instance of PostGIS and MapServer on the same machine. I have 
loaded data into PostGIS and can view these features successfully in thick 
clients (ArcGIS Pro, QGIS).

My MapServer appears to be creating a successful WMS service with two layers. 
However, these two layers, called from PostGIS, are empty of any features. The 
same two layers were the features successfully confirmed to be in the PostGIS 
database, above. Nevertheless, my WMS layers from MapServer show up empty.

What am I missing?

My Mapfile: https://pastebin.com/tRTJKTxA

My ms_error.txt: https://pastebin.com/daJJMEkJ

My PostgreSQL log file: https://pastebin.com/EN2LzheE

My WMS Returns: https://pastebin.com/NR0W0Pg7

Nathan Tyler Lowry

Comprehensive GIS Solutions

(719) 208-7092 Desk

(719) 963-3571 Cell

(719) 960-2084 Fax

nathan.tyler.lo...@gmail.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] Basemap as merged and separate layers

2020-12-11 Thread Rahkonen Jukka (MML) via mapserver-users
Hi,

I believe (hope) that it is possible, perhaps by leaving the  names of the 
layers in the group empty, or with wms_enable_request metadata. Some links 
which seem relevant:

https://mapserver.gis.umn.edu/development/rfc/ms-rfc-67.html
https://github.com/mapserver/mapserver/issues/5404
https://github.com/MapServer/MapServer/pull/5533

-Jukka Rahkonen-

Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Yves Jacolin via mapserver-users
Lähetetty: perjantai 11. joulukuuta 2020 17.07
Vastaanottaja: Jesper Kempe 
mailto:jesper.ke...@gmail.com>>
Kopio: Mapserver 
mailto:mapserver-users@lists.osgeo.org>>
Aihe: Re: [mapserver-users] Basemap as merged and separate layers

Hello,

I think some part of your need can be done in MapServer, look at the 
wms_layer_group layer metadata in 
https://www.mapserver.org/ogc/wms_server.html. but all LAYERs will be always 
shown in MapServer.

Y.

Le ven. 11 déc. 2020 à 15:55, Jesper Kempe via mapserver-users 
mailto:mapserver-users@lists.osgeo.org>> a 
écrit :
Hi

I have a basemap in Mapserver 7.4.3 presented as a WMS-layer.

As many maps it consists of landusage, roads, label and so on.
Each of these "layers" or parts of the map consist of many  in the 
mapfile for different scales.
For example land0, land1 and roads0, roads1 and so on. Much like 
https://mapserver.org/basemaps/index.html

Currently all layers are part of "GROUP default" and map renders correctly when 
asking for LAYERS=default.

Unfortunately all layers (land0,land1,roads0,road1...) are also show in the 
Capability.

What I would like have is instead a response in the capability where there are 
layers for "the main map" and also a grouped layer for all "zoom layers" i.e. 
roads0,roads1 combined to a roads layer.
For example the layers default, land and roads should be the only layers 
visible in the Capability and possible to render in a GetMap-request.
A GetMap request for LAYERS=roads should show all the separate roads* layers 
only.

Can this be done in Mapserver?

Thanks,
Jesper


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


--
Yves Jacolin
Training and support manager - Team Manager
Camptocamp

Tel (France) : +33 4 58 48 20 43
Tel (Switzerland) : +41 21 619 10 43
Mob. : +33 6 18 75 42 21

email : yves.jaco...@camptocamp.com
http://www.camptocamp.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] OGR Geojson error

2020-09-29 Thread Rahkonen Jukka (MML)
Hi,

I found couple of issues but can’t say how severe they are:

http://opendata.arcgis.com/datasets/5da472c6d27b4b67970acc7b5044c862_0.geojson
this returns HTTP 302, moved temporarily and it redirects to https port
https://opendata.arcgis.com/datasets/5da472c6d27b4b67970acc7b5044c862_0.geojson
Trying to access the https port gives an error:
curl: (7) Failed to connect to opendata.arcgis.com port 443: Connection refused

Perhaps that arcgis site requires something like cookies or a certain 
user-agent before it is willing to send data.  I checked the URL also with a 
browser and it follows the redirection into https and gets data from there. 
GDAL understands the returned GeoJSON once it is saved on disk.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Weisbender, Eric
Lähetetty: tiistai 29. syyskuuta 2020 20.27
Vastaanottaja: b.j.kob...@utwente.nl; mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] OGR Geojson error

Thanks Kobben.  I think it might be more than a file naming issue.  Below is 
the response from ogrinfo but I can find anything related online.  Any ideas?


/usr/local/bin/ogrinfo 
http://opendata.arcgis.com/datasets/5da472c6d27b4b67970acc7b5044c862_0.geojson
ERROR 1: Peer's certificate has an invalid signature.
ERROR 1: Peer's certificate has an invalid signature.
FAILURE:
Unable to open datasource 
`http://opendata.arcgis.com/datasets/5da472c6d27b4b67970acc7b5044c862_0.geojson'
 with the following drivers.
  -> PCIDSK
  -> PDF
  -> EEDA
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> OGR_SDTS
  -> S57
  -> DGN
  -> OGR_VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> GML
  -> GPX
  -> KML
  -> GeoJSON
  -> GeoJSONSeq
  -> ESRIJSON
  -> TopoJSON
  -> OGR_GMT
  -> WAsP
  -> OpenFileGDB
  -> XPlane
  -> DXF
  -> CAD
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> PGDUMP
  -> GPSBabel
  -> SUA
  -> OpenAir
  -> OGR_PDS
  -> WFS
  -> WFS3
  -> HTF
  -> AeronavFAA
  -> EDIGEO
  -> GFT
  -> SVG
  -> CouchDB
  -> Cloudant
  -> Idrisi
  -> ARCGEN
  -> SEGUKOOA
  -> SEGY
  -> ODS
  -> XLSX
  -> ElasticSearch
  -> Carto
  -> AmigoCloud
  -> SXF
  -> Selafin
  -> JML
  -> PLSCENES
  -> CSW
  -> VDV
  -> MVT
  -> TIGER
  -> AVCBin
  -> AVCE00
  -> NGW
  -> HTTP


Eric Weisbender | GIS Program Lead
Western Area Power Administration | Headquarters
(O) 720.962.7280 | weisb...@wapa.gov

From: b.j.kob...@utwente.nl 
mailto:b.j.kob...@utwente.nl>>
Sent: Saturday, September 26, 2020 2:53 AM
To: Weisbender, Eric mailto:weisb...@wapa.gov>>; 
mapserver-users@lists.osgeo.org
Subject: [EXTERNAL] Re: [mapserver-users] OGR Geojson error

It might be simply that file names beginning with  a number are always a bad 
idea, because several libs and systems out there have problems with it...?

--
Barend Köbben


On 25/09/2020, 16:45, "mapserver-users on behalf of Weisbender, Eric" 
mailto:mapserver-users-boun...@lists.osgeo.org>
 on behalf of weisb...@wapa.gov> wrote:

Hello List,

I have two sources of geojson data in my map file.  One works fine the other 
does not.  The one that works streams into the browser when I go to it 
directly.  The other source downloads a file.  The one that does not work I get 
the following MapServer error.  Also the geojson sources are listed below.  The 
layer defs are the same in the mapfile.

Thanks in advance for your help.

Error:
msOGRFileOpen(): OGR error. Open failed for OGR connection in layer 
`fire_nifc_point .  File not found or unsupported format. Check server logs.


Works:  
http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson


No Worky:  
http://opendata.arcgis.com/datasets/68637d248eb24d0d853342cba02d4af7_0.geojson



Eric Weisbender | GIS Program Lead
Western Area Power Administration | Headquarters
(O) 720.962.7280 | weisb...@wapa.gov

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

Re: [mapserver-users] [EXTERNAL] RE: Multiple Styles for a LAYER/CLASS

2020-09-14 Thread Rahkonen Jukka (MML)
Hi,

Doesn’t the named styles system 
https://mapserver.gis.umn.edu/ogc/sld.html#named-styles-support that was new in 
version 5.2 work as documented?

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Cechini, Matthew F. (GSFC-423.0)[Science Systems & Applications, Inc.]
Lähetetty: maanantai 14. syyskuuta 2020 17.56
Vastaanottaja: Lime, Steve D (MNIT) ; 
mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] [EXTERNAL] RE: Multiple Styles for a LAYER/CLASS

Unfortunately, that’s not the functionality that I’m looking for…

What I want is to support “=default” or “=blue” query parameters 
resulting in different styling of the same underlying data.

Thanks,
Matt
.
Matthew Cechini
Contractor, Science Systems and Applications, Inc.
NASA GIBS Systems/Software Engineer
410.205.6272

From: "Lime, Steve D (MNIT)" 
mailto:steve.l...@state.mn.us>>
Date: Monday, September 14, 2020 at 10:49 AM
To: Matthew Cechini 
mailto:matthew.f.cech...@nasa.gov>>, 
"mapserver-users@lists.osgeo.org" 
mailto:mapserver-users@lists.osgeo.org>>
Subject: RE: [EXTERNAL] RE: Multiple Styles for a LAYER/CLASS

Names aren’t valid (or useful) at the style-level. If you remove those lines it 
should work and you’ll get stacked styles for each feature. --Steve

From: Cechini, Matthew F. (GSFC-423.0)[Science Systems & Applications, Inc.] 
mailto:matthew.f.cech...@nasa.gov>>
Sent: Monday, September 14, 2020 7:27 AM
To: Lime, Steve D (MNIT) 
mailto:steve.l...@state.mn.us>>; 
mapserver-users@lists.osgeo.org
Subject: Re: [EXTERNAL] RE: Multiple Styles for a LAYER/CLASS


We’re using 7.0.1… admittedly a bit of an older version.  Mapserver balks on 
NAME in the STYLE element in that version.

Thanks,
Matt
.
Matthew Cechini
Contractor, Science Systems and Applications, Inc.
NASA GIBS Systems/Software Engineer
410.205.6272

From: "Lime, Steve D (MNIT)" 
mailto:steve.l...@state.mn.us>>
Date: Friday, September 11, 2020 at 5:17 PM
To: Matthew Cechini 
mailto:matthew.f.cech...@nasa.gov>>, 
"mapserver-users@lists.osgeo.org" 
mailto:mapserver-users@lists.osgeo.org>>
Subject: [EXTERNAL] RE: Multiple Styles for a LAYER/CLASS

Hi Matt: Actually that syntax is supported (except for the style NAME 
attribute) and you can have multiple styles inside a class. What version are 
you using? --Steve

From: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 On Behalf Of Cechini, Matthew F. (GSFC-423.0)[Science Systems & Applications, 
Inc.]
Sent: Friday, September 11, 2020 2:37 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Multiple Styles for a LAYER/CLASS


Greetings,
   I would like to provide multiple styles for the same LAYER/CLASS in our 
mapserver configuration.  Ideally that looks something like this, though of 
course this syntax isn’t currently supported.


CLASS

  NAME "Thermal Anomalies"

 STYLE

 NAME   'default'

 SYMBOL 'circle'

 COLOR  240 40 40

 OUTLINECOLOR  240 40 40

 SIZE 3

 END



 STYLE

 NAME   'blue'

 SYMBOL 'circle'

 COLOR  0 0 255

 OUTLINECOLOR  0 0 255

 SIZE 3

 END

END

   How would I accomplish this given existing functionality?

Thanks,
Matt
.
Matthew Cechini
Contractor, Science Systems and Applications, Inc.
NASA GIBS Systems/Software Engineer
410.205.6272
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Use Ground Control Points from GeoTIFF

2020-09-03 Thread Rahkonen Jukka (MML)
Hi Jesper,

Poor performance may mean that your original tiff is not optimized for server 
usage and you should rewrite it in any case or at least add some overviews. 
Gdalinfo report about the original tiff and .vrt would probably give some 
useful information. If you select to warp images physically (would be my choise 
BTW) please try to do it right. You should find good GDAL commands from these 
slides 
https://www.slideshare.net/geosolutions/geoserver-on-steroids-foss4g-2015.

-Jukka Rahkonen-

Lähettäjä: Jesper Kempe mailto:jesper.ke...@gmail.com>>
Lähetetty: torstai 3. syyskuuta 2020 15.18
Vastaanottaja: Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
Kopio: Jeff McKenna 
mailto:jmcke...@gatewaygeomatics.com>>; 
Mapserver 
mailto:mapserver-users@lists.osgeo.org>>
Aihe: Re: [mapserver-users] Use Ground Control Points from GeoTIFF

Hi Jukka

Sorry about that, I forgot that yesterday.

I did a test now and that actually works!

Changing DATA to the vrt-file and setting

PROJECTION
  "init=epsg:3857"
END

creates an image with sat.tif placed correctly!

$ shp2img -m icesat.map -o /data/temp/Jesper/ttt.png -all_debug 5
msLoadMap(): 0.014s
msDrawMap(): rendering using outputformat named png (AGG/PNG).
msDrawRasterLayerLow(sat): entering.
msResampleGDALToMap in effect: cellsize = 4202.211585
msDrawGDAL(sat): using RAW_WINDOW=0 0 12531 12770, dst=0,0,279,284
msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,2,3,4
msDrawMap(): Layer 0 (sat), 557.242s
msDrawMap(): Drawing Label Cache, 0.000s
msDrawMap() total time: 557.243s
msSaveImage(/data/temp/Jesper/ttt.png) total time: 0.119s
msFreeMap(): freeing map at 0x7b1f50.
freeLayer(): freeing layer at 0x7ba080.
freeLayer(): freeing layer at 0x7bb760.
shp2img total time: 557.378s

BUT, note 557.378s on the last row...

Also a WMS-request works but takes about 4 minutes to complete!

It looks like I need to reproject all files new GeoTIFFs to get a decent speed.

Thanks for all the replies!

Jesper


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

Re: [mapserver-users] Use Ground Control Points from GeoTIFF

2020-09-03 Thread Rahkonen Jukka (MML)
Hi,

I would appreciate if you could have a try with
"gdalwarp -of vrt -t_srs "EPSG:3857" sat.tif sat_3857.vrt"

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Jesper Kempe
Lähetetty: torstai 3. syyskuuta 2020 13.57
Vastaanottaja: Jeff McKenna 
Kopio: Mapserver 
Aihe: Re: [mapserver-users] Use Ground Control Points from GeoTIFF

shp2img creates an empty blank image with a mapfile like this:

MAP
NAME "map"
WEB
METADATA
"wms_title""WMS mapserver"
"wms_srs"  "EPSG:4326 EPSG:3021 EPSG: EPSG:3006 
EPSG:900913"
"wms_extent"   "1225000 613 191 7675000"
"wms_enable_request"   "*"
"wfs_enable_request"   "*"
END
END

PROJECTION
"init=epsg:4326"
END

EXTENT 15 60 30 68
SIZE 200 200

LAYER
  NAME "sat"
  DATA "/data/temp/Jesper/sat.tif"
  TYPE RASTER
  STATUS DEFAULT

  METADATA
"wms_title" "sat"
  END
END


The output from shp2img looks like this:

$ shp2img -m ttt.map -o /data/temp/Jesper/ttt.png -all_debug 5
msLoadMap(): 0.003s
msDrawMap(): rendering using outputformat named png (AGG/PNG).
msDrawRasterLayerLow(sat): entering.
msDrawRasterLayerGDAL(): Entering transform.
msDrawRasterLayerGDAL(): src=15,10645,15,15, dst=0,0,200,200
msDrawRasterLayerGDAL(): source raster PL (14.962,10645.462) for dst PL (0,0).
msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,2,3,4
msDrawMap(): Layer 0 (sat), 0.011s
msDrawMap(): Drawing Label Cache, 0.000s
msDrawMap() total time: 0.011s
msSaveImage(/data/temp/Jesper/ttt.png) total time: 0.003s
msFreeMap(): freeing map at 0x1d14f50.
freeLayer(): freeing layer at 0x1d1d080.
freeLayer(): freeing layer at 0x1d1e1b0.
shp2img total time: 0.017s


If I add:
  PROJECTION
"init=epsg:4326"
  END
  EXTENT 17.0473154408269387 62.1606759790530177 27.5792082876237146 
66.7744046276809797

shp2img outputs:

msLoadMap(): 0.003s
msDrawMap(): rendering using outputformat named png (AGG/PNG).
msDrawRasterLayerLow(sat): entering.
msDrawRasterLayerGDAL(): Entering transform.
msDrawRasterLayerGDAL(): src=0,0,10474,10717, dst=27,63,140,61
msDrawRasterLayerGDAL(): source raster PL (-49.554,-33.774) for dst PL (27,63).
msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,2,3,4
msDrawMap(): Layer 0 (sat), 0.025s
msDrawMap(): Drawing Label Cache, 0.000s
msDrawMap() total time: 0.025s
msSaveImage(/data/temp/Jesper/ttt.png) total time: 0.004s
msFreeMap(): freeing map at 0x2453f50.
freeLayer(): freeing layer at 0x245c080.
freeLayer(): freeing layer at 0x245d430.
shp2img total time: 0.033s

Then the image is shown in ttt.png but is not in the correct place and not 
rotated correctly.

Any help or ideas are appreciated!

Thanks
Jesper

Den ons 2 sep. 2020 kl 18:23 skrev Jeff McKenna 
mailto:jmcke...@gatewaygeomatics.com>>:
I'm curious what happens when you try to generate a map image from the
commandline: shp2img -m test.map -o ttt.png -all_debug 5

-jeff



--
Jeff McKenna
MapServer Consulting and Training Services
co-founder of FOSS4G
http://gatewaygeo.com/



On 2020-09-02 4:51 a.m., Jesper Kempe wrote:
> Hi
>
> This is the mapfile:
>
> MAP
>  NAME "map"
>  WEB
>  METADATA
>  "wms_title""WMS mapserver"
>  "wms_srs"  "EPSG:4326 EPSG:3021 EPSG:
> EPSG:3006 EPSG:900913"
>  "wms_extent"   "1225000 613 191 7675000"
>  "wms_enable_request"   "*"
>  "wfs_enable_request"   "*"
>  END
>  END
>
>  PROJECTION
>  "init=epsg:4326"
>  END
>
>  EXTENT -180 -90 180 90
>
>  LAYER
>NAME "sat"
>DATA "sat.tif"
>TYPE RASTER
>STATUS ON
>
>METADATA
>  "wms_title" "sat"
>END
>
>PROJECTION
>  "init=epsg:4326"
>END
>EXTENT 17.0473154408269387 62.1606759790530177
> 27.5792082876237146 66.7744046276809797
>
>  END
>
> END
>
> I have also tried both without PROJECTION in LAYER and with
> PROJECTION
>   AUTO
> END
>
> None of them works.
>
> EXTENT in the mapfile is taken from Qgis metadata of the layer.
>
>
> Thanks
> Jesper
>
> Den tis 1 sep. 2020 kl 23:41 skrev Steve Lime 
> mailto:sdl...@gmail.com>
> >>:
>
> What does the mapfile look like?
>
> On Tue, Sep 1, 2020 at 10:26 AM Jesper Kempe 
> mailto:jesper.ke...@gmail.com>
> >> wrote:
>
> Hi
>
> I have a GeoTiff file that gdalinfo presents like this:
>
> gdalinfo sat.tif
> Driver: GTiff/GeoTIFF
> Files: sat.tif
> Size is 10474, 10717
> Coordinate System is `'
> GCP Projection =
> GEOGCS["WGS 84",
>  DATUM["WGS_1984",
>  SPHEROID["WGS 84",6378137,298.257223563,
> 

Re: [mapserver-users] Use Ground Control Points from GeoTIFF

2020-09-02 Thread Rahkonen Jukka (MML)
Try to warp into .VRT, that takes so little time and disk space that it could 
be a workaround if it works.

-Jukka-

Lähettäjä: Jesper Kempe 
Lähetetty: keskiviikko 2. syyskuuta 2020 11.40
Vastaanottaja: Rahkonen Jukka (MML) 
Kopio: Steve Lime ; Mapserver 

Aihe: Re: [mapserver-users] Use Ground Control Points from GeoTIFF

Yes, a gdalwarp on the file works fine but I would really like to avoid that.
A "gdalwarp -t_srs "EPSG:3857" sat.tif sat_3857.tif" and use the file  
sat_3857.tif works.

The file I want to show in Mapserver is available at 
https://drive.google.com/file/d/1t3fM0Ej1FGwrdqbvg5EhIFcpnNOfKdQS/view?usp=sharing
 if anyone wants to give it a try.

//Jesper

Den ons 2 sep. 2020 kl 10:26 skrev Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>:
Hi,

I am not suggesting this as a final solution yet, but gather some knowledge and 
try if image works when a) warped into GeoTIFF with gdalwarp b) warped into .vrt

-Jukka Rahkonen-

Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Jesper Kempe
Lähetetty: keskiviikko 2. syyskuuta 2020 10.52
Vastaanottaja: Steve Lime mailto:sdl...@gmail.com>>
Kopio: Mapserver 
mailto:mapserver-users@lists.osgeo.org>>
Aihe: Re: [mapserver-users] Use Ground Control Points from GeoTIFF

Hi

This is the mapfile:

MAP
NAME "map"
WEB
METADATA
"wms_title""WMS mapserver"
"wms_srs"  "EPSG:4326 EPSG:3021 EPSG: EPSG:3006 
EPSG:900913"
"wms_extent"   "1225000 613 191 7675000"
"wms_enable_request"   "*"
"wfs_enable_request"   "*"
END
END

PROJECTION
"init=epsg:4326"
END

EXTENT -180 -90 180 90

LAYER
  NAME "sat"
  DATA "sat.tif"
  TYPE RASTER
  STATUS ON

  METADATA
"wms_title" "sat"
  END

  PROJECTION
"init=epsg:4326"
  END
  EXTENT 17.0473154408269387 62.1606759790530177 27.5792082876237146 
66.7744046276809797

END

END

I have also tried both without PROJECTION in LAYER and with
PROJECTION
 AUTO
END

None of them works.

EXTENT in the mapfile is taken from Qgis metadata of the layer.


Thanks
Jesper

Den tis 1 sep. 2020 kl 23:41 skrev Steve Lime 
mailto:sdl...@gmail.com>>:
What does the mapfile look like?

On Tue, Sep 1, 2020 at 10:26 AM Jesper Kempe 
mailto:jesper.ke...@gmail.com>> wrote:
Hi

I have a GeoTiff file that gdalinfo presents like this:

gdalinfo sat.tif
Driver: GTiff/GeoTIFF
Files: sat.tif
Size is 10474, 10717
Coordinate System is `'
GCP Projection =
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
GCP[  0]: Id=1, Info=
  (0,0) -> (27.5783052509812,65.9184735836942,229.992792810313)
GCP[  1]: Id=2, Info=
  (524,0) -> (27.1416007200269,65.9731480840222,172.994255514815)
GCP[  2]: Id=3, Info=
  (1048,0) -> (26.7005564512604,66.0268770755367,152.994545626454)
GCP[  3]: Id=4, Info=
  (1572,0) -> (26.257537545879,66.0793551447287,131.994995356537)
GCP[  4]: Id=5, Info=
  (2096,0) -> (25.8102107755995,66.1308402121171,163.993212723173)


with 482 GCPs.


The file opens ok in Qgis and is located in the right location.
But I can´t in any way get it to show correctly in Mapserver.

Is this possible to do? Or do I have to gdalwarp the file to a known projection 
and set the PROJECTION of the layer?

Thanks
Jesper


___
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

Re: [mapserver-users] Use Ground Control Points from GeoTIFF

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

I am not suggesting this as a final solution yet, but gather some knowledge and 
try if image works when a) warped into GeoTIFF with gdalwarp b) warped into .vrt

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Jesper Kempe
Lähetetty: keskiviikko 2. syyskuuta 2020 10.52
Vastaanottaja: Steve Lime 
Kopio: Mapserver 
Aihe: Re: [mapserver-users] Use Ground Control Points from GeoTIFF

Hi

This is the mapfile:

MAP
NAME "map"
WEB
METADATA
"wms_title""WMS mapserver"
"wms_srs"  "EPSG:4326 EPSG:3021 EPSG: EPSG:3006 
EPSG:900913"
"wms_extent"   "1225000 613 191 7675000"
"wms_enable_request"   "*"
"wfs_enable_request"   "*"
END
END

PROJECTION
"init=epsg:4326"
END

EXTENT -180 -90 180 90

LAYER
  NAME "sat"
  DATA "sat.tif"
  TYPE RASTER
  STATUS ON

  METADATA
"wms_title" "sat"
  END

  PROJECTION
"init=epsg:4326"
  END
  EXTENT 17.0473154408269387 62.1606759790530177 27.5792082876237146 
66.7744046276809797

END

END

I have also tried both without PROJECTION in LAYER and with
PROJECTION
 AUTO
END

None of them works.

EXTENT in the mapfile is taken from Qgis metadata of the layer.


Thanks
Jesper

Den tis 1 sep. 2020 kl 23:41 skrev Steve Lime 
mailto:sdl...@gmail.com>>:
What does the mapfile look like?

On Tue, Sep 1, 2020 at 10:26 AM Jesper Kempe 
mailto:jesper.ke...@gmail.com>> wrote:
Hi

I have a GeoTiff file that gdalinfo presents like this:

gdalinfo sat.tif
Driver: GTiff/GeoTIFF
Files: sat.tif
Size is 10474, 10717
Coordinate System is `'
GCP Projection =
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
GCP[  0]: Id=1, Info=
  (0,0) -> (27.5783052509812,65.9184735836942,229.992792810313)
GCP[  1]: Id=2, Info=
  (524,0) -> (27.1416007200269,65.9731480840222,172.994255514815)
GCP[  2]: Id=3, Info=
  (1048,0) -> (26.7005564512604,66.0268770755367,152.994545626454)
GCP[  3]: Id=4, Info=
  (1572,0) -> (26.257537545879,66.0793551447287,131.994995356537)
GCP[  4]: Id=5, Info=
  (2096,0) -> (25.8102107755995,66.1308402121171,163.993212723173)


with 482 GCPs.


The file opens ok in Qgis and is located in the right location.
But I can´t in any way get it to show correctly in Mapserver.

Is this possible to do? Or do I have to gdalwarp the file to a known projection 
and set the PROJECTION of the layer?

Thanks
Jesper


___
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] SSL curl error when hitting HTTP WMS

2020-06-09 Thread Rahkonen Jukka (MML)
Hi,

The service indeed seems to redirect into https address.

GDAL has an "unsafeSSL" option but I believe that Mapserver does not 
http://osgeo-org.1560.x6.nabble.com/https-url-with-MapServer-as-WMS-client-td5332403.html.

Perhaps you could bypass the certificate check by setting a general curl 
insecure option as in 
https://www.cyberciti.biz/faq/how-to-curl-ignore-ssl-certificate-warnings-command-option/.
 However, it feels rather risky to do it at that level.

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: mapserver-users  Puolesta 
Jeff McKenna
Lähetetty: tiistai 9. kesäkuuta 2020 13.10
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] SSL curl error when hitting HTTP WMS

The WMS service that you mention redirects all requests to HTTPS: 
https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?

-jeff



--
Jeff McKenna
MapServer Consulting and Training Services co-founder of FOSS4G 
http://gatewaygeo.com/



On 2020-06-09 2:46 a.m., John Huotari wrote:
> I’m attempting to hit a WMS using HTTP, not HTTPS, but I run into the 
> following SSL error
> 
> HTTP: request failed with curl error code 60 (SSL certificate problem: 
> unable to get local issuer certificate)
> 
> I can get around this error by downloading a CA bundle file and setting 
> the CURL_CA_BUNDLE environment variable to point to it, but why is a CA 
> bundle file necessary when not even using SSL (hitting a WMS using HTTP, 
> not HTTPS)?  Does anyone know a workaround that wouldn’t require 
> deploying a CA bundle file to my servers and setting an environment 
> variable to point to it?
> 
> I’m currently using the stable release of MSVC 2017 x64 package 
> downloaded from GISInternals - http://www.gisinternals.com/release.php
> 
> A sample mapfile looks like this
> 
> MAP
> 
>    NAME USA1
> 
>    STATUS ON
> 
>    IMAGETYPE PNG8
> 
>    RESOLUTION 72
> 
>    IMAGECOLOR 255 255 255
> 
>    UNITS METERS
> 
>    PROJECTION "proj=lcc" "lat_1=20" "lat_2=60" "lat_0=40" 
> "lon_0=-112.52116185" "x_0=0" "y_0=0" "ellps=GRS80" "units=m" 
> "datum=NAD83" END
> 
>    SIZE 1500 1500
> 
>    EXTENT -45292.7219576058 780481.616003812 45290.5126012127 
> 871065.05991903
> 
>    LAYER
> 
>     NAME "WMS_DRG"
> 
>      TYPE RASTER
> 
>      STATUS ON
> 
>      PROJECTION "proj=longlat" "ellps=GRS80" "datum=NAD83" "no_defs" END
> 
>      CONNECTION 
> "http://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WmsServer?;
> 
>      CONNECTIONTYPE WMS
> 
>      METADATA
> 
>    "wms_srs"  "EPSG:4326"
> 
>    "wms_name"  "0"
> 
>    "wms_server_version"  "1.1.1"
> 
>    "wms_format"  "image/png"
> 
>      END
> 
>    END
> 
> END
> 



___
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] KKJ images misaligned after update

2020-05-18 Thread Rahkonen Jukka (MML)
Hi,

I got a report about a service that has been running fine for years but got 
broken now after following updates:

sqlite 3.29 -> 3.31
proj 6.2.0 -> 6.3.0
geos 3.7.2 -> 3.8.0
gdal 2.4.2 -> 3.0.4
mapserver 7.4.2 -> 7.4.3

What breaks is an orthophoto layer that has source files in many CRSs. The 
source CRS may be EPSG:2391, 2392, 2393, 2395, and 3067, and the output is 
EPSG:3067. What happens is that the images in 239x series using the Finnish KKJ 
datum are not reprojected correctly. It seems that the affine transformation 
parameters (TOWGS84[-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496]) of the 
Finnish KKJ system http://epsg.io/2393 are not used.

I made a small test-zip into http://latuviitta.org/downloads/kkjtest.zip. It 
works fine for me with MS4W (Mapserver 7.6.0dev, GDAL 2.4.4, Proj 5.2.0) but 
with the updated system the middle tile takes quite an offset  
(kkj_wrong.jpeg). The middle image is in EPSG:2393, the outmost two are in 
EPSG:3067, and the WMS GetMap was made with =EPSG:3067. The error is 
specific for the KKJ->ETRS-TM35FIN (EPSG:3067) transformation because if user 
reads the layer from WMS in EPSG:3857 then the middle tile stays where it 
should.

Unfortunately I do not have myself Mapserver with GDAL 3 and Proj 6 available 
for re-producing the error. If somebody wants to have a try it should be 
relatively easy. Edit the kkjtest.map mapfile and the "location" field of the 
kkjtest.shp to match with your file paths.

-Jukka Rahkonen- 






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

Re: [mapserver-users] WCS GetCoverage request one by one pixel

2020-05-11 Thread Rahkonen Jukka (MML)
Hi,

I verified the error and I am pretty sure that subsetting with min=max has been 
working for me couple of years ago with some Mapserver version.

This sends a GeoTIFF:
http://localhost:8060/cgi-bin/mapserv.exe?map=c:\ms4w_data\raster_test.map=WCS=2.0.1=GetCoverage=natural_earth=long(27,28)=lat(62,63)

This sends an error:
http://localhost:8060/cgi-bin/mapserv.exe?map=c:\ms4w_data\raster_test.map=WCS=2.0.1=GetCoverage=natural_earth=long(27,27)=lat(62,62)
msImageCreate(): Image handling error. Attempt to allocate raw image failed, 
out of memory.

I believe that 1x1 pixel image is expected because WCS 2.0.1 standard defines 
that the request is OK.

"Then, for the trim bounds trimLow and trimHigh the following
shall hold: L <= trimLow <= trimHigh <= H"

Here is my MS4W mapfile for the Natural Earth raster 
https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/raster/NE1_50M_SR_W.zip

MAP
  NAME ""
  STATUS ON
MAXSIZE 5000
CONFIG "MS_ERRORFILE" "c:\ms4w_data\test_error.txt"
#DEBUG 3
EXTENT -180 -90 180 90
  SIZE 600 600
  #SHAPEPATH "c:\ms4w\tmp\ms_tmp"
  IMAGECOLOR 255 255 255
  UNITS METERS
  WEB
#IMAGEPATH "c:\ms4w\tmp\ms_tmp"
#IMAGEURL "c:\ms4w\tmp\ms_tmp"
  METADATA
  "ows_enable_request" "*"
  "wms_srs""EPSG:4326"
  "ows_onlineresource"
"http://localhost:8060/cgi-bin/mapserv.exe?map=c:\ms4w_data\test.map;
  "wms_title""wms-test"
  "wcs_label"   "wcs-test" ### required
  "wcs_description" "wcs-test"
  "wcs_enable_request"   "*"
 END
  END
PROJECTION
"init=epsg:4326"
  END
  OUTPUTFORMAT
  NAME 'AGG_Q'
  MIMETYPE "image/png"  DRIVER "AGG/PNG"
  EXTENSION "png"
  IMAGEMODE RGB
  FORMATOPTION "QUANTIZE_FORCE=ON"
  FORMATOPTION "QUANTIZE_DITHER=OFF"
  FORMATOPTION "QUANTIZE_COLORS=256"
  END
OUTPUTFORMAT
  NAME GEOTIFF
  DRIVER "GDAL/GTiff"
  MIMETYPE "image/tiff"
  IMAGEMODE BYTE
  EXTENSION "tif"
END

LAYER
NAME "natural_earth"
TYPE RASTER
STATUS ON
DATA "c:\ms4w_data\ne_raster\NE1_50M_SR_W.tif"
PROJECTION
"init=epsg:4326"
END
METADATA
  "wms_title" "ne_raster"
  "wcs_title" "ne_raster"
END

END #layer
END #map


Lähettäjä: mapserver-users  Puolesta 
Even Rouault
Lähetetty: lauantai 9. toukokuuta 2020 21.41
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] WCS GetCoverage request one by one pixel


Anton,



> I quickly skimmed the issue tracker on Github but could not find any issue

> causing this problem. Any thoughts on the cause of the problem are highly

> appreciated.



I believe this is a bug in MapServer due to a difference between pixel-center 
vs pixel-corner convention between WCS conventions and MapServer conventions, 
which must lead to an empty bounding box when the request is 1x1, and thus 
causing invalid resolution to be computed at some point (division by zero). 
This could presumably be fixed



Even



--

Spatialys - Geospatial professional services

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

Re: [mapserver-users] Data Stores for mapserver.

2020-05-07 Thread Rahkonen Jukka (MML)
Hi,

Do you find anything suitable for you from this list 
https://gdal.org/drivers/vector/index.html?
They are all available for you through OGR connection but it can well be that 
some formats do not work totally out-of-the-box.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Atlanta Geek
Lähetetty: torstai 7. toukokuuta 2020 21.32
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Data Stores for mapserver.

How difficult is it to add a new datastore to mapserver.  We currently use 
postgres but with a bigger need for deeper data analysis we are looking at 
other datastores for our report engine. Mapserver is one component of this 
engine.  Does anyone have any experience using any other datastore with 
mapserver that is analytics specific?

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

Re: [mapserver-users] GetFeature WFS request with Spatial Filter DWITHIN

2020-04-27 Thread Rahkonen Jukka (MML)
Hi,

The vendor specific filters are listed in the WFS  GetCapabilities. Try 
https://demo.geo-solutions.it/geoserver/wfs?service=WFS=2.0.0=GetCapabilities
 and you will find a lot of filters, including “Nearest”. I do not know the 
exact syntax to use in WFS filter but perhaps Andrea is lurking this list and 
can show some light for us.

The function list is per WFS service and that may be problematic with filters 
like pgnearest and SDO_NN which can work only with PostGIS and Oracle layers, 
respectively.

-Jukka Rahkonen-

Lähettäjä: Steve Lime 
Lähetetty: maanantai 27. huhtikuuta 2020 21.42
Vastaanottaja: Rahkonen Jukka (MML) 
Kopio: Fran Acuña Parra ; mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] GetFeature WFS request with Spatial Filter DWITHIN

To be clear, Fran - are you saying the issue isn't the result set rather the 
order? If so I don't know of a way to affect that order.

In terms of a nearest feature or features. This would be something that I would 
be keen on addressing. I've run into a variant of this issue using the CGI and 
mode=query when searching multiple layers. The query finds the first matching 
feature but not necessarily the closest. It's an issue primarily with line and 
point layers when you need to set TOLERANCE values to make things clickable. 
Jukka, what does the vendor specific extension in GeoServer look like from WFS 
filter standpoint?

--Steve

On Mon, Apr 27, 2020 at 10:21 AM Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

The DWithin function in WFS is a true/false function just like the equivalent 
PostGIS function https://postgis.net/docs/ST_DWithin.html. You can’t find the 
nearest feature with DWithin. A not so good workaround is to increase the 
distance until the result is not empty.

Mapserver does not have a vendor specific function for nearest either like 
Geotools/Geoserver. Especially the pgnearest function that works with PostGIS 
backend and returns n nearest features would be practical for your use case  
https://docs.geotools.org/stable/userguide/library/main/function_list.html.  
Geotools should also have a similar function for Oracle that is using the 
native SDO_NN function.

Unfortunately I can’t say how to proceed for making nearest or nearestN queries 
with Mapserver.

-Jukka Rahkonen-

Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Fran Acuña Parra
Lähetetty: maanantai 27. huhtikuuta 2020 16.59
Vastaanottaja: 
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: [mapserver-users] GetFeature WFS request with Spatial Filter DWITHIN

Hi,

Following the topic about another question that I sent, I'm using a Getfeature 
WFS request with a DWITHIN spatial filter to returns the closes feature of a 
layer given some specific coordinates. The request works fine, but when there 
are several features that match the filter it doesn't returns the closest one 
in the first position of the response(GML for example). Is there a way to 
achieve this?

Thanks in advance.

Regards,

Fran Acuña
___
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

Re: [mapserver-users] Make PROJECTION mandatory?

2020-04-27 Thread Rahkonen Jukka (MML)
tewaygeomatics.com>> wrote:
Hi Jukka,

I personally consider defining PROJECTION blocks at the MAP level and all 
LAYERs mandatory, in my day-to-day work, for each and every mapfile.
  If you do not specify all of these, MapServer makes assumptions and you are 
just asking for trouble downstream through WMS clients etc.
(your users)

I also do not rely on any PROJECTION AUTO magic either, for my paying clients.

These are all nice tricks but in critical production environments I stay away 
from them; instead, find the source projection, and define the MAP projection 
block and all LAYER projection blocks.

I'm not sure this answers your questions, but this was my 'gut reaction'
to your message.  I believe we have the same thinking here.

-jeff



--
Jeff McKenna
MapServer Consulting and Training Services
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgatewaygeo.com%2f=E,1,uRKu6N_CiiNLLVVq0e47_QXUkZM4g9vqte-aBcbYyDH1b7WnS1Ln_b1a9kqHV0iwGwOUs3KazTLN-kMthOESPP3PB65XPBsYDNo99uct63RwastB0y4d0JpRk50,=1



On 2020-04-27 10:36 a.m., Rahkonen Jukka (MML) wrote:
> Hi,
>
> Recent Mapserver buids require PROJ and GDAL 
> https://mapserver.gis.umn.edu/ja/development/rfc/ms-rfc-127.html. That 
> means that every Mapserver can support PROJECTION blocks both at the 
> MAP level and within LAYER. And because there are no more builds 
> without Proj support there is no real need for writing mapfiles 
> without PROJECTION blocks. Therefore I suggest that such mapfiles 
> should be considered invalid in the future. If it is for some reason 
> too strict requirement, what if we at least edit the documentation 
> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmapserver.org%2fma
> pfile%2fprojection.html=E,1,0fhb3f14X4JnWaND9-ffdGhd-Dt86B_opKe9hGsU
> rG9BAz5MAFfY4va3fbKeVLpkpU7_UF3pNaH-rfzX6lyAkuRFz_4jFWPHVTfeNvPEY5eLCH
> yJIN7bQ1TIPip6=1 so that it really encourages users to write the 
> PROJECTION blocks. GetCapabilities could also show something like
> 
>
> Having layers without PROJECTION saves users from writing this much text:
>
> “PROJECTION "init=epsg:3857" END
>
> but when the user meets any problem with accessing data or rendering 
> the first thing to check is the projection. In the mailing list it 
> means one more question-answer round before getting closer to the real 
> problem – if the problem was not in the projection, as it very often is.
>
> If source data are in local coordinate system it would be better to 
> define also that explicitly with a special keyword like PROJECTION “LOCAL”.
>
> Would other user consider making projection compulsory rather as an 
> improvement or inconvenience?
>
> -Jukka Rahkonen-
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org
> >
> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.osgeo.org%2f
> mailman%2flistinfo%2fmapserver-users=E,1,SKUjKqRwIeFRAc02DA-HvDd0MhI
> 4jyQ2ufljOuLY7qnb4BO2tsp-93Uz94xMPlp-ph-zvFw8arVLo9voGZJkvRYpdJ8KrHH_S
> XGtMLLaQxJhypE,=1
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2flists.osgeo.org%2fmailman%2flistinfo%2fmapserver-users=E,1,5jEh9uf3O2tJwySsW_GwIzo6GO1cZ-SUBE9lG-SsOJU3VBXvXos48WKdE1xpf-k0EVRxx3fCgdRbOjR1Qre_pElTqHiO5-amlVemT67DQHYP2NL1Qti8pY8,=1
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.osgeo.org%2fpipermail%2fmapserver-users%2fattachments%2f20200427%2f32e4771d%2fattachment-0001.html=E,1,-gv1SBk8r6ITlWWwYNlthF9RHuDWYIFTEq0uuOWuGRg8FbMp0s1amctpimmBX0Opeh670ooWsH64sndhLEJhpwXcWS09YoVtkW1W_CzHtGEM_w,,=1>

___
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] GetFeature WFS request with Spatial Filter DWITHIN

2020-04-27 Thread Rahkonen Jukka (MML)
Hi,

The DWithin function in WFS is a true/false function just like the equivalent 
PostGIS function https://postgis.net/docs/ST_DWithin.html. You can’t find the 
nearest feature with DWithin. A not so good workaround is to increase the 
distance until the result is not empty.

Mapserver does not have a vendor specific function for nearest either like 
Geotools/Geoserver. Especially the pgnearest function that works with PostGIS 
backend and returns n nearest features would be practical for your use case  
https://docs.geotools.org/stable/userguide/library/main/function_list.html.  
Geotools should also have a similar function for Oracle that is using the 
native SDO_NN function.

Unfortunately I can’t say how to proceed for making nearest or nearestN queries 
with Mapserver.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Fran Acuña Parra
Lähetetty: maanantai 27. huhtikuuta 2020 16.59
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] GetFeature WFS request with Spatial Filter DWITHIN

Hi,

Following the topic about another question that I sent, I'm using a Getfeature 
WFS request with a DWITHIN spatial filter to returns the closes feature of a 
layer given some specific coordinates. The request works fine, but when there 
are several features that match the filter it doesn't returns the closest one 
in the first position of the response(GML for example). Is there a way to 
achieve this?

Thanks in advance.

Regards,

Fran Acuña
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Make PROJECTION mandatory?

2020-04-27 Thread Rahkonen Jukka (MML)
Hi,

Recent Mapserver buids require PROJ and GDAL 
https://mapserver.gis.umn.edu/ja/development/rfc/ms-rfc-127.html. That means 
that every Mapserver can support PROJECTION blocks both at the MAP level and 
within LAYER. And because there are no more builds without Proj support there 
is no real need for writing mapfiles without PROJECTION blocks. Therefore I 
suggest that such mapfiles should be considered invalid in the future. If it is 
for some reason too strict requirement, what if we at least edit the 
documentation https://mapserver.org/mapfile/projection.html so that it really 
encourages users to write the PROJECTION blocks. GetCapabilities could also 
show something like


Having layers without PROJECTION saves users from writing this much text:
"PROJECTION "init=epsg:3857" END
but when the user meets any problem with accessing data or rendering the first 
thing to check is the projection. In the mailing list it means one more 
question-answer round before getting closer to the real problem - if the 
problem was not in the projection, as it very often is.

If source data are in local coordinate system it would be better to define also 
that explicitly with a special keyword like PROJECTION "LOCAL".

Would other user consider making projection compulsory rather as an improvement 
or inconvenience?

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

Re: [mapserver-users] mapserver creating layers group MS , that is displayed in GetCapabilities. how to get rid of it? what is the reason for it?

2020-04-16 Thread Rahkonen Jukka (MML)
Hi,

Can you point some common WMS server that does not have a root layer? For 
example all Geoservers have root layer like this 
https://demo.geo-solutions.it/geoserver/ows?service=wms=1.3.0=GetCapabilities


GeoServer Web Map Service

This is an ArcGIS server and it seems to have root layer with title but without 
a name as well https://hakku.gtk.fi/locations/wmsserver/.

OpenLayers can certainly parse GetCapabilities from common WMS servers. The 
nested layers are there, I guess, for making it possible to categorize layers 
and thus help with building a user friendly presentation of the layers. But if 
you parse only the layers with name and skip layers with just title the result 
might please you.

However, it should be possible to make Mapserver to have a root layer with just 
title, that is mandatory, but without name. Do you mean that your root layer 
has always name even if your MAP has an empty name (NAME "") or if you have set 
an empty name for it in MAP-METADATA (wms_rootlayer_name "")?

-Jukka Rahkonen-

Lähettäjä: Zmitser Kozhukh 
Lähetetty: torstai 16. huhtikuuta 2020 19.41
Vastaanottaja: Rahkonen Jukka (MML) 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re[2]: [mapserver-users] mapserver creating layers group MS , that is 
displayed in GetCapabilities. how to get rid of it? what is the reason for it?

Thank you Jukka! For me it is surprise to find out that there is a such thing 
as a root layer. Do you know if it is possible to disable it? Or is it just 
natural way how mapserver parses mapfile into getcapabilities xml? I would 
rather prefer to have list of separate layers in getcapabilities.
I have tried to set the name of the root layer to empty string, also the name 
of the map I was setting to empty string, also tried to put metadata 
ows_enable_request to ‘!*’ but the root layer still appears in GetCapabilities. 
In case when I omit wms_title and wms_abstract on the Map object level, it is 
still substituted to ‘MS’ automatically by mapserver.
For me personally, this requirement to have root layer partially makes sense, 
but the customer , who uses OL to read getcapabilities of wms services, that I 
am preparing, is bothered by having root layer there — it is meaningless and 
not needed for him.
So I guess I will just preprepare custom getcapabilities xmls and configure 
server to serve them instead of using mapserver for this.
Sincerely, Dimitri

Четверг, 16 апреля 2020, 18:43 +03:00 от Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>:


WMS service does not actually need to have a root layer but usually it exists. 
Each layer must have a title but name in optional. If layer does not hava a 
name it cannot be accessed with GetMap so what you need to do is to get rid of 
the name of your root layer. How to do that is documented in 
https://www.mapserver.org/ogc/wms_server.html:



Map Name and wms_title:

WMS Capabilities requires a Name and a Title tag for every layer. The Map’s 
NAME and wms_title metadata will be used to set the root layer’s name and title 
in the GetCapabilities XML output. The root layer in the WMS context 
corresponds to the whole mapfile. You can suppress the root layer’s name by 
setting wms_rootlayer_name to "".



There has been some changes in configuring the name of the root layer. Earlier 
it just took the NAME from the MAP level if it was not left empty. Do you 
perhaps have “MS” as a name of your mapfile now?



Discussion about the topic in https://github.com/mapserver/mapserver/issues/5404



And this is from the WMS 1.3.0 standard:



7.2.4.6.2 Title

A  is mandatory for all layers; it is a human-readable string for 
presentation in a menu. The Title is not

inherited by child Layers.

7.2.4.6.3 Name

If, and only if, a layer has a , then it is a map layer that can be 
requested by using that Name in the

LAYERS parameter of a GetMap request. A Layer that contains a  element is 
referred to as a “named

layer” in this International Standard. If the layer has a Title but no Name, 
then that layer is only a category title for

all the layers nested within. A server that advertises a Layer containing a 
Name element shall be able to accept

that Name as the value of LAYERS argument in a GetMap request and return the 
corresponding map. A client

shall not attempt to request a layer that has a Title but no Name.

A server shall throw a service exception (code="LayerNotDefined") if an invalid 
layer is requested.

A containing category itself may include a Name by which a map portraying all 
of the nested layers can be

requested at once. For example, a parent layer "Roads" may have children 
“Interstates” and “State Highways”

and allow the user to request either child individually or both together.

The Name is not inherited by child Layers.





-Jukka Rahkonen-





Lähettäjä: mapserver-users 
>
 Puolesta Zmitser Kozhukh
Lähetetty: torstai 16. huhtikuuta 2020 17.32
Vasta

Re: [mapserver-users] mapserver creating layers group MS , that is displayed in GetCapabilities. how to get rid of it? what is the reason for it?

2020-04-16 Thread Rahkonen Jukka (MML)
WMS service does not actually need to have a root layer but usually it exists. 
Each layer must have a title but name in optional. If layer does not hava a 
name it cannot be accessed with GetMap so what you need to do is to get rid of 
the name of your root layer. How to do that is documented in 
https://www.mapserver.org/ogc/wms_server.html:

Map Name and wms_title:
WMS Capabilities requires a Name and a Title tag for every layer. The Map’s 
NAME and wms_title metadata will be used to set the root layer’s name and title 
in the GetCapabilities XML output. The root layer in the WMS context 
corresponds to the whole mapfile. You can suppress the root layer’s name by 
setting wms_rootlayer_name to "".

There has been some changes in configuring the name of the root layer. Earlier 
it just took the NAME from the MAP level if it was not left empty. Do you 
perhaps have “MS” as a name of your mapfile now?

Discussion about the topic in https://github.com/mapserver/mapserver/issues/5404

And this is from the WMS 1.3.0 standard:

7.2.4.6.2 Title
A  is mandatory for all layers; it is a human-readable string for 
presentation in a menu. The Title is not
inherited by child Layers.
7.2.4.6.3 Name
If, and only if, a layer has a , then it is a map layer that can be 
requested by using that Name in the
LAYERS parameter of a GetMap request. A Layer that contains a  element is 
referred to as a “named
layer” in this International Standard. If the layer has a Title but no Name, 
then that layer is only a category title for
all the layers nested within. A server that advertises a Layer containing a 
Name element shall be able to accept
that Name as the value of LAYERS argument in a GetMap request and return the 
corresponding map. A client
shall not attempt to request a layer that has a Title but no Name.
A server shall throw a service exception (code="LayerNotDefined") if an invalid 
layer is requested.
A containing category itself may include a Name by which a map portraying all 
of the nested layers can be
requested at once. For example, a parent layer "Roads" may have children 
“Interstates” and “State Highways”
and allow the user to request either child individually or both together.
The Name is not inherited by child Layers.


-Jukka Rahkonen-


Lähettäjä: mapserver-users  Puolesta 
Zmitser Kozhukh
Lähetetty: torstai 16. huhtikuuta 2020 17.32
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] mapserver creating layers group MS , that is displayed 
in GetCapabilities. how to get rid of it? what is the reason for it?

Good day,
I haven’t been using mapserver for a while, but I guess, that since last time I 
have used it, something has changed.
Now when I am querying GetCapabilities of WMS service, created by Mapserver 
(version 7.2.0 running on a linux server), it puts everying in ‘MS’ layer 
group. But I don’t have any MS group defined in mapfile. Could anyone explain 
how to get rid of this MS group in GetCapabilities xml? This is how it looks in 
xml:

MS
MS
MS
EPSG:4326
….
after normal layers follow:

…..

…..

So for me it looks that for no reason the group MS is created which is sort of 
container for all normal layers.
But how to get rid of this MS group?
Sincerely,


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

Re: [mapserver-users] WCS GetCoverage request one by one pixel

2020-04-07 Thread Rahkonen Jukka (MML)
Hi Anton,

What I meant was to have a try by commenting out this line from your mapfile
PROCESSING "RESAMPLE=BILINEAR"

Actually it would be interesting to know what really happens if the 
interpolation/resampling method is configured in the mapfile and GetCoverage 
comes also with Interpolation parameter.

-Jukka-

Lähettäjä: Bakker, Anton 
Lähetetty: tiistai 7. huhtikuuta 2020 18.40
Vastaanottaja: Rahkonen Jukka (MML) ; 
mapserver-users@lists.osgeo.org
Aihe: RE: WCS GetCoverage request one by one pixel

Hi Jukka,

Thanks for your response; do you mean to set the default resampling method in 
the mapfile? Setting the resampling method in the WCS request does not work 
(for both GET and POST requests):

POST:

http://www.opengis.net/wcs/2.0
http://schemas.opengis.net/wcs/2.0/wcsAll.xsd;
  xmlns="http://www.opengis.net/wcs/2.0;
  xmlns:wcs="http://www.opengis.net/wcs/2.0;
  xmlns:wcscrs="http://www.opengis.net/wcs/crs/1.0;
  xmlns:scal="http://www.opengis.net/wcs/scaling/1.0;
  xmlns:int="http://www.opengis.net/wcs/interpolation/1.0;
  service="WCS"
  version="2.0.1">
ahn3_05m_dsm

x
196396.75
196396.75


y
450031.75
450031.75

image/tiff


NEAREST




GET:

https://geodata.nationaalgeoregister.nl/ahn3/wcs?service=WCS=GetCoverage=2.0.1=ahn3_05m_dsm=image/tiff=x(196396.75,196396.75)=y(450031.75,450031.75)=NEAREST

Both POST and GET request fail with the same error: "msImageCreate(): Image 
handling error. Attempt to allocate raw image failed, out of memory."

Cheers,
Anton


From: Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
Sent: Monday, April 6, 2020 5:26 PM
To: Bakker, Anton mailto:anton.bak...@kadaster.nl>>; 
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org> 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: WCS GetCoverage request one by one pixel


Hi,



Could you have a try with the default resampling "nearest"? And then also with 
subset having lower limit equal to upper. Now it fails, I tried already.



https://geodata.nationaalgeoregister.nl/ahn3/wcs?service=WCS=GetCoverage=2.0.1=ahn3_05m_dsm=image/tiff=x(196396.75,196396.75)=y(450031.75,450031.75)



GetCoverage trim with equal low and high has at least worked in the past, see 
http://osgeo-org.1560.x6.nabble.com/Why-WCS-2-0-1-slice-is-not-supported-td5343277.html



It should be OK by the WCS standard because all intersected pixels should be 
included and in this case the intersection is a single pixel. But see also 
https://osgeo-org.atlassian.net/browse/GEOS-9553 and learn that Geoserver 
supports slicing but not trimming to one pixel.



-Jukka Rahkonen-


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

Re: [mapserver-users] WCS GetCoverage request one by one pixel

2020-04-06 Thread Rahkonen Jukka (MML)
Hi,

Could you have a try with the default resampling "nearest"? And then also with 
subset having lower limit equal to upper. Now it fails, I tried already.

https://geodata.nationaalgeoregister.nl/ahn3/wcs?service=WCS=GetCoverage=2.0.1=ahn3_05m_dsm=image/tiff=x(196396.75,196396.75)=y(450031.75,450031.75)

GetCoverage trim with equal low and high has at least worked in the past, see 
http://osgeo-org.1560.x6.nabble.com/Why-WCS-2-0-1-slice-is-not-supported-td5343277.html

It should be OK by the WCS standard because all intersected pixels should be 
included and in this case the intersection is a single pixel. But see also 
https://osgeo-org.atlassian.net/browse/GEOS-9553 and learn that Geoserver 
supports slicing but not trimming to one pixel.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Bakker, Anton
Lähetetty: maanantai 6. huhtikuuta 2020 16.00
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] WCS GetCoverage request one by one pixel

Hi all,

I am running into a problem when sending HTTP requests to a MapServer backed 
WCS service.  I am trying to request a GeoTIFF of exactly 1 by 1 pixel, however 
this request fails by responding with a huge pixel (here is the 
describeCoverage request of the coverage requested):

https://geodata.nationaalgeoregister.nl/ahn3/wcs?service=WCS=GetCoverage=2.0.1=ahn3_05m_dsm=image/tiff=x(196396.75,196397.25)=y(450031.75,450032.25)

When I modify the request to cover an area of 2X2 pixels, the response turns 
out fine:

https://geodata.nationaalgeoregister.nl/ahn3/wcs?service=WCS=GetCoverage=2.0.1=ahn3_05m_dsm=image/tiff=x(196396.75,196397.75)=y(450031.75,450032.75)

See the screenshots hosted on imgur; (https://imgur.com/a/8IBGs3G (first 
screenshot is the erronous response of the request with the 1X1 extent, second 
screenshot is the result of the 2X2 request).

The MapServer version we are running is 7.4.3. Here is an excerpt of the 
mapfile that is used to configure the WCS service:

LAYER
NAME ahn3_05m_dsm
METADATA
  "wcs_srs"  "EPSG:28992"
  "wcs_label"   "ahn3_05m_dsm"
  "wcs_rangeset_name"   "ahn3_05m_dsm"
  "wcs_rangeset_label"  "ahn3_05m_dsm"
  "wcs_extent"  "1 25 356250 618750"
  "wcs_resolution"  "0.5 0.5"
  "wcs_formats" "GEOTIFF_FLOAT32 GEOTIFF_BYTE GEOTIFF_INT16 
GEOTIFF_RGB"
  "wcs_imagemode"   "FLOAT32"
  "wcs_bandcount"   "1"
END
TYPE RASTER
DUMP TRUE
STATUS ON
DATA /srv/data/ahn3_05m_dsm/ahn3_05m_dsm.vrt
PROCESSING "RESAMPLE=BILINEAR"
PROJECTION
  "init=epsg:28992"
END
END

I quickly skimmed the issue tracker on Github but could not find any issue 
causing this problem. Any thoughts on the cause of the problem are highly 
appreciated.

Kind regards,

Anton Bakker, Software Engineer
Kadaster / Geo- en Vastgoedinformatie en Advies / PDOK
tel. 06 - 29 737 351
anton.bak...@kadaster.nl
www.kadaster.nl



Disclaimer:
De inhoud van dit bericht is uitsluitend bestemd voor geadresseerde.
Gebruik van de inhoud van dit bericht door anderen zonder toestemming van het 
Kadaster
is onrechtmatig. Mocht dit bericht ten onrechte bij u terecht komen, dan 
verzoeken wij u
dit direct te melden aan de verzender en het bericht te vernietigen.
Aan de inhoud van dit bericht kunnen geen rechten worden ontleend.

Disclaimer:
The content of this message is meant to be received by the addressee only.
Use of the content of this message by anyone other than the addressee without 
the consent
of the Kadaster is unlawful. If you have received this message, but are not the 
addressee,
please contact the sender immediately and destroy the message.
No rights can be derived from the content of this message.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] layer with "truncated" symbols 2

2020-03-27 Thread Rahkonen Jukka (MML)
Hi,

Your problem is on the client side. OpenLayers is now requesting tiles with 
256x256 pixels. The middle tile has not any point inside its bounding box and 
therefore no symbols are rendered. Configure OpenLayers to do single tile 
requests.

http://dev.openlayers.org/examples/single-tile.html

Posts from gis.stackexchange dealing with this common issue with tiling clients:
https://gis.stackexchange.com/questions/198450/need-clarification-on-geoserver-meta-tile
https://gis.stackexchange.com/questions/87116/geoserver-cutting-off-symbols-close-to-tile-edges/87123#87123
https://gis.stackexchange.com/questions/83033/single-tiled-mapserver-wms-to-avoid-labels-and-features-cut-along-tile-borders-a

Duplicated labels is another version of the same issue
https://www.geowebcache.org/docs/current/concepts/metatiles.html

Using some tile cache program like MapProxy, MapCache of GeoWebCache between 
OpenLayers and WMS is another way to resolve the problem.

-Jukka Rahkonen-


-Alkuperäinen viesti-
Lähettäjä: mapserver-users  Puolesta 
Leehan
Lähetetty: perjantai 27. maaliskuuta 2020 11.27
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] layer with "truncated" symbols 2

following your advice, I added quedalle classe :

...
LAYER
NAME "nombre de cas"
TYPE POINT
PROJECTION
"init=epsg:2154"
END
EXTENT 276838.0988 4584246.823 909596.998 8872270.142
CONNECTIONTYPE POSTGIS
CONNECTION blabla
LABELITEM "nb_cas"
CLASS
 EXPRESSION "quedalle"
 STYLE
SYMBOL "circle"
SIZE 150
COLOR 0 0 0
 END
END
CLASS
STYLE 
SYMBOL "cas"
SIZE [ln_nb_cas]
COLOR [couleur]
OPACITY 70  
END #fin style
LABEL
COLOR 0 0 0
OUTLINECOLOR 255 255 255
FONT "verdana-gras"
TYPE truetype
SIZE 8
END
END #fin class

And indeed I am using an attribute for red circle size.
But the result is still the same.
(I can't believe I am the first to experience this issue!) If it can help, here 
is a snap with the dummy class :
 



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
___
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] OUTPUTFORMAT png 16-bits

2020-02-05 Thread Rahkonen Jukka (MML)
Hi,

But it is GDAL that is supposed to write the png because of
DRIVER GDAL/PNG

GDAL does support UInt16 fot png but it does not support int16. Perhaps this 
has something to do with the problem.

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: Eichner, Andreas - SID  
Lähetetty: keskiviikko 5. helmikuuta 2020 13.05
Vastaanottaja: Johannes Paul ; Rahkonen Jukka (MML) 

Kopio: mapserver-users@lists.osgeo.org
Aihe: AW: [mapserver-users] OUTPUTFORMAT png 16-bits

Hello Johannes,

16bit-PNGs are IMHO not supported by MapServer. Although libPNG supports 16bit 
depth (see http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-4.3) 
MapServer only supports 1, 2, 4 and 8bit palettes (see 
https://github.com/mapserver/mapserver/blob/master/mapimageio.c#L355).

HTH

-Ursprüngliche Nachricht-
Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Johannes Paul
Gesendet: Mittwoch, 5. Februar 2020 11:33
An: Rahkonen Jukka (MML)
Cc: mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] OUTPUTFORMAT png 16-bits

Hello Jukka,
Thanks for your reply, i've changed mimetype but i still get the 8-bits png...
Johannes 

Le mer. 5 févr. 2020 à 11:09, Rahkonen Jukka (MML) 
 a écrit :


Hi,

 

I would make a test by using some other mimetype, like image/png16, for 
eliminating the possibility that some internal  png configuration drives over 
your own outputformat.

 

I don’t know if it helps but it is cheap to test.

 

-Jukka Rahkonen-

 

Lähettäjä: mapserver-users  
Puolesta Johannes Paul
Lähetetty: keskiviikko 5. helmikuuta 2020 12.03
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] OUTPUTFORMAT png 16-bits

 

Hello,

I'm using Mapserver to output PNG 16-bits DEM raster from .HGT 
elevation data.

I'm using the below output format definition :

OUTPUTFORMAT
  NAME PNG16
  DRIVER GDAL/PNG
  MIMETYPE image/png
  IMAGEMODE INT16
  EXTENSION "png"
END

However I keep on getting the standard PNG 8-bits out of mapserver.

 

The strange thing being that when I use a similar config to get GeoTiff 
16-bits, I do get what I'm asking for :

 

OUTPUTFORMAT
  NAME GEOTIFF16
  DRIVER GDAL/GTiff
  MIMETYPE image/tiff
  IMAGEMODE INT16
  EXTENSION "tiff"
END



 




Could that be an issue with the GDAL/PNG driver ? It seems that the 
GDAL/PNG driver supports only CreateCopy() and not Create(), where the 
GDAL/GTiff driver supports both ... Could that be it ? I suspect the GDAL/PNG 
driver so I also sent my issue to the GDAL mailing list.

 

I can see from the mailing list that other users already had a similar 
issue, but there is no obvious reason or solution provided.

https://lists.osgeo.org/pipermail/mapserver-users/2011-April/068428.html


https://lists.osgeo.org/pipermail/mapserver-users/2012-January/071310.html

 

For information, I'm using GDAL v2.1.3 and Mapserver v7.0.1

Thanks,

Johannes

 

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

Re: [mapserver-users] OUTPUTFORMAT png 16-bits

2020-02-05 Thread Rahkonen Jukka (MML)
Hi,

I would make a test by using some other mimetype, like image/png16, for 
eliminating the possibility that some internal  png configuration drives over 
your own outputformat.

I don’t know if it helps but it is cheap to test.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Johannes Paul
Lähetetty: keskiviikko 5. helmikuuta 2020 12.03
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] OUTPUTFORMAT png 16-bits

Hello,
I'm using Mapserver to output PNG 16-bits DEM raster from .HGT elevation data.
I'm using the below output format definition :

OUTPUTFORMAT

  NAME PNG16

  DRIVER GDAL/PNG

  MIMETYPE image/png

  IMAGEMODE INT16

  EXTENSION "png"

END
However I keep on getting the standard PNG 8-bits out of mapserver.

The strange thing being that when I use a similar config to get GeoTiff 
16-bits, I do get what I'm asking for :

OUTPUTFORMAT
  NAME GEOTIFF16
  DRIVER GDAL/GTiff
  MIMETYPE image/tiff
  IMAGEMODE INT16
  EXTENSION "tiff"
END





Could that be an issue with the GDAL/PNG driver ? It seems that the GDAL/PNG 
driver supports only CreateCopy() and not Create(), where the GDAL/GTiff driver 
supports both ... Could that be it ? I suspect the GDAL/PNG driver so I also 
sent my issue to the GDAL mailing list.

I can see from the mailing list that other users already had a similar issue, 
but there is no obvious reason or solution provided.
https://lists.osgeo.org/pipermail/mapserver-users/2011-April/068428.html
https://lists.osgeo.org/pipermail/mapserver-users/2012-January/071310.html

For information, I'm using GDAL v2.1.3 and Mapserver v7.0.1
Thanks,
Johannes

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

Re: [mapserver-users] cgi-error: End of script output before headers mapserv

2020-01-24 Thread Rahkonen Jukka (MML)
Did you make the test that I suggested to run the same request for individual 
layers instead of the root layer “default”?

-Jukka-

Lähettäjä: mapserver-users  Puolesta 
Johannes Paul
Lähetetty: torstai 23. tammikuuta 2020 21.56
Vastaanottaja: Brian 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] cgi-error: End of script output before headers 
mapserv

Hi Brian,
I'm not usinage fcgi on my side, and it is not related to file permission or 
bad cgi script.
I've tried to work on my Osm postgis tables, and made the geom valid, like 
Jukka said, but it didn't change anything...
I'm thinking it might be related with Apache MPM prefork module and the 
MaxRequestWorker ?
Keep in touch


Le jeu. 23 janv. 2020 à 20:27, Brian 
mailto:mulcahy.bri...@gmail.com>> a écrit :
So I have this error as well. I mostly see it when a connection times out. Like 
you mapserver shows no errors but apache has the script ended before headers 
error. Do you have fcgi enabled? If I disable fcgi I don't get that error, so 
It could be related to connection a user has to mapserver. Maybe 
FcgidMaxRequestsPerProcess, FcgidMinProcessesPerClass, 
FcgidMaxProcessesPerClass  need to be tweaked?

If you do a google search on this error most of the responses says it is either 
due to a bad cgi script or bad file/dir permissions which in our case I doubt 
that is the reason. If you figure it out let me know.

On Wed, Jan 22, 2020 at 12:31 PM Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

I would suspect data, especially because it seems to be OSM data. Perhaps some 
invalid polygon again.

You use =default and I suppose that it means all the layers from your 
mapfile together. In that case I would try to catch the failing layer by adding 
layers one by one and in groups (first =layer1, then =layer2, 
then =layer1,layer2).

Hopefully that way you can find the failing layer, and then because you know 
the BBOX you may find the nasty geometry from the database. Without your data 
and mapfile it is rather useless to make very much guesswork, but a small 
change in bbox may select/not select a bad geometry, of change of bbox may 
change scale so much that source data come from a different table if you have a 
scale dependent layer group in the mapfile etc.

If the issue is due to bad geometry and you use PostGIS you may find it with 
ST_IsValid and ST_IsValidReason, and correct with ST_MakeValid.

-Jukka Rahkonen-

Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Johannes Paul
Lähetetty: keskiviikko 22. tammikuuta 2020 13.02
Vastaanottaja: 
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: [mapserver-users] cgi-error: End of script output before headers mapserv

Hello,
my mapserver is having a very strange behaviour, which I can't explain, nor 
debug.
I'm using mapserver 7.0.0 along with apache http server 2.4.6.

Most of the time, the server is working just fine, i.e. when I request a 
typical URL, I get my image back:

http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.143,38.746,-9.140,38.748=256=256=default=image/png=EPSG:4326=true

but then, when I slightly change bbox values, I get an internal server error 
(500):

http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.1433,38.7460,-9.1406,38.7487=256=256=default=image/png=EPSG:4326=true

I don't get any mapserver error log, but I do get an apache error log saying:
[cgi:error] End of script output before headers: mapserv

This is really an strange behaviour which I can't explain.
Did anyone already experienced a similar situation ?
Thanks
Jo
___
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<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

Re: [mapserver-users] cgi-error: End of script output before headers mapserv

2020-01-22 Thread Rahkonen Jukka (MML)
Hi,

I would suspect data, especially because it seems to be OSM data. Perhaps some 
invalid polygon again.

You use =default and I suppose that it means all the layers from your 
mapfile together. In that case I would try to catch the failing layer by adding 
layers one by one and in groups (first =layer1, then =layer2, 
then =layer1,layer2).

Hopefully that way you can find the failing layer, and then because you know 
the BBOX you may find the nasty geometry from the database. Without your data 
and mapfile it is rather useless to make very much guesswork, but a small 
change in bbox may select/not select a bad geometry, of change of bbox may 
change scale so much that source data come from a different table if you have a 
scale dependent layer group in the mapfile etc.

If the issue is due to bad geometry and you use PostGIS you may find it with 
ST_IsValid and ST_IsValidReason, and correct with ST_MakeValid.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Johannes Paul
Lähetetty: keskiviikko 22. tammikuuta 2020 13.02
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] cgi-error: End of script output before headers mapserv

Hello,
my mapserver is having a very strange behaviour, which I can't explain, nor 
debug.
I'm using mapserver 7.0.0 along with apache http server 2.4.6.

Most of the time, the server is working just fine, i.e. when I request a 
typical URL, I get my image back:

http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.143,38.746,-9.140,38.748=256=256=default=image/png=EPSG:4326=true

but then, when I slightly change bbox values, I get an internal server error 
(500):

http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.1433,38.7460,-9.1406,38.7487=256=256=default=image/png=EPSG:4326=true

I don't get any mapserver error log, but I do get an apache error log saying:
[cgi:error] End of script output before headers: mapserv

This is really an strange behaviour which I can't explain.
Did anyone already experienced a similar situation ?
Thanks
Jo
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Info Template

2019-11-20 Thread Rahkonen Jukka (MML)
Hi Markus,

I am not sure if you'd prefer me to answer in Finnish but English is easier for 
the majority of readers.

Certainly it is possible to use data from a database with templates yes but you 
did not tell the details about for what purpose you are trying to use the 
templates. The DATA (perhaps with CONNECTION) that is used in LAYER 
https://mapserver.org/mapfile/layer.html can also be used as a data source for 
templates.

An example from an old mail 
http://osgeo-org.1560.x6.nabble.com/html-tags-in-GetFeatureInfo-td5224781.html 
contains a template that defines the html format of GetFeatureInfo. Each "item 
name" is a name of the attribute in the source data. If vector data for the 
LAYER comes from MYSQL then the attributes are read from MYSQL as well.


NIMI
 [item name=NIMI format="$value" escape=none]
LISÄTIEDOT
 [item name=KIELLONLISATIETO format="$value" escape=none]
VOIMASSAOLO
 [item name=VOIMASSAOLO format="$value" escape=none]
YHTEYSTIEDOT
 [item name=YHTEYSTIEDOT format="$value" escape=none]
 

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Markus Lütke Brintrup
Lähetetty: keskiviikko 20. marraskuuta 2019 14.53
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Info Template

Hallo Liste,

besteht die Möglichkeit in der Template.html eines Map-Projektes eine 
Datenbankanbindung an zu steuern?
Beispiel:

Projektname:
[Werte aus MYSQL-DB]


Freundliche Grüße

Markus Lütke Brintrup

WipflerPLAN
Niederlassung Donauries

Telefon: 09081 27509-44
Telefax: 09081 27509-50
m...@wipflerplan.de
www.wipflerplan.de

WipflerPLAN Planungsgesellschaft mbH
Standort Nördlingen
An der Lach 11a
86720 Nördlingen
Amtsgericht Ingolstadt HRB 190595
Geschäftsführer:
Wilhelm Wipfler
Ursula Burkart
Adelheid Buchard


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

Re: [mapserver-users] Configuring a layer with one output with multiple input projections

2019-11-15 Thread Rahkonen Jukka (MML)
Hi,

Please read  
https://mapserver.org/optimization/tileindex.html#tileindex-mixed-srs and 
https://mapserver.org/development/rfc/ms-rfc-100.html?

-Jukka Rahkonen-
Lähettäjä: mapserver-users  Puolesta 
Peter Schmitt
Lähetetty: perjantai 15. marraskuuta 2019 21.02
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Configuring a layer with one output with multiple input 
projections

Hi,

Is it possible to configure one raster layer with a single output projection 
(epsg:4326) where input rasters are in different UTM zones? I'd like to avoid 
reprojecting the source data if possible.

The rasters will be determined from a Postgis-based tile index where raster 
extents are stored in epsg:4326. The database will also track what UTM zone the 
source raster is in.  Is it possible to pass this projection info from the 
database to the PROJECTION block?

I tried an experiment which does not quite work.  I built a tile index with two 
tifs in different UTM zones:

gdaltindex -t_srs EPSG:4326 test_tindex.gpkg zone45.tif zone46.tif

Then my layers are:

  LAYER
NAME"test_tindex"
TYPEPOLYGON

CONNECTIONTYPE  OGR
CONNECTION  "test_tindex.gpkg"
STATUS  OFF
PROJECTION
# proj4 config for +init=epsg:4326  
http://spatialreference.org/ref/epsg/wgs-84/
"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
END
CLASS
STYLE
WIDTH 2
OUTLINECOLOR 0 255 0
END
END
  END

  LAYER
NAME   "test"
TYPE   RASTER
METADATA
"ows_title" "test"
"ows_srs"   "EPSG:4326 EPSG:3857"
END
TILEINDEX   "test_tindex"
STATUS  OFF

PROJECTION
AUTO
END
  END

When I make a WMS request for test in an area where the images overlap, it 
seems MapServer stops rendering rasters after the first image in the tile index 
is found... so in this case since zone45.tif  was the first image in the tile 
index, that's what I see for a request bbox in the overlap region.  If I swap 
the order of files in the command to build the tindex, the overlapped area only 
shows me zone46.tif.

$ mapserv -v
MapServer version 7.2.2 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER 
SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS 
SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

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

Re: [mapserver-users] Mapserver bumped from 7.0.7 to 7.4.1 leads to wrong projection of features

2019-11-14 Thread Rahkonen Jukka (MML)
Hi,

Please add relevant parts of your mapfile. Obviously all that relates to 
projections and an example of the client side requests as well if you are 
changing the coordinate system on the fly.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Jaap Donker
Lähetetty: torstai 14. marraskuuta 2019 17.51
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Mapserver bumped from 7.0.7 to 7.4.1 leads to wrong 
projection of features

Hi,

Upon updating mapserver, projections for the features we use in our webapp were 
off.
We updated from version 7.0.7 to version 7.4.1. I'd like to stress that nothing 
else changed in setup during testing.

In the images below you can see the situation before (left) and after (right). 
The blue lines are polygons representing seamlines for the orthomosaic of 
aerials we are using.
This change in projection is troubling.

Original situation:
https://pasteboard.co/IGFtgdY.png

New situation:
https://pasteboard.co/IGFtxfs.png

Going through the backlog I see that there's some changes in PROJ4, but I'm a 
bit at a loss as to how best to investigate this issue.

Any help or guidance would be very much appreciated.

Regards,

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

Re: [mapserver-users] mapcache seed speed optimization

2019-11-08 Thread Rahkonen Jukka (MML)
Hi,

You can see examples about how to debug and improve the rendering speed with 
Mapserver in the presentation of Lars Schylberg 
https://media.ccc.de/v/bucharest-271-mapserver-optimize-for-performance.

Your maps look pretty and I hope you will find some bottleneck layers so you 
can make them faster.

-Jukka-

Lähettäjä: Sebastiano Laini 
Lähetetty: perjantai 8. marraskuuta 2019 16.30
Vastaanottaja: 'mapserver-users@lists.osgeo.org' 

Kopio: Rahkonen Jukka (MML) ; 'Yves 
Jacolin' 
Aihe: RE: mapcache seed speed optimization

My MapServer is on the same server as MapCache and my network is pretty fast.

I was just trying to experiment with the -n and -p value and checking the CPU 
load and I didn't seen any difference, but now that I read the responses I'm 
trying -n 6 and the CPU and the RAM is more in use now and seems to seed faster 
than before. I reach that numbers because the last time I was seeding with -n 
10 was incredibly slow so I started to increase the numbers.

Now in HTOP I can actually see 6 mapcache processes and not just 2

Sadly to seed the whole UK in disk cache we run out of inodes, I would like to 
use SSD.

About our data we use a mix of everything, here the final result 
https://www.buchananmapping.co.uk/

We use raster, vector and tab files; the reason I can't move out from mapserver 
are mainly the mapinfo tables (tab), possibly those tab files are the slowest 
layers
Even though some of the vector layers are very huge, some of them the data is 
about 21GB.

I'll try to debug layer by layer through MapServer and strip down to the 
minimum or replace some layers.

Lastly, the last time I've tried to seed the whole UK it took me more than a 
month and I simply stop it because was unacceptable to seed 7 levels of 
resolutions 70, 28, 14, 7, 2.8, 1.4, 0.7 that correspond to these scales 2500, 
5000, 1, 25000, 5, 10, 25, 50

Sebastiano Laini
Web Developer

From: Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi]
Sent: 08 November 2019 14:02
To: Sebastiano Laini 
mailto:sebastiano.la...@buchanancomputing.co.uk>>;
 'mapserver-users@lists.osgeo.org' 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: mapcache seed speed optimization

Hi,

When you seed tiles from WMS the slowest component is usually the WMS server. 
And what the WMS server is spending its time is usually rendering. And what 
makes rendering slow is usually that you render too much, and sometimes that 
WMS server gets the vector data too slow because the backend data source is 
slow, very often because it has poor indexes which do not for suit the queries 
that WMS server is
sending.

If you have a slow WMS you can't get more speed out of it by bombing it with 
very many parallel threads. I would have a try if using 2-4, perhaps 8 threads 
makes seeding faster but if there is no difference I would concentrate on the 
WMS configuration. BTW. why did you
select to use 2 threads?

I am not sure why you see just 1 core running on 100% load. I guess that you 
are now running WMS and MapCache on the same computer. Mapserver program is 
using only 1 core but http server should start more processes for parallel 
requests. That CPU load is at 100% is generally a good thing because it tells 
that CPU is working, instead of waiting data from a slow disk. Another thing is 
that CPU may be doing something heavy and stupid.

Myself I would start by gathering  some information about how Mapserver WMS is 
working be setting "DEBUG 2" on each layer or for the whole mapfile. By looking 
at the rendering times of each layer the slowest layers can be found and then 
it is time to think about how to make those layers faster.

You wrote that you use SQLite cache so it would be good to know that SQLite 
database does not support parallel writes https://sqlite.org/lockingv3.html. 
Seeding with a few parallel threads may increase the speed if the WMS is the 
slowest part in your chain but when you have saturated the SQLite writing speed 
adding threads will do no good. If you have optimized your WMS so well that 
SQLite sets the limits then you should test other cache alternatives. I guess 
that file cache would be faster to seed from multiple threads.

When is comes to ticket https://github.com/mapserver/mapcache/issues/169 the 
latest comment is from a Mpaserver developer and their last words "I wouldn't 
mind helping to fix if there were interested parties..." feel rather polite to 
me.

-Jukka Rahkonen-




Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Sebastiano Laini
Lähetetty: perjantai 8. marraskuuta 2019 14.35
Vastaanottaja: 'mapserver-users@lists.osgeo.org' 
mailto:mapserver-users@lists.osgeo.org>>
Aihe: [mapserver-users] mapcache seed speed optimization

Hi all,

I'm evaluating new stacks but seems that I'm stuck with mapserver and mapcache 
due to the input source of our maps, so I'm trying to improv

Re: [mapserver-users] mapcache seed speed optimization

2019-11-08 Thread Rahkonen Jukka (MML)
Hi,

When you seed tiles from WMS the slowest component is usually the WMS server. 
And what the WMS server is spending its time is usually rendering. And what 
makes rendering slow is usually that you render too much, and sometimes that 
WMS server gets the vector data too slow because the backend data source is 
slow, very often because it has poor indexes which do not for suit the queries 
that WMS server is
sending.

If you have a slow WMS you can't get more speed out of it by bombing it with 
very many parallel threads. I would have a try if using 2-4, perhaps 8 threads 
makes seeding faster but if there is no difference I would concentrate on the 
WMS configuration. BTW. why did you
select to use 2 threads?

I am not sure why you see just 1 core running on 100% load. I guess that you 
are now running WMS and MapCache on the same computer. Mapserver program is 
using only 1 core but http server should start more processes for parallel 
requests. That CPU load is at 100% is generally a good thing because it tells 
that CPU is working, instead of waiting data from a slow disk. Another thing is 
that CPU may be doing something heavy and stupid.

Myself I would start by gathering  some information about how Mapserver WMS is 
working be setting "DEBUG 2" on each layer or for the whole mapfile. By looking 
at the rendering times of each layer the slowest layers can be found and then 
it is time to think about how to make those layers faster.

You wrote that you use SQLite cache so it would be good to know that SQLite 
database does not support parallel writes https://sqlite.org/lockingv3.html. 
Seeding with a few parallel threads may increase the speed if the WMS is the 
slowest part in your chain but when you have saturated the SQLite writing speed 
adding threads will do no good. If you have optimized your WMS so well that 
SQLite sets the limits then you should test other cache alternatives. I guess 
that file cache would be faster to seed from multiple threads.

When is comes to ticket https://github.com/mapserver/mapcache/issues/169 the 
latest comment is from a Mpaserver developer and their last words "I wouldn't 
mind helping to fix if there were interested parties..." feel rather polite to 
me.

-Jukka Rahkonen-




Lähettäjä: mapserver-users  Puolesta 
Sebastiano Laini
Lähetetty: perjantai 8. marraskuuta 2019 14.35
Vastaanottaja: 'mapserver-users@lists.osgeo.org' 

Aihe: [mapserver-users] mapcache seed speed optimization

Hi all,

I'm evaluating new stacks but seems that I'm stuck with mapserver and mapcache 
due to the input source of our maps, so I'm trying to improve the speed of the 
mapserver/mapcache stack and what I cannot improve is the seed speed.

The -n and -p parameters seems to be useless.

-n | -nthreads: number of parallel threads that should be used to request tiles 
from the WMS source. The default is 1, but can be set higher if the WMS server 
can withstand parallel requests. (As a rule of thumb, the value chosen here 
should never be much higher than the number of CPUs on the WMS server.)

-p | -nprocesses: number of parallel processes that should be used to request 
tiles from the WMS source.
I've tried to use -n 2 and -p 6 but for some reason the CPU load is max 
100% in 1 core, no way to make it use more power and speed up the seed process.
Max memory used is 470MB between Centos 7 (with all the services running) and 
the seed process.

I've setup apache to use HTT/2 and it make quite a difference when the cache is 
already seeded but during the seed process doesn't seems to be affected.

My MapServer build is:

./configure \
--with-ogr=/usr/local/bin/gdal-config \
--with-gdal=/usr/local/bin/gdal-config \
--with-wfsclient \
--with-wmsclient \
--with-wfs \
--enable-debug \
--with-curl-config=/usr/bin/curl-config \
--with-proj \
--with-jpeg \
--with-freetype \
--with-postgis=/usr/pgsql-9.3/bin/pg_config \
--with-geos=/usr/local/bin/geos-config

I know there is mapserver 7 and yet I'm using 6 for the test.

While the MapCache is:

cmake   -DCMAKE_PREFIX_PATH="/usr/bin/sqlite3" \
-DWITH_SQLITE=1 \
-DWITH_BERKELEY_DB=0 \
-DWITH_TIFF=0 \
-DWITH_GEOTIFF=0 \
-DWITH_FCGI=0 \
-DWITH_PCRE=0 \
-DWITH_PIXMAN=1 \
-DWITH_OGR=1 \
-DWITH_GEOS=1 \
 ../

MapCache is the latest version and this is my mapcache.xml file, we use sqlite 
as a cache method

  
  
/home/www/html/maps/cache/{tileset}/{grid}/{z}/{x}-{y}.sqlite3
  1
  1
  1573741823
  

  
bcmaps
cache_sqlite
bcgrid
PNG
16 16
0
2628000
  

  
   
   BC custom grid
   
   EPSG:27700
   256 256
   0 0 70 125
   70 28 14 7 2.8 1.4 0.7
  

  
   best
  

  
assemble
bilinear
mypng
4096
  

I've also tried to use -DWITH_MAPSERVER but seems that the integration is not 
working and they doen't care? 

Re: [mapserver-users] Mapserver TabFile Error

2019-10-25 Thread Rahkonen Jukka (MML)
Hi,

Please include the request that your application sends for Mapserver. You 
should find it from the access log of your Apache server if you cannot capture 
it from the client side.

Somehow it feels like your client does not send the = parameter, or it you 
have tried to configure a default mapfile on the server side it did not go 
right.

Test with no mapfile:
https://demo.mapserver.org/cgi-bin/mapserv?

Test with mapfile pointer included:
https://demo.mapserver.org/cgi-bin/mapserv?map=/osgeo/mapserver/msautotest/world/world.map

-Jukka Rahkonen-




-Alkuperäinen viesti-
Lähettäjä: mapserver-users  Puolesta 
StefanWebViewer
Lähetetty: perjantai 25. lokakuuta 2019 17.28
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Mapserver TabFile Error

We would like to render a polygon on our mapserver. Everything works 
wonderfully on our localhost. Now we would like to send the application via 
external server. Everything works fine on the external server as well.
Except that the polygon appears on the map. The polygon is a TabFile. All paths 
have been updated, adapted and checked several times. In the network analysis 
comes with the "map" .exe this error: "No query information to decode. 
QUERY_STRING is set, but empty." Someone an idea what else would have to be 
adjusted?

Thanks a lot!



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
___
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] Doubling of labels on high resolution maps

2019-10-16 Thread Rahkonen Jukka (MML)
Hi,

Print composer is probably making tiled requests from WMS. That is compulsory 
for any bigger maps because the default maxsize on the Mapserver side is 
2048x2048 pixels https://mapserver.org/uk/mapfile/map.html. It is easy to 
increase the maxsize but I do not know if print composer as a client can be 
aware of that.

Partials FALSE may help, but based on the screenshot it is possible that print 
composer is making requests with some overlap.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Travis Kirstine
Lähetetty: keskiviikko 16. lokakuuta 2019 18.24
Vastaanottaja: Jan Hartmann 
Kopio: MapServer-users 
Aihe: Re: [mapserver-users] Doubling of labels on high resolution maps

There are a few options you could add to your label but I would start with

MINDISTANCE 200
PARTIALS FALSE

See
https://mapserver.org/mapfile/label.html



On Wed, 16 Oct 2019 at 10:37, Jan Hartmann 
mailto:j.l.h.hartm...@uva.nl>> wrote:
Hi,

I'm trying to generate high resolution print maps with QGIS, based on a 
MapServer WMS layer. When displayed in the regular QGIS application with 72dpi, 
all looks fine. When using the Print Composer based on the same Mapfile, but 
with 300dpi, some labels are duplicated (not all). Some duplicates are clipped. 
The two versions can be seen here:

https://maps.hisgis.nl/marken_072dpi.png
https://maps.hisgis.nl/marken_300dpi.png

Below the Mapfile.  Any idea what goes wrong here?

Jan

map
name Markegrenzen

web
  metadata
"wms_title" "Markegrenzen"
"wms_srs" "EPSG:28992 EPSG:3857"
"wms_extent"  "13000 301000 279000 62"
"wms_enable_request" "*"
  end
end

extent 13000 301000 279000 62
units meters
size 400 400
resolution 300
defresolution 72


projection
  "init=epsg:28992"
end

z
layer
  name Markegrenzen
  status on
  type polygon
  connectiontype postgis
  connection "dbname=ov options='-c search_path=horigheid,public'"
  data " the_geom from (
select gid,the_geom,naam from markegrenzen
) as foo using unique gid using srid=28992
  "
  labelitem "naam"
  class
style
outlinecolor 255 0 0
width 1
end
label
color 255 0 0
size 4
end
  end
end
end

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

2019-10-09 Thread Rahkonen Jukka (MML)
Hi,

See https://mapserver.org/ogc/wfs_server.html
You should have full control on the service URL by having  
"wfs_service_onlineresource" set in the metadata section.

-Jukka Rahkonen-


Lähettäjä: mapserver-users  Puolesta 
Kler, Tijs de
Lähetetty: keskiviikko 9. lokakuuta 2019 13.41
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Mapserver behind proxyserver

Hey All,

I am running a mapserver docker container on port 80 using the following docker 
image: https://github.com/PDOK/mapserver-wfs-postgis.

For deployment i have to run behind a proxyserver based on HAproxy that takes 
care of ssl encryption.
Accessing GetCapabilites 
(https://acc.dsr.maps.amsterdam.nl/mapserver/wfs?REQUEST=GetCapabilities=wfs)
 resolves and returns xml with the available layers.
The layers however contains url references to port 80:
> https://acc.dsr.maps.amsterdam.nl:80/mapserver?request=GetMetadata=Invloedsgebied_Metro

How does mapserver build the layer urls?
Does it use the request header of the GetCapabilities request to construct it? 
Or serverside configuration?
And if yes, which header fields or environment/config variables are used to 
construct the layer URL?

Cheers,
Tijs



De gemeente Amsterdam streeft naar optimale dienstverlening en zorgvuldige 
afhandeling van e-mailverkeer. Als een e-mail niet voor u is bestemd, verzoekt 
de gemeente u vriendelijk ons van de juiste adressering op de hoogte te stellen 
en de e-mail te verwijderen zonder de informatie te gebruiken en te delen met 
anderen. Voor verdere informatie over de rechten op informatie, zie 
https://www.amsterdam.nl/proclaimer.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] How does colorrange actually work with vector layers?

2019-09-19 Thread Rahkonen Jukka (MML)
Hi,

Documentation of colorrange in https://www.mapserver.org/mapfile/style.html 
suggests to find details from 
https://www.mapserver.org/development/rfc/ms-rfc-6.html#rfc6 but the RFC does 
not really tell what was finally implemented. Is this what is documented for 
styles what we have now?

STYLE
RANGEITEM "myAttr"
COLORRANGE 255 0 0  0 255 0
DATARANGE 0.0 1.0
END

I suppose it is not possible to give a third, interim value for COLORRANGE, nor 
to use Z (or M) coordinate value as RANGEITEM. Especially I have in my mind 
usecases for Z to visualize heights and depths, and M for speed or other 
measures.

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

Re: [mapserver-users] Highly inefficient MakeValid statement in Mapserver-generated spatial queries

2019-09-09 Thread Rahkonen Jukka (MML)
Hi,

Fortunately not the entire MS4W community is affected, just those who work with 
MS SQL server.

When makevalid will be turned off MapServer admin will have another option to 
deal with invalid geometries: select data in  mapfile with IsValid=true. Then 
the faulty geometries will not show on the map but the whole layer will not 
fail.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
ikes...@yahoo.com
Lähetetty: maanantai 9. syyskuuta 2019 15.20
Vastaanottaja: 'Seth G' ; 'Tamas Szekeres' 

Kopio: 'MapserverList OSGEO' 
Aihe: Re: [mapserver-users] Highly inefficient MakeValid statement in 
Mapserver-generated spatial queries

Is there any chance that an “unstable” version could be released sooner so that 
we don’t have to wait another 3-6 months for the next release?
This performance issue affects the entire MS4W user community for all WMS 
requests. It would be great if an interim version could be released sooner.
Much appreciated,
Istvan

From: Seth G mailto:se...@geographika.co.uk>>
Sent: Sunday, September 8, 2019 11:06 PM
To: Istvan Keszei mailto:ikes...@yahoo.com>>; Tamas Szekeres 
mailto:szeker...@gmail.com>>
Cc: MapserverList OSGEO 
mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: [mapserver-users] Highly inefficient MakeValid statement in 
Mapserver-generated spatial queries

Hi Istvan,

Unfortunately you won't be able to turn it off without recompiling the MSSQL 
driver.
I've added a pull request removing these at 
https://github.com/mapserver/mapserver/pull/5856
This will be merged into master assuming there are no objections.
I assume you are using ms4w as you mention a 4.0.1 release? You'll need to see 
when a new release of that may be available with the update.
Thanks for reporting this issue,

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Sun, Sep 8, 2019, at 12:30 AM, Istvan Keszei wrote:

We have real large geospatial tables.  Not having an option to turn MakeValid 
off will kill our applications’ performance as indexes are essential.

For a simple query, the disk reads are 100x more for a query including the 
MakeValid. Hence, the cpu resources required are multifold too.

Yes, please turn it off or make it optional. Can this be done manually somehow? 
We have waited long months for 4.0.1 to come out (with the opacity fix) and now 
this issue prevents the upgrade.

I see the invalid geometries more of a data maintenance responsibility rather 
than a query-side-responsibility. I understand for some people this is 
convenient, so that is why I suggest to make this optional.

Any help is appreciated!

Thank you,
Istvan


On 2019. Sep 7., at 23:55, Tamas Szekeres 
mailto:szeker...@gmail.com>> wrote:
I think we can remove MakeValid from the queries entirely.
The problem is that if the table contains invalid geometries, the entire query 
will fail.

Best regards,

Tamas


Seth G mailto:se...@geographika.co.uk>> ezt írta 
(időpont: 2019. szept. 7., Szo, 21:35):

Hi,

Good question. This is a fairly new change as part of 
https://github.com/mapserver/mapserver/issues/5781 from April this year.
In SQL Profiler I seem to get GEOM.STIntersects for WFS requests and 
GEOM.MakeVaid().STIntersects for WMS.
MakeValid does appear to stop the index being used. Do you have a link which 
says this definitively?

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Sat, Sep 7, 2019, at 12:02 PM, ikes...@yahoo.com 
wrote:

Hello,



I noticed that when MapServer issues the query to MS SQL Server, it appends a 
.MakeValid() tag to the geometry field, which makes data access highly 
inefficient as no spatial indexes can be used when the MakeValid() is used. 
Here is the query that is being produced:



SELECT

convert(nvarchar(max), [label]),

[ogr_geometry],

convert(varchar(36), [ogr_fid])

FROM

section

WHERE

ogr_geometry.MakeValid().STIntersects(geometry::STGeomFromText('POLYGON((-10973271.1167343
 5605636.0681215,-10963019.0003155 5605636.0681215,-10963019.0003155 
5614459.76757417,-10973271.1167343 5614459.76757417,-10973271.1167343 
5605636.0681215))',3857)) = 1



Here is the data access string from the map file:



DATA "ogr_geometry from section USING UNIQUE ogr_fid USING SRID=3857"



Earlier I was using a specific HINT for index usage:



DATA "ogr_geometry from section WITH (INDEX(section_ogr_geometry_idx)) USING 
UNIQUE ogr_fid USING SRID=3857"



But since MapServer adds the MakeValid automatically, I am getting the 
following error:



Msg 8635, Level 16, State 9, Line 1

The query processor could not produce a query plan for a query with a spatial 
index hint.  Reason: Could not find required binary spatial method in a 
condition.  Try removing the index hints or removing SET FORCEPLAN.



How do I configure mapserver to NOT ADD the MakeValid to every single one of 
its queries ?



Any response is much appreciated !



Thanks,

Istvan




___
mapserver-users mailing list

Re: [mapserver-users] The GetFeature WFS Request fail if the layer is empty

2019-08-13 Thread Rahkonen Jukka (MML)
Hi,

Thanks for the clarification. As a comparison here is a request and 
corresponding result for having a look at what Geoserver does

https://demo.geo-solutions.it/geoserver/wfs?service=WFS=2.0.0=GetFeature=states_filter=STATE_NAME='Foo'

Result:

http://www.w3.org/2001/XMLSchema; 
xmlns:wfs="http://www.opengis.net/wfs/2.0; 
xmlns:gml="http://www.opengis.net/gml/3.2; 
xmlns:topp="http://www.openplans.org/topp; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; numberMatched="0" 
numberReturned="0" timeStamp="2019-08-13T09:43:54.633Z" 
xsi:schemaLocation="http://www.opengis.net/wfs/2.0 
https://demo.geo-solutions.it:443/geoserver/schemas/wfs/2.0/wfs.xsd 
http://www.openplans.org/topp 
https://demo.geo-solutions.it:443/geoserver/wfs?service=WFSversion=2.0.0request=DescribeFeatureTypetypeName=topp%3Astates
 http://www.opengis.net/gml/3.2 
https://demo.geo-solutions.it:443/geoserver/schemas/gml/3.2.1/gml.xsd"/>

-Jukka-

Lähettäjä: Andrea Peri 
Lähetetty: tiistai 13. elokuuta 2019 12.35
Vastaanottaja: Rahkonen Jukka (MML) 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] The GetFeature WFS Request fail if the layer is 
empty

Hi Jukka,

I'm testing with GetFeature using a postgis table.
The table in my test is not empty, but I apply a filter to the query for the 
data retrieving of the layer and the result with the filter is an empty dataset.

A.


Il giorno mar 13 ago 2019 alle ore 09:00 Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 ha scritto:
Hi,

What kind of source dataset do you have, and do you mean that for example a 
PostGIS table exists but there are no rows in the table?

-Jukka Rahkonen-

Lähettäjä: mapserver-users 
mailto:mapserver-users-boun...@lists.osgeo.org>>
 Puolesta Andrea Peri
Lähetetty: maanantai 12. elokuuta 2019 14.30
Vastaanottaja: 
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: [mapserver-users] The GetFeature WFS Request fail if the layer is empty

Hi,
I' notice that the GetFeature WFS request of a mapserver (i'm work using 
master) return an error if the dataset (and so the layer) is empty.

I test using version 1.0.0, 1.1.1 and 2.00.

On 2.0.0 the result is:
http status 400
The request sent by the client was syntactically incorrect.

On 1.1.0 and 1.0.0 the result is an xml exception with:
msWFSGetFeature(): WFS server error. ms_error->code not found

I Guess it should return not an exception or error, but instead an empty GML or 
an Empty Shapefile and so on...

Before to build a test service of this issue, I like to know if this instead is 
a confirmed specific characteristic of a wfs service.

Thx,

--
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-


--
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] The GetFeature WFS Request fail if the layer is empty

2019-08-13 Thread Rahkonen Jukka (MML)
Hi,

What kind of source dataset do you have, and do you mean that for example a 
PostGIS table exists but there are no rows in the table?

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Andrea Peri
Lähetetty: maanantai 12. elokuuta 2019 14.30
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] The GetFeature WFS Request fail if the layer is empty

Hi,
I' notice that the GetFeature WFS request of a mapserver (i'm work using 
master) return an error if the dataset (and so the layer) is empty.

I test using version 1.0.0, 1.1.1 and 2.00.

On 2.0.0 the result is:
http status 400
The request sent by the client was syntactically incorrect.

On 1.1.0 and 1.0.0 the result is an xml exception with:
msWFSGetFeature(): WFS server error. ms_error->code not found

I Guess it should return not an exception or error, but instead an empty GML or 
an Empty Shapefile and so on...

Before to build a test service of this issue, I like to know if this instead is 
a confirmed specific characteristic of a wfs service.

Thx,

--
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] WCS 2.0.1 not returning same image as WCS 1.0.0

2019-06-05 Thread Rahkonen Jukka (MML)
Hi,

I recommend to read the WCS 2.0 core standard which does not support bbox, resx 
or resy anymore. Mapserver documentation shows also how to use SUBSET 
https://www.mapserver.org/ogc/wcs_server.html. If you need to change the pixel 
size then the document to read is the WCS Scaling extension standard 
https://portal.opengeospatial.org/files/12-039.


-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Moisan, Yves (NRCAN/RNCAN)
Lähetetty: keskiviikko 5. kesäkuuta 2019 21.05
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] WCS 2.0.1 not returning same image as WCS 1.0.0

Hi All,

On Ubuntu 18.04 with :

MapServer version 7.0.7 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS 
SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER 
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG 
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

When I issue a GetCoverage in WCS 1.0.1 I get a 1635 X 1940 pixels GTiff image :

http://myserver?SERVICE=WCS=1.0.0=GetCoverage=myCoverage=376509,4898728,377163,4899504=EPSG:26918=0.4=0.4=image/tiff

The same request, only in 2.0.1 and with COVERAGEID instead of COVERAGE, I get :

msWCSGetCoverage20(): WCS server error. Raster size out of range, width and 
height of resulting coverage must be no more than MAXSIZE=4096.

How can that be ?  I'm specifying resx resy to the values pixels have in the 
image behind the service (and when I overlay the image I get back from the WCS 
1.0.0 call it matches the original image pixel for pixel) so there can't be 
interpolation going on here.  I'm surprised.

Thanx for pointers,

Yves


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

Re: [mapserver-users] WCS 2.0.1 sends multipart response for ascii grid format

2019-05-09 Thread Rahkonen Jukka (MML)
Hi,

I thought I could resolve the problem by setting
CONFIG "GDAL_PAM_ENABLED" "NO"

Unfortunately nothing changed.

-Jukka Rahkonen-


Lähettäjä: Rahkonen Jukka (MML)
Lähetetty: keskiviikko 8. toukokuuta 2019 18.53
Vastaanottaja: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: WCS 2.0.1 sends multipart response for ascii grid format

Hi,

I have Mapserver 7.2.1 and outputformat defined as

OUTPUTFORMAT
NAME AAIGRID
DRIVER "GDAL/AAIGRID"
MIMETYPE "application/x-ascii-grid"
IMAGEMODE FLOAT32
EXTENSION "grd"
FORMATOPTION "SIGNIFICANT_DIGITS=5"
END

The WCS 2.0.1 GetCoverage request is sending the response as multipart.  The 
first part is the ASCII grid and it is followed by these two parts

--wcs
Content-Type: application/octet-stream
Content-Description: coverage data
Content-Transfer-Encoding: binary
Content-ID: coverage/out.grd.aux.xml
Content-Disposition: INLINE; filename=out.grd.aux.xml


  
2
72.00
72.00
  


--wcs
Content-Type: application/octet-stream
Content-Description: coverage data
Content-Transfer-Encoding: binary
Content-ID: coverage/out.prj
Content-Disposition: INLINE; filename=out.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]]

Is there a way to get rid of the last parts of the response?

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

[mapserver-users] WCS 2.0.1 sends multipart response for ascii grid format

2019-05-08 Thread Rahkonen Jukka (MML)
Hi,

I have Mapserver 7.2.1 and outputformat defined as

OUTPUTFORMAT
NAME AAIGRID
DRIVER "GDAL/AAIGRID"
MIMETYPE "application/x-ascii-grid"
IMAGEMODE FLOAT32
EXTENSION "grd"
FORMATOPTION "SIGNIFICANT_DIGITS=5"
END

The WCS 2.0.1 GetCoverage request is sending the response as multipart.  The 
first part is the ASCII grid and it is followed by these two parts

--wcs
Content-Type: application/octet-stream
Content-Description: coverage data
Content-Transfer-Encoding: binary
Content-ID: coverage/out.grd.aux.xml
Content-Disposition: INLINE; filename=out.grd.aux.xml


  
2
72.00
72.00
  


--wcs
Content-Type: application/octet-stream
Content-Description: coverage data
Content-Transfer-Encoding: binary
Content-ID: coverage/out.prj
Content-Disposition: INLINE; filename=out.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]]

Is there a way to get rid of the last parts of the response?

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

Re: [mapserver-users] Conditional BANDS directive based on underlying data

2019-04-30 Thread Rahkonen Jukka (MML)
Hi,

As Even already answered, using vrt files over the BGRN originals will work. We 
had a need to use both grayscale originals and vrt-falsified RGB versions (the 
only band pointing to red, green, and blue in .vrt) in the same service. We 
have only one tileindex in PostGIS, made from the tiff images, but it can be 
modified on-the-fly in the tileindex layer

DATA "the_geom from (SELECT the_geom, fid, CASE WHEN filepath like '%_mv_%' 
THEN replace(filepath,'TIFF','vrt') ELSE filepath END AS location,…

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Peter Schmitt
Lähetetty: maanantai 29. huhtikuuta 2019 19.41
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Conditional BANDS directive based on underlying data

Hi,

When my data is 4-band (BGRN), I use the BANDS processing directive to yield 
RGB tiles, like so:

PROCESSING"BANDS=4,3,2"

Is there a way to have a single layer within a Mapfile that will set this 
directive to 4,3,2 when the underlying data has four bands and either skip the 
directive or set it to 1,2,3 when the underlying data is 3-band?

The only thing I can think of is it to try runtime substitution, where my 
request might include the band order like 
"REQUEST=WMS_band_order=4,3,2&" and then configure my mapfile 
accordingly:

PROCESSING"BANDS=%the_band_order%"

Is there another way which doesn't require the client to know about the 
underlying data?  FWIW, my ultimate use-case serves mosaics using a tile index 
generated from Postgis. The Postgis table could have a column storing the band 
information, but I'm not sure how to extract that in my LAYER/BANDS Processing 
directive.

Thanks!
Pete

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

Re: [mapserver-users] Accessing WFS- Service: unexpected output (junk?)

2019-04-04 Thread Rahkonen Jukka (MML)
Hi,

I could make some progress by using   "wfs_request_method" "GET". Now the error 
was "WFS server error. Unable to get extents for this layer." Then I set  
"wfs_extent" "-999 -999 999 999" but now I get "Search returned 
no results. No matching record(s) found."

Hope that this helps you to forward.

-Jukka Rahkonen-


Lähettäjä: mapserver-users  Puolesta 
Feinen, Jörg
Lähetetty: torstai 4. huhtikuuta 2019 8.43
Vastaanottaja: 'mapserver-users@lists.osgeo.org' 

Aihe: [mapserver-users] Accessing WFS- Service: unexpected output (junk?)

Hi all,

i´m quite a noob to WFS and now trying to access a wfs-service (see Mapfile). 
In QGIS it works well, so service seems ok.
As you can see in this mapfile, we tried a lot - but it didnt succeed.

Any help ?

jörg

(i searched the archive for this error - nothing found)
-error

MapServer Message


msDrawMap(): Image handling error. Failed to draw layer named BIOTOPE.
msWFSLayerWhichShapes(): WFS connection error. WFS request produced unexpected 
output (junk?) for layer BIOTOPE.

---mapfile
UNITS Meters
CONFIG 'PROJ_LIB' '/proj/nad/'


SYMBOLSET '/nkat/symbols/symbols.sym'
FONTSET '/nkat/fonts/fonts.txt'
CONFIG 'MS_ERRORFILE' '/websys/ms_error.txt'
CONFIG 'CURL_CA_BUNDLE' '/ca-bundle.crt'

DEBUG OFF


IMAGETYPE png
IMAGECOLOR 255 255 255

  WEB
  IMAGEPATH "d:/cache/wfs/"
   IMAGEURL "d:/cache/wfs/"
TEMPPATH "d:/cache/wfs/"
  END

OUTPUTFORMAT
  NAME 'png'
  DRIVER AGG/PNG
  MIMETYPE 'image/png'
  IMAGEMODE RGBA
  EXTENSION 'png'
  FORMATOPTION 'GAMMA=0.75'
  TRANSPARENT on
END
LAYER
  NAME BIOTOPE
  TYPE POLYGON
  STATUS default
  #CONNECTION 
"http://geodienste-umwelt.hessen.de/arcgis/services/inspire/bewirtschaftungsgebiete/MapServer/WFSServer?;
  CONNECTION 
"http://geodienste-umwelt.hessen.de/arcgis/services/inspire/lebensraeume_biotope/MapServer/WFSServer?;
  CONNECTIONTYPE WFS
  METADATA
  #"wfs_typename"  
'inspire_bewirtschaftungsgebiete:TWS_HQS_TK25'
  "wfs_typename"  
"inspire_lebensraeume_biotope:BIOTOPE"
  "wfs_request_method" "POST"
"wfs_service" "WFS"
  "wfs_version"   "1.0.0"
  "wfs_connectiontimeout" "60"
  "wfs_maxfeatures"   "10"
  #"wfs_onlineresource"  
"http://geodienste-umwelt.hessen.de/arcgis/services/inspire/bewirtschaftungsgebiete/MapServer/WFSServer?;
   "wfs_onlineresource"  
"http://geodienste-umwelt.hessen.de/arcgis/services/inspire/lebensraeume_biotope/MapServer/WFSServer?;
  "wfs_enable_request"   "*"
  "wfs_title""TARPO Local Priority 
Projects"  ## REQUIRED
  "wfs_srs"  "EPSG:25832"  ##
  END

  PROJECTION
"init=epsg:25832"
  END
  CLASS
  #  NAME  "inspire_bewirtschaftungsgebiete:TWS_HQS_TK25"
  NAME  "BIOTOPE"
STYLE
  COLOR 255 128 128
  OUTLINECOLOR 96 96 96
END
  END
END # Layer












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

  1   2   3   4   >