Sithila Konara | 3 Oct 11:03 2014
Picon

Fwd: Fwd: All map services display pink tiles


Hi,
Out put as follows...

<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException>
<![CDATA[
wms request for tileset osm returned an unsupported format:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /cgi-bin/mapserv was not found on this server.</p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at localhost Port 80</address>
</body></html>

]]>
</ServiceException>


On Wed, Oct 1, 2014 at 6:45 PM, thomas bonfort <thomas.bonfort <at> gmail.com> wrote:

On 1 October 2014 18:38, Sithila Konara <sithilamadushanka <at> gmail.com> wrote:
This is how errors get occors
nd i have examined Apache error logs, but unable find much details. I'm working in a Ubuntu server in a VM environment. server is directly connected to internet using NAT interface to get the Internet. But i think server should provide tiles from only using local resources, after successful mapserver implementation. But I noticed that pink tiles also not display when i disconnect the server from the Internet. I'm new to Linux and Mapserver so difficult to extract meaning of error logs etc

On Wed, Oct 1, 2014 at 2:52 PM, thomas bonfort <thomas.bonfort <at> gmail.com> wrote:
Sithila,
try right clicking on one of the pink tiles to open it in a new browser window, or alternately look in your apache access/error logs. You should get an error message that should give you a head start. 502 errors are usually a sign that the source wms server is producing an error instead of an image, the actual error message should be returned back to you.

--
thomas







_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Malm Paul | 2 Oct 14:23 2014

error finding objects with wfs mapserver 6.4.1

Hi,

I’m using mapserver 6.4.1 on a 64 bits Linux.

I have problems finding WFS objects when the BBOX is narrow (although the object is completely within the BBOX). I only get an error code, see below.

It is not a big difference if we compare Query 2 with Query 1. It is only the bounding box (but the symbol to search for is within both boxes )

Can anyone, please tell me what I’m doing wrong?

 

I’m trying to send the request trough Firefox.

 

Kind regards,

Paul

__________________________________________________________________________________________________________________

QUERY 1:

http://localhost/mapserver/mapserv?map=/tmp/rbase/map/rbase.map&version=1.0.0&service=WFS&request=GetFeature&TypeName=Lm_2&BBOX=0,0,90,90&MaxFeatures=1

 

results in:

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd                         http://mapserver.gis.umn.edu/mapserver http://localhost/mapserver/mapserv?map=/tmp/rbase/map/rbase.map&amp;SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=Lm_2&amp;OUTPUTFORMAT=XMLSCHEMA">

      <gml:boundedBy>

                             <gml:Box srsName="EPSG:4326">

                                                          <gml:coordinates>24.925816,59.452003 24.925816,59.452003</gml:coordinates>

                             </gml:Box>

      </gml:boundedBy>

    <gml:featureMember>

      <ms:Lm_2>

        <gml:boundedBy>

                             <gml:Box srsName="EPSG:4326">

                                                          <gml:coordinates>24.925816,59.452003 24.925816,59.452003</gml:coordinates>

                             </gml:Box>

        </gml:boundedBy>

        <ms:msGeometry>

        <gml:Point srsName="EPSG:4326">

          <gml:coordinates>24.925816,59.452003</gml:coordinates>

        </gml:Point>

        </ms:msGeometry>

        <ms:RCID>847</ms:RCID>

        <ms:FIDN>-105865197</ms:FIDN>

      </ms:Lm_2>

    </gml:featureMember>

</wfs:FeatureCollection>

_________________________________________________________________________________________________________________________

QUERY 2: (only changed the BBOX to a more narrow box)

http://localhost/mapserver/mapserv?map=/tmp/rbase/map/rbase.map&version=1.0.0&service=WFS&request=GetFeature&TypeName=Lm_2&BBOX=24.0,59.45,24.93,59.48&MaxFeatures=1

 

results in:

 

XML Parsing Error: no element found

Location: http://localhost/mapserver/mapserv?map=/tmp/rbase/map/rbase.map&version=1.0.0&service=WFS&request=GetFeature&TypeName=Lm_2&BBOX=24.0,59.45,24.93,59.48&MaxFeatures=1

Line Number 1, Column 1:

^

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

MAP FILE, I have tried to combine WMS/WFS map file:

 

MAP

NAME 'test'

CONFIG "PROJ_LIB" "/usr/share/proj"

EXTENT -180 -90 180 90

SIZE 512 512

RESOLUTION 96

DEFRESOLUTION 96

  FONTSET './fontset.lst'

  SYMBOLSET "./symbols.sym"

  PROJECTION

   'init=epsg:4326'

  END

  OUTPUTFORMAT

    NAME 'AGG'

    DRIVER AGG/PNG

    IMAGEMODE RGB

  END

  WEB

    IMAGEPATH '/tmp/'

    IMAGEURL '/tmp/'

    METADATA

     ' wms_enable_request'        ' *'

      'wms_title'           'S57 Charts'

      'wms_srs'              'epsg:4326'

      'wfs_title'             'S57 Charts'

      'wfs_srs'               'epsg:4326'

     ' wfs_enable_request'        ' *'

    END

  END 

LAYER

    NAME "Lm_2"

    GROUP "Landmarks_Infrastructure"

    METADATA

        "wms_title"     "Lm_2"

        "wfs_title"     "Lm_2"

        "wms_enable_request"   "*"

        "wfs_enable_request"  "*"

        "gml_include_items" "all"

    END

    TYPE POINT

    STATUS OFF

    TILEINDEX "/tmp/rbase/index/2_LNDMRK_POINT"

    TILEITEM "LOCATION"

    PROCESSING "CLOSE_CONNECTION=DEFER"

    CLASS

                             EXPRESSION (([CATLMK] == 17) OR ([CATLMK] == 7)) # tower or mast

        STYLE

          SYMBOL "lndmrk"

          COLOR 0 0 0

          SIZE 15

        END

    END

END

END

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Tim Nasman | 1 Oct 23:58 2014

Mapcache Question

I have read through the Mapcache documentation but I feel like I am missing some basic elements to how it works.

 I am using Mapcache to display a mbtile that I have created. Now from what I understand, my mapcache .xml will list out the parameters of the mbtile and then I add a layer within my mapfile referencing the .xml which I should then be able to to use as WMTS using openlayers. I just haven't grasped how mapcache and mapserv work together so any clarification would be helpful. Thanks for your time. 

--
Timothy Nasman
Data Analyst | Programmer
Rolling Leaf Inc.
[V] : 910.274.1436

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Basques, Bob (CI-StPaul | 1 Oct 23:47 2014
Picon
Picon

Re: Conditional SQL fragment via CGI . .

Oh, geez, just found my own answer . . .

 

http://mapserver.org/cgi/runsub.html#default-values-if-not-provided-in-the-url

 

dopey me . . .

 

bobb

 

 

 

From: Basques, Bob (CI-StPaul)
Sent: Wednesday, October 01, 2014 4:44 PM
To: mapserver-users <at> lists.osgeo.org
Subject: Conditional SQL fragment via CGI . .

 

I know,  probably not possible, but,

 

I want to change a fragment of a SQL request inside of a DATA block via MapServer CGI, using some conditions, namely if a null value is passed in, I want to ignore that null value.  Is there any way of setting a default CGI value inside of the mapfile so if a value isn’t sent in, it defaults to something automatically?

 

Thanks

 

Bobb

 

 

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Fergus McDonald | 1 Oct 16:15 2014
Picon

Mapserver CGI URL parameter parsing with plus character escaped as %2b

I am having an issue with Mapserver 6.4.1 when attempting to pass a
layer labelitem parameter setting via URL.

The map file contains the following validation for layer 0

VALIDATION
	"labelitem" "[a-z]+"
END

The following request works (ignore the double quotes around the entire
URL):

"http://sitename/cgi-bin/map=pathtomapfile&mode=map&map.layer[0]=labelitem+columnname"

as does this (note the brackets replaced with html escapes)

"http://sitename/cgi-bin/map=pathtomapfile&mode=map&map.layer%5B0%5D=labelitem+columnname"

..but if the plus sign is escaped also:

"http://sitename/cgi-bin/map=pathtomapfile&mode=map&map.layer%5B0%5D=labelitem%2Bcolumnname"

Mapserver fails with the following error:

getString(): Symbol definition error. Parsing error near (+):(line 1)

This problem arises because when generating such requests from
OpenLayers, any such parameters automatically have the plus sign
escaped before the request is sent. It does seem unconsistent that
escapes are recognised for some parts of the URL and not others.

Am I doing something wrong or should this be a bug report?

Thanks in advance
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Sithila Konara | 1 Oct 09:50 2014
Picon

Fwd: All map services display pink tiles



I have implemented mapserver in Ubuntu 14.04 with postgresql 9.3, postgis and imposm using GitHub tutorial. After completing the tutorial all map services display pink tiles not map info. i was not encounter with any issues during the tutorial run. any reason to this?

Following screenshots for your reference.

When I check network I saw some errors as follows it shows as bad gate way and internal server error

here's my basemap makefile and mapcache.xml file

  • basemap/makefile
UNAME := $(shell uname) ifeq ($(UNAME), Darwin) SED=sed -i "" else SED=sed -i endif CPP=gcc -E -x c #if the preprocessor fails for some reason, try replacing this with "cpp" on linux, or "cpp-4.2" on darwin (not available starting with mountain lion) OSM_PREFIX=osm_new_ OSM_NAME_COLUMN=name OSM_SRID=4326 OSM_UNITS=dd OSM_EXTENT=-180 -90 180 90 OSM_SRID=3857 OSM_UNITS=meters OSM_DB_CONNECTION=host=localhost dbname=osm user=osm password=osm port=5432 OSM_EXTENT=-20000000 -20000000 20000000 20000000 OSM_WMS_SRS=EPSG:900913 EPSG:4326 EPSG:3857 EPSG:2154 EPSG:310642901 EPSG:4171 EPSG:310024802 EPSG:310915814 EPSG:310486805 EPSG:310702807 EPSG:310700806 EPSG:310547809 EPSG:310706808 EPSG:310642810 EPSG:310642801 EPSG:310642812 EPSG:310032811 EPSG:310642813 EPSG:2986 DEBUG=1 LAYERDEBUG=1 STYLE=google #can also use google or bing
  • mapcache-osm.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- see the accompanying https://github.com/mapserver/mapcache/blob/master/mapcache.xml.sample for a fully commented configuration file --> <mapcache> <cache name="disk" type="disk"> <base>/home/sithila/osm-demo/mapcache/cache</base> <!-- Change Path here --> <symlink_blank/> </cache> <source name="osm" type="wms"> <getmap> <params> <FORMAT>image/png</FORMAT> <LAYERS>default</LAYERS> <MAP>/home/sithila/osm-demo/basemaps/osm-google.map</MAP> <!-- Change Path here --> </params> </getmap> <http> <url>http://localhost/cgi-bin/mapserv?</url> <!-- Change server here --> </http> </source> <tileset name="osm"> <metadata> <title>OSM MapServer served map</title> <abstract>see https://github.com/mapserver/mapserver/wiki/RenderingOsmDataUbuntuv2</abstract> </metadata> <source>osm</source> <cache>disk</cache> <grid>WGS84</grid> <grid>g</grid> <format>PNG</format> <metatile>5 5</metatile> <metabuffer>10</metabuffer> <expires>10000</expires> <auto_expire>86400</auto_expire> </tileset> <default_format>JPEG</default_format> <service type="wms" enabled="true"> <full_wms>assemble</full_wms> <resample_mode>bilinear</resample_mode> <format>JPEG</format> <maxsize>4096</maxsize> </service> <service type="wmts" enabled="true"/> <service type="tms" enabled="true"/> <service type="kml" enabled="true"/> <service type="gmaps" enabled="true"/> <service type="ve" enabled="true"/> <service type="demo" enabled="true"/> <errors>report</errors> <lock_dir>/tmp</lock_dir> </mapcache>

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Stefan Carl | 30 Sep 15:02 2014
Picon

PHP Mapscript GetLegendGraphic and GetFeatureInfo Problem

Dear list,
 
i use mapserver 6.4.1 with php Mapscript and i want to build a WMS which deals with Layers from a remote WMS. So i write a php-Script which creates a map object with all parameters.
 
After building this php-Script at the webserver (/var/www/test) i can access the Service with a getCapabilities Request (...test.php?service=wms&version=1.1.1&request=getCapabilities) and the service works e.g. in QGIS 2.2.
Then 2 problems appear:
- if i want to get the legend of a Layer in QGIS 2.2 with the getLegendGraphic Request but it fails (server replies internal server error)
- the getFeatureInfo response only serves the content type text/plain (i already changed wms_feature_info_mime_type to application/vnd.ogc.gml: nothing happens)
 
I try to find out the problem by checking other clients like gvSIG and uDig but there the same problems appear. I build the wms with the same parameters with a Mapfile and the getLegendGraphic and getFeatureinfo Request work. I also compare the getCapabilities-Response of the service build by the php-file and the service build by the mapfile and both response-xml are equal.
 
I think there is a problem in the php-file. Maybe it is a problem with sld-support  (related to the: getLegendGraphic problem) or gml-support (related to the: getFeatureInfo problem) but i'm not sure.
 
I hope somebody can help me.
 
 
Best regards
Stefan
 
<?php
$map = ms_newMapObj("");
$map->set('name','Kartendienst externe Daten MV');
$map->setProjection('init=epsg:25833');
$map->setExtent(195000, 5870000, 490000, 6080000);
$map->set('units',MS_METERS);

$map->web->set('imagepath','data/umn/umn_tmp');
$map->web->set('imageurl','http://xxx/umn/');
$map->setMetadata(wms_title,'Kartendienst externe Daten MV');
$map->setMetadata(wms_abstract,'Dienst');
$map->setMetadata('WMS_ONLINERESOURCE','http://xxx/test/test.php');

$map->setMetadata('WMS_SRS','EPSG:35833 EPSG:35832 EPSG:325833 EPSG:25833 EPSG:25832 EPSG:4326 EPSG:4647 EPSG:5650');
$map->setMetadata('WMS_FEATURE_INFO_MIME_TYPE','text/plain');
$map->setMetadata('wms_encoding', 'UTF-8');
$map->setMetadata('OWS_ENABLE_REQUEST','*');
$map->setMetadata('WMS_SERVER_VERSION','1.1.1');
$map->setMetadata('WMS_LAYER_GROUP','/Kartendienst externe Daten MV');
$layer = ms_newLayerObj($map);
$layer->set(name, 'Landesstrassen');
$layer->setConnectionType(MS_WMS);
$layer->set(connection, 'http://www.geodaten-mv.de/dienste/verkehrsnetz_lsbv_wms?');
$layer->set(status,'ms_on');
$layer->set(type,'RASTER');
$layer->set(template,"blank.html");
$layer->setMetadata(WMS_NAME, 'Landesstrassen');
$layer->setMetadata(WMS_TITLE, 'Landesstraßen');
$layer->setMetadata(WMS_SERVER_VERSION, '1.1.1');
$layer->setMetadata(wms_FORMAT, 'image/png');
$layer->setMetadata(wms_REQUEST, 'GetMap');
$layer->setMetadata(OWS_ENABLE_REQUEST, '*');
$layer->setMetadata(WMS_INCLUDE_ITEMS, 'all');
$layer->setMetadata(WMS_LAYER_GROUP, '/Kartendienst externe Daten MV/Topographie');
$layer->setMetadata(WMS_STYLE, 'default');
$layer->setMetadata(WMS_STYLE_DEFAULT_LEGENDURL_FORMAT, 'image/png');
$layer->setMetadata(WMS_STYLE_DEFAULT_LEGENDURL_HEIGHT, '53');
$layer->setMetadata(WMS_STYLE_DEFAULT_LEGENDURL_WIDTH, '154');
$layer->setMetadata(WMS_STYLE_DEFAULT_LEGENDURL_HREF, 'http://www.geodaten-mv.de/dienste/verkehrsnetz_lsbv_wms?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=Landesstrassen&format=image/png&STYLE=default');
$layer->setProjection("init=epsg:25833");
$layer->setExtent(195000, 5870000, 490000, 6080000);
$request=ms_newowsrequestobj();
$request->loadparams();
ms_ioinstallstdouttobuffer();
$mapobject=$map;
$mapobject->owsdispatch($request);
$contenttype=ms_iostripstdoutbuffercontenttype();
 
if($contenttype=='image/png'){
header('Content-type: '.$contenttype);
ms_iogetStdoutBufferBytes();
}else{
$buffer=ms_iogetstdoutbufferstring();
header('Content-type: '.$contenttype);
echo $buffer;
}
ms_ioresethandlers();
?>
 

 
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Rahkonen Jukka (Tike | 27 Sep 21:51 2014
Picon

LAYER example for kernerdensity wanted

Hi,

I am running MapServer version 6.5-dev on Windows and I suppose it has the support for kerneldensity
layers. Could someone show the LAYER part that works with the Natural Earth populated places dataset
http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip?
I have created .qix index but not touched the data in other ways.

I have indeed managed to get some coloured stripes out at some scales but what I mostly get is Internal server
error (http 500). MS_ERRORFILE does not show any errors and Apache error log is probably recording just this:
[Sat Sep 27 21:57:27 2014] [error] [client 127.0.0.1] Premature end of script headers: mapserv.exe

My current LAYER (or layers, one for data and one for kerneldensity):

LAYER
NAME "points"
DATA "c:\data\ne\ne_10m_populated_places"
TYPE POINT
    STATUS ON
    PROJECTION
        "init=epsg:4326"
    END
    debug 5
    CLASS
       STYLE
                   SIZE 5
                   SYMBOL "circle"
                   COLOR 200 200 200
                   OUTLINECOLOR 0 0 0
        END
    END
END
layer
    name "heatmap"
    type raster
    connectiontype kerneldensity
    connection "points"
    status on
    debug 5
    #processing "RANGE_COLORSPACE=HSL"
    processing "KERNELDENSITY_RADIUS=20"
    processing "KERNELDENSITY_ATTRIBUTE=RANK_MIN"
    #processing "KERNELDENSITY_COMPUTE_BORDERS=ON"
    processing "KERNELDENSITY_NORMALIZATION=AUTO"
    offsite 0 0 0
    class
      style
        COLORRANGE  "#0000ff00"  "#0000ffff"
        DATARANGE 0 32
      end
      style
        COLORRANGE  "#0000ffff"  "#ff0000ff"
        DATARANGE 32 255
      end
    end
  end

What I have tried so far has been to comment out this and that but result seems to be always the same.

-Jukka Rahkonen-
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Andreas Douvalis | 27 Sep 05:22 2014
Picon

Mapcahe curl error certificate verify failed

I forgot to mention that the issue has to do with mapcache apache module. Mapcache uses curl to get mapserver image.

The question is: How can I disable certificate verification of curl for mapcahe apache module? Is that possible in mapcahe configuration file  or in apache conf?
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Jeff Konnen | 26 Sep 11:00 2014
Picon

Displacing coincident points

Hi everybody,

I've been looking into the mapserver documentation to find a way to automagically displace coincident points.
There does not seem to be a way to do this.

Other vendors suggest that using labelling for the placement of the symbols could be a solution (http://blogs.esri.com/esri/arcgis/2007/08/27/displaying-coincident-points/) or propose tools for diperse markers [1] / displacement [2].



I've not managed to get any good result using Mapserver though.

Has anyone already done something similar?

TiA
Jeff
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Andreas Douvalis | 26 Sep 09:17 2014
Picon

Mapcahe curl error certificate verify failed

Hi!

I have one self-signded certificate for my local site (that I have for develpment-test purposes) and I want to get rid off  certificate verification error.
How can I pass in curl the option: CURLOPT_SSL_VERIFYPEER false.


I tried with the environments in apache conf:

SetEnv CURL_CA_BUNDLE "/ms4w/Apache/conf/ca-bundle/cacert.pem"
SetEnv CURLOPT_SSL_VERIFYPEER false
SetEnv CURLOPT_SSL_VERIFYHOST 1
SetEnv CURLOPT_CAINFO "/ms4w/Apache/conf/ca-bundle/cacert.pem"

but the above solution it does not work. I tried with inserting in my windows system environment variables the above values but, still i does not work.

The error message is :
curl failed to request url https://localhost/cgi-bin/mapserv.exe?map=user.map&VERSION=1.1.1&..... : SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Maybe in cgi mode you can not pass environments?

PLEASE HELP
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Gmane