TENGDA | 13 Oct 08:21 2014
Picon

STYLEITEM AUTO and LABEL ENCODING can't exist simultaneously??

Hi All,

Is there any method that I can both set 'STYLEITEM AUTO', and also set ENCODING GB18030?  NOTE: my mapserv is V5.2.1.

[PROBLEM]:
I am now using mapinfo tab files as my map data. 
Labels in the mapinfo files are in Chinese. In order to support styles within mapinfo, I use 'STYLEITEM AUTO'. 
Then style are displayed well, however, Chinese characters are not displayed properly.

[PROBLEM DESCRIPTION]:
  • Mapserver version: 5.2.1.
MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF
 OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICO
NV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUP
PORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS INPUT=OGR
 INPUT=GDAL INPUT=SHAPEFILE
  • ogrinfo of tab file:
OGRFeature(2000_BJ10):4
  blank (String) = 
  Style = LABEL(t:"育",a:0.000000,s:1.380000g,c:#000000,p:1,f:"")
  POINT (1017054046.578231 612967797.60216415)

[CONFUSING]:
  • When I use STYLEITEM AUTO, I can't set 'ENCODING GB18030' for LABEL. 
  • If not using STYLEITEM AUTO, I can't set LABELITEM, because the chinese character is within Style=LABEL(t:"Chinese character"....).
Method I also tried includes:
  • Change mapfile encoding from ANSI to UTF-8
  • Change MIF/MID encoding from ANSI to UTF-8, or even to BIG5.
So, is there any method that I can both set 'STYLEITEM AUTO', and also set ENCODING GB18030?  NOTE: my mapserv is V5.2.1.

[MORE INFORMATION]:
I also have another mapinfo tab file, whose data is like this:
ENAME2000: String (50.0)
OGRFeature(省界):1
  NAME (String) = 北京市
  AREA (Real) =             1.733
  PERIMETER (Real) =             8.498
  省界_ (Real) =           9
  省界_ID (Real) =          11
  CODE2000 (Real) = 110000
  ENAME2000 (String) = Beijing Municipality
  Style = BRUSH(fc:#f0f0f0,bc:#ffffff,id:"mapinfo-brush-2.ogr-brush-0");PEN(w:1p
x,c:#d0d0d0,id:"mapinfo-pen-2.ogr-pen-0")
In this situation, I can use one layer with 'STYLEITEM AUTO' to display styles, and another layer with 'LABELITEM NAME' and LABEL ... END to display Labels, without any problem. Mapfile is as follow:
LAYER
##DATASOURCETYPE 0
NAME "test"
TYPE polygon
STATUS DEFAULT
OPACITY 100
SIZEUNITS pixels
DATA "省界"
CONNECTION "C:\ms4w\Apache\htdocs\mapinfo\省界.TAB"
CONNECTIONTYPE ogr
STYLEITEM "AUTO"
PROJECTION
AUTO
END
CLASS
NAME "Untitled class"
END
END
LAYER
##DATASOURCETYPE 0
NAME "省界"
TYPE annotation
STATUS DEFAULT
OPACITY 100
SIZEUNITS pixels
DATA "省界"
CONNECTION "C:\ms4w\Apache\htdocs\mapinfo\省界.TAB"
CONNECTIONTYPE ogr
PROJECTION
AUTO
END
LABELITEM "NAME"
CLASS
NAME "Untitled class"
LABEL
ANGLE auto
FONT "HEITI"
ENCODING "GB18030"
TYPE truetype
PRIORITY 1
SIZE 10
MAXSIZE 256
MINSIZE 4
COLOR 255 0 0
OUTLINECOLOR 0 255 255
BACKGROUNDSHADOWSIZE 1 1
POSITION cc
ANTIALIAS FALSE
FORCE FALSE
PARTIALS FALSE
END
END
END

As you can see the difference between the two kinds of tab file, 
  • one set chinese character in to LABEL(t:'') field, in which I not know how to both set STYLEITEM AUTO and set ENCODING to LABEL.
  • the other set Chinese character to the NAME field, in which I can set one layer with STYLEITEM AUTO, and another layer with LABELITEM.
Can anyone solve the problem I described in this post?
Waiting for your reply. Thanks very much.





_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
mapserver | 10 Oct 22:12 2014
Picon

mapcache WMTS - TMS one tile offset

Disclaimer: I have asked this question already on openlayers-users, but not 
received any answer
---

I have set up a mapserver/mapcache service for tiled background maps, which 
should offer WMTS and TMS services
in the EPSG:31468 projection.

The TMS tiles I've verified to be correctly placed against a standard wms layer, 
however the WMTS tiles get placed with
a one tile offset to the south compared to the TMS tiles.

Please see the screenshot: 
http://markus-spring.info/varia/wmts_tms_offset_problem.jpg

The grid definition is as follows:

     <grid name="MUC31468">
        <metadata>
           <title>Mapcache Service City of Munich EPSG 31468</title>
        </metadata>
        <srs>EPSG:31468</srs>
        <size>256 256</size>
        <extent>4440016 5313983 4492016 5359983</extent>
        <units>m</units>
        <resolutions>141.11153491115225 70.55561745557612
                     42.33331047334567 35.27775872778806 26.458319045841048
                     17.63887936389403 8.819439681947015 3.527775872778806
                     2.6458319045841043 1.763887936389403 0.8819439681947016
                     0.35277758727788067 0.17638879363894033</resolutions>
     </grid>

and the tileset

     <tileset name="karte_2014-1">
        <source>karte_2014-1</source>
        <cache>disk</cache>
        <metadata>
           <title>karte_2014-1</title>
           <abstract></abstract>
        </metadata>
        <format>PNG</format>
        <metatile>5 5</metatile>
        <metabuffer>10</metabuffer>
        <dimensions>
          <dimension type="regex" name="MAPFILE"
default="/path/to/mapfile.map">^[a-zA-Z0-9\./]*\.map$</dimension>
        </dimensions>
        <grid>MUC31468</grid>
     </tileset>

while the service definitions (for OpenLayers 2.13) are these:

            var wmts = new OpenLayers.Layer.WMTS({
                name:        "WMTS basemap",
                url:         "http://centmap/mapcache/wmts?",
                layer:       "karte_2014-1",
                matrixSet:   "MUC31468",
                format:      "image/png",
                style:       "default",
                opacity:     0.7,
                maxExtent:   maxExtent,
                isBaseLayer: true
            });

            var tms = new OpenLayers.Layer.TMS(
                "TMS basemap",
                "http://centmap/mapcache/tms/",
                { layername: "karte_2014-1",
                  type:      "png" }
            );

Any help would be greatly appreciated.

---Markus

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

Michal Seidl | 10 Oct 22:30 2014
Picon

Documentation of erlier versions of Mapserver

Hello,
because I did not find any direct contact to www.mapserver.org website 
administrator I am sending this issue to this list.

There are wrong links to documentation in Pdf of erlier versions.
Currents is:
http://mapserver.org/MapServer-xx.pdf

Correct is:
http://mapserver.org/pdf/MapServer-xx.pdf

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

Steve.Toutant | 10 Oct 18:14 2014
Picon

WFS DescribeFeatureType returns string for all attributes

Hi,
I'm using mapserv 6.4.1 as a wfs server to publish hundreds of layers. Most of the Layers are Postgis table or view
DescribeFeatureType on a layer returns "string" as data type for each attributes. This is an issue when we want to flter on WFS layer.

I saw that this issue was discussed years ago
https://github.com/mapserver/docs/issues/65

Before Adding gml_[item name]_type for each non string attributes of every layers...Is there a plan to fix this bug?

thank you
Steve


_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
yeryry | 7 Oct 22:40 2014
Picon

KML output problems/crashes/bad reprojection

I've been trying to get KML output working (6.5, OSgeo4W). After a lot of experimentation and all kinds of strange results, I managed to get something somewhat working, but still have some problems... The IRC channel seems dead, so here I am again.
I've adapted the Itasca example map file to try to make it simpler... My example query strings are at the bottom. https://gist.github.com/anonymous/f0516f2766699e1ce3db

With the driver set to "OGR/KML" (this is undocumented?):
WFS (queries 1 and 2) works.
WMS (query 3) causes mapserv.exe to crash.

With the driver set to "KML":
WFS (queries 1 and 2) produces output with no points. There must be some projection problem. "Projection library error. All points failed to reproject". If I use the other EXTENT line, it crashes.
WMS (query 3) now works. Or seems to...

There may be a problem with my settings, but I don't think it should ever crash because of that. I've had lots of problems before I tried to use KML output, but they didn't include crashing. Because making various apparently unrelated changes results in it crashing, with no output to the log at all, perhaps there's a problem with some error message routine? This may be a problem with the OSgeo4W build, but they seem to have no user support at all...
And should the output options affect the projection at all?

Another problem... With WMS, the width and height parameters in the query have a big effect on the coordinates in the output (same as this? https://trac.osgeo.org/mapserver/ticket/3928). This doesn't make sense to me, as KML doesn't have "pixels", so the width and height of a hypothetical "image" should have no effect on coordinates, and maybe no effect on output at all. Also "non-square pixels" (https://trac.osgeo.org/mapserver/ticket/3949) makes no sense for vector output. After discovering this problem with WMS, I switched to trying WFS, but then had the other problems.
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
yeryry | 4 Oct 16:01 2014
Picon

CLUSTER_GET_ALL_SHAPES gives bad query output

It seems that the problem described in
http://osgeo-org.1560.x6.nabble.com/CLUSTER-and-GetFeatureInfo-td4227414.html
is still present. When retrieving the details for a cluster, the
cluster-related attributes are set only for the last member of the
cluster, and normal attributes for that member aren't sent. The normal
attributes for all members should be sent, and I would think the
cluster-related ones should be set for each member, not just the last.
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Basques, Bob (CI-StPaul | 3 Oct 22:41 2014
Picon
Picon

have the docs for STYLE COLORRANGE been added yet?

All,

 

I can’t seem to find them . . .

 

Thanks

 

Bobb

 

 

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Yves Jacolin | 3 Oct 18:03 2014

Re: Unsubscribe

On Saturday, September 27, 2014 16:04:32 Krishna Priya Patury wrote:
> Hi there,
> 
> I would like to be removed from this mailing list.
> 
> Thanks much,
Krishna,

Jut click at the bottom of this email the link 
http://lists.osgeo.org/mailman/listinfo/mapserver-users

You can manage your subscribtion (suspend or leave for ever).

Regards,

Y.
--

-- 
Responsable Formation et Support
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel (France) : +33 4 79 26 57 98
Tel (Suisse) : 021 619 10 43
Mob. : +33 6 18 75 42 21
Fax : 04 79 70 15 81
Mail : yves.jacolin <at> camptocamp.com
http://www.camptocamp.com
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

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

Gmane