Re: [mapserver-users] Mapserver + WMS

2021-10-11 Thread Carl Godkin
Hi Jeff,

Thank you very much for the detailed response.  When I run the commands you
provided, everything matches and the output GeoTIFF file definitely has the
type "Type=Int16."

I was originally asking why I didn't see that type when querying the server
with the sub-datasets returned by this command

> gdalinfo "WMS:http://localhost:8080//elev;

but I'm probably just coloring outside the lines of what WMS is meant to
support.

I think that the next thing I will do is use WCS for this instead.  I
confess that I went with WMS since I'm more familiar with it.  I expected a
single-band 16-bit "image" to act like a 2D grid which is what happens when
I import "BIL" files or other single-band images.

Thanks for stepping me through this and pointing me at WCS.

carl


On Mon, Oct 11, 2021 at 11:35 AM Jeff McKenna 
wrote:

> Hi Carl,
>
> First, welcome to the MapServer community!
>
> Thanks for the detailed question, and pointing to the source data, this
> always helps to give a proper answer.
>
> You've done well and are very close.  Here are some points to consider:
>
> - the OGC specification for serving raw raster data is actually WCS
> (which MapServer does well, see https://mapserver.org/ogc/wcs_server.html
> )
>
> - but you're right that a cool trick is to use the (more) popular WMS
> specification and set an OUTPUTFORMAT in your server's mapfile, to
> generate a GeoTIFF through a WMS GetMap request.
>
> - I see that you've already setup an OUTPUTFORMAT such as:
>
> OUTPUTFORMAT
>NAME "GEOTIFF_16"
>DRIVER "GDAL/GTiff"
>MIMETYPE "image/tiff"
>IMAGEMODE INT16
>EXTENSION "tif"
> END
>
> - now the trick is to call that specific outputformat.  I recommend
> always testing this at the commandline first, with shp2img (which will
> be renamed to 'map2img' shortly, for the MapServer 8.0 release).  It
> takes a mapfile and generates an output (or gives exact error).
>
> - since you are using MS4W, just open a CMD window and cd into /ms4w.
> Then execute 'setenv.bat' to set necessary paths.  Then, in that same
> windows, cd to where your mapfile is, and execute the following (notice
> the "-i" switch, which requests the named outputformat set in the mapfile)
> :
>
>shp2img -m local.map -o ttt16.tif -map_debug 3 -i GEOTIFF_16
>
> - that command should return a draw speed for each layer, and generate
> your 16-bit GeoTIFF.  And look closely at that response, the first words
> will be something like:
>
> rendering using outputformat named GEOTIFF_16 (GDAL/GTiff)
>
> Great! That's what we want.
>
> - once you're satisfied, now we can turn to WMS requests.  But always
> first start with removing any "WARNING" messages in your GetCapabilities
> request, and then also verifying that the  section of that
> response includes a listed "image/tiff" format option.  (example
> GetCapabilities request) :
>
>
>
> http://127.0.0.1/cgi-bin/mapserv.exe?map=/ms4w/apps/ticket-wms-gebco-outputformat/local.map=WMS=1.3.0=GetCapabilities
>
> - once you're happy with the GetCapabilities response, then you can try
> a GetMap request, that includes "=image/tiff"
>
>
>
>
> http://127.0.0.1/cgi-bin/mapserv.exe?map=/ms4w/apps/ticket-wms-gebco-outputformat/local.map=WMS=1.3.0=GetMap=-90,-180,90,180=EPSG:4326=346=173=gebco==image/tiff=96_RESOLUTION=96_OPTIONS=dpi:96=TRUE
>
> - or you can stay right there at your commandline, and make that GetMap
> request there with the "mapserv -nh QUERY_STRING="" trick, and pipe that
> to a new image file, such as:
>
>mapserv -nh
> QUERY_STRING="map=/ms4w/apps/ticket-wms-gebco-outputformat/local.map=WMS=1.3.0=GetMap=-90,-180,90,180=EPSG:4326=346=173=gebco==image/tiff=96_RESOLUTION=96_OPTIONS=dpi:96=TRUE"
>
>  > getmap.tif
>
> Hope that helps.
>
> Also thanks for the positive feedback on MS4W, its goal is to serve big
> data fast for organizations, on enterprise Windows servers, and it
> sounds like it has met your needs well.  Look for a big MS4W release soon
> ;)
>
> And a happy (Canadian) Thanksgiving holiday to you.
>
> -jeff
>
>
>
> --
> Jeff McKenna
> GatewayGeo: Developers of MS4W, MapServer Consulting and Training
> co-founder of FOSS4G
> http://gatewaygeo.com/
>
>
>
> On 2021-10-07 8:12 p.m., Carl Godkin wrote:
> > Hi,
> >
> > I'm new to mapserver but fairly experienced with GDAL.  I hope that
> > someone can explain where I've gone wrong with setting up WMS.
> >
> > I followed the instructions here
> > [https://worldwind.earth/elevation-server.html
> > ] almost exactly to set
> > up a WMS server and it sort of works.  (I am using MS4W actually, so I
> > didn't install Apache & Mapserver as that page described and of course I
> > made a few other adaptations for Windows.)
> >
> > I downloaded the GEBCO tiles from here
> > [https://www.gebco.net/data_and_products/gridded_bathymetry_data/
> > ]
> > without any problems.
> >
> > What I don't understand is that 

Re: [mapserver-users] Mapserver + WMS

2021-10-11 Thread Jeff McKenna

Hi Carl,

Also, as you travel down this path, please aim to adding your upcoming 
elevation WMS service into the MapServer Site Gallery : 
https://github.com/MapServer/MapServer/wiki/MapServer-Site-Gallery


This really helps new users see the powers of MapServer.

Thanks!

-jeff



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


On 2021-10-11 3:35 p.m., Jeff McKenna wrote:

Hi Carl,

First, welcome to the MapServer community!

Thanks for the detailed question, and pointing to the source data, this 
always helps to give a proper answer.


You've done well and are very close.  Here are some points to consider:

- the OGC specification for serving raw raster data is actually WCS 
(which MapServer does well, see https://mapserver.org/ogc/wcs_server.html )


- but you're right that a cool trick is to use the (more) popular WMS 
specification and set an OUTPUTFORMAT in your server's mapfile, to 
generate a GeoTIFF through a WMS GetMap request.


- I see that you've already setup an OUTPUTFORMAT such as:

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

- now the trick is to call that specific outputformat.  I recommend 
always testing this at the commandline first, with shp2img (which will 
be renamed to 'map2img' shortly, for the MapServer 8.0 release).  It 
takes a mapfile and generates an output (or gives exact error).


- since you are using MS4W, just open a CMD window and cd into /ms4w. 
Then execute 'setenv.bat' to set necessary paths.  Then, in that same 
windows, cd to where your mapfile is, and execute the following (notice 
the "-i" switch, which requests the named outputformat set in the 
mapfile) :


   shp2img -m local.map -o ttt16.tif -map_debug 3 -i GEOTIFF_16

- that command should return a draw speed for each layer, and generate 
your 16-bit GeoTIFF.  And look closely at that response, the first words 
will be something like:


    rendering using outputformat named GEOTIFF_16 (GDAL/GTiff)

Great! That's what we want.

- once you're satisfied, now we can turn to WMS requests.  But always 
first start with removing any "WARNING" messages in your GetCapabilities 
request, and then also verifying that the  section of that 
response includes a listed "image/tiff" format option.  (example 
GetCapabilities request) :



http://127.0.0.1/cgi-bin/mapserv.exe?map=/ms4w/apps/ticket-wms-gebco-outputformat/local.map=WMS=1.3.0=GetCapabilities 



- once you're happy with the GetCapabilities response, then you can try 
a GetMap request, that includes "=image/tiff"




http://127.0.0.1/cgi-bin/mapserv.exe?map=/ms4w/apps/ticket-wms-gebco-outputformat/local.map=WMS=1.3.0=GetMap=-90,-180,90,180=EPSG:4326=346=173=gebco==image/tiff=96_RESOLUTION=96_OPTIONS=dpi:96=TRUE 



- or you can stay right there at your commandline, and make that GetMap 
request there with the "mapserv -nh QUERY_STRING="" trick, and pipe that 
to a new image file, such as:


   mapserv -nh 
QUERY_STRING="map=/ms4w/apps/ticket-wms-gebco-outputformat/local.map=WMS=1.3.0=GetMap=-90,-180,90,180=EPSG:4326=346=173=gebco==image/tiff=96_RESOLUTION=96_OPTIONS=dpi:96=TRUE" 
 > getmap.tif


Hope that helps.

Also thanks for the positive feedback on MS4W, its goal is to serve big 
data fast for organizations, on enterprise Windows servers, and it 
sounds like it has met your needs well.  Look for a big MS4W release 
soon ;)


And a happy (Canadian) Thanksgiving holiday to you.

-jeff





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


Re: [mapserver-users] Mapserver + WMS

2021-10-11 Thread Jeff McKenna

Hi Carl,

First, welcome to the MapServer community!

Thanks for the detailed question, and pointing to the source data, this 
always helps to give a proper answer.


You've done well and are very close.  Here are some points to consider:

- the OGC specification for serving raw raster data is actually WCS 
(which MapServer does well, see https://mapserver.org/ogc/wcs_server.html )


- but you're right that a cool trick is to use the (more) popular WMS 
specification and set an OUTPUTFORMAT in your server's mapfile, to 
generate a GeoTIFF through a WMS GetMap request.


- I see that you've already setup an OUTPUTFORMAT such as:

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

- now the trick is to call that specific outputformat.  I recommend 
always testing this at the commandline first, with shp2img (which will 
be renamed to 'map2img' shortly, for the MapServer 8.0 release).  It 
takes a mapfile and generates an output (or gives exact error).


- since you are using MS4W, just open a CMD window and cd into /ms4w. 
Then execute 'setenv.bat' to set necessary paths.  Then, in that same 
windows, cd to where your mapfile is, and execute the following (notice 
the "-i" switch, which requests the named outputformat set in the mapfile) :


  shp2img -m local.map -o ttt16.tif -map_debug 3 -i GEOTIFF_16

- that command should return a draw speed for each layer, and generate 
your 16-bit GeoTIFF.  And look closely at that response, the first words 
will be something like:


   rendering using outputformat named GEOTIFF_16 (GDAL/GTiff)

Great! That's what we want.

- once you're satisfied, now we can turn to WMS requests.  But always 
first start with removing any "WARNING" messages in your GetCapabilities 
request, and then also verifying that the  section of that 
response includes a listed "image/tiff" format option.  (example 
GetCapabilities request) :



http://127.0.0.1/cgi-bin/mapserv.exe?map=/ms4w/apps/ticket-wms-gebco-outputformat/local.map=WMS=1.3.0=GetCapabilities

- once you're happy with the GetCapabilities response, then you can try 
a GetMap request, that includes "=image/tiff"




http://127.0.0.1/cgi-bin/mapserv.exe?map=/ms4w/apps/ticket-wms-gebco-outputformat/local.map=WMS=1.3.0=GetMap=-90,-180,90,180=EPSG:4326=346=173=gebco==image/tiff=96_RESOLUTION=96_OPTIONS=dpi:96=TRUE

- or you can stay right there at your commandline, and make that GetMap 
request there with the "mapserv -nh QUERY_STRING="" trick, and pipe that 
to a new image file, such as:


  mapserv -nh 
QUERY_STRING="map=/ms4w/apps/ticket-wms-gebco-outputformat/local.map=WMS=1.3.0=GetMap=-90,-180,90,180=EPSG:4326=346=173=gebco==image/tiff=96_RESOLUTION=96_OPTIONS=dpi:96=TRUE" 
> getmap.tif


Hope that helps.

Also thanks for the positive feedback on MS4W, its goal is to serve big 
data fast for organizations, on enterprise Windows servers, and it 
sounds like it has met your needs well.  Look for a big MS4W release soon ;)


And a happy (Canadian) Thanksgiving holiday to you.

-jeff



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



On 2021-10-07 8:12 p.m., Carl Godkin wrote:

Hi,

I'm new to mapserver but fairly experienced with GDAL.  I hope that 
someone can explain where I've gone wrong with setting up WMS.


I followed the instructions here 
[https://worldwind.earth/elevation-server.html 
] almost exactly to set 
up a WMS server and it sort of works.  (I am using MS4W actually, so I 
didn't install Apache & Mapserver as that page described and of course I 
made a few other adaptations for Windows.)


I downloaded the GEBCO tiles from here 
[https://www.gebco.net/data_and_products/gridded_bathymetry_data/ 
] 
without any problems.


What I don't understand is that while the GEBCO GeoTIFF files that I am 
using have one band that gdalinfo describes as


  Band 1 Block=512x512 Type=Int16, ColorInterp=Gray

when I look at the WMS bands using gdalinfo, I see three byte-sized bands:

Band 1 Block=1024x1024 Type=Byte, ColorInterp=Red
Band 2 Block=1024x1024 Type=Byte, ColorInterp=Green
Band 3 Block=1024x1024 Type=Byte, ColorInterp=Blue

I'd really like to get 16-bit integer elevations from my WMS server but 
I don't know why this didn't just happen or how I mis-configured things 
to make it not happen.


I know these are not complete details, but rather than write a novel for 
my first post here, I'm hoping someone can suggest where the problem 
might be or suggest some further documentation to read.


Thanks very much,
carl




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


[mapserver-users] Xml support in Mapserver v8

2021-10-11 Thread aim...@mail.com
Hi

I maintain my maps in xml, converting to map files utilising xsltproc.

1. will there be an xsltproc in v8?
2. will there be an updated xsd file for v8?
3  if 1 & 2 are yes, is it possible to get an early release of the xsd file?

Thanks

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


Re: [mapserver-users] (no subject)

2021-10-11 Thread Yoann CHARIEAU
Did you check permissions on your /tmp/mapcache directory ?
It should be writeable by your http server user (usually www-data).

Yoann

- Mail original -
De: "Steve Lime" 
À: "Atlanta Geek" 
Cc: "mapserver-users" 
Envoyé: Jeudi 7 Octobre 2021 14:57:13
Objet: Re: [mapserver-users] (no subject)

I've not used a similar setup but it seems like there's no need to create tiles 
if you're passing WMS calls through to another WMS server. Do you get tiles if 
you make tiled service requests? 

On Tue, Oct 5, 2021 at 1:52 PM Atlanta Geek < [ mailto:atlantag...@gmail.com | 
atlantag...@gmail.com ] > wrote: 



Im attempting to configure mapcache. 
I assume that this is covered in this mailing list as well. Mapcache is 
returning images of the map for me but the cache files are not being written. 
Its strange because I can use the seeding command with the same xml file and 
its populating the expected directory but when I go through the mapcache script 
its not writing to that cache directory. 

Any guidance would be appreciated. 

The URL Im testing with is this. 
[ 
http://192.168.112.225/mapcache?service=WMS=GetMap=default==image%2Fpng=true=1.1.1=2048=2048=EPSG%3A3857=-10018754.171394622,0,0,10018754.171394628
 | 
http://192.168.112.225/mapcache?service=WMS=GetMap=default==image%2Fpng=true=1.1.1=2048=2048=EPSG%3A3857=-10018754.171394622,0,0,10018754.171394628
 ] 



mapcache.xml is as follows: 
 
 
/tmp/mapcache 
 
 
 
fast 
256 
 
 
 
 
image/jpeg 
default 
/usr/lib/cgi-bin/osm-bw.map 
true 
 
 
 
 [ http://192.168.112.225/cgi-bin/mapserv | 
http://192.168.112.225/cgi-bin/mapserv ] ? 
 
 
 
vmap0 
disk 
WGS84 
g 
png 
3600 
 
png 

 
png 
assemble 
bilinear 
4096 
 
 
 [ 
http://192.168.112.225/cgi-bin/mapserv?transparent=true=/usr/lib/cgi-bin/osm-bw.map
 | 
http://192.168.112.225/cgi-bin/mapserv?transparent=true=/usr/lib/cgi-bin/osm-bw.map
 ]  
 
 
 
 
 
 
 
 
 
report 
/tmp 
debug 
 
-- 
[ http://www.atlantageek.com/ | http://www.atlantageek.com ] 
___ 
MapServer-users mailing list 
[ mailto:MapServer-users@lists.osgeo.org | MapServer-users@lists.osgeo.org ] 
[ https://lists.osgeo.org/mailman/listinfo/mapserver-users | 
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