Solly Vuso | 23 Sep 13:23 2014
Picon

Re: How to add tile.xml image as a background

Hi Mapservers

I have an image as an tile.xml image and i want to use it as a background image , can someone please assist me on how to write it on the mapfile

here is the xml

http://aerial.openstreetmap.org.za/aerial-osm-org-za-tiles.xml
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Dejan Gambin | 23 Sep 12:32 2014
Picon

Label wrapping question

Hi,

I have some users wishing to use long legend labels, but they don't fit well on my site. As I can see, MapServer
is doing this - if maxlength > 0 and wrap = 'char' (usually space), insert a new line at the FIRST wrap
character found AFTER maxlength character. This is leading to some bad results (label not wrapped or
wrapped too early).

My question is - shouldn't it be better to wrap at the LAST wrap character BEFORE maxlength character? Is
this maybe implemented somewhere or there are plans for this?

Thanks very much

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

Steve.Toutant | 18 Sep 18:08 2014
Picon

WFS getfeature returns nothing if layer srs is 4326


I have a mapfile in srs 3857, using mapserv 6.1 (dev version)
In this mapfile I have
2 layers with srs 4326
1 layer with 900913
1 layer with 32198

Since 6.0 we can have several srs in a WFS I think
All layers Data source is a postgis table


GetFeatures request don't work for the 2 layers in 4326. See The getCapabilities returns bad value for WGS84BoundingBox
- <FeatureType>
  <Name>cardiologie</Name>
  <Title>cardiologie</Title>
  <DefaultSRS>urn:ogc:def:crs:EPSG::3857</DefaultSRS>
- <OutputFormats>
  <Format>text/xml; subtype=gml/3.1.1</Format>
  </OutputFormats>
- <ows:WGS84BoundingBox dimensions="2">
  <ows:LowerCorner>-25000000 -25000000</ows:LowerCorner>
  <ows:UpperCorner>25000000 25000000</ows:UpperCorner>
  </ows:WGS84BoundingBox>
  </FeatureType>

Compares with a layer in 32198. See valid values for WGS84BoundingBox
  - <FeatureType>
  <Name>chsld</Name>
  <Title>chsld</Title>
  <DefaultSRS>urn:ogc:def:crs:EPSG::3857</DefaultSRS>
- <OutputFormats>
  <Format>text/xml; subtype=gml/3.1.1</Format>
  </OutputFormats>
- <ows:WGS84BoundingBox dimensions="2">
  <ows:LowerCorner>-178.714246078922 -66.3067843156478</ows:LowerCorner>
  <ows:UpperCorner>179.855210132046 -35.1587587019759</ows:UpperCorner>
  </ows:WGS84BoundingBox>
  </FeatureType>

I created a geometry column in 32198 for these 2 layers, and the everything work

Any idea on the issue here? Why coordinates are invalid when using 4326?

thank

steve

_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
TENGDA | 18 Sep 11:36 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
Pasquale Di Donato | 16 Sep 14:20 2014
Picon

Mapserver+SLD+FE+default style

Hi All,

I'm wondering if I can send GetMap request + SLD and use default styles.
I mean, I'd like to use an SLD file just to filter some features and then style them with the defualt style in the mapfile: I'd like to avoid specifying the style in the SLD.

Is that possible?

Will appreciate any feedback,
Thanks,

Pasquale Di Donato
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Rahkonen Jukka (Tike | 15 Sep 11:27 2014
Picon

Add the easy way to get GeoJSON from WFS into documentation

Hi,

I suggest to add most parts of the mail from Michael Smith
http://lists.osgeo.org/pipermail/mapserver-users/2013-November/075559.html into Mapserver
WFS server document http://mapserver.org/ogc/wfs_server.html. It is about an easy way for making
Mapserver to serve GeoJSON from WFS. Actually, is there something that prevents GeoJSON output from
being one of the internally supported default outputformats without a need to configure it separately in
each WFS mapfile? It could be deactivated with "wfs_getfeature_formatlist" if necessary.

This is the mail I refer to:

"Peter,
You can use OGR outputformats. Add something like this to your mapfile

OUTPUTFORMAT
  NAME "geojson"
  DRIVER "OGR/GEOJSON"
  MIMETYPE "application/json; subtype=geojson"
  FORMATOPTION "STORAGE=stream"
  FORMATOPTION "FORM=SIMPLE"
END

Add to your LAYER or MAP METADATA, "wfs_getfeature_formatlist" "geojson"
And then in your WFS call add &outputformat=geojson.
This will return geojson directly in the browser, if you need it to download, you can change the
FORMATOPTION to FORM=ZIP
See http://mapserver.org/output/ogr_output.html for more detail.

Mike"

-Jukka Rahkonen-

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

Andrea Peri | 12 Sep 13:52 2014
Picon

The usage of the Content-Depend-Legend

Hi,
I'm try-ing to usage the Content-Depend-Legend.

So I read the doc:
http://www.mapserver.org/development/rfc/ms-rfc-101.html

I read that there is need three values:
SRS, BBOX, EXTENT, and WIDTH,HEIGHT.

I understand that the BBOX with the WIDTH and HEIGHT will decide tha
scale of the map, but I dont understand well what rule has the EXTENT
parameter.

Is it a removed paameter ?

Thx,

--

-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
bpicinbono | 11 Sep 21:35 2014
Picon

select several features attributes by wms

Hi,
Working with openlayers 3, I'm trying to display features attributes from a
mapserver driven wms;
with this kind of url:

http://myserver/cgi-bin/mapserv?map=/pathtomapfile/mapfile.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&FORMAT=image%2Fpng&TRANSPARENT=true&QUERY_LAYERS=mylayer&LAYERS=mylayer&INFO_FORMAT=text%2Fhtml&I=50&J=50&CRS=EPSG%3A4326&STYLES=&WIDTH=101&HEIGHT=101&BBOX=28.65234375%2C-30.41015625%2C64.16015625%2C5.09765625

I can display with a mouse click on the map the attributes of one vector
feature, either in text-plain or test-html;

I'ld like to know if it's possible to get attributes from several features;
I tried addind &maxFeatures=10 and &radius=50 to the url, without success;
I've been told it's not possible, what do you think about this ?
(the server is on mapserver 6.4.1-3)
Thanks in advance

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

Peter Hopfgartner | 11 Sep 10:53 2014

MapServer 5.6.9 with PHP 5.4

For some of our servers I needed to compile MapServer 5.6 with PHP 5.4. In case someone else has the same need, I’ve created the ticket https://github.com/mapserver/mapserver/issues/4991.

Regards,

Peter

R3 GIS
_______________________________________________
mapserver-users mailing list
mapserver-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
Tim Nasman | 9 Sep 22:38 2014

WMS & MSSQL Question

Hello,

So I have been slowly learning the in's and out's of Mapserver and right now I am at an impasse because I am not getting anymore errors to figure out where to look next.

I am importing data from a MSSQL database and Mapserver is configured as a WMS. When I test the mapfile in shp2img I get the information I want so I know the connection is working and as far I know the mapfile is correct, but when I try to access the map on my server using 

http://localhost/cgi-bin/mapserv.exe?map=C:\mypath\mapfile.map&mode=browse

 I am just receiving a blank box that is the same size as my map size with no errors to chase out. So I guess my question would be, where in the mapfile should I start digging into to figure out why it is not showing the information I want.

Thanks

--
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

Re: [EXTERNAL] Re: Clickable label

I would recommend the UTF Grid approach.

http://mapserver.org/development/rfc/ms-rfc-93.html or

On 9/9/14, 6:35 AM, "Basques, Bob (CI-StPaul)"
<bob.basques <at> ci.stpaul.mn.us> wrote:

>All,
>
>It's probably not the cleanest way to approach it, but maybe a straight
>imagemap type approach.   You use the four corners of the label bounding
>poly and send as an imagemap or json set or id query.
>
>I think the bounding polys need to somehow be thought of as a ad-hoc data
>layer themselves.  Is there a way of sub-selecting feature constructs
>(that were originated by mapserver, like centroids are, into a reusable
>(on the fly) dataset?
>
>My immediate thoughts were to use a clientside imagemage (which is passe
>these days) and that is where the translation occurs for the bounding
>boxes, via the imagemap generation.
>
>bobb
>________________________________________
>From: Lime, Steve D (MNIT)
>Sent: Monday, January 20, 2014 9:43 AM
>To: Basques, Bob (CI-StPaul); wiltomap; mapserver-users <at> lists.osgeo.org
>Subject: RE: [mapserver-users] Clickable label
>
>That or a UTFGrid. I don't believe that support (in master) handles
>labels but maybe it could. In UTFGrid context you wouldn't want to render
>characters anyway, only the bounding polygons. However, because the grid
>is rendered at a lower resolution than the related map label placement
>consistency might be the issue. --Steve
>________________________________________
>From: Basques, Bob (CI-StPaul)
>Sent: Friday, January 10, 2014 6:15 PM
>To: Lime, Steve D (MNIT); wiltomap; mapserver-users <at> lists.osgeo.org
>Subject: RE: [mapserver-users] Clickable label
>
>Steve,
>
>I've been thinking on this thread since it started, I wonder, could you
>use a imagemap template from Mapserver, but populate it with the Label
>bounding polygons?
>
>bobb
>
>
>________________________________________
>From: mapserver-users-bounces <at> lists.osgeo.org
>[mapserver-users-bounces <at> lists.osgeo.org] on behalf of Lime, Steve D
>(MNIT) [Steve.Lime <at> state.mn.us]
>Sent: Friday, January 10, 2014 4:14 PM
>To: wiltomap; mapserver-users <at> lists.osgeo.org
>Subject: Re: [mapserver-users] Clickable label
>
> This can't be done with stock MapServer. Labels are dynamic by nature
>and are the product of a map raw while queries work off the base data.
>The bridge between the map and a query is a conversion from pixels to map
>coordinates based on map size and extent.
>
>You might be able to pull this off using MapScript. For a query you'd
>have to do things in two stages:
>
>  1) Draw the map (in memory) based on the map the user interacted with
>(same extent, size and set of layers) so that a label cache is created.
>  2) Search the label cache based on the query point and based on that
>pull the appropriate feature.
>
>I don't know if step 2 is feasible or not. You used to be able to loop
>through it, not sure about now.
>
>There might be other ways using an image where you render text and label
>backgrounds using the same color, a color that you could map back to a
>feature id. The map would basically contain label polygons in a raster
>you could, in turn, query that raster using point and retrieve a feature
>id. I have doubts that you could match the first image to the second so
>this would be a huge long shot.
>
>Steve
>
>-----Original Message-----
>From: mapserver-users-bounces <at> lists.osgeo.org
>[mailto:mapserver-users-bounces <at> lists.osgeo.org] On Behalf Of wiltomap
>Sent: Friday, January 10, 2014 2:17 AM
>To: mapserver-users <at> lists.osgeo.org
>Subject: [mapserver-users] Clickable label
>
>Hello all,
>
>I have to display labels instead of points on a layer. The labels rely on
>an attribute value. I would like to click on the label to make an
>attribute windows open up. So far, no problem with mapfile
>configuration...
>
>The only thing is that the attribute window opens up when I click right
>in the middle of the label. I can use TOLERANCEUNITS and TOLERANCE
>parameters in the mapfile to enlarge the clickable area BUT this means
>that I can also click next to the label and get the attribute window,
>which I don't want to...
>
>My purpose is to get the attribute window whereever I click on the label
>(any part of it) and not if I click next to it. Would you think about a
>solution to that ?
>
>I enclose a scrennshot of the mapfile I have worked out so far.
>
>
>Many thanks in advance,
>
>Thomas
>
>
><http://osgeo-org.1560.x6.nabble.com/file/n5097281/mapfile_label.jpg>
>
>
>
>--
>View this message in context:
>http://osgeo-org.1560.x6.nabble.com/Clickable-label-tp5097281.html
>Sent from the Mapserver - User mailing list archive at Nabble.com.
>_______________________________________________
>mapserver-users mailing list
>mapserver-users <at> lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>_______________________________________________
>mapserver-users mailing list
>mapserver-users <at> lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>_______________________________________________
>mapserver-users mailing list
>mapserver-users <at> lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/mapserver-users

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


Gmane