[mapserver-users] styling point shapefile for wms

2017-04-13 Thread jmorgan3

Hello,

I am attempting to set up a basic MapServer environment and finding 
myself such at what I think is a styling through WMS issue. I am finding 
if I call up a WMS via the following URL I get the expected results



http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=/ms4w/apps/wq/wq.map=wq_stations=map

However, if I call the same WMS using

http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=/ms4w/apps/wq/wq.map=WMS=/ms4w/apps/wq/wq.map=WMS=1.3.0=GetMap=wq_stations=EPSG:4326=-87.6,30.00,-87.26,31.00==600=600=image/png
I get a blank page. Perhaps in the first URL I am not actually using 
WMS, but I am thinking the issue is more to do with how I setup or 
incorrectly my STYLE. Here is my map file for reference:


#
# Start of map file
#
MAP
NAME WQ
STATUS ON
SIZE 600 600
EXTENT -87.6 30.00 -87.26 31.00
#EXTENT -87.60 28.67 -82.65 31.07 # [minx] [miny] [maxx] [maxy]
IMAGETYPE PNG
CONFIG "MS_ERRORFILE" "/ms4w/tmp/ms_error.txt"
DEBUG 5
PROJECTION
"init=epsg:4326"
END
WEB
# change the next two lines to match your setup
IMAGEPATH "C:/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
WMS_TITLE "WQ Demo"
WMS_ABSTRACT "This is WQ Demo"
WMS_ENABLE_REQUEST "*"
WMS_ACCESSCONSTRAINTS "none"
# change this value to match your setup
WMS_ONLINERESOURCE 
"http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=/ms4w/apps/wq/wq.map;

WMS_SRS "EPSG:4326"
END
END
#Circle symbol
#Ref: 
http://osgeo-org.1560.x6.nabble.com/Can-t-draw-points-from-shapefile-td5070300.html

SYMBOL
NAME 'CIRCLE'
TYPE ellipse
FILLED true
POINTS
  1 1
END
END
#
# Start of layer definitions
#
LAYER
NAME "wq_stations"
DATA 'data/ewqma_stations4326.shp'
STATUS ON
TYPE POINT
CLASS
STYLE
SYMBOL 'CIRCLE'
COLOR   255 1 1
END
END # CLASS
END # LAYER
END # LAYER
END # Map File

Any pointers on what I am doing or interpreting incorrectly would be 
greatly appreciated.


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

Re: [mapserver-users] Σχετ: CONGIG MS_ERRORFILE ownership

2017-04-13 Thread Stephen Woodbridge

On 4/13/2017 2:54 PM, Stefanos Anastasiou wrote:

Hello Stephen,
Thank you.!!  I works. I thought that the errofile is created every 
time you run the app.


Regarding Python Mapscript: we put the script in DocumentRoot and run it 
the browser like http://localhost/script.py ??


You probably need to put it in cgi-bin directory and then access it via
http://localhost/cgi-bin/script.py

-Steve

Στις 9:27 μ.μ. Πέμπτη, 13 Απριλίου 2017, ο/η Stephen Woodbridge 
 έγραψε:



On 4/13/2017 1:26 PM, Stefanos Anastasiou wrote:

 > Hello list,
 >I noticed that when I set the  CONFIG "MS_ERRORFILE"
 > "/home/stefanos/mapdata/log_file.log"  it is saved with ownership to
 > www-data for both user and group. Well this seems to cause problem for
 > Python mapscript (at least at my machine with Python version 2.7 -
 > Python 3 is not able to import mapscript at all).  I'm using Spyder as
 > an environment and it gives me the following message
 >
 > MapServerError: msSetErrorFile(): General error message. Failed to open
 > MS_ERRORFILE /home/stefanos/mapdata/log_file.log
 >
 > mapserv -v
 >
 > MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ
 > SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV
 > SUPPORTS=XMP 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
 >
 > Is there any way to solve this issue ?


Create the file before you use and make if group writable and group
owned by www-data

sudo rm /home/stefanos/mapdata/log_file.log
touch /home/stefanos/mapdata/log_file.log
chmod 664 /home/stefanos/mapdata/log_file.log
sudo chgrp www-data /home/stefanos/mapdata/log_file.log

-Steve W

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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





---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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

Re: [mapserver-users] Mapserver 7.0.4 Join 1:M ouput in GML

2017-04-13 Thread pe_lord
I did'nt succed to overide the gml native template from Mapserver.

Despite, I succeded in combining my join into a GEOJSON.
The real problem to increment [shpxy] with correct option to format
coordinates correctly. With my tries, i've seen that the trimlast option do
not work properly.

Here how look my templates

Main template 

// mapserver template
{
   "type":"FeatureCollection",
   "crs":{
  "type":"name",
  "properties":{
 "name":"urn:ogc:def:crs:EPSG::3857"
  }
   },

   "features":[
  {
 "type":"Feature",
 "properties":{
 "ID":"[ID]",
 [join_NAMEOFTHEJOIN]
 "Total":"[total]"# NEED to add something 
after the
1:M Join to manage my last , from my join content. 
 },
 "geometry":{
"type":"Polygon",
"coordinates":[
[shpext
format="[[$minx,$miny],[$maxx,$miny],[$maxx,$maxy],[$minx,$maxy],[$minx,$miny]]"]
]
 }
  }

   ]
}

=
1:M template join
=
//Mapserver Template

   
   
"field1_[NAMEOFTHEJOIN_FIELD1]":"[NAMEOFTHEJOIN_FIELD1]",  # I ADD
NAMEOFTHEJOIN_FIELD1] after field1 or field2 because JSON dont manage
identical keys.
   
"field2_[NAMEOFTHEJOIN_FIELD1]":"[NAMEOFTHEJOIN_FIELD1]",


   








--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Mapserver-7-0-4-Join-1-M-ouput-in-GML-tp5316702p5317266.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] CONGIG MS_ERRORFILE ownership

2017-04-13 Thread Stephen Woodbridge

On 4/13/2017 1:26 PM, Stefanos Anastasiou wrote:

Hello list,
I noticed that when I set the   CONFIG "MS_ERRORFILE" 
"/home/stefanos/mapdata/log_file.log"   it is saved with ownership to 
www-data for both user and group. Well this seems to cause problem for 
Python mapscript (at least at my machine with Python version 2.7 - 
Python 3 is not able to import mapscript at all).  I'm using Spyder as 
an environment and it gives me the following message


MapServerError: msSetErrorFile(): General error message. Failed to open 
MS_ERRORFILE /home/stefanos/mapdata/log_file.log


mapserv -v

MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV 
SUPPORTS=XMP 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


Is there any way to solve this issue ?


Create the file before you use and make if group writable and group 
owned by www-data


sudo rm /home/stefanos/mapdata/log_file.log
touch /home/stefanos/mapdata/log_file.log
chmod 664 /home/stefanos/mapdata/log_file.log
sudo chgrp www-data /home/stefanos/mapdata/log_file.log

-Steve W

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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

[mapserver-users] CONGIG MS_ERRORFILE ownership

2017-04-13 Thread Stefanos Anastasiou
Hello list,   I noticed that when I set the   CONFIG "MS_ERRORFILE" 
"/home/stefanos/mapdata/log_file.log"   it is saved with ownership to www-data 
for both user and group. Well this seems to cause problem for Python mapscript 
(at least at my machine with Python version 2.7 - Python 3 is not able to 
import mapscript at all).  I'm using Spyder as an environment and it gives me 
the following message 
MapServerError: msSetErrorFile(): General error message. Failed to open 
MS_ERRORFILE /home/stefanos/mapdata/log_file.log
mapserv -v 
MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=XMP 
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
Is there any way to solve this issue ? 






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

Re: [mapserver-users] geotiff 48bit with mapserver 7 wms

2017-04-13 Thread David

Hi Steve,

thank you very much for your help. The Mapserver is serving the tiles 
with the correct RGB values now. The problem is, that it is serving 8 
bit per band and not 16 bit.
I need the 16bit because i want to use the wms as a base layer for some 
further processing with qgis or another gis client. So no problem 
regarding browsers for me.


I will take a look and change the data type to float32 for the tiff 
files. At least this is an supported OUTPUTFORMAT for mapserver.

Any suggestions on this matter are highly appreciated.

Cheers,
David

-- Original Message --
From: mapserver-users-requ...@lists.osgeo.org
To: mapserver-users@lists.osgeo.org
Sent: 4/12/2017 4:00:02 PM
Subject: mapserver-users Digest, Vol 111, Issue 5


Send mapserver-users mailing list submissions to
 mapserver-users@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
 https://lists.osgeo.org/mailman/listinfo/mapserver-users
or, via email, send a message with subject or body 'help' to
 mapserver-users-requ...@lists.osgeo.org

You can reach the person managing the list at
 mapserver-users-ow...@lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of mapserver-users digest..."


Today's Topics:

   1. geotiff 48bit with mapserver 7 wms (David)
   2. Re: geotiff 48bit with mapserver 7 wms (Stephen Woodbridge)


--

Message: 1
Date: Wed, 12 Apr 2017 00:22:12 +
From: David 
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] geotiff 48bit with mapserver 7 wms
Message-ID: 
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Hi there,

iam having some trouble to serve 48 bit geotiff images with a mapserver
7 wms. I created to layers for speed purposes with scale limiters. The
lowres layer is served well and looks good, it is 24bit geotiff
data(8bit per channel). But if the layer changes to the highres, 48bit
geotiff data(16bit per channel), the data is shown wrong.
I searched for some hints regarding a similar issue but could not find
something.

This is a screenshot of the loaded highres layer. It does not matter if
i load a bbox inside the browser, qgis or another wms client. The
highres data looks always the same.

image loaded from highres layer:
http://imgur.com/a/B65cp

the mapfile:
https://pastebin.com/4G2DZErZ

the gdalinfo for one 16bit 3-band tile:
https://pastebin.com/kfS0BjmE

Best Regards,
David
-- next part --
An HTML attachment was scrubbed...
URL: 



--

Message: 2
Date: Tue, 11 Apr 2017 21:25:01 -0400
From: Stephen Woodbridge 
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] geotiff 48bit with mapserver 7 wms
Message-ID: 
Content-Type: text/plain; charset=utf-8; format=flowed

Read this:
http://mapserver.org/input/raster.html

You need to add to your highres layer

PROCESSING "SCALE=AUTO"

Or per band scaling. I done thing most browsers know what to do with 16
bits per channel.

-Steve W

On 4/11/2017 8:22 PM, David wrote:

 Hi there,

 iam having some trouble to serve 48 bit geotiff images with a 
mapserver
 7 wms. I created to layers for speed purposes with scale limiters. 
The

 lowres layer is served well and looks good, it is 24bit geotiff
 data(8bit per channel). But if the layer changes to the highres, 
48bit

 geotiff data(16bit per channel), the data is shown wrong.
 I searched for some hints regarding a similar issue but could not 
find

 something.

 This is a screenshot of the loaded highres layer. It does not matter 
if

 i load a bbox inside the browser, qgis or another wms client. The
 highres data looks always the same.

 image loaded from highres layer:
 http://imgur.com/a/B65cp

 the mapfile:
 https://pastebin.com/4G2DZErZ

 the gdalinfo for one 16bit 3-band tile:
 https://pastebin.com/kfS0BjmE

 Best Regards,
 David


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




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



--

Subject: Digest Footer

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

--

End of mapserver-users Digest, Vol 111, Issue 5
***

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

[mapserver-users] Mapcache 1.6.0 release

2017-04-13 Thread thomas bonfort
The latest release [1] of MapCache is out.

Major features of this 1.6 release include:

- advanced (multi)dimension support
- support for exponential backoff/retry on cache and source errors
- support for external credential providers for GCP/S3 caches
- support for GDAL sources (with reprojection)
- support for direct access to optimized TIF files on REST/GCP caches.
- fallback support for failing wms sources


The migration_guide.txt file included in the archive contains migration
information required on the config file for users making use of dimension
support.

[1] http://download.osgeo.org/mapserver/mapcache-1.6.0.tar.gz

Best regards,
The MapServer Team
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users