Re: [mapserver-users] Issue with label content for UNION layers

2019-12-13 Thread Julian Hollingbery
I just tried with the latest version from gisinternals (7.6.0-dev), and I see 
the same issue.

BTW, somehow the line “ows_enable_request” “*” had disappeared from the WEB 
section.

Fra: Julian Hollingbery
Sendt: 11. december 2019 09:19
Til: Steve Lime 
Cc: mapserver-users@lists.osgeo.org
Emne: SV: [mapserver-users] Issue with label content for UNION layers

Thanks for asking: 7.0.7

Fra: Steve Lime mailto:sdl...@gmail.com>>
Sendt: 11. december 2019 04:57
Til: Julian Hollingbery mailto:jul...@northtech.dk>>
Cc: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Emne: Re: [mapserver-users] Issue with label content for UNION layers

What version?

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

Re: [mapserver-users] Issue with label content for UNION layers

2019-12-11 Thread Julian Hollingbery
Thanks for asking: 7.0.7

Fra: Steve Lime 
Sendt: 11. december 2019 04:57
Til: Julian Hollingbery 
Cc: mapserver-users@lists.osgeo.org
Emne: Re: [mapserver-users] Issue with label content for UNION layers

What version?


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

[mapserver-users] Issue with label content for UNION layers

2019-12-10 Thread Julian Hollingbery
Hi list,

I’m seeing a strange phenomenon regarding label content for a layer with 
connectiontype UNION.
A WMS request to the parent layer (including the UNION layer) produces the 
result I’d expect, but the same request directly to the UNION layer labels all 
features with the same label.
Correct:
http://172.30.229.42//fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/Danske_Stednavne/Danske_Stednavne_test.map=WMS=1.3.0=GetMap=588000.0,6042000.0,888000.0,6342000.0=EPSG:25832=500=500=danske_stednavne==image/png=FALSE
Wrong:
http://172.30.229.42//fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/Danske_Stednavne/Danske_Stednavne_test.map=WMS=1.3.0=GetMap=588000.0,6042000.0,888000.0,6342000.0=EPSG:25832=500=500=landskabsform==image/png=FALSE

The reponses can be seen here: 
https://www.dropbox.com/sh/121shf8djnx3b3d/pGTLfcuga_mXWDaWFsKQa?dl=0

Any thoughts?

Best Regards,
Julian

MAP
NAME "danske_stednavne"
EXTENT 12 590 100 650
MAXSIZE 1

OUTPUTFORMAT
NAME "png24"
DRIVER "AGG/PNG"
MIMETYPE "image/png; mode=24bit"
EXTENSION "png"
IMAGEMODE "RGB"
FORMATOPTION INTERLACE=OFF
END
PROJECTION
"init=epsg:25832"
END
DEBUG 0
CONFIG "ON_MISSING_DATA" "LOG"
FONTSET "fonts/fontset.txt"

WEB
METADATA
"wms_srs" "EPSG:25832 EPSG:4326 EPSG:4258 EPSG:25833 EPSG:32632 
EPSG:32633 EPSG:4093 EPSG:4094 EPSG:4095 EPSG:4096 EPSG:3395 EPSG:3857"
END
END

LAYER
NAME "landskabsform"
EXTENT 12 590 100 650
TEMPLATE "blank.html"
LABELITEM skrivemaade
STATUS DEFAULT
TYPE polygon
CONNECTIONTYPE UNION
CONNECTION "oer_store,oer_mellem"
METADATA
"wms_srs" "epsg:25832"
END
PROJECTION
"init=epsg:25832"
END

STYLEITEM "AUTO"
# Define an empty class that will be filled at runtime from the color 
and
# styles read from each source layer.
CLASS
END

END #LAYER

LAYER
NAME "oer_store"
INCLUDE "./danske_stednavne_post_include.map"
DATA "geometri from stednavne_nohist_l1_wms.oer_store using unique 
objectid using srid=25832"
TYPE polygon
STATUS OFF
LABELITEM "skrivemaade"
METADATA
"wms_srs" "epsg:25832"
END
PROJECTION
"init=epsg:25832"
END
CLASS
STYLE
OUTLINECOLOR 91 91 91
WIDTH 1
END #STYLE

LABEL
COLOR 0 0 0
FONT "verdana"
TYPE truetype
SIZE 12
END #LABEL
END #CLASS
END #LAYER

LAYER
NAME "oer_mellem"
INCLUDE "./danske_stednavne_post_include.map"
DATA "geometri from stednavne_nohist_l1_wms.oer_mellem using unique 
objectid using srid=25832"
TYPE polygon
STATUS OFF
LABELITEM skrivemaade
METADATA
"wms_srs" "epsg:25832"
END
PROJECTION
"init=epsg:25832"
END
CLASS
STYLE
OUTLINECOLOR 91 91 91
WIDTH 1
END #STYLE

LABEL
COLOR 0 0 0
FONT "verdana"
TYPE truetype
SIZE 10
END #LABEL
END #CLASS
END #LAYER

END #MAP

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

Re: [mapserver-users] WFS GeoJSON Output Missing numberMatched

2019-06-07 Thread Julian Hollingbery
Hi,

Maybe this is a stupid idea, but could you not simply keep asking until you get 
a page with zero features?

Regards,
Julian

-Oprindelig meddelelse-
Date: Wed, 05 Jun 2019 23:43:22 +0200
From: "Seth G" 
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] WFS GeoJSON Output Missing numberMatched
Message-ID: 
Content-Type: text/plain

Hi all,

I'm currently working on a front-end grid that requests features via WFS 2.0 
and loads them using OpenLayers. 
OpenLayers 4 doesn't support parsing of GML3 used by WFS 2.0, but I can return 
features as GeoJSON by setting the output format as follows:

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

Then setting WEB > METADATA > "wfs_getfeature_formatlist" 
"gml,geojson,application/json"

WFS requests  are then made with URL parameters such as 
=WFS=2.0.0=GetFeature=MyLayer=application%2Fjson=0=20

Everything works fine including paging, but in order to calculate how many 
"pages" of data I need to get the numberMatched property. 
This can be turned on for GML3 using WEB > METADATA > 
"wfs_compute_number_matched" "true" (as noted at 
https://mapserver.org/fr/ogc/wfs_server.html#web-object-metadata). 

If I then request GML with outputFormat=gml3 the GML response includes 
numberMatched="6607" (the number of features in the layer). 

As GML3 features can't be rendered in OpenLayers I'd like to get this property 
added to the GeoJSON output. This appears to be implemented in GeoServer. 
I was wondering if this is something that can be configured somewhere in the 
Mapfile perhaps as an option for the OGR/GEOJSON driver 
(https://gdal.org/drivers/vector/geojson.html). 
The timeStamp, numberReturned are also missing from the GeoJSON output. 

Any ideas or hints appreciated,

Seth


--
web:http://geographika.co.uk
twitter: @geographika


--

Message: 3
Date: Thu, 06 Jun 2019 00:39:03 +0200
From: "Seth G" 
To: "Even Rouault" ,
mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] WFS GeoJSON Output Missing
numberMatched
Message-ID: <0a5df404-ffc4-431e-a520-80b882252...@www.fastmail.com>
Content-Type: text/plain

Thanks Even for both suggestions. 
Using resultType=hits and caching the result for the duration of the session 
could be an option for read-only layers (and would likely speed things up as 
setting  "wfs_compute_number_matched" is not recommended for performance 
reasons). Editable layers would require two requests on every request, which 
might be ok depending on speeds. 

The second approach is probably more robust, and works fine in a Mapfile by 
setting these layer creation options (although obviously the numberMatched in 
hard-coded):

OUTPUTFORMAT
NAME "application/json"
DRIVER "OGR/GEOJSON"
MIMETYPE "application/json"
FORMATOPTION "FORM=SIMPLE"
FORMATOPTION "STORAGE=memory" # filesystem and memory both work (only 
use one)
FORMATOPTION "LCO:NATIVE_MEDIA_TYPE=application/vnd.geo+json"
FORMATOPTION "LCO:NATIVE_DATA={'numberMatched':6607}"
END

It looks like mapogroutput.c would need to be modified to support this 
approach. 
Thanks again for the options,

Seth

--
web:http://geographika.co.uk
twitter: @geographika


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

Re: [mapserver-users] Mapfile comment parsing issue

2019-03-21 Thread Julian Hollingbery
Hi Seth,

Nope, but that does sound like a useful debugging technique!

/julian

-Oprindelig meddelelse-

Date: Wed, 20 Mar 2019 14:48:12 -0400
From: "Seth G" 
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Mapfile comment parsing issue
Message-ID: <27582da7-8789-4e10-a806-f7232e13d...@www.fastmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Julian,

I have seen something similar when writing tests for mappyfil. I've tried to 
find my test case in https://github.com/geographika/mappyfile/tree/master/tests 
but can't seem to locate it at the moment. I'm fairly sure I had some notes 
somewhere and it related to parsing MapServer expressions. I'll take another 
look later. 
Did you try to dump the Mapfile out using MapScript to see how it is stored 
internally in MapServer after it has been loaded?

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Wed, Mar 20, 2019, at 4:49 PM, Julian Hollingbery wrote:
> Hi list,

> 

> I have observed an obscure behavior in MapServer version 7.0.7, which I’d 
> like to run by you before I submit an issue.

> 

> I have an issue where labels on contour line disappear when I write a 
> particular type of comment after the TEXT directive.

> 

> Using this request:

> http://host/fcgi-bin/mapserv.fcgi?map=ms_issue_report.map=WMS;
> VERSION=1.3.0=GetMap=542400.00,6216800.00,542600.0,621700
> 0.0=EPSG:25832=400=400=dhm_kote_0_5_m,dhm_kurv
> e_0_5_m==image/png=FALSE

> this piece of MAP file

> 

>  CLASS

>  GROUP "default"

>  NAME "dhm2015 kurver, 0,5 m"

> 

>  TEXT (tostring([hoejde],"%.2f")) #altid to decimal, også .00 (eng. 
> always two decimals, including .00)

>  STYLE

>  OPACITY 80

>  COLOR 100 50 0

>  WIDTH 1

>  END #STYLE

>  LABEL

>  FONT "arial"

>  SIZE 9

>  COLOR 137 90 68

>  OFFSET 0 -6

>  SHADOWSIZE 1 1

>  TYPE TRUETYPE

>  REPEATDISTANCE 300

>  ANGLE auto

>  PARTIALS FALSE

>  END # LABEL

>  END #CLASS

> 

> Gives me  https://pasteboard.co/I6jsBen.png (contour lines w/o 
> labels), whereas

> 

>  CLASS

>  GROUP "default"

>  NAME "dhm2015 kurver, 0,5 m"

>  #altid to decimal, også .00 (eng. always two decimals, including .00)

>  TEXT (tostring([hoejde],"%.2f"))

>  STYLE

>  OPACITY 80

>  COLOR 100 50 0

>  WIDTH 1

>  END #STYLE

>  LABEL

>  FONT "arial"

>  SIZE 9

>  COLOR 137 90 68

>  OFFSET 0 -6

>  SHADOWSIZE 1 1

>  TYPE TRUETYPE

>  REPEATDISTANCE 300

>  ANGLE auto

>  PARTIALS FALSE

>  END # LABEL

>  END #CLASS

> 

> Results in https://pasteboard.co/I6js9YK.png (which is the desired result: 
> Contour lines labelled with two decimal points).

> I have narrowed it down a bit, and if I delete the “(eng. ..)”, i.e. 
> just have

>  TEXT (tostring([hoejde],"%.2f")) #altid to decimal, også .00

> It still works nicely.

> 

> So I guess the parentheses are somehow parsed as something meaningful 
> (related to the “tostring”-expression, perhaps?), invalidating the TEXT 
> declaration.

> 

> Has anyone seen something similar?

> 

> Best Regards

> /julian

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

Re: [mapserver-users] Mapfile comment parsing issue

2019-03-21 Thread Julian Hollingbery
Yep, that would absolutely explain what I see.

/julian

On 20 Mar 2019, at 19.49, Lime, Steve D (MNIT) 
mailto:steve.l...@state.mn.us>> wrote:

Should be easy enough to replicate. Does this sum it up?


· Label TEXT w/expression followed with a comment containing ()’s - 
FAILS

· Same TEXT w/expression but with moving the comment containing ()’s 
onto its own line - WORKS

· Label TEXT w/expression followed with a comment without ()’s – WORKS

Seems like the regex in maplexer.l for expressions might be too greedy.

--Steve


From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Julian Hollingbery
Sent: Wednesday, March 20, 2019 10:49 AM
To: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Subject: [mapserver-users] Mapfile comment parsing issue

Hi list,

I have observed an obscure behavior in MapServer version 7.0.7, which I’d like 
to run by you before I submit an issue.

I have an issue where labels on contour line disappear when I write a 
particular type of comment after the TEXT directive.

Using this request:
http://host/fcgi-bin/mapserv.fcgi?map=ms_issue_report.map=WMS=1.3.0=GetMap=542400.00,6216800.00,542600.0,6217000.0=EPSG:25832=400=400=dhm_kote_0_5_m,dhm_kurve_0_5_m==image/png=FALSE
this piece of MAP file

   CLASS
 GROUP "default"
 NAME "dhm2015 kurver, 0,5 m"

 TEXT (tostring([hoejde],"%.2f")) #altid to decimal, også .00 (eng. always 
two decimals, including .00)
 STYLE
   OPACITY 80
   COLOR 100 50 0
   WIDTH 1
 END #STYLE
  LABEL
FONT "arial"
SIZE 9
COLOR 137 90 68
OFFSET 0 -6
SHADOWSIZE 1 1
TYPE TRUETYPE
REPEATDISTANCE 300
ANGLE auto
PARTIALS FALSE
  END # LABEL
   END #CLASS

Gives me 
https://pasteboard.co/I6jsBen.png<https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpasteboard.co%2FI6jsBen.png=02%7C01%7Csteve.lime%40state.mn.us%7Ca451b548353e4155a66d08d6ad4b8fff%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C636886937384475484=li%2BfUjy8z0PLsrF4PR%2FIcBay0iqpasi88oLNdHhhguM%3D=0>
 (contour lines w/o labels), whereas

   CLASS
 GROUP "default"
 NAME "dhm2015 kurver, 0,5 m"
 #altid to decimal, også .00 (eng. always two decimals, including .00)
 TEXT (tostring([hoejde],"%.2f"))
 STYLE
   OPACITY 80
   COLOR 100 50 0
   WIDTH 1
 END #STYLE
  LABEL
FONT "arial"
SIZE 9
COLOR 137 90 68
OFFSET 0 -6
SHADOWSIZE 1 1
TYPE TRUETYPE
REPEATDISTANCE 300
ANGLE auto
PARTIALS FALSE
  END # LABEL
   END #CLASS

Results in https://pasteboard.co/I6js9YK.png (which is the desired result: 
Contour lines labelled with two decimal points).
I have narrowed it down a bit, and if I delete the “(eng. ..)”, i.e. just have
 TEXT (tostring([hoejde],"%.2f")) #altid to decimal, også .00
It still works nicely.

So I guess the parentheses are somehow parsed as something meaningful (related 
to the “tostring”-expression, perhaps?), invalidating the TEXT declaration.

Has anyone seen something similar?

Best Regards
/julian

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

[mapserver-users] Mapfile comment parsing issue

2019-03-20 Thread Julian Hollingbery
Hi list,

I have observed an obscure behavior in MapServer version 7.0.7, which I’d like 
to run by you before I submit an issue.

I have an issue where labels on contour line disappear when I write a 
particular type of comment after the TEXT directive.

Using this request:
http://host/fcgi-bin/mapserv.fcgi?map=ms_issue_report.map=WMS=1.3.0=GetMap=542400.00,6216800.00,542600.0,6217000.0=EPSG:25832=400=400=dhm_kote_0_5_m,dhm_kurve_0_5_m==image/png=FALSE
this piece of MAP file

   CLASS
 GROUP "default"
 NAME "dhm2015 kurver, 0,5 m"

 TEXT (tostring([hoejde],"%.2f")) #altid to decimal, også .00 (eng. always 
two decimals, including .00)
 STYLE
   OPACITY 80
   COLOR 100 50 0
   WIDTH 1
 END #STYLE
  LABEL
FONT "arial"
SIZE 9
COLOR 137 90 68
OFFSET 0 -6
SHADOWSIZE 1 1
TYPE TRUETYPE
REPEATDISTANCE 300
ANGLE auto
PARTIALS FALSE
  END # LABEL
   END #CLASS

Gives me https://pasteboard.co/I6jsBen.png (contour lines w/o labels), whereas

   CLASS
 GROUP "default"
 NAME "dhm2015 kurver, 0,5 m"
 #altid to decimal, også .00 (eng. always two decimals, including .00)
 TEXT (tostring([hoejde],"%.2f"))
 STYLE
   OPACITY 80
   COLOR 100 50 0
   WIDTH 1
 END #STYLE
  LABEL
FONT "arial"
SIZE 9
COLOR 137 90 68
OFFSET 0 -6
SHADOWSIZE 1 1
TYPE TRUETYPE
REPEATDISTANCE 300
ANGLE auto
PARTIALS FALSE
  END # LABEL
   END #CLASS

Results in https://pasteboard.co/I6js9YK.png (which is the desired result: 
Contour lines labelled with two decimal points).
I have narrowed it down a bit, and if I delete the “(eng. ..)”, i.e. just have
 TEXT (tostring([hoejde],"%.2f")) #altid to decimal, også .00
It still works nicely.

So I guess the parentheses are somehow parsed as something meaningful (related 
to the “tostring”-expression, perhaps?), invalidating the TEXT declaration.

Has anyone seen something similar?

Best Regards
/julian

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

Re: [mapserver-users] LAYER with CONNECTIONTYPE UNION fails

2018-09-13 Thread Julian Hollingbery
So, I had not much more than just sent this when I discovered this: 
http://osgeo-org.1560.x6.nabble.com/testing-CONNECTIONTYPE-UNION-td4254182.html

And, voila! 

LAYER
NAME "dtk_skaermkort"
EXTENT 12 590 100 650
PROJECTION
"init=epsg:25832"
END
STATUS ON
TYPE raster
PROCESSING "RESAMPLE=BILINEAR"
CONNECTIONTYPE UNION
CONNECTION "s3096,s1548,s774,s387,s193,s96,s48,s24,s12,s6,s3,s1,s07"
METADATA
"wms_title" "dtk_skaermkort"
"wms_srs" "epsg:25832"
"wms_group_title" "dtk_skaermkort"
END
END

appears to solve the issue.

For future reference,
/julian

----------

Message: 1
Date: Wed, 12 Sep 2018 14:43:09 +
From: Julian Hollingbery 
To: "mapserver-users@lists.osgeo.org"

Subject: [mapserver-users] LAYER with CONNECTIONTYPE UNION fails
catastrophically when asked to reproject
Message-ID:



Content-Type: text/plain; charset="iso-8859-1"

Hi list,


I have run into something which puzzles me. I have configured a WMS using a MAP 
file with three layers: dtk_skaermkort, dtk_skaermkort_3096 and 
dtk_skaermkort_1548. The two latter expose TIFFs via a tile index in a shape 
file. Data is in EPSG:25832. The first layer uses CONNECTIONTYPE UNION to show 
the aggregate of the other two layers. This works *as long as I stay in the 
native projection*. However, this fails:
http://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/topo_skaermkort/topo_skaermkort_mailinglist.map=WMS=1.3.0=GetMap=-280235,5874930,649671,6549730=EPSG:25833=867=629=dtk_skaermkort==image/png
With a horrible Apache HTTP 500 (which I can find no trace of in 
/var/log/apache2/error.log...)

even though these succeed:

http://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/topo_skaermkort/topo_skaermkort_mailinglist.map=WMS=1.3.0=GetMap=-280235,5874930,649671,6549730=EPSG:25833=867=629=dtk_skaermkort_3096==image/png
and
http://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/topo_skaermkort/topo_skaermkort_mailinglist.map=WMS=1.3.0=GetMap=-280235,5874930,649671,6549730=EPSG:25833=867=629=dtk_skaermkort_1548==image/png

What have I done wrong?

Sample data: https://www.dropbox.com/s/gw8h8lrwwb0gltz/data.zip?dl=0
Map file:

MAP
NAME "topo_skaermkort"
EXTENT 12 590 100 650
MAXSIZE 1
STATUS ON
UNITS METERS
DEBUG 5
SHAPEPATH "/mapserver/data/skaermkort_ok"
CONFIG "ON_MISSING_DATA" "LOG"
CONFIG "MS_ERRORFILE" "maperror_topo_skaermkort_local.txt"
PROJECTION
"init=epsg:25832"
END
WEB
IMAGEPATH "/mapserver/data/skaermkort_ok/originalt/"
METADATA
"wms_title" "DTK/Skærmkort"
"wms_srs" "EPSG:4326 EPSG:4258 EPSG:25832 EPSG:25833 EPSG:32632 
EPSG:32633 EPSG:4093 EPSG:4094 EPSG:4095 EPSG:4096 EPSG:3395 EPSG:3857"
"wms_bbox_extended" "TRUE"
"wms_getmap_formatlist" "image/jpeg,image/png"
"ows_enable_request" "* !GetFeatureInfo"
"wms_encoding" "utf-8"
END
END
LAYER
NAME "dtk_skaermkort"
EXTENT 12 590 100 650
STATUS ON
TYPE raster
PROCESSING "RESAMPLE=BILINEAR"
CONNECTIONTYPE UNION
CONNECTION "s3096,s1548,s774,s387,s193,s96,s48,s24,s12,s6,s3,s1,s07"
METADATA
"wms_title" "dtk_skaermkort"
"wms_srs" "epsg:25832"
"wms_group_title" "dtk_skaermkort"
END
END
LAYER
GROUP "dtk_skaermkort"
NAME "s3096"
TILEINDEX "originalt/s3096/s3096x.shp"
TILEITEM "location"
EXTENT 12 590 100 650
MINSCALEDENOM 1201748.867
MAXSCALEDENOM 3000
STATUS OFF
TYPE raster
PROCESSING "RESAMPLE=BILINEAR"
METADATA
"wms_title" "s3096"
"wms_srs" "epsg:25832"
   "wms_enable_request" "!GetCapabilities"
END
END
LAYER
GROUP "dtk_skaermkort"
NAME "s1548"
TILEINDEX "originalt/s1548/s1548x.shp"
TILEITEM "location"
EXTENT 12 590 100 650
MINSCALEDENOM 600874.809
MAXSCALEDENOM 1201748.866
STATUS OFF

[mapserver-users] LAYER with CONNECTIONTYPE UNION fails catastrophically when asked to reproject

2018-09-12 Thread Julian Hollingbery
Hi list,


I have run into something which puzzles me. I have configured a WMS using a MAP 
file with three layers: dtk_skaermkort, dtk_skaermkort_3096 and 
dtk_skaermkort_1548. The two latter expose TIFFs via a tile index in a shape 
file. Data is in EPSG:25832. The first layer uses CONNECTIONTYPE UNION to show 
the aggregate of the other two layers. This works *as long as I stay in the 
native projection*. However, this fails:
http://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/topo_skaermkort/topo_skaermkort_mailinglist.map=WMS=1.3.0=GetMap=-280235,5874930,649671,6549730=EPSG:25833=867=629=dtk_skaermkort==image/png
With a horrible Apache HTTP 500 (which I can find no trace of in 
/var/log/apache2/error.log...)

even though these succeed:

http://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/topo_skaermkort/topo_skaermkort_mailinglist.map=WMS=1.3.0=GetMap=-280235,5874930,649671,6549730=EPSG:25833=867=629=dtk_skaermkort_3096==image/png
and
http://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/mapfiler/WMS/topo_skaermkort/topo_skaermkort_mailinglist.map=WMS=1.3.0=GetMap=-280235,5874930,649671,6549730=EPSG:25833=867=629=dtk_skaermkort_1548==image/png

What have I done wrong?

Sample data: https://www.dropbox.com/s/gw8h8lrwwb0gltz/data.zip?dl=0
Map file:

MAP
NAME "topo_skaermkort"
EXTENT 12 590 100 650
MAXSIZE 1
STATUS ON
UNITS METERS
DEBUG 5
SHAPEPATH "/mapserver/data/skaermkort_ok"
CONFIG "ON_MISSING_DATA" "LOG"
CONFIG "MS_ERRORFILE" "maperror_topo_skaermkort_local.txt"
PROJECTION
"init=epsg:25832"
END
WEB
IMAGEPATH "/mapserver/data/skaermkort_ok/originalt/"
METADATA
"wms_title" "DTK/Skærmkort"
"wms_srs" "EPSG:4326 EPSG:4258 EPSG:25832 EPSG:25833 EPSG:32632 
EPSG:32633 EPSG:4093 EPSG:4094 EPSG:4095 EPSG:4096 EPSG:3395 EPSG:3857"
"wms_bbox_extended" "TRUE"
"wms_getmap_formatlist" "image/jpeg,image/png"
"ows_enable_request" "* !GetFeatureInfo"
"wms_encoding" "utf-8"
END
END
LAYER
NAME "dtk_skaermkort"
EXTENT 12 590 100 650
STATUS ON
TYPE raster
PROCESSING "RESAMPLE=BILINEAR"
CONNECTIONTYPE UNION
CONNECTION "s3096,s1548,s774,s387,s193,s96,s48,s24,s12,s6,s3,s1,s07"
METADATA
"wms_title" "dtk_skaermkort"
"wms_srs" "epsg:25832"
"wms_group_title" "dtk_skaermkort"
END
END
LAYER
GROUP "dtk_skaermkort"
NAME "s3096"
TILEINDEX "originalt/s3096/s3096x.shp"
TILEITEM "location"
EXTENT 12 590 100 650
MINSCALEDENOM 1201748.867
MAXSCALEDENOM 3000
STATUS OFF
TYPE raster
PROCESSING "RESAMPLE=BILINEAR"
METADATA
"wms_title" "s3096"
"wms_srs" "epsg:25832"
   "wms_enable_request" "!GetCapabilities"
END
END
LAYER
GROUP "dtk_skaermkort"
NAME "s1548"
TILEINDEX "originalt/s1548/s1548x.shp"
TILEITEM "location"
EXTENT 12 590 100 650
MINSCALEDENOM 600874.809
MAXSCALEDENOM 1201748.866
STATUS OFF
TYPE raster
PROCESSING "RESAMPLE=BILINEAR"
METADATA
"wms_title" "s1548"
"wms_srs" "epsg:25832"
"wms_enable_request" "!GetCapabilities"
END
END
END

Kind Regards,
/julian
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

2018-06-27 Thread Julian Hollingbery
Thanks for that pointer, Thomas.

So, if I read the code correctly, here is the line which reads the 
"restricted_extent" attribute from the configuration file:
https://github.com/mapserver/mapcache/blob/master/lib/configuration_xml.c#L680
and stores it in gridlink->restricted_extent.
Here is the line which produces the error I see, after checking against 
tile->grid_link->grid_limits
https://github.com/mapserver/mapcache/blob/master/lib/tileset.c#L176

But I can find nowhere in the code where either
1) gridlink->restricted_extent is substituted into grid_link->grid_limits, or
2) A check is performed of tile->grid_link->grid_limits against 
gridlink->restricted_extent

Shouldn't I be able to find such code?

Regards
/julian



Fra: thomas bonfort 
Sendt: 22. juni 2018 10:12:45
Til: Julian Hollingbery
Cc: Rahkonen Jukka (MML); Ian Turton; mapserver-users@lists.osgeo.org
Emne: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

here is how the y=5 you are seeing is calculated:
https://github.com/mapserver/mapcache/blob/master/lib/service_wmts.c#L830


On Fri, Jun 22, 2018 at 9:05 AM Julian Hollingbery 
mailto:jul...@northtech.dk>> wrote:

Hi Ian and Jukka,



Thanks for your response!



However, I’m pretty sure that the TileMatrix-parameter is good, since this 
works nicely:



.. =GSTutm32=5=39=64=image%2Fpng



(TileRow changed from 40 to 39).

After all, I copied the request from http://xx.xx.xx.xx/servicename/demo/wmts, 
which, incidentally, shows the infamous pink tiles, if I pan to the outer edges 
of the tilegrid.



Regards,

/julian



Fra: Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
Sendt: 21. juni 2018 17:58
Til: Ian Turton mailto:ijtur...@gmail.com>>; Julian 
Hollingbery mailto:jul...@northtech.dk>>
Cc: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Emne: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?



Hi,



I don’t see a relevant part of GetCapabilities but I believe that the name of 
the tile matrix in MapCache based WMTS services is plain ”5” like here



https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/WMTSCapabilities.xml

GetTile example

https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts?service=WMTS=GetTile=1.0.0=maastokartta=default=image/png=ETRS-TM35FIN=6=44=27



-Jukka Rahkonen-







Lähettäjä: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] 
Puolesta Ian Turton
Lähetetty: 21. kesäkuuta 2018 17:12
Vastaanottaja: Julian Hollingbery 
mailto:jul...@northtech.dk>>
Kopio: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?



It looks like MapServer is mixing up tileset and tilerow (probably a cut and 
paste error in the error message) - I think the tile matrix should be 
GSTutm32:5 not just 5.



Ian



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

2018-06-22 Thread Julian Hollingbery
Hi Ian and Jukka,

Thanks for your response!

However, I’m pretty sure that the TileMatrix-parameter is good, since this 
works nicely:

.. =GSTutm32=5=39=64=image%2Fpng

(TileRow changed from 40 to 39).
After all, I copied the request from http://xx.xx.xx.xx/servicename/demo/wmts, 
which, incidentally, shows the infamous pink tiles, if I pan to the outer edges 
of the tilegrid.

Regards,
/julian

Fra: Rahkonen Jukka (MML) 
Sendt: 21. juni 2018 17:58
Til: Ian Turton ; Julian Hollingbery 
Cc: mapserver-users@lists.osgeo.org
Emne: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

Hi,

I don’t see a relevant part of GetCapabilities but I believe that the name of 
the tile matrix in MapCache based WMTS services is plain ”5” like here

https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/WMTSCapabilities.xml
GetTile example
https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts?service=WMTS=GetTile=1.0.0=maastokartta=default=image/png=ETRS-TM35FIN=6=44=27

-Jukka Rahkonen-



Lähettäjä: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] 
Puolesta Ian Turton
Lähetetty: 21. kesäkuuta 2018 17:12
Vastaanottaja: Julian Hollingbery 
mailto:jul...@northtech.dk>>
Kopio: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Aihe: Re: [mapserver-users] Wrong case of "TileOutOfRange" Error?

It looks like MapServer is mixing up tileset and tilerow (probably a cut and 
paste error in the error message) - I think the tile matrix should be 
GSTutm32:5 not just 5.

Ian

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

[mapserver-users] Wrong case of "TileOutOfRange" Error?

2018-06-21 Thread Julian Hollingbery
Hi list,

we are using MapCache 1.6.1 as a WMTS and TMS server in front of a WMS, for the 
most part with success :-)

However, a request like

http://xx.xx.xx.xx/servicename/wmts/?SERVICE=WMTS=GetTile=1.0.0=layername=default=GSTutm32=5=40=64=image%2Fpng

returns


http://www.opengis.net/ows/2.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://www.opengis.net/ows/2.0 
owsExceptionReport.xsd"
 version="1.0.0" xml:lang="en">




which puzzles me for two reasons:
1) I did not request a tile with "y=5"
2) The GetCapabilities show me
   
  

  layername

  layername

  

 default

  

  image/png

  

 GSTutm32

 

 ...




   GSTutm32:5


   6


   43


   19


   64



In the configuration file, I have:


http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
  

12 590 100 650
EPSG:25832
m
256 256
1638.4 819.2 409.6 204.8 102.4 51.2 25.6 12.8 6.4 3.2 1.6 0.8 
0.4 0.2 0.1 0.05
  
  

  
image/png
wms_layername
  


  
http://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/source_service.maphttp://172.30.229.42/fcgi-bin/mapserv.fcgi?map=/mapserver/config/source_service.map%3c/url>>

  
  

  yy.yy.yy.yy
  11211

  
  
source_service
couchbase
GSTutm32
PNG
5 5
10
  
...

Am i missing something, or is this simply a bug in the handling of a  
with restricted_extent?

Best Regards,
/julian
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users