Re: [mapserver-users] Is Mapserver known to play nice with Proj 6.3 ?

2020-02-05 Thread Even Rouault
> Did you try building the master branch? 

Yes MapServer master branch + PROJ 6.3.0 or 6.3 git HEAD.

-- 
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] Is Mapserver known to play nice with Proj 6.3 ?

2020-02-05 Thread Herzmann, Daryl E [AGRON]
Hi Even,

You are the best!  Thank you for the response.  My email client does not like 
inline quoting, sigh.  With regards to:

1) Performance hit.

Yeah, I haven't got a test case yet.  Too many moving parts on my end currently 
:(

2) building with proj 6.3.0

Did you try building the master branch?  That's what fails for me without 
adding that macro.  branch-7-4 works without code modifications. 

3) segfaults

I will look into your suggestion, but initially I found some core files with 
this backtrace:

#0  0x7f9b4abc38df in raise () from /lib64/libc.so.6
#1  0x7f9b4abadcf5 in abort () from /lib64/libc.so.6
#2  0x7f9b4ac06c17 in __libc_message () from /lib64/libc.so.6
#3  0x7f9b4ac0d53c in malloc_printerr () from /lib64/libc.so.6
#4  0x7f9b4ac0ef2c in _int_free () from /lib64/libc.so.6
#5  0x7f9b4d30ddcb in msGEOSCleanup () from 
/opt/miniconda3/envs/prod/lib/libmapserver.so.2
#6  0x7f9b4d3f3a66 in msCleanup () from 
/opt/miniconda3/envs/prod/lib/libmapserver.so.2
#7  0x0040116a in ?? ()
#8  0x7f9b4d861560 in ?? ()
#9  0x000f026f in ?? ()
#10 0x7f9b44b18290 in feholdexc...@got.plt () from 
/opt/miniconda3/envs/prod/lib/./././libquadmath.so.0
#11 
#12 0x7f9b4abc6520 in __cxa_finalize () from /lib64/libc.so.6
#13 0x7f9b44ae2740 in __do_global_dtors_aux () from 
/opt/miniconda3/envs/prod/lib/./././libquadmath.so.0
#14 0x7f9b4da22000 in ?? () from /lib64/ld-linux-x86-64.so.2
#15 0x in ?? ()

I am still efforting getting a full debug environment setup :(

4) new proj 6.3.1 release

Thank you for prioritizing that!  I will certainly give it a spin and report 
back my findings.

daryl





--
/**
 * daryl herzmann
 * Systems Analyst III -- Iowa Environmental Mesonet
 * https://mesonet.agron.iastate.edu
 */



From: Even Rouault 
Sent: Wednesday, February 5, 2020 3:22 PM
To: mapserver-users@lists.osgeo.org
Cc: Herzmann, Daryl E [AGRON]
Subject: Re: [mapserver-users] Is Mapserver known to play nice with Proj 6.3 ?

Hi,

> 1) For my deployment of FastCGI mapserver (master or 7.4.x build) and based
> on my monitoring, CPU usage is about double vs my previous setup of
> mapserver 7.3.x and Proj 5.2.0.  My comment here is lame I know as I have
> yet to produce a test case showing that actual difference.  All the other
> support libraries that went into the new build are updated too, so it is
> unfair to perhaps blame proj here :)  I had lots of previous fun[1] with a
> newer proj and postgis when an old sqlite3 library is at play, but I'm
> using the most recent version of that here.

There's certainly a performance hit with PROJ >= 6. How much it is depends on
a lot of things. I'm not sure there are so many low hanging fruits remaining,
but precise reproducer to investigate could be useful. Normally in FastCGI,
the initial overhead should be amortized in following requests reusing the
same process.

However with branch 7.4 you will use PROJ.4 API of PROJ 6, so a x2 performance
hit is not expected in that situation. It should exhibit performance similar
to PROJ 5.

> 2) I could not get master branch to build with proj 6.3, I get the error:
>
> [  0%] Building C object CMakeFiles/mapserver.dir/fontcache.c.o
> In file included from /home/akrherz/projects/mapserver/mapproject.h:46,
>  from /home/akrherz/projects/mapserver/mapshape.h:35,
>  from /home/akrherz/projects/mapserver/mapserver.h:126,
>  from /home/akrherz/projects/mapserver/fontcache.c:30:
> /opt/miniconda3/envs/prod/include/proj_api.h:37:2: error: #error 'To use the
> proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'
> #error 'To use the proj_api.h you must define the macro
> ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'

That's not expected. Is there a /opt/miniconda3/envs/prod/include/proj.h file
as there should normally be one for PROJ >= 6 ?

> 3) I've been seeing lots of segfaulting and coredumps

You should make sure that all MapServer direct or indirect dependencies use
the same PROJ version.
(or you can use the -DPROJ_RENAME_SYMBOLS trick as in
https://github.com/mapserver/mapserver/blob/master/ci/travis/script.sh#L16
and
https://github.com/mapserver/mapserver/blob/master/ci/travis/script.sh#L30)

That said...

> 4) It appears like Travis CI testing is all against proj 6.1.1, maybe I
> should revert to that? :)

I've just tested with PROJ 6.3.0 and I indeed see number of crashes/wrong
results when running msautotest. Those disappear when using the HEAD of the
6.3 git branch.
I've raised the opportunity to issue a PROJ 6.3.1 release in
https://lists.osgeo.org/pipermail/proj/2020-February/009339.html

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] Is Mapserver known to play nice with Proj 6.3 ?

2020-02-05 Thread Even Rouault
Hi,

> 1) For my deployment of FastCGI mapserver (master or 7.4.x build) and based
> on my monitoring, CPU usage is about double vs my previous setup of
> mapserver 7.3.x and Proj 5.2.0.  My comment here is lame I know as I have
> yet to produce a test case showing that actual difference.  All the other
> support libraries that went into the new build are updated too, so it is
> unfair to perhaps blame proj here :)  I had lots of previous fun[1] with a
> newer proj and postgis when an old sqlite3 library is at play, but I'm
> using the most recent version of that here.

There's certainly a performance hit with PROJ >= 6. How much it is depends on 
a lot of things. I'm not sure there are so many low hanging fruits remaining, 
but precise reproducer to investigate could be useful. Normally in FastCGI, 
the initial overhead should be amortized in following requests reusing the 
same process.

However with branch 7.4 you will use PROJ.4 API of PROJ 6, so a x2 performance 
hit is not expected in that situation. It should exhibit performance similar 
to PROJ 5.

> 2) I could not get master branch to build with proj 6.3, I get the error:
> 
> [  0%] Building C object CMakeFiles/mapserver.dir/fontcache.c.o
> In file included from /home/akrherz/projects/mapserver/mapproject.h:46,
>  from /home/akrherz/projects/mapserver/mapshape.h:35,
>  from /home/akrherz/projects/mapserver/mapserver.h:126,
>  from /home/akrherz/projects/mapserver/fontcache.c:30:
> /opt/miniconda3/envs/prod/include/proj_api.h:37:2: error: #error 'To use the
> proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'
> #error 'To use the proj_api.h you must define the macro
> ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'

That's not expected. Is there a /opt/miniconda3/envs/prod/include/proj.h file 
as there should normally be one for PROJ >= 6 ?

> 3) I've been seeing lots of segfaulting and coredumps

You should make sure that all MapServer direct or indirect dependencies use 
the same PROJ version.
(or you can use the -DPROJ_RENAME_SYMBOLS trick as in
https://github.com/mapserver/mapserver/blob/master/ci/travis/script.sh#L16
and
https://github.com/mapserver/mapserver/blob/master/ci/travis/script.sh#L30)

That said...

> 4) It appears like Travis CI testing is all against proj 6.1.1, maybe I
> should revert to that? :)

I've just tested with PROJ 6.3.0 and I indeed see number of crashes/wrong 
results when running msautotest. Those disappear when using the HEAD of the 
6.3 git branch.
I've raised the opportunity to issue a PROJ 6.3.1 release in
https://lists.osgeo.org/pipermail/proj/2020-February/009339.html

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] Is Mapserver known to play nice with Proj 6.3 ?

2020-02-05 Thread Herzmann, Daryl E [AGRON]
Greetings,

I'm attempting to use Mapserver with Proj 6.3 and am wondering if this 
combination is known to work?  I've been experiencing some issues.

1) For my deployment of FastCGI mapserver (master or 7.4.x build) and based on 
my monitoring, CPU usage is about double vs my previous setup of mapserver 
7.3.x and Proj 5.2.0.  My comment here is lame I know as I have yet to produce 
a test case showing that actual difference.  All the other support libraries 
that went into the new build are updated too, so it is unfair to perhaps blame 
proj here :)  I had lots of previous fun[1] with a newer proj and postgis when 
an old sqlite3 library is at play, but I'm using the most recent version of 
that here.

[1] https://lists.osgeo.org/pipermail/postgis-users/2019-November/043727.html

2) I could not get master branch to build with proj 6.3, I get the error:

[  0%] Building C object CMakeFiles/mapserver.dir/fontcache.c.o
In file included from /home/akrherz/projects/mapserver/mapproject.h:46,
 from /home/akrherz/projects/mapserver/mapshape.h:35,
 from /home/akrherz/projects/mapserver/mapserver.h:126,
 from /home/akrherz/projects/mapserver/fontcache.c:30:
/opt/miniconda3/envs/prod/include/proj_api.h:37:2: error: #error 'To use the 
proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'
 #error 'To use the proj_api.h you must define the macro 
ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'

Which is described in this closed issue: 
https://github.com/mapserver/mapserver/issues/5766

Strangely, this builds just fine on the branch-7-4 branch without any code 
workarounds.

3) I've been seeing lots of segfaulting and coredumps

Process 2803 (mapserv.fcgi) of user 48 dumped core.#012#012Stack trace of 
thread 2803:#012#0  0x7f348d2a28df raise (libc.so.6)#012#1  
0x7f348d28ccf5 abort (libc.so.6)#012#2  0x7f348d2e5c17 __libc_message 
(libc.so.6)#012#3  0x7f348d2ec53c malloc_printerr (libc.so.6)#012#4  
0x7f348d2edf2c _int_free (libc.so.6)#012#5  0x7f348f9ecdcb 
msGEOSCleanup (libmapserver.so.2)#012#6  0x7f348fad2a66 msCleanup 
(libmapserver.so.2)#012#7  0x00401213 msCleanupOnSignal 
(mapserv.fcgi)#012#8  0x7f348d2a2960 __restore_rt (libc.so.6)#012#9  
0x7f348730c0c9 _gfortrani_free_format_hash_table (libgfortran.so.4)#012#10 
0x7f3487318d72 close_unit_1 (libgfortran.so.4)#012#11 0x7f3487318e02 
_gfortrani_close_units (libgfortran.so.4)#012#12 0x7f348fee80e6 _dl_fini 
(ld-linux-x86-64.so.2)#012#13 0x7f348d2a506c __run_exit_handlers 
(libc.so.6)#012#14 0x7f348d2a51a0 exit (libc.so.6)#012#15 
0x00401782 main (mapserv.fcgi)#012#16 0x7f348d28e873 
__libc_start_main (libc.so.6)#012#17 0x0040111e _start (mapserv.fcgi)

4) It appears like Travis CI testing is all against proj 6.1.1, maybe I should 
revert to that? :)

thanks
daryl


--
/**
 * daryl herzmann
 * Systems Analyst III -- Iowa Environmental Mesonet
 * https://mesonet.agron.iastate.edu
 */
___
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 Johannes Paul
Thanks for the trick Jeff, unfortunatelly i still get a 8-bits png and
obviously uint16 is not a valid mapserver imagemode...
Johannes

Le mer. 5 févr. 2020 à 16:52, Jeff McKenna 
a écrit :

> Hi Johannes,
>
> I just wanted to mention that what I always test OUTPUTFORMAT with is
> through the shp2img commandline utility, with the "-i" switch, such as:
>
>shp2img -m test.map -o ttt.png -i PNG16 -all_debug 5
>
> PS. in the future MapServer v8.0 I hope to help change that utility name
> to "map2img", so it makes more sense.
>
>
> -jeff
>
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> https://gatewaygeomatics.com/
>
>
>
>
> On 2020-02-05 6:02 a.m., Johannes Paul wrote:
> > 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
___
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 Jeff McKenna

Hi Johannes,

I just wanted to mention that what I always test OUTPUTFORMAT with is 
through the shp2img commandline utility, with the "-i" switch, such as:


  shp2img -m test.map -o ttt.png -i PNG16 -all_debug 5

PS. in the future MapServer v8.0 I hope to help change that utility name 
to "map2img", so it makes more sense.



-jeff



--
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/




On 2020-02-05 6:02 a.m., Johannes Paul wrote:

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 Eichner, Andreas - SID
Hi Jukka,

you're damn right. Missed that he uses the GDAL-driver. Seems to be exactly as 
you say. For IMAGEMODE INT16 MapServer maps it to GDT_Int16 
(https://github.com/mapserver/mapserver/blob/master/mapgdal.c#L234). But GDAL's 
PNG-driver checks for GDT_UInt16 
(https://github.com/OSGeo/gdal/blob/master/gdal/frmts/png/pngdataset.cpp#L1477) 
and maps everything else to bitdepth=8

-Ursprüngliche Nachricht-
Von: Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi] 
Gesendet: Mittwoch, 5. Februar 2020 14:57
An: Eichner, Andreas - SID; Johannes Paul
Cc: mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] OUTPUTFORMAT png 16-bits

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,

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 Eichner, Andreas - SID
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 Johannes Paul
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) <
jukka.rahko...@maanmittauslaitos.fi> 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

[mapserver-users] OUTPUTFORMAT png 16-bits

2020-02-05 Thread Johannes Paul
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