Re: [mapserver-users] KKJ images misaligned after update

2020-05-18 Thread Even Rouault
On lundi 18 mai 2020 13:16:32 CEST Rahkonen Jukka (MML) wrote:
> 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

I didn't try, but I'd strongly suspect the combination MapServer 7.4 + GDAL 3 
doesn't work so 
well here. The issue you hit should be hopefully fixed with the following added 
code path in 
MapServer 7.6:
https://github.com/mapserver/mapserver/blob/
13607c79d8254326c83b1b8b2f81d2560169106c/mapogr.cpp#L959

Basically on reading the SRS from the TIFF file with GDAL, we used to export 
the WKT 
definition to a PROJ.4 string, and then built the Mapserver CRS object from it. 
Before GDAL 
3.X, this export to PROJ.4 string included TOWGS84 parameters. Since GDAL 3.X, 
it no longer 
does.

Hence the new code path, that detects that the CRS read from GDAL has an EPSG 
code 
attached, and when that's the case, instanciate a +init=epsg: string as the 
Mapserver 
CRS object to avoid going to potentially lossy PROJ.4 strings.

So "good" version combinations are probably:
- Mapserver 7.4 (or 7.6) + GDAL 2.4 + PROJ 5
- or MapServer 7.6 + GDAL 3.X + PROJ >= 6

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

[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

[mapserver-users] List properties of mapserver objects

2020-05-18 Thread Georgiana Paiu
I am using mapserver 7 with PHP and I was trying to list the properties and
the values of some objects (example styleObj, labelObj) by
using get_object_vars function from PHP. It seems the result is always an
empty array. Can you help me with a suggestion, please?

I mention that before I was using mapserver 5 and it was working fine.

Thank you,

*Georgiana Paiu*
Web Developer
(+40) 75 443 4340 <(+40)+75+443+4340> | paiu.georgi...@gmail.com | Skype:
georgiana.paiu 
  
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users