Re: [mapserver-users] wms servers html template output

2019-10-16 Thread Basques, Bob (CI-StPaul)
Travis,

We went with a slightly more involved route of caching things locally in a 
Postgres database.  You can automate things to a certain extent with a REST 
service for example with some clevering automation scripting for example.  We 
had to figure out things like how to handle when attributes changed, etc, but 
it was doable from a REST service.

bobb



On Oct 16, 2019, at 11:57 AM, Lime, Steve D (MNIT) 
mailto:steve.l...@state.mn.us>> wrote:

Think Before You Click: This email originated outside our organization.

Hi Travis: I don’t think there is an “easy” way. I mean you could script 
template creation so that process does the tedious work for you by looking at 
the map. You would create a new-style template (see RFC 36) so everything is in 
one file and then you’d create a single output format reference to that table.

If we wanted to support this via MapServer templates I think we’d need to do 3 
things:

• Extend the [resultset] tag to support “layer_pattern” attribute so 
that it (a regex) could apply to multiple layers (like any/all of them).
• Enhance the [items] and [values] tags to control formatting. 
Currently those just slam the column names and values together in a delimited 
string.
• Enhance the [values] tag processing to allow referencing the 
associated item/column name in the context of formatting.

I’d probably also propose compliance with the item-related metadata that is 
typically used with OGC service outputs to control which items are output…

With those changes you could write a template like so:

// MapServer Template
[resultset layer_pattern="."]
[feature]

[values format=”$item$value]

[/feature]
[resultset]

This would give you an item/value table for any feature for any layer. You 
could also to more horizontal tables using the [items] tag to output one header 
row…

--Steve


From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Travis Kirstine
Sent: Tuesday, October 15, 2019 9:06 AM
To: mapserver-users 
mailto:mapserver-users@lists.osgeo.org>>
Subject: [mapserver-users] wms servers html template output

This message may be from an external email source.
Do not select links or open attachments unless verified. Report all suspicious 
emails to Minnesota IT Services Security Operations Center.


Hi all,

I'm struggling a bit with using a generic template for html getfeatureinfo 
requests.  Is there a easy way to create a simple html table containing the 
attribute field names and values for any layer.  I don't want to create a 
separate template for each layer.  Thanks

There was some mention of this here:
http://osgeo-org.1560.x6.nabble.com/Generic-template-for-WMS-GetFeatureInfo-td4227865.html

___
mapserver-users mailing list
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] wms servers html template output

2019-10-16 Thread Lime, Steve D (MNIT)
Hi Travis: I don’t think there is an “easy” way. I mean you could script 
template creation so that process does the tedious work for you by looking at 
the map. You would create a new-style template (see RFC 36) so everything is in 
one file and then you’d create a single output format reference to that table.

If we wanted to support this via MapServer templates I think we’d need to do 3 
things:


· Extend the [resultset] tag to support “layer_pattern” attribute so 
that it (a regex) could apply to multiple layers (like any/all of them).

· Enhance the [items] and [values] tags to control formatting. 
Currently those just slam the column names and values together in a delimited 
string.

· Enhance the [values] tag processing to allow referencing the 
associated item/column name in the context of formatting.

I’d probably also propose compliance with the item-related metadata that is 
typically used with OGC service outputs to control which items are output…

With those changes you could write a template like so:

// MapServer Template
[resultset layer_pattern="."]
[feature]

[values format=”$item$value]

[/feature]
[resultset]

This would give you an item/value table for any feature for any layer. You 
could also to more horizontal tables using the [items] tag to output one header 
row…

--Steve


From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Travis Kirstine
Sent: Tuesday, October 15, 2019 9:06 AM
To: mapserver-users 
Subject: [mapserver-users] wms servers html template output

This message may be from an external email source.
Do not select links or open attachments unless verified. Report all suspicious 
emails to Minnesota IT Services Security Operations Center.


Hi all,

I'm struggling a bit with using a generic template for html getfeatureinfo 
requests.  Is there a easy way to create a simple html table containing the 
attribute field names and values for any layer.  I don't want to create a 
separate template for each layer.  Thanks

There was some mention of this here:
http://osgeo-org.1560.x6.nabble.com/Generic-template-for-WMS-GetFeatureInfo-td4227865.html

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

Re: [mapserver-users] Doubling of labels on high resolution maps

2019-10-16 Thread Rahkonen Jukka (MML)
Hi,

Print composer is probably making tiled requests from WMS. That is compulsory 
for any bigger maps because the default maxsize on the Mapserver side is 
2048x2048 pixels https://mapserver.org/uk/mapfile/map.html. It is easy to 
increase the maxsize but I do not know if print composer as a client can be 
aware of that.

Partials FALSE may help, but based on the screenshot it is possible that print 
composer is making requests with some overlap.

-Jukka Rahkonen-

Lähettäjä: mapserver-users  Puolesta 
Travis Kirstine
Lähetetty: keskiviikko 16. lokakuuta 2019 18.24
Vastaanottaja: Jan Hartmann 
Kopio: MapServer-users 
Aihe: Re: [mapserver-users] Doubling of labels on high resolution maps

There are a few options you could add to your label but I would start with

MINDISTANCE 200
PARTIALS FALSE

See
https://mapserver.org/mapfile/label.html



On Wed, 16 Oct 2019 at 10:37, Jan Hartmann 
mailto:j.l.h.hartm...@uva.nl>> wrote:
Hi,

I'm trying to generate high resolution print maps with QGIS, based on a 
MapServer WMS layer. When displayed in the regular QGIS application with 72dpi, 
all looks fine. When using the Print Composer based on the same Mapfile, but 
with 300dpi, some labels are duplicated (not all). Some duplicates are clipped. 
The two versions can be seen here:

https://maps.hisgis.nl/marken_072dpi.png
https://maps.hisgis.nl/marken_300dpi.png

Below the Mapfile.  Any idea what goes wrong here?

Jan

map
name Markegrenzen

web
  metadata
"wms_title" "Markegrenzen"
"wms_srs" "EPSG:28992 EPSG:3857"
"wms_extent"  "13000 301000 279000 62"
"wms_enable_request" "*"
  end
end

extent 13000 301000 279000 62
units meters
size 400 400
resolution 300
defresolution 72


projection
  "init=epsg:28992"
end

z
layer
  name Markegrenzen
  status on
  type polygon
  connectiontype postgis
  connection "dbname=ov options='-c search_path=horigheid,public'"
  data " the_geom from (
select gid,the_geom,naam from markegrenzen
) as foo using unique gid using srid=28992
  "
  labelitem "naam"
  class
style
outlinecolor 255 0 0
width 1
end
label
color 255 0 0
size 4
end
  end
end
end

___
mapserver-users mailing list
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] Doubling of labels on high resolution maps

2019-10-16 Thread Travis Kirstine
There are a few options you could add to your label but I would start with

MINDISTANCE 200
PARTIALS FALSE

See
https://mapserver.org/mapfile/label.html



On Wed, 16 Oct 2019 at 10:37, Jan Hartmann  wrote:

> Hi,
>
> I'm trying to generate high resolution print maps with QGIS, based on a
> MapServer WMS layer. When displayed in the regular QGIS application with
> 72dpi, all looks fine. When using the Print Composer based on the same
> Mapfile, but with 300dpi, some labels are duplicated (not all). Some
> duplicates are clipped. The two versions can be seen here:
>
> https://maps.hisgis.nl/marken_072dpi.png
> https://maps.hisgis.nl/marken_300dpi.png
>
> Below the Mapfile.  Any idea what goes wrong here?
>
> Jan
>
> map
> name Markegrenzen
>
> web
>   metadata
> "wms_title" "Markegrenzen"
> "wms_srs" "EPSG:28992 EPSG:3857"
> "wms_extent"  "13000 301000 279000 62"
> "wms_enable_request" "*"
>   end
> end
>
> extent 13000 301000 279000 62
> units meters
> size 400 400
> resolution 300
> defresolution 72
>
>
> projection
>   "init=epsg:28992"
> end
>
> z
> layer
>   name Markegrenzen
>   status on
>   type polygon
>   connectiontype postgis
>   connection "dbname=ov options='-c search_path=horigheid,public'"
>   data " the_geom from (
> select gid,the_geom,naam from markegrenzen
> ) as foo using unique gid using srid=28992
>   "
>   labelitem "naam"
>   class
> style
> outlinecolor 255 0 0
> width 1
> end
> label
> color 255 0 0
> size 4
> end
>   end
> end
> end
>
>
> ___
> mapserver-users mailing list
> 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

[mapserver-users] Doubling of labels on high resolution maps

2019-10-16 Thread Jan Hartmann

Hi,

I'm trying to generate high resolution print maps with QGIS, based on a 
MapServer WMS layer. When displayed in the regular QGIS application with 
72dpi, all looks fine. When using the Print Composer based on the same 
Mapfile, but with 300dpi, some labels are duplicated (not all). Some 
duplicates are clipped. The two versions can be seen here:


https://maps.hisgis.nl/marken_072dpi.png
https://maps.hisgis.nl/marken_300dpi.png

Below the Mapfile.  Any idea what goes wrong here?

Jan

map
name Markegrenzen

web
  metadata
    "wms_title" "Markegrenzen"
    "wms_srs" "EPSG:28992 EPSG:3857"
    "wms_extent"  "13000 301000 279000 62"
    "wms_enable_request" "*"
  end
end

extent 13000 301000 279000 62
units meters
size 400 400
resolution 300
defresolution 72


projection
  "init=epsg:28992"
end

z
layer
  name Markegrenzen
  status on
  type polygon
  connectiontype postgis
  connection "dbname=ov options='-c search_path=horigheid,public'"
  data " the_geom from (
    select gid,the_geom,naam from markegrenzen
    ) as foo using unique gid using srid=28992
  "
  labelitem "naam"
  class
    style
    outlinecolor 255 0 0
    width 1
    end
    label
    color 255 0 0
    size 4
    end
  end
end
end


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