Re: [mapserver-users] TileIndex - accuracy and truncation ?

2014-06-13 Thread Rahkonen Jukka (Tike)
Hi,

I am sure that the accuracy of tileindex vectors does not make the trouble.  
The tileindex is only used for selecting which images will be needed for 
building the requested output image and this is done by selecting polygons 
which intersect with the requested BBOX.  Once the correct image files are 
selected the georeferencing of the images is read from the images themselves, 
in your case from png + WLD.

I suppose that white lines appear when the selected images are subsampled to a 
non-original pixel size for the output one by one. At the image boundary when 
the image pixels cover less than 50% of the output pixel area the corresponding 
output pixel is painted white. Let's say this was at the upper edge of the 
lower tile. Normally when the same pixel is rendered from the lower edge of the 
upper tile there should be more than 50% image data for the pixel and it should 
be rendered with color. Now for some reason also the upper tile yields white 
pixel and the result is "not data for this pixel in lower tile or in upper 
tile".

It is a bit heavy to try to solve the issue only by thinking.  Could you put 
two adjacent tiles with WLD files somewhere so I could have a try with them? 
Tell the EPSG code as well.  Meanwhile, if you have some experience on GDAL or 
if you are willing to learn you can also try to make the mosaic in another way 
than using tileindex. Create a GDAL virtual mosaic file with gdalbuildvrt tool 
and use the resulting .vrt file as datasource for your layer instead of 
tileindex. Read http://www.gdal.org/gdalbuildvrt.html and 
http://www.gdal.org/gdalbuildvrt.html.  As a result GDAL will take care of 
subsampling and it may give different results.

On the other hand, if you could tolerate using GDAL instead of FME you can 
avoid all the trouble by converting your original image into tiled and 
compressed geotiff with overviews.

-Jukka Rahkonen-








Lars I. Nielsen wrote:

Hi,

For performance reasons, I've (used FME to) split a large PNG into 450 small 
tiles, serving them with a Mapserver tileindex as a WMS service to a web 
solution.

Howeever, white lines appear between some of the tile rows (not all) at some 
scales (not all).

I've looked deeper into the WLD files for the individual tiles, and found that 
the calculations are accurate to 1/10 of a nanometer. At least if one uses all 
10 decimals.

Tiles are 2254 pixels high, and (as per the WLDs below) 6138899.3169212583 - 
0.0204375000 * 2254 = 6138853.2507962583 (almost equal to 6138853.2507962584)

Which leads me to suspect that some sort of truncation goes on, yielding some 
sort of rounding error.

Do anyone know whether the tileindex calculations truncates any of the values 
in the WLD files ? And if so, by how much ?

Cheers.

--

A typical map picture with a white line can be seen via this link:

http://hvmgo01.hvenegaard.dk/mswms/mapserv.exe?map=odensekkgd_wms.map&LAYERS=ASSISTENS&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image/png&SRS=epsg:25832&BBOX=586609.80952408,6138781.1015875,586686.025,6138857.3142859&WIDTH=256&HEIGHT=256
Here's the WLD of the two tiles displayed in the picture:

Upper tile WLD:
0.0204375000
0.00
0.00
-0.0204375000
586620.6934394070
6138899.3169212583

Lower tile WLD:
0.0204375000
0.00
0.00
-0.0204375000
586620.6934394070
6138853.2507962584

--

Ps! As I wrote previously, I'm using FME to create the tiles. So I have little 
control over the actual coordinate and pixel values, and only specify the 
number of tiles I need. So manual truncation is not really a viable option.


Kind regards / Med venlig hilsen
Lars I. Nielsen

Landinspektør, Senior GIS Programmør og Konsulent
Hvenegaard Landinspektører A/S
Rugaardsvej 55, DK-5000 Odense C
Denmark
Tel. +45 6313 5050
http://www.hvenegaard.dk

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

[mapserver-users] WFS and WMS

2014-06-13 Thread Malm Paul
Hi list!
Is it possible to combine configuration for both WFS and WMS in a mapfile?

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

Re: [mapserver-users] WFS and WMS

2014-06-13 Thread Rahkonen Jukka (Tike)
Short answer: yes.  However, you would perhaps like to see an example, or?

-Jukka Rahkonen-

Malm Paul wrote


Hi list!
Is it possible to combine configuration for both WFS and WMS in a mapfile?

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

Re: [mapserver-users] WFS and WMS

2014-06-13 Thread Jörg Thomsen
Hi Paul,

Am 13.06.2014 14:20, schrieb Malm Paul:
> Hi list!
> 
> Is it possible to combine configuration for both WFS and WMS in a mapfile?

yes. you can combine wms_* and wfs_* in metadata-section or use ows_* if
the metadata is the same for wms and wfs.

Jörg

> 
>  
> 
> Thanks,
> 
> /Paul
> 
> 
> 
> ___
> 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] WFS and WMS

2014-06-13 Thread Jeff McKenna
Yes it is, instead of "wms_" or "wfs_" use "ows_" in your metadata.

-jeff




On 2014-06-13, 9:20 AM, Malm Paul wrote:
> Hi list!
> 
> Is it possible to combine configuration for both WFS and WMS in a mapfile?
> 
>  
> 
> Thanks,
> 
> /Paul
> 


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WFS and WMS

2014-06-13 Thread Malm Paul
Yes please,
if you have one I would be grateful.
/Paul


From: Rahkonen Jukka (Tike) [mailto:jukka.rahko...@mmmtike.fi]
Sent: den 13 juni 2014 14:30
To: Malm Paul; 'mapserver-users@lists.osgeo.org'
Subject: Re: WFS and WMS

Short answer: yes.  However, you would perhaps like to see an example, or?

-Jukka Rahkonen-

Malm Paul wrote

Hi list!
Is it possible to combine configuration for both WFS and WMS in a mapfile?

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

Re: [mapserver-users] WFS and WMS

2014-06-13 Thread Martin Kofahl
Consider also the setting wms/wfs/ows_enable_request "*" to enable/disable
a specific layer for wms or wfs.

Martin

2014-06-13 14:31 GMT+02:00 Jörg Thomsen :

> Hi Paul,
>
> Am 13.06.2014 14:20, schrieb Malm Paul:
> > Hi list!
> >
> > Is it possible to combine configuration for both WFS and WMS in a
> mapfile?
>
> yes. you can combine wms_* and wfs_* in metadata-section or use ows_* if
> the metadata is the same for wms and wfs.
>
> Jörg
>
> >
> >
> >
> > Thanks,
> >
> > /Paul
> >
> >
> >
> > ___
> > 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] WFS and WMS

2014-06-13 Thread Rahkonen Jukka (Tike)
Hi,

I will need to make one first. I am going to use the famous "states.shp" that 
is used as one of the demo layers of Geoserver. I would say that we should have 
something similar for Mapserver, a bunch of mapfiles and some demo datasets 
that could be dropped on the server so that they just work and users could see 
examples about how to make layers from shapefiles, geotiffs, tileindexes, and 
OGR connection and set up WMS, WFS and WCS services, activate GetFeatureInfo, 
use labels and  layer groups with min/maxscaledenom and so on.  That would also 
be a great help when reporting and resolving bugs because all parties could 
have the same data on their computers without pain. An official demo server 
would be a great supporting resource and people could send just links like 
"See, this one is advertised as a Mapserver WFS in http://demo.mapserver.org/ 
but hey, it is WMS at the same!"

http://demo.mapserver.org:8080/cgi-bin/wfs?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=459&HEIGHT=346&LAYERS=cities&TRANSPARENT=TRUE&FORMAT=image%2Fpng&BBOX=-185.5362494997,-128.25123742265794,186.7522494998,152.38453742265796&SRS=EPSG:4326&STYLES=



-Jukka Rahkonen-

Malm Paul wrote:

Yes please,
if you have one I would be grateful.
/Paul


From: Rahkonen Jukka (Tike) [mailto:jukka.rahko...@mmmtike.fi]
Sent: den 13 juni 2014 14:30
To: Malm Paul; 'mapserver-users@lists.osgeo.org'
Subject: Re: WFS and WMS

Short answer: yes.  However, you would perhaps like to see an example, or?

-Jukka Rahkonen-

Malm Paul wrote

Hi list!
Is it possible to combine configuration for both WFS and WMS in a mapfile?

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

Re: [mapserver-users] WFS and WMS

2014-06-13 Thread Jeff McKenna
On 2014-06-13, 9:56 AM, Rahkonen Jukka (Tike) wrote:
> Hi,
> 
>  
> 
> An official demo server
> would be a great supporting resource and people could send just links
> like “See, this one is advertised as a Mapserver WFS in
> http://demo.mapserver.org/ but hey, it is WMS at the same!”
> 
>  
> 

/me pats self on back

Have a nice weekend all,

-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WFS and WMS

2014-06-13 Thread Rahkonen Jukka (Tike)
Hi,

A rough example is here. I am sure it is not perfect but at least both WMS and 
WFS layers work with QGIS 2.0. I know there is an odd mixture of ows*, wms* and 
wfs* metadata items.
http://latuviitta.org/downloads/wms-wfs.zip

Zip file contains a Spatialite database for data and a corresponding mapfile. 
They should work as is with MS4W when the installation drive is c:\ and files 
are extracted into c:\ms4w\apps. The path appears only in few places in the 
mapfile but naturally they must be edited if c:\ms4w\apps is not correct.

The WMS layer had a little extra with two labels but I commented them out 
because they require Mapserver 6.2 and such MS4W version does not exist. The 
whole mapfile is so short that I paste it also here below

MAP
SIZE 800 800
EXTENT -90 -180 90 180
UNITS DD
IMAGECOLOR 20 250 250
WEB
METADATA
"ows_enable_request" "*"
"wms_bbox_extended" "true"
"ows_srs" "CRS:84 EPSG:4326 EPSG:32634 EPSG:3857 EPSG:2923"
"wms_title" "MS 6.1.1 WMS from Spatialite"
"wfs_title" "MS 6.1.1 WFS from Spatialite"
"wfs_onlineresource" 
"http://localhost/cgi-bin/mapserv.exe?map=c:\ms4w\apps\wms-wfs.map";
 END
END
DEBUG 10
CONFIG "PROJ_LIB" "C:/ms4w/proj/nad"
CONFIG "CPL_DEBUG" "ON"
CONFIG "SQLITE_LIST_ALL_TABLES" "TRUE"
CONFIG "MS_ERRORFILE" "c:/ms4w/tmp/debug.txt"
PROJECTION
"init=epsg:4326"
END
LAYER
NAME "states_table"
CONNECTIONTYPE OGR
CONNECTION "\ms4w\apps\wms-wfs.sqlite"
DATA "states"
PROCESSING "CLOSE_CONNECTION=DEFER"
TYPE POLYGON
STATUS ON
PROJECTION
"init=epsg:4326"
END
METADATA
  "ows_title" "states" ##REQUIRED
  "wfs_srs"   "EPSG:4326" ## REQUIRED
  "gml_include_items" "all" ## Optional (serves all attributes for layer)
  "gml_featureid" "PK_UID" ## REQUIRED
END
CLASS
STYLE
COLOR 100 200 100
END
LABEL
COLOR  150 150 150
OUTLINECOLOR 255 255 255
TYPE bitmap
SIZE small
POSITION UL
#TEXT "[STATE_FIPS]"
PARTIALS FALSE
END
  LABEL
COLOR  150 150 150
OUTLINECOLOR 255 255 255
TYPE bitmap
SIZE small
POSITION LL
#TEXT "[STATE_NAME]"
PARTIALS FALSE
END
END
END
END

-Jukka Rahkonen-

Rahkonen Jukka wrote:
Hi,

I will need to make one first. I am going to use the famous "states.shp" that 
is used as one of the demo layers of Geoserver. I would say that we should have 
something similar for Mapserver, a bunch of mapfiles and some demo datasets 
that could be dropped on the server so that they just work and users could see 
examples about how to make layers from shapefiles, geotiffs, tileindexes, and 
OGR connection and set up WMS, WFS and WCS services, activate GetFeatureInfo, 
use labels and  layer groups with min/maxscaledenom and so on.  That would also 
be a great help when reporting and resolving bugs because all parties could 
have the same data on their computers without pain. An official demo server 
would be a great supporting resource and people could send just links like 
"See, this one is advertised as a Mapserver WFS in http://demo.mapserver.org/ 
but hey, it is WMS at the same!"

http://demo.mapserver.org:8080/cgi-bin/wfs?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=459&HEIGHT=346&LAYERS=cities&TRANSPARENT=TRUE&FORMAT=image%2Fpng&BBOX=-185.5362494997,-128.25123742265794,186.7522494998,152.38453742265796&SRS=EPSG:4326&STYLES=



-Jukka Rahkonen-

Malm Paul wrote:

Yes please,
if you have one I would be grateful.
/Paul


From: Rahkonen Jukka (Tike) [mailto:jukka.rahko...@mmmtike.fi]
Sent: den 13 juni 2014 14:30
To: Malm Paul; 'mapserver-users@lists.osgeo.org'
Subject: Re: WFS and WMS

Short answer: yes.  However, you would perhaps like to see an example, or?

-Jukka Rahkonen-

Malm Paul wrote

Hi list!
Is it possible to combine configuration for both WFS and WMS in a mapfile?

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

[mapserver-users] working with date formats in identify templates

2014-06-13 Thread Mark Volz
Hello

I have a date that is in Julian format.  I would like to convert that date from 
Julian format such as '20140423' to something more user friendly like 
'4/23/2014' or 'April 23, 2014' etc.  Can I accomplish this through mapserver?


GIS Date:
[item name="Date"]


Thanks


Sincerely,
Mark Volz, GISP

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

Re: [mapserver-users] working with date formats in identify templates

2014-06-13 Thread Lime, Steve D (MNIT)
There's nothing inherent in templates to do this for you but there are options:


1.   Use javascript in the template, something like:


GIS Date:

  var date_jf = '[item name="Date"]';

  // process the date into something prettier
  var date = ...;

 // output the date (zillion ways to do this)
  document.write("" + date +"");




2.   If you're using a db backend you could format things in your SQL.

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Volz
Sent: Friday, June 13, 2014 2:18 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] working with date formats in identify templates

Hello

I have a date that is in Julian format.  I would like to convert that date from 
Julian format such as '20140423' to something more user friendly like 
'4/23/2014' or 'April 23, 2014' etc.  Can I accomplish this through mapserver?


GIS Date:
[item name="Date"]


Thanks


Sincerely,
Mark Volz, GISP

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