Re: [mapserver-users] WMS MapServer

2016-05-31 Thread Rahkonen Jukka (MML)
Hi,


Usually blank images without error mean that there are no data within the BBOX. 
Check the coverage of your data and that you have projections right.


It would be very interesting to know afterwards all the steps you have followed 
with your Mapserver setup. I believe that you have spent considerable much time 
with it and that means that the Mapserver documentation may not be good enough.


You wrote once that you had problems with path

E:\rcis\web\MapServerDlls\uildselease-1800-x64inprojSHARE\proj_def.dat. Does 
it mean that you have built Mapserver by yourself on Windows?

 -Jukka Rahkonen-


Vogt, Robert wrote:

Good afternoon all,

Still working on getting MapServer up and running...

I am getting blank tiles back with a status of 200 in chrome.
I enabled DEBUG 4 in my .map file and designated an "MS_ERRORFILE", when I 
request the page an error test document is created...
However it is blank...does this mean there were no error's?

If so what is a reasonable next step to take to debug blank tiles?

-BobV


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

Re: [mapserver-users] Mapserver - connection to MSSQL

2016-05-31 Thread Robert Sanson
Hi Tamas

That was it. I inserted the appropriate values into geometry_columns and 
spatial_ref_sys.

All working now.

Many thanks,

Robert

From: Tamas Szekeres [mailto:szeker...@gmail.com]
Sent: Wednesday, 1 June 2016 9:23 a.m.
To: Robert Sanson 
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Mapserver - connection to MSSQL

Probably the referred table is not enumerated in the geometry_columns metadata 
table of the database.

Best regards,

Tamas


2016-05-31 23:04 GMT+02:00 Robert Sanson 
>:
Hi Tamas

Thanks for that. I tried that but now the response is:


http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;>


msDrawMap(): Image handling error. Failed to draw layer named 
par_direct.
msOGRFileNextShape(): OGR error. Error initializing the metadata tables :



Any way I can get around this issue?

Robert

From: Tamas Szekeres [mailto:szeker...@gmail.com]
Sent: Wednesday, 1 June 2016 6:36 a.m.
To: Robert Sanson 
>
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Mapserver - connection to MSSQL

Robert,

It looks like the port number portion in the connection string causes the 
issue, specifically the comma is not being interpreted correctly by the parser. 
I guess this is similar to an earlier issue reported to gdal: 
https://trac.osgeo.org/gdal/ticket/4885

That time quoting the connection string provided a workaround as far as I 
remember.

Best regards,

Tamas


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

Re: [mapserver-users] WMS MapServer

2016-05-31 Thread Lime, Steve D (MNIT)
First thing I’d check is layer status. What are the STATUS values for your 
layers? One easy thing to do is set STATUS DEFAULT for the layers in question.

Steve

From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Vogt, Robert (RCIS)
Sent: Tuesday, May 31, 2016 4:11 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] WMS MapServer

Good afternoon all,

Still working on getting MapServer up and running…

I am getting blank tiles back with a status of 200 in chrome.
I enabled DEBUG 4 in my .map file and designated an "MS_ERRORFILE", when I 
request the page an error test document is created…
However it is blank…does this mean there were no error’s?

If so what is a reasonable next step to take to debug blank tiles?

-BobV


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

Re: [mapserver-users] Mapserver - connection to MSSQL

2016-05-31 Thread Tamas Szekeres
Probably the referred table is not enumerated in the geometry_columns
metadata table of the database.

Best regards,

Tamas


2016-05-31 23:04 GMT+02:00 Robert Sanson :

> Hi Tamas
>
>
>
> Thanks for that. I tried that but now the response is:
>
>
>
> 
>
>  http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;>
>
> 
>
> 
>
> msDrawMap(): Image handling error. Failed to draw layer named
> par_direct.
>
> msOGRFileNextShape(): OGR error. Error initializing the metadata tables :
>
> 
>
> 
>
>
>
> Any way I can get around this issue?
>
>
>
> Robert
>
>
>
> *From:* Tamas Szekeres [mailto:szeker...@gmail.com]
> *Sent:* Wednesday, 1 June 2016 6:36 a.m.
> *To:* Robert Sanson 
> *Cc:* mapserver-users@lists.osgeo.org
> *Subject:* Re: [mapserver-users] Mapserver - connection to MSSQL
>
>
>
> Robert,
>
>
>
> It looks like the port number portion in the connection string causes the
> issue, specifically the comma is not being interpreted correctly by the
> parser. I guess this is similar to an earlier issue reported to gdal:
> https://trac.osgeo.org/gdal/ticket/4885
>
>
>
> That time quoting the connection string provided a workaround as far as I
> remember.
>
>
>
> Best regards,
>
>
>
> Tamas
>
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] WMS MapServer

2016-05-31 Thread Vogt, Robert (RCIS)
Good afternoon all,

Still working on getting MapServer up and running…

I am getting blank tiles back with a status of 200 in chrome.
I enabled DEBUG 4 in my .map file and designated an "MS_ERRORFILE", when I 
request the page an error test document is created…
However it is blank…does this mean there were no error’s?

If so what is a reasonable next step to take to debug blank tiles?

-BobV


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

Re: [mapserver-users] Mapserver - connection to MSSQL

2016-05-31 Thread Robert Sanson
Hi Tamas

Thanks for that. I tried that but now the response is:


http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;>


msDrawMap(): Image handling error. Failed to draw layer named 
par_direct.
msOGRFileNextShape(): OGR error. Error initializing the metadata tables :



Any way I can get around this issue?

Robert

From: Tamas Szekeres [mailto:szeker...@gmail.com]
Sent: Wednesday, 1 June 2016 6:36 a.m.
To: Robert Sanson 
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Mapserver - connection to MSSQL

Robert,

It looks like the port number portion in the connection string causes the 
issue, specifically the comma is not being interpreted correctly by the parser. 
I guess this is similar to an earlier issue reported to gdal: 
https://trac.osgeo.org/gdal/ticket/4885

That time quoting the connection string provided a workaround as far as I 
remember.

Best regards,

Tamas

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

Re: [mapserver-users] Mapserver - connection to MSSQL

2016-05-31 Thread Tamas Szekeres
Robert,

It looks like the port number portion in the connection string causes the
issue, specifically the comma is not being interpreted correctly by the
parser. I guess this is similar to an earlier issue reported to gdal:
https://trac.osgeo.org/gdal/ticket/4885

That time quoting the connection string provided a workaround as far as I
remember.

Best regards,

Tamas





2016-05-12 22:44 GMT+02:00 Robert Sanson :

> Hi
>
>
>
> I manually retyped the connection string into my Mapfile and still get the
> same error. The exact same connection string works fine in ogrinfo, the
> only error message is something about OGC Metadata table missing, however,
> it proceeds to give me the correct information.
>
>
>
> Thanks,
>
>
> Robert
>
> *From:* Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi]
> *Sent:* Wednesday, 11 May 2016 7:28 p.m.
> *To:* geograph...@gmail.com; Robert Sanson ;
> mapserver-users@lists.osgeo.org
> *Subject:* Re: [mapserver-users] Mapserver - connection to MSSQL
>
> Hi,
>
> The connection string in the mapfile does look perfect but something that
> happens for me is that if I copy and paste text the copy may  contain
> invisible characters which make troubles. I would rewrite the CONNECTION
> again by hand from keyboard and try if it helps.
>
> -Jukka Rahkonen-
>
> Seth G wrote:
>
> Hi,
>
> The error message indicates there is a problem with your connection string:
>
> 'MSSQL:driver=FreeTDS;server=db-agribase-p.asurequality.com' does not
> contain the 'database' portion
>
> If the database part is not missing, maybe there is a missing semi-colon,
> or special character ending the database connection string?
>
> Regards,
>
> Seth
>
> On 10/05/2016 23:54, Robert Sanson wrote:
>
> Hi
>
>
>
> I am trying to create a Mapserver (v 6.4.1 on Ubuntu) layer based on a
> MSSQL table with native geometry.
>
>
>
> I have tested the connection via ogrinfo (based on gdal v 2.0.2) and it
> works:
>
>
>
> ogrinfo -sql "select * from par_table where par_no = 6777887"
> "MSSQL:driver=FreeTDS;server=myserver,1433;uid=xx;pwd=xxx;database=mydb;trusted_connection=no;tables=par_table(geom)"
>
>
>
> This is my layer section:
>
>
>
> LAYER
>
>   NAME par_direct
>
>   GROUP "CRS"
>
>   STATUS ON
>
>   CONNECTIONTYPE ogr
>
>   CONNECTION
> "MSSQL:driver=FreeTDS;server=myserver,1433;uid=xx;pwd=xxx;database=mydb;trusted_connection=no;tables=par_table(geom)"
>
>   FILTER "WHERE date_dropped is null"
>
>   TYPE POLYGON
>
>   PROCESSING 'CLOSE_CONNECTION=DEFER'
>
>   MAXSCALE 275000
>
>   CLASS
>
> STYLE
>
>   WIDTH 0.25
>
>   OUTLINECOLOR 0 0 255
>
> END
>
>   END
>
>   METADATA
>
> "ows_title" "par_direct"
>
> "wms_group_title" "CRS"
>
> "wms_exceptions_format" "application/vnd.ogc.se_xml"
>
> "wms_abstract""This is the LINZ parcel layer in NZTM"
>
> "wms_keywordlist""LINZ,CRS"
>
> "wms_extent" "1114412.940 4793178.168 2089186.204 6190213.601"
>
>   END
>
> END
>
>
>
> When I try a WMS getmap call I get this error message:
>
>
>
> 
>
>  "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;
> >
>
> 
>
> 
>
> msDrawMap(): Image handling error. Failed to draw layer named
> par_direct.
>
> msOGRFileOpen(): OGR error. Open failed for OGR connection in layer
> `par_direct.
>
> MSSQL:driver=FreeTDS;server=db-agribase-p.asurequality.com does
> not contain the database portion
>
> 
>
> 
>
>
>
>
>
> Many thanks,
>
>
>
> Robert L. Sanson
>
>
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] CGI Tilemode blank on one layer

2016-05-31 Thread Lime, Steve D (MNIT)
Since you have no scale dependencies or anything like that I don’t know why… 
You have some spurious layer definitions (no need for TILEITEM or UNITS) but I 
don’t think that’s the problem. The most obvious cause would be that you’re 
viewing an area where there is ocean but no Kenya. What happens if you request 
both layers in the same tile?
  
http://localhost/cgi-bin/mapserv?MAP=/var/wpsinput/gdss.map=10m_ocean=kenyaoutline=tile=${x}+${y}+${z}.png
Steve

From: Daniel Mwaurah [mailto:mwau...@gmail.com]
Sent: Wednesday, December 23, 2015 4:30 PM
To: Lime, Steve D (MNIT) 
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] CGI Tilemode blank on one layer

Thats true Steve,

Its actually rendering in the non tiled setting. I wonder how come its one 
layer not rendering in tilemode while the other one is. Both render ok in non 
tile setting.



On Wed, Dec 23, 2015 at 10:29 PM, Lime, Steve D (MNIT) 
> wrote:
It will look at the extent of shapefiles to decide if it needs to process 
features in a layer but that’s to be expected. I mean, if there’s nothing to 
draw then why bother. Have you verified that the layers render in a non-tiled 
setting?

From: Daniel Mwaurah [mailto:mwau...@gmail.com]
Sent: Wednesday, December 23, 2015 3:26 PM
To: Lime, Steve D (MNIT) >
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] CGI Tilemode blank on one layer

Thank you Steve for your response.

I have tried commenting out the extents but still the same problem. I think it 
recognizes the inbuilt extents of the data layers.

On Wed, Dec 23, 2015 at 9:36 PM, Lime, Steve D (MNIT) 
> wrote:
What happens if you comment out the layer extents? They really shouldn’t be 
necessary.

From: mapserver-users 
[mailto:mapserver-users-boun...@lists.osgeo.org]
 On Behalf Of Daniel Mwaurah
Sent: Wednesday, December 23, 2015 2:27 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] CGI Tilemode blank on one layer

hallo people,

I would greatly appreciate some help with Mapserver Tile mode. Eeven a hint in 
the right direction would be much appreciated. I am trying to display two 
layers in Tile mode in open layers as follows


1. 
http://localhost/cgi-bin/mapserv?MAP=/var/wpsinput/gdss.map=kenyaoutline=tile=${x}+${y}+${z}.png

2. 
http://localhost/cgi-bin/mapserv?MAP=/var/wpsinput/gdss.map=10m_ocean=tile=${x}+${y}+${z}.png


The problem arises in that one layer the 10m_ocean displays while the other one 
just shows a blank. I suspect it has to do with the extents because the 
10m_ocean layers has a large extent from -180 to 180 while the kenyaoutline 
layer only covers one country from about 33 to 37 degrees.

Is there a limitation to small extents in tile mode? or what could be the 
problem. My mapfile is as below.


MAP
  #FONTSET "[fontsetpath]"
DEBUG 5
  CONFIG "MS_ERRORFILE" "/var/www/wpsinput/ms_error.txt"
  EXTENT 33 -5 42 6
  IMAGETYPE "png"
  NAME "Natural_Earth_quick_start_for_QGIS"
  SIZE 600 600
  CONFIG ON_MISSING_DATA "LOG"
  STATUS ON
  UNITS DD

  OUTPUTFORMAT
NAME "png"
MIMETYPE "image/png"
DRIVER "AGG/PNG"
EXTENSION "png"
IMAGEMODE RGBA
TRANSPARENT TRUE
  END # OUTPUTFORMAT

  PROJECTION
"proj=longlat"
"datum=WGS84"
"no_defs"
  END # PROJECTION
  LEGEND
KEYSIZE 20 10
KEYSPACING 5 5
LABEL
  SIZE MEDIUM
  OFFSET 0 0
  SHADOWSIZE 1 1
  TYPE BITMAP
END # LABEL
STATUS OFF
  END # LEGEND

  QUERYMAP
SIZE -1 -1
STATUS OFF
STYLE HILITE
  END # QUERYMAP

  SCALEBAR
INTERVALS 4
LABEL
  SIZE MEDIUM
  OFFSET 0 0
  SHADOWSIZE 1 1
  TYPE BITMAP
END # LABEL
SIZE 200 3
STATUS OFF
UNITS MILES
  END # SCALEBAR

  WEB
FOOTER ""
HEADER ""
TEMPPATH ""
METADATA
  "ows_onlineresource"
"http://localhost/cgi-bin/mapserv?map=/home/wpsinput/worldmap.map;
  "ows_enable_request"   "*"
  "ows_srs"  "EPSG:4326"
  "ows_title" "Natural_Earth_quick_start_for_QGIS"
END # METADATA
#TEMPLATE "[templatepath]"
  END # WEB

  LAYER
DATA "/var/www/10m_physical/10m_ocean.shp"
EXTENT 33 -5 42 6
METADATA
  "ows_title" "10m_ocean"
END # METADATA
NAME "10m_ocean"
PROJECTION
  "proj=longlat"
  "datum=WGS84"
  "no_defs"
END # PROJECTION

Re: [mapserver-users] WFS - featureid/resourceid

2016-05-31 Thread Ian Walberg
That did not seem to make any difference, can you tell from here what output 
types should work?

http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map=WFS=2.0.0=GetCapabilities

Thanks

Ian


From: TC Haddad [mailto:tchad...@gmail.com]
Sent: Saturday, May 7, 2016 12:46 PM
To: Ian Walberg 
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] WFS - featureid/resourceid


Try adding GML as a format option to see if you are able to get a result that 
way:

"wfs_getfeature_formatlist" "gml,geojson"


On Sat, May 7, 2016 at 12:43 PM, Ian Walberg 
> wrote:
Yes we see the same and that was my reason for asking.

Thanks
Ian

From: TC Haddad [mailto:tchad...@gmail.com]
Sent: Saturday, May 7, 2016 12:39 PM
To: Ian Walberg >

Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] WFS - featureid/resourceid


Well it looks like your map file settings are fine, and a correctly formatted 
URL would be:

http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map=WFS=2.0.0=GetFeature_ID=urn:ogc:def:query:OGC-WFS::GetFeatureById=DATA_TEST.1
However the resulting error message indicates that something may else may be 
amiss:

msQueryByFilter(): Search returned no results. No matching record(s) found.
LayerDefaultTranslateFilter(): General error message. This data driver does not 
implement filter translation support

On Sat, May 7, 2016 at 12:29 PM, Ian Walberg 
> wrote:
And also in the WEB section


  METADATA
"wfs_title"  "WFS Test"
"wfs_onlineresource" "http://127.0.0.1/cgi-bin/mapserv?;
"wfs_srs""EPSG:4326"
"wfs_abstract"   "WFS Test"
"wfs_enable_request" "*"
"wfs_getfeature_formatlist" "geojson"

Ian

From: mapserver-users 
[mailto:mapserver-users-boun...@lists.osgeo.org]
 On Behalf Of Ian Walberg
Sent: Saturday, May 7, 2016 12:27 PM
To: TC Haddad >
Cc: mapserver-users@lists.osgeo.org

Subject: Re: [mapserver-users] WFS - featureid/resourceid

Here is what we have in the map file layer, what have we missed?

METADATA
"wfs_srs" "EPSG:4326"
"wfs_title" "DATA_POI"
"gml_featureid" "id"
"gml_include_items" "all"
"wfs_enable_request" "*"
"wfs_encoding" "UTF-8"
"wfs_abstract" "Points"
"wfs_getfeature_formatlist" "geojson"
END
Thanks

Ian

From: TC Haddad [mailto:tchad...@gmail.com]
Sent: Saturday, May 7, 2016 12:12 PM
To: Ian Walberg >
Cc: Rahkonen Jukka (MML) 
>;
 mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] WFS - featureid/resourceid


Ian

you may have to enable the GetFeatureById option in your mapfile as at the 
moment it looks like you have it turned off.
Put something like this in the LAYER block to enable all WFS requests:

"wfs_enable_request" "*"
From there you can begin to test with:

http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map=WFS=2.0.0=GetFeatureById
And the server will tell you what other parameters you need to add to the URL 
in order to successfully return a record.

On Sat, May 7, 2016 at 11:44 AM, Ian Walberg 
> wrote:
Jukka,

We could not get that to work, what is the syntax for our setup?

Thanks

Ian

From: Rahkonen Jukka (MML) 
[mailto:jukka.rahko...@maanmittauslaitos.fi]
Sent: Saturday, May 7, 2016 10:54 AM
To: Ian Walberg >; 
mapserver-users@lists.osgeo.org
Subject: VS: [mapserver-users] WFS - featureid/resourceid

I would try the GetFeatureById stored query 
http://mapserver.org/ogc/wfs_server.html

Jukka Rahkonen

Lähettäjä: Ian Walberg
Lähetetty: ‎7.‎5.‎2016 20:47
Vastaanottaja: 
mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] WFS - featureid/resourceid
Folks,

How do we select just a single feature using FEATUREID or RESOUCEID.

http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map=WFS=2.0.0=GetFeature=DATA_TEST

Thanks

Ian

Re: [mapserver-users] Mapserver - connection to MSSQL

2016-05-31 Thread Robert Sanson
Hi

I retyped the connection string into my Mapfile and I still get the same error.

The exact same connection string works fine via ogrinfo on the command line:

ogrinfo -sql "select * from par_table where par_no = 6777887" 
"MSSQL:driver=FreeTDS;server=myserver,1433;uid=xx;pwd=xxx;database=mydb;trusted_connection=no;tables=par_table(geom)"

The only error message is:

ERROR 1: Error initializing the metadata tables

However, it then proceeds to give me the answer correctly.

INFO: Open of 
`MSSQL:driver=FreeTDS;server=myserver,1433;uid=xx;pwd=xxx;database=mydb;trusted_connection=no;tables=par_table(geom)'
  using driver `MSSQLSpatial' successful.

Layer name: SELECT
Geometry: Unknown (any)
Feature Count: 1
Layer SRS WKT:
PROJCS["NZGD2000 / New Zealand Transverse Mercator 2000",
GEOGCS["NZGD2000",
DATUM["New_Zealand_Geodetic_Datum_2000",
SPHEROID["GRS 1980",6378137,298.257222101,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6167"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4167"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",173],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",160],
PARAMETER["false_northing",1000],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","2193"]]

etc.

Regards,

Robert

From: Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi]
Sent: Wednesday, 11 May 2016 7:28 p.m.
To: geograph...@gmail.com; Robert Sanson ; 
mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Mapserver - connection to MSSQL

Hi,

The connection string in the mapfile does look perfect but something that 
happens for me is that if I copy and paste text the copy may  contain invisible 
characters which make troubles. I would rewrite the CONNECTION again by hand 
from keyboard and try if it helps.

-Jukka Rahkonen-

Seth G wrote:

Hi,

The error message indicates there is a problem with your connection string:

'MSSQL:driver=FreeTDS;server=db-agribase-p.asurequality.com' does not contain 
the 'database' portion

If the database part is not missing, maybe there is a missing semi-colon, or 
special character ending the database connection string?

Regards,

Seth

On 10/05/2016 23:54, Robert Sanson wrote:
Hi

I am trying to create a Mapserver (v 6.4.1 on Ubuntu) layer based on a MSSQL 
table with native geometry.

I have tested the connection via ogrinfo (based on gdal v 2.0.2) and it works:

ogrinfo -sql "select * from par_table where par_no = 6777887" 
"MSSQL:driver=FreeTDS;server=myserver,1433;uid=xx;pwd=xxx;database=mydb;trusted_connection=no;tables=par_table(geom)"

This is my layer section:

LAYER
  NAME par_direct
  GROUP "CRS"
  STATUS ON
  CONNECTIONTYPE ogr
  CONNECTION 
"MSSQL:driver=FreeTDS;server=myserver,1433;uid=xx;pwd=xxx;database=mydb;trusted_connection=no;tables=par_table(geom)"
  FILTER "WHERE date_dropped is null"
  TYPE POLYGON
  PROCESSING 'CLOSE_CONNECTION=DEFER'
  MAXSCALE 275000
  CLASS
STYLE
  WIDTH 0.25
  OUTLINECOLOR 0 0 255
END
  END
  METADATA
"ows_title" "par_direct"
"wms_group_title" "CRS"
"wms_exceptions_format" "application/vnd.ogc.se_xml"
"wms_abstract""This is the LINZ parcel layer in NZTM"
"wms_keywordlist""LINZ,CRS"
"wms_extent" "1114412.940 4793178.168 2089186.204 6190213.601"
"gml_include_items" "all"
"gml_exclude_items" ""
"ows_include_items" "all"
"ows_exclude_items" ""
  END
END

When I try a WMS getmap call I get this error message:


http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;>


msDrawMap(): Image handling error. Failed to draw layer named 
par_direct.
msOGRFileOpen(): OGR error. Open failed for OGR connection in layer 
`par_direct.
MSSQL:driver=FreeTDS;server=db-agribase-p.asurequality.com does not 
contain the database portion



Any clues?

Many thanks,

Robert L. Sanson



___

mapserver-users mailing list

mapserver-users@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ?

2016-05-31 Thread karsten
 
Hi All,
 
thanks to all the responses. It was neither one of ( cgi-bin permissions for 
Apache nor the Script alias) Both where in line with what everyone said/ 
listed. The issue was that I did not have the cgi module for Apache enabled :(
I enabled it with 
a2enmod cgi
service apache2 restart
and then everything worked for mapserver, perl script etc. 
 
I did only find out because I places a simple Perl script in cgi-bin that also 
was downloaded instead of executed .
Thanks for the answers they brought me on the right track !
 
Cheers
Karsten

  _  

From: Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi] 
Sent: Tuesday, April 05, 2016 0:17
To: kars...@terragis.net; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 
on ubuntu 14.04 - but NO - gives binary output ?



Hi,

 

I believe that there is something wrong with the configuration of your http 
server. It does not seem to know that you do not want to download the mapserv 
binary but make the binary to work for you. If you run Apache I would have a 
look at “ScriptAlias” in the httpd.conf file and check that the directory where 
you have placed the mapserv binary is configured to contain applications. This 
example is from Windows.

 

# ScriptAlias: This controls which directories contain server scripts. 

# ScriptAliases are essentially the same as Aliases, except that

# documents in the target directory are treated as applications and

# run by the server when requested rather than as documents sent to the

# client.  The same rules about trailing "/" apply to ScriptAlias

# directives as to Alias.

#

ScriptAlias /cgi-bin/ "/ms4w/Apache/cgi-bin/"

ScriptAlias /fcgi-bin/ "/ms4w/Apache/cgi-bin/"

 

-Jukka Rahkonen-

 

karsten wrote:



 

Hi All,

 

I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04 and can 
getv the follwoing output  from the executable:

/usr/lib/cgi-bin# ./mapserv -v
MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

Howvere when I try to get a get aresponse to a request e.g. 
136.243.250.62/cgi-bin/mapserv

or aslo when I try a getcapabiliteis request like

http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map
 

 =1.1.1=getCapabilities=wms

I always get a 'binary file back' output like below the line . Would anybody 
know what could have gone wrong or where to start figuring this out ?

 

Cheers

Karsten

 

Karsten Vennemann
Terra GIS LTD

.binary output below? -

ELF  >ð
@ @   P"  @ 8   @ ‑@   @ @ @ @ ø  ø 
  8  8@ 8@      @ 
  @   ð  ð` ð`   (
‑  ‑` ‑` ð  ð   T  T@ T@ D  
 D  Påtd   È  È@ È@ <   <  Qåtd 
 Råtd   ð  ð` ð`
/lib64/ld-linux-x86-64.so.2  GNU   GNU 
O ~a¢; ¼k*BUÍš~6›   ‑ €!
ˆ @‑   "   *   j CÖºã’|(ŒCEÕìjš|2bÛíØqX8ò‹ÚÍ㞸ñ

:—
­KãÀêÓï
âž Ñ”óµ         
Ï      š      e        
   m     /   Â    
   –     Y     l    
  ¥      å      > 
  `     9     û      
£     Ý      ª      
R   t     /   
       y     ’      bè 
` Ï!` ˆ     !`¼ø ` ·  
 
 $@   h   
 ð
@ Ãø `     !`o   
 @@ e   y   
@ d è ` ‘    À@\   
 ´@ R   
 °@   
 Ý@ Glibmapserver.so.2 _ITM_deregisterTMCloneTable __gmon_start__ 
_Jv_RegisterClasses _ITM_registerTMCloneTable msIO_installHandlers 
msFreeMapServObj msDebug loadParams msCGIWriteError msIO_fprintf msGetVersion 
msCGIWriteLog msSetup msGetGlobalDebugLevel msCGIDispatchRequest msCGILoadMap 

Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 on ubuntu 14.04 - but NO - gives binary output ?

2016-05-31 Thread karsten
Hi,
 
Thanks for our response. I don't think that is the issue because the apparent 
'download' of the mapserv executable is only because browsers in this case do 
not 'understand' the mine type of the response . Regularly the response is just 
a text file but apparently a 'download' of mapserv... I fact you can usually 
rename the downloaded mapserv and rename as a text file then read the error 
message.
I have in any  Apache configuration
 
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted


Cheers
Karsten

  _  

From: Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi] 
Sent: Tuesday, April 05, 2016 0:17
To: kars...@terragis.net; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] seemingly sucessfully compiled mapserver 7.0.1 
on ubuntu 14.04 - but NO - gives binary output ?



Hi,

 

I believe that there is something wrong with the configuration of your http 
server. It does not seem to know that you do not want to download the mapserv 
binary but make the binary to work for you. If you run Apache I would have a 
look at “ScriptAlias” in the httpd.conf file and check that the directory where 
you have placed the mapserv binary is configured to contain applications. This 
example is from Windows.

 

# ScriptAlias: This controls which directories contain server scripts. 

# ScriptAliases are essentially the same as Aliases, except that

# documents in the target directory are treated as applications and

# run by the server when requested rather than as documents sent to the

# client.  The same rules about trailing "/" apply to ScriptAlias

# directives as to Alias.

#

ScriptAlias /cgi-bin/ "/ms4w/Apache/cgi-bin/"

ScriptAlias /fcgi-bin/ "/ms4w/Apache/cgi-bin/"

 

-Jukka Rahkonen-

 

karsten wrote:



 

Hi All,

 

I just seemingly sucessfully compiled mapserver 7.0.1 on Ubuntu 14.04 and can 
getv the follwoing output  from the executable:

/usr/lib/cgi-bin# ./mapserv -v
MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

Howvere when I try to get a get aresponse to a request e.g. 
136.243.250.62/cgi-bin/mapserv

or aslo when I try a getcapabiliteis request like

http://136.243.250.62/cgi-bin/mapserv?map=/var/www/mapdata/ccrp/mapfiles/fingermillet2.map
 

 =1.1.1=getCapabilities=wms

I always get a 'binary file back' output like below the line . Would anybody 
know what could have gone wrong or where to start figuring this out ?

 

Cheers

Karsten

 

Karsten Vennemann
Terra GIS LTD

.binary output below? -

ELF  >ð
@ @   P"  @ 8   @ ‑@   @ @ @ @ ø  ø 
  8  8@ 8@      @ 
  @   ð  ð` ð`   (
‑  ‑` ‑` ð  ð   T  T@ T@ D  
 D  Påtd   È  È@ È@ <   <  Qåtd 
 Råtd   ð  ð` ð`
/lib64/ld-linux-x86-64.so.2  GNU   GNU 
O ~a¢; ¼k*BUÍš~6›   ‑ €!
ˆ @‑   "   *   j CÖºã’|(ŒCEÕìjš|2bÛíØqX8ò‹ÚÍ㞸ñ

:—
­KãÀêÓï
âž Ñ”óµ         
Ï      š      e        
   m     /   Â    
   –     Y     l    
  ¥      å      > 
  `     9     û      
£     Ý      ª      
R   t     /   
       y     ’      bè 
` Ï!` ˆ     !`¼ø ` ·  
 
 $@   h   
 ð
@ Ãø `     !`o   
 @@ e   y   
@ d è ` ‘    À@\   
 ´@ R   
 °@   
 Ý@ Glibmapserver.so.2 _ITM_deregisterTMCloneTable __gmon_start__ 
_Jv_RegisterClasses _ITM_registerTMCloneTable msIO_installHandlers 
msFreeMapServObj msDebug loadParams msCGIWriteError msIO_fprintf msGetVersion 

Re: [mapserver-users] Rendering of Symbols outside map window

2016-05-31 Thread deduikertjes
My pull request (https://github.com/mapserver/mapserver/pull/5199) 
implements a gutter in WMS mode.


It is rather unobtrusive and straightforward. I am using it in 
production for quit some time now.
I could not find any side effects, but I did not try in combination with 
labeling or extremely large symbols.


Maybe a nice moment to review and/ or test by Patrick?

MArco

On 17-02-16 18:01, Lime, Steve D (MNIT) wrote:


My memory is lousy I guess. Expanding the search rect used based on 
style sizes and to account for the use case Thomas mentions seems 
logical to me (more efficient), that or a gutter (probably easier). 
Needs a small RFC IMHO as I’m sure there would be side effects.


In terms of what might be done immediately in Patrick’s case.

-I wonder if using CIRCLE shapes might work. A circle must be defined 
by a minimum bounding rectangle. That is, two points that define the 
smallest square that can contain it. These two points are the two 
opposite corners of said box. Since the which shapes function operates 
on bounding boxes it should identify any of the circles that intersect 
the map extent.


-Issues like this are also handled correctly with tiling (mapcache) if 
I’m not mistaken – and you can define a metatile gutter. Maybe that 
could be used. You could set up tiling and then make arbitrary WMS 
calls against mapcache if you had to, or even just use the tiles directly.


-Go the PostGIS route as suggested by Ambrogio…

Steve

*From:*deduikertjes [mailto:deduikert...@xs4all.nl]
*Sent:* Tuesday, February 16, 2016 1:44 AM
*To:* thomas bonfort ; Lime, Steve D (MNIT) 

*Cc:* Patrick Meis ; 
mapserver-users@lists.osgeo.org

*Subject:* Re: [mapserver-users] Rendering of Symbols outside map window


>>>That's something we may want to fix.

If I remember correctly, Mapserver in  tile mode draws a slightly 
larger tile and crops that one (something configurable with GUTTER or 
so). I wrote my the code in my pull request along the same principle.
Adjusting the query extent when doing whichshapes() and account for 
the size of symbols when adjusting  the clipping rectangle once the 
feature is obtained might be more efficient?


But maybe this discussion shoud be done in mapserver-dev?

MArco

On 15-02-16 21:23, thomas bonfort wrote:

Steve,

IIRC, we account for the size of symbols when adjusting our
clipping rectangle once we have obtained a feature, but we do not
adjust the query extent when doing whichshapes(). That's something
we may want to fix.

Another use-case would also be when the DATA statement does
something like "ST_Buffer(the_geom,...) as the geom"

--

thomas

On 15 February 2016 at 17:44, Lime, Steve D (MNIT)
> wrote:

I know. We use to account for that explicitly.



*From:*deduikertjes [deduikert...@xs4all.nl
]
*Sent:* Monday, February 15, 2016 2:44 AM
*To:* Lime, Steve D (MNIT); Patrick Meis


*Cc:* mapserver-users@lists.osgeo.org

*Subject:* Re: [mapserver-users] Rendering of Symbols outside
map window

Steve,

I think the key part in the question is here:

" and the center point of the symbol is no longer inside the
map window".

To my experience a symbol doesn't get drawn at all when the
point which is symbolized is outside the requested extent (WMS
mode at least).

To solve that I created the mentioned pull request.

Or do I miss something?

MArco


On 13-02-16 00:17, Lime, Steve D (MNIT) wrote:

This should already be happening. The drawing code
traverses a layer's class/styles to commute a selection
and clipping rectangle that is larger than the map extent.




*From:*mapserver-users
[mapserver-users-boun...@lists.osgeo.org
] on
behalf of mdprive [deduikert...@xs4all.nl
]
*Sent:* Friday, February 12, 2016 4:15 PM
*To:* Patrick Meis
*Cc:* mapserver-users@lists.osgeo.org

*Subject:* Re: [mapserver-users] Rendering of Symbols
outside map window

Hi Patrick,

i've submitted a pull request for extending the map by a
buffer and then clipping it, so that partial symbols on
the edge get rendered as well (wms non tiled mode).

maybe you can build from sources and use this patch to

[mapserver-users] cascading WMS service problem: "cannot calculate extent"

2016-05-31 Thread Brent Wood
Hi,


I am working on a local OSM WMS service (provided by mapserver). I want to 
cascade this & use it within other servers/maps. And advice appreciated.


I have set up a simple mapfile to do this, but keep getting a "cannot calculate 
extent" error that I cannot explain or resolve. I think the error is from my 
service, and not the one being cascaded.


The underlying services (in different styles) can be viewed in a browser at:

http://maps.nzoss.org.nz/?mode=browse=openlayers=all=/opt/basemaps/osm-michelin.map
and
http://maps.nzoss.org.nz/?mode=browse=openlayers=all=/opt/basemaps/osm-bing.map
and
http://maps.nzoss.org.nz/?mode=browse=openlayers=all=/opt/basemaps/osm-google.map


And can be accessed directly at

http://maps.nzoss.org.nz/cgi-bin/mapserv?map=/opt/basemaps/osm-google.map

The mapfile to cascade this is below, could someone please let me know why this 
fails?



MAP
  NAME "osmnz2"
  EXTENT 12863671 -7350771 21885121 -1422127
  UNITS meters
  SIZE 1000 1000

  IMAGETYPE PNG24

  PROJECTION
"init=epsg:3857"
  END
  WEB
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
  "wms_enable_request" "*"
  "wms_title" "WMS testing"
  "wms_srs" "EPSG:3857"

  "ows_keywordlist""osm nz"
  "ows_fees"   "none"
  "ows_accessconstraints" "none"
  "ows_contactorganization" "none"
  "ows_contactperson" "for this demo service:none"
  "ows_contactposition" "none"
  "ows_contactvoicetelephone" "none"
  "ows_contactfacsimiletelephone" "none"
  "ows_address" "none"
  "ows_city""none"
  "ows_country" "none"
  "ows_role""none"
  "ows_contactinstructions" "none"
  "ows_hoursofservice" "whenever"
  "ows_contactelectronicmailaddress" "none"
END
  END

  LAYER
NAME"osmnz"
EXTENT 12863671 -7350771 21885121 -1422127
PROJECTION
  "init=epsg:3857"
END # end of object "projection"

TYPERASTER

CONNECTION  
"http://150.242.41.10/cgi-bin/mapserv?map=/opt/basemaps/osm-google.map;
CONNECTIONTYPE  WMS

STATUS  ON
DUMPFALSE
METADATA
"wms_name"  "osmnz"
"wms_format""image/jpeg"
"wms_server_version""1.0.0"
"wms_title" "osm_nz"
"wms_srs"   "epsg:3857"
"wms_extent""12863671 -7350771 21885121 -1422127"
"wms_abstract"  "NZ Open Streetmap service"
"wms_version"   "1.1.1"
"queryable" "false"
END # end of metadata object
  END # end of layer "osm_nz"

END # map






Brent Wood


Brent Wood
Principal Technician - GIS and Spatial Data Management
Programme Leader - Environmental Information Delivery
+64-4-386-0529 | 301 Evans Bay Parade, Greta Point, Wellington | 
www.niwa.co.nz
[NIWA]
To ensure compliance with legal requirements and to maintain cyber security 
standards, NIWA's IT systems are subject to ongoing monitoring, activity 
logging and auditing. This monitoring and auditing service may be provided by 
third parties. Such third parties can access information transmitted to, 
processed by and stored on NIWA's IT systems.



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

Re: [mapserver-users] CGI Tilemode blank on one layer

2016-05-31 Thread Lime, Steve D (MNIT)
It will look at the extent of shapefiles to decide if it needs to process 
features in a layer but that’s to be expected. I mean, if there’s nothing to 
draw then why bother. Have you verified that the layers render in a non-tiled 
setting?

From: Daniel Mwaurah [mailto:mwau...@gmail.com]
Sent: Wednesday, December 23, 2015 3:26 PM
To: Lime, Steve D (MNIT) 
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] CGI Tilemode blank on one layer

Thank you Steve for your response.

I have tried commenting out the extents but still the same problem. I think it 
recognizes the inbuilt extents of the data layers.

On Wed, Dec 23, 2015 at 9:36 PM, Lime, Steve D (MNIT) 
> wrote:
What happens if you comment out the layer extents? They really shouldn’t be 
necessary.

From: mapserver-users 
[mailto:mapserver-users-boun...@lists.osgeo.org]
 On Behalf Of Daniel Mwaurah
Sent: Wednesday, December 23, 2015 2:27 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] CGI Tilemode blank on one layer

hallo people,

I would greatly appreciate some help with Mapserver Tile mode. Eeven a hint in 
the right direction would be much appreciated. I am trying to display two 
layers in Tile mode in open layers as follows


1. 
http://localhost/cgi-bin/mapserv?MAP=/var/wpsinput/gdss.map=kenyaoutline=tile=${x}+${y}+${z}.png

2. 
http://localhost/cgi-bin/mapserv?MAP=/var/wpsinput/gdss.map=10m_ocean=tile=${x}+${y}+${z}.png


The problem arises in that one layer the 10m_ocean displays while the other one 
just shows a blank. I suspect it has to do with the extents because the 
10m_ocean layers has a large extent from -180 to 180 while the kenyaoutline 
layer only covers one country from about 33 to 37 degrees.

Is there a limitation to small extents in tile mode? or what could be the 
problem. My mapfile is as below.


MAP
  #FONTSET "[fontsetpath]"
DEBUG 5
  CONFIG "MS_ERRORFILE" "/var/www/wpsinput/ms_error.txt"
  EXTENT 33 -5 42 6
  IMAGETYPE "png"
  NAME "Natural_Earth_quick_start_for_QGIS"
  SIZE 600 600
  CONFIG ON_MISSING_DATA "LOG"
  STATUS ON
  UNITS DD

  OUTPUTFORMAT
NAME "png"
MIMETYPE "image/png"
DRIVER "AGG/PNG"
EXTENSION "png"
IMAGEMODE RGBA
TRANSPARENT TRUE
  END # OUTPUTFORMAT

  PROJECTION
"proj=longlat"
"datum=WGS84"
"no_defs"
  END # PROJECTION
  LEGEND
KEYSIZE 20 10
KEYSPACING 5 5
LABEL
  SIZE MEDIUM
  OFFSET 0 0
  SHADOWSIZE 1 1
  TYPE BITMAP
END # LABEL
STATUS OFF
  END # LEGEND

  QUERYMAP
SIZE -1 -1
STATUS OFF
STYLE HILITE
  END # QUERYMAP

  SCALEBAR
INTERVALS 4
LABEL
  SIZE MEDIUM
  OFFSET 0 0
  SHADOWSIZE 1 1
  TYPE BITMAP
END # LABEL
SIZE 200 3
STATUS OFF
UNITS MILES
  END # SCALEBAR

  WEB
FOOTER ""
HEADER ""
TEMPPATH ""
METADATA
  "ows_onlineresource"
"http://localhost/cgi-bin/mapserv?map=/home/wpsinput/worldmap.map;
  "ows_enable_request"   "*"
  "ows_srs"  "EPSG:4326"
  "ows_title" "Natural_Earth_quick_start_for_QGIS"
END # METADATA
#TEMPLATE "[templatepath]"
  END # WEB

  LAYER
DATA "/var/www/10m_physical/10m_ocean.shp"
EXTENT 33 -5 42 6
METADATA
  "ows_title" "10m_ocean"
END # METADATA
NAME "10m_ocean"
PROJECTION
  "proj=longlat"
  "datum=WGS84"
  "no_defs"
END # PROJECTION
STATUS ON
TILEITEM "location"
TYPE POLYGON
UNITS METERS
CLASS
  NAME "Single symbol"
  STYLE
COLOR 198 226 242
  END # STYLE
END # CLASS
  END # LAYER


LAYER
DATA "/var/www/kenyaoutline/Kenyaoutline.shp"
EXTENT 33 -5 42 6
METADATA
  "ows_title" "Kenyaoutline"
END # METADATA
NAME "Kenyaoutline"
PROJECTION
  "proj=longlat"
  "datum=WGS84"
  "no_defs"
END # PROJECTION
STATUS ON
TILEITEM "location"
TYPE POLYGON
UNITS METERS
CLASS
  NAME "Single symbol"
  STYLE
COLOR 0 0 0
  END # STYLE
END # CLASS
  END # LAYER

END # MAP



The same happens when i try to view it using QGIS Tilelayer plugin.


--
Kind regards,

Mwaura Daniel



--
Kind regards,

Mwaura Daniel
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] WMS cascading and Mapcache

2016-05-31 Thread milad nidal
Thanks for answer..
 I did a cache with mapcache (on Linux). The first image is with mapserver
6.4 (on windows) and the second for the sames layers with mapserver 7 (on
linux).

One can see the outline of the white area in some places..

Thanks


On Tue, Dec 1, 2015 at 4:06 AM, thomas bonfort 
wrote:

> On 1 December 2015 at 02:49, milad nidal  wrote:
> > We get something like an outline of cascading WMS and this happened only
> > when we do a cache
>
> Can you explicit what you mean by this ?
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] create wms service with mapserver

2016-05-31 Thread Rahkonen Jukka (MML)
Hi,

I do understand what you want to do  with GetCapabilities. What I tried to ask 
is why there is different path to the mapfile it the two requests:
map=c://ms4w/apps/webgis/wms.map
map=c://ms4w/apps/webgis/mp/wms.map

Is it just a typo, have you changed the location of  the mapfile, do you have 
two mapfiles in different places?

-Jukka-


rishi wrote:

"http://localhost:8085/cgi-bin/mapserv.exe?map=c://ms4w/apps/webgis/wms.map=WMS=GetCapabilities"
 i am trying to display xml format using this url

http://localhost:8085/cgi-bin/mapserv.exe?mode=map=c://ms4w/apps/webgis/mp/wms.map
 this url displays map

On Mon, Nov 23, 2015 at 5:02 PM, Rahkonen Jukka (MML) 
>
 wrote:
There is nothing that is obviously wrong in your mapfile. Some suggestions:

-  Add debug 5 into your layer

-  Try to get a map with shp2img

-  Convert data from PostGIS into shapefile and use that as source data.


It seems that you have changed something in between because first you wrote “in 
the browser when i paste the url 
"http://localhost/cgi-bin/mapserv.exe?map=c://ms4w/apps/webgis/wms.map=WMS=GetCapabilities;

Now you write that this is the URL
(http://localhost:8085/cgi-bin/mapserv.exe?mode=map=c://ms4w/apps/webgis/mp/wms.map),



-Jukka Rahkonen-

Lähettäjä: rishi [mailto:rish...@gmail.com]
Lähetetty: 23. marraskuuta 2015 13:10
Vastaanottaja: Rahkonen Jukka (MML)
Aihe: Re: [mapserver-users] create wms service with mapserver

When i tried to open that mapserv.exe file it is displaying as "the file or 
directory is corrupted or unreadable".

if i open the same file as mode=map 
(http://localhost:8085/cgi-bin/mapserv.exe?mode=map=c://ms4w/apps/webgis/mp/wms.map),
 it is displaying the map

On Mon, Nov 23, 2015 at 4:34 PM, Rahkonen Jukka (MML) 
>
 wrote:
MS4W is ready for WMS but please tell us first what do you see when you opened 
the mapserv.exe file with a text editor.

-Jukka Rahkonen-

rishi wrote:

do i need to install anything related to wms in ms4w folder?

MapServer version 5.2.1

On Mon, Nov 23, 2015 at 3:52 PM, Rahkonen Jukka (MML) 
>
 wrote:
I guess that something went wrong but saving mapserv.exe into file and reading 
it with text editor is the right thing to do. Jörg and Jeff should have noticed 
that the GetCapabilities request was made without  which means the 
highest version 1.3.0 for Mapserver and then the normal GetCapabilities 
document will be sent with mime type that most browsers understand. Try it:
http://demo.mapserver.org/cgi-bin/wms?SERVICE=WMS=GetCapabilities

I may be wrong but I would rather believe that mapserv.exe contains an error 
message about unknown projection epsg:900913. Use epsg:3857 instead.  And I 
prefer using an explicit parameter = always instead of relying on what 
version comes from the lottery when version in not defined in the query.

-Jukka Rahkonen-




Jörg Thomsen wrote:

Hi,

nothing went wrong. The problem under windows is, that apache(?) names the 
capabilities-document mapserv.exe. Save it, open it in an editor and see your 
capabilities!

Perhaps anyone reading this can tell us how to configure the 
windows-instrallation, so that the capabilities-doc is not named .exe? I don't 
know.

Jörg



Am 23.11.2015 um 10:30 schrieb rishi:

i am trying to create wms service using postgres data in mapserver my map 
file(wms.map) is

MAP EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947 
TRANSPARENT on IMAGETYPE png size 150 500

web

metadata

"wms_title" "Customer Airports" "wms_onlineresource" 
"http://localhost:8085/cgi-bin/mapserv.exe?; "wms_enable_request" "*" "wms_srs" 
"EPSG:4326 EPSG:900913" "wms_feature_info_mime_type" "text/html" "wms_format" 
"image/png"

end

end

LAYER CONNECTIONTYPE postgis
CONNECTION "user=postgres password=abcd dbname=sample port=5432 host=localhost" 
DATA "geom FROM district_old using unique gid"

STATUS Default

TYPE polygon





PROJECTION

  "init=epsg:900913"

END







labelitem 'district'



class

style



#color 55 230 51

outlinecolor 90 90 90

width 2

end

LABEL

#color 255 255 255

size 2

BACKGROUNDCOLOR 255 201 14

position auto

END

end

END

END

in the browser when i paste the url 
"http://localhost/cgi-bin/mapserv.exe?map=c://ms4w/apps/webgis/wms.map=WMS=GetCapabilities;

it is not displaying the xml file instead it is downloading the mapserv.exe file

please correct my code also tell me the requirements to work with wms


___

mapserver-users mailing list


Re: [mapserver-users] Label formatting on GRID

2016-05-31 Thread thomas bonfort
There is no such support that I know of in mapserver.
Your first use-case could be implemented by extending the grid labelling
function to get it's text from a mapserver expression, and extending the
expression syntax to include integer division and modulo operators.
Your second use-case is more involved and would require multiple label
blocks along with the aforementioned enhancements.

Both cases are not trivial and would require funding.

regards,
thomas

On 13 October 2015 at 05:59, Matt McClelland  wrote:

> Hi All
>
> I am wanting to truncate (simplify) the grid numbering to match the grid
> reference users would use in the field.
>
> Looking at the top right (of the attached example) I would like
> 236000 to just display as 36 and
> 6263000 to just display as 63
>
> In a perfect world I would love it to display like this
> a subscript (little) 2 followed by standard 36 =  236  and
> a subscript (little) 62 followed by standard 63 =  6263
>
> Any suggestions ??
>
> Thanks :)
>
> The attache map I generated using mapserver 7.0
> The Grid map file is
> LAYER
>   GROUP "default"
>   NAME "grid"
>   METADATA
> "DESCRIPTION" "Grid"
>   END
>   TYPE LINE
>   STATUS ON
>   CLASS
> NAME "Graticule"
> COLOR 100 100 100
> LABEL
>   COLOR  255 0 0
>   FONT sc
>   TYPE truetype
>   SIZE 8
>   POSITION AUTO
>   PARTIALS FALSE
>   FORCE TRUE
>   BUFFER -10
>   OUTLINECOLOR 255 255 255
> END
>   END
>   PROJECTION
> "init=epsg:28356"
>   END
>   GRID
> LABELFORMAT '%.0f'
> MININTERVAL 1000
>   END
> END # Layer
>
> Matt :)[image: Inline image 1]
> 
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] create wms service with mapserver

2016-05-31 Thread Rahkonen Jukka (MML)
There is nothing that is obviously wrong in your mapfile. Some suggestions:

-  Add debug 5 into your layer

-  Try to get a map with shp2img

-  Convert data from PostGIS into shapefile and use that as source data.


It seems that you have changed something in between because first you wrote “in 
the browser when i paste the url 
"http://localhost/cgi-bin/mapserv.exe?map=c://ms4w/apps/webgis/wms.map=WMS=GetCapabilities;

Now you write that this is the URL
(http://localhost:8085/cgi-bin/mapserv.exe?mode=map=c://ms4w/apps/webgis/mp/wms.map),



-Jukka Rahkonen-

Lähettäjä: rishi [mailto:rish...@gmail.com]
Lähetetty: 23. marraskuuta 2015 13:10
Vastaanottaja: Rahkonen Jukka (MML)
Aihe: Re: [mapserver-users] create wms service with mapserver

When i tried to open that mapserv.exe file it is displaying as "the file or 
directory is corrupted or unreadable".

if i open the same file as mode=map 
(http://localhost:8085/cgi-bin/mapserv.exe?mode=map=c://ms4w/apps/webgis/mp/wms.map),
 it is displaying the map

On Mon, Nov 23, 2015 at 4:34 PM, Rahkonen Jukka (MML) 
>
 wrote:
MS4W is ready for WMS but please tell us first what do you see when you opened 
the mapserv.exe file with a text editor.

-Jukka Rahkonen-

rishi wrote:

do i need to install anything related to wms in ms4w folder?

MapServer version 5.2.1

On Mon, Nov 23, 2015 at 3:52 PM, Rahkonen Jukka (MML) 
>
 wrote:
I guess that something went wrong but saving mapserv.exe into file and reading 
it with text editor is the right thing to do. Jörg and Jeff should have noticed 
that the GetCapabilities request was made without  which means the 
highest version 1.3.0 for Mapserver and then the normal GetCapabilities 
document will be sent with mime type that most browsers understand. Try it:
http://demo.mapserver.org/cgi-bin/wms?SERVICE=WMS=GetCapabilities

I may be wrong but I would rather believe that mapserv.exe contains an error 
message about unknown projection epsg:900913. Use epsg:3857 instead.  And I 
prefer using an explicit parameter = always instead of relying on what 
version comes from the lottery when version in not defined in the query.

-Jukka Rahkonen-




Jörg Thomsen wrote:

Hi,

nothing went wrong. The problem under windows is, that apache(?) names the 
capabilities-document mapserv.exe. Save it, open it in an editor and see your 
capabilities!

Perhaps anyone reading this can tell us how to configure the 
windows-instrallation, so that the capabilities-doc is not named .exe? I don't 
know.

Jörg



Am 23.11.2015 um 10:30 schrieb rishi:

i am trying to create wms service using postgres data in mapserver my map 
file(wms.map) is

MAP EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947 
TRANSPARENT on IMAGETYPE png size 150 500

web

metadata

"wms_title" "Customer Airports" "wms_onlineresource" 
"http://localhost:8085/cgi-bin/mapserv.exe?; "wms_enable_request" "*" "wms_srs" 
"EPSG:4326 EPSG:900913" "wms_feature_info_mime_type" "text/html" "wms_format" 
"image/png"

end

end

LAYER CONNECTIONTYPE postgis
CONNECTION "user=postgres password=abcd dbname=sample port=5432 host=localhost" 
DATA "geom FROM district_old using unique gid"

STATUS Default

TYPE polygon





PROJECTION

  "init=epsg:900913"

END







labelitem 'district'



class

style



#color 55 230 51

outlinecolor 90 90 90

width 2

end

LABEL

#color 255 255 255

size 2

BACKGROUNDCOLOR 255 201 14

position auto

END

end

END

END

in the browser when i paste the url 
"http://localhost/cgi-bin/mapserv.exe?map=c://ms4w/apps/webgis/wms.map=WMS=GetCapabilities;

it is not displaying the xml file instead it is downloading the mapserv.exe file

please correct my code also tell me the requirements to work with wms


___

mapserver-users mailing list

mapserver-users@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/mapserver-users


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


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

Re: [mapserver-users] Multiple styles in a MapServer WMS Service

2016-05-31 Thread Eichner, Andreas - SID
Hi Simon,

We had to create a CLASSGROUP for every style and on every layer:

LAYER
  CLASSGROUP 'Style1'
  CLASSGROUP 'Style2'

  CLASS
GROUP 'Style1'
STYLE
  [...]
END
  END

  CLASS
GROUP 'Style2'
STYLE
  [...]
END
  END
END

With this, they are advertised as:

  [...]
  
Style1
[...]
  
  
Style2
[...]
  


And you can request the one to use on GetMap-Requests using the STYLES 
parameter.

HTH


> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Wright, Simon M.
> Gesendet: Dienstag, 31. Mai 2016 14:37
> An: mapserver-users@lists.osgeo.org
> Betreff: [mapserver-users] Multiple styles in a MapServer WMS Service
> 
> Dear All
> 
> 
> 
> I'm fairly new to MapServer and am trying to create a WMS Service.
> 
> 
> 
> I have defined two styles the following metadata section of a layer as
> follows:
> 
> 
> 
>   METADATA
> 
>  "wms_title"   "LC.LandCoverSurfaces"
> 
>  "wms_srs" "CRS:84 EPSG:4326 EPSG:27700 EPSG:4258
> EPSG:3857"
> 
>  "wms_metadataurl_type" "ISO19115:2003"
> 
>  "wms_metadataurl_format"   "text/xml"
> 
>  "wms_metadataurl_href"
> "https://catalogue.ceh.ac.uk//id/a1f88807-4826-44bc-994d-a902da5119c2?;
> 
>  "wms_style"   "default"
> 
>  "wms_style_default_legendurl_title"  ""
> 
>  "wms_style_default_legendurl_width"  "226"
> 
>  "wms_style_default_legendurl_height" "431"
> 
>  "wms_style_default_legendurl_format" "image/png"
> 
>  "wms_style_default_legendurl_href"
> "http://eidc.ceh.ac.uk/administration-folder/tools/wms/987544e0-22d8-11e4-
> 8c21-0800200c9a66/legends/LCM2007_DomTar.png"
> 
>  "wms_style"   "inspire_common:DEFAULT"
> 
>  "wms_style_inspire_common:DEFAULT_legendurl_title"
> "LC.LandCoverSurfaces Default Style"
> 
>  "wms_style_inspire_common:DEFAULT_legendurl_width"
> "226"
> 
>  "wms_style_inspire_common:DEFAULT_legendurl_height"
> "431"
> 
>  "wms_style_inspire_common:DEFAULT_legendurl_format"
> "image/png"
> 
>  "wms_style_inspire_common:DEFAULT_legendurl_href"
> "http://eidc.ceh.ac.uk/administration-folder/tools/wms/987544e0-22d8-11e4-
> 8c21-0800200c9a66/legends/LCM2007_DomTar.png"
> 
> 
> 
> But only one style is actually broadcast in the WMS GetCapabilities
> document:
> 
> 
> 
> 
> 
> LC.LandCoverSurfaces
> 
> LC.LandCoverSurfaces
> 
> CRS:84
> 
> EPSG:4326
> 
> EPSG:27700
> 
> EPSG:4258
> 
> EPSG:3857
> 
> 
> 
> -9.49714
> 
> 3.63202
> 
> 49.7668
> 
> 61.581
> 
> 
> 
>  maxy="61.581"/>
> 
>  maxy="3.63202"/>
> 
>  maxy="1.3e+06"/>
> 
>  maxy="3.63202"/>
> 
>  maxx="404315" maxy="8.76046e+06"/>
> 
> 
> 
> text/xml
> 
> http://www.w3.org/1999/xlink;
> xlink:type="simple" xlink:href="https://catalogue.ceh.ac.uk//id/a1f88807-
> 4826-44bc-994d-a902da5119c2?"/>
> 
> 
> 
> 
> 
> inspire_common:DEFAULT
> 
> inspire_common:DEFAULT
> 
> 
> 
> image/png
> 
> http://www.w3.org/1999/xlink";
> xlink:type="simple" xlink:href="http://eidc.ceh.ac.uk/administration-
> folder/tools/wms/987544e0-22d8-11e4-8c21-
> 0800200c9a66/legends/LCM2007_DomTar.png"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> It appears that the last defined style is the one that makes it through to
> the GetCapabilities file.
> 
> 
> 
> 
> 
> 
> 
> Therefore, am I specifying my styles incorrectly in the .map file?
> 
> 
> 
> Is it possible to define multiple styles for the GetCapabilities document?
> 
> 
> 
> Or, is this a bug in MapServer 6.4.2?  And if so, should I use a later
> version of MapServer?
> 
> 
> 
> 
> 
> 
> 
> Many thanks for any help that anyone can provide.
> 
> 
> 
> 
> 
> 
> 
> Best wishes, Simon.
> 
> 
> 
> This message (and any attachments) is for the recipient only. NERC is
> subject to the Freedom of Information Act 2000 and the contents of this
> email and any reply you make may be disclosed by NERC unless it is exempt
> from release under the Act. Any material supplied to NERC may be stored in
> an electronic records management system.
> 

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

Re: [mapserver-users] Multiple styles in a MapServer WMS Service

2016-05-31 Thread Jeff McKenna

Hi Simon,

I just locally enabled 2 different styles, and they showed up in my 
GetCapabilities document, by using CLASSGROUP and GROUP in my mapfile 
layer (see the RFC examples at 
http://mapserver.org/development/rfc/ms-rfc-39.html).  Note that I 
deleted your layer metadata, and magically both styles appeared in the 
GetCapabilities.


There could be a bug there (why your metadata doesn't work I am not 
sure), but to get the 2 styles to appear I followed that RFC.


I am testing with MS4W 3.1.4 (MapServer 7.0.1). http://ms4w.com

-jeff


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




On 2016-05-31 9:37 AM, Wright, Simon M. wrote:

Dear All



I’m fairly new to MapServer and am trying to create a WMS Service.



I have defined two styles the following metadata section of a layer as
follows:



  METADATA

 "wms_title"   "LC.LandCoverSurfaces"

 "wms_srs" "CRS:84 EPSG:4326 EPSG:27700
EPSG:4258 EPSG:3857"

 "wms_metadataurl_type" "ISO19115:2003"

 "wms_metadataurl_format"   "text/xml"

 "wms_metadataurl_href"
"https://catalogue.ceh.ac.uk//id/a1f88807-4826-44bc-994d-a902da5119c2?;

 "wms_style"   "default"

 "wms_style_default_legendurl_title"  ""

 "wms_style_default_legendurl_width"  "226"

 "wms_style_default_legendurl_height" "431"

 "wms_style_default_legendurl_format" "image/png"

 "wms_style_default_legendurl_href"
"http://eidc.ceh.ac.uk/administration-folder/tools/wms/987544e0-22d8-11e4-8c21-0800200c9a66/legends/LCM2007_DomTar.png;

 "wms_style"   "inspire_common:DEFAULT"


"wms_style_inspire_common:DEFAULT_legendurl_title"
"LC.LandCoverSurfaces Default Style"


"wms_style_inspire_common:DEFAULT_legendurl_width" "226"


"wms_style_inspire_common:DEFAULT_legendurl_height""431"


  "wms_style_inspire_common:DEFAULT_legendurl_format"
"image/png"


"wms_style_inspire_common:DEFAULT_legendurl_href"
"http://eidc.ceh.ac.uk/administration-folder/tools/wms/987544e0-22d8-11e4-8c21-0800200c9a66/legends/LCM2007_DomTar.png;



But only one style is actually broadcast in the WMS GetCapabilities
document:





LC.LandCoverSurfaces

LC.LandCoverSurfaces

CRS:84

EPSG:4326

EPSG:27700

EPSG:4258

EPSG:3857



-9.49714

3.63202

49.7668

61.581















text/xml

http://www.w3.org/1999/xlink;
xlink:type="simple"
xlink:href="https://catalogue.ceh.ac.uk//id/a1f88807-4826-44bc-994d-a902da5119c2?"/>





inspire_common:DEFAULT

inspire_common:DEFAULT



image/png

http://www.w3.org/1999/xlink";
xlink:type="simple"
xlink:href="http://eidc.ceh.ac.uk/administration-folder/tools/wms/987544e0-22d8-11e4-8c21-0800200c9a66/legends/LCM2007_DomTar.png"/>









It appears that the last defined style is the one that makes it through
to the GetCapabilities file.







Therefore, am I specifying my styles incorrectly in the .map file?



Is it possible to define multiple styles for the GetCapabilities document?



Or, is this a bug in MapServer 6.4.2?  And if so, should I use a later
version of MapServer?







Many thanks for any help that anyone can provide.







Best wishes, Simon.


This message (and any attachments) is for the recipient only. NERC is
subject to the Freedom of Information Act 2000 and the contents of this
email and any reply you make may be disclosed by NERC unless it is
exempt from release under the Act. Any material supplied to NERC may be
stored in an electronic records management system.



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




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