Re: [mapserver-users] mamcache vertical assembly

2019-02-05 Thread Stephen Woodbridge

On 2/5/2019 8:52 PM, Richard Greenwood wrote:

Stephen,

I was watching this thread hoping for a reply to your original 
question because it's an interesting problem. If you have time to 
provide a more detailed explanation of your solution I'd be interested.


So what I had originally were 7 layers of NOAA ENC (Electronic Nautical 
Charts) being pulled from the NOAA WMS service and these were getting 
cached locally in mapcache. Since my app was always turning on/off all 
seven layers as a set, I wanted to build a new layer that merged all 
seven into a single layer. Part of the reason for this was to reduce the 
number of layer in openlayers for performance improvements. This would 
be just a vertical stacking of the the seven layers into one. Because of 
the way NOAA service is structured each layer has a different end point 
so it was not possible to have their server do the stacking.


I eventually found this post:
https://lists.osgeo.org/pipermail/mapserver-users/2012-April/072045.html
which suggests, this might no be the best approach.

In addition, while looking at this issue I realized the NOAA service 
changed it layer definitions for some of the data and my mapcache stuff 
was broken as a result. In the end, I decided to create a mapserver 
mapfile that did WMS client requests to the NOAA server and broke up the 
seven layers into 21 (7 each area, line and point) smaller layers that 
allowed for more correct stacking of the data and setting appropriate 
MIN/MAX scaledenom  values as recommended by the getCapabilities for the 
NOAA services. Now I have one mapcache layer that uses the new mosaic 
mapfile and this does the vertical stacking which is slow given that 
mapserver has to make about 21 WMS requests to serve each metatile 
request from mapcache. But the end result is good and tiles are fast 
once they are populated.


Also, I will note that the NOAA ENC service updates the chart data on a 
regular basis, so I expire my tiles in the cache after 7 days so they 
get regenerated possible using new data. I think because of this, the 
strategy of using mapserver to do the stacking and mapcache to handle 
the caching is a better division of labor and once the app is converted 
to use the new mosaic layer, I'll remove the 7 old layers to free up 
disk space.


Hope this helps someone with a similar issue.

Best regards,
  -Steve W



Best regards,
Rich


On Tue, Feb 5, 2019 at 4:38 PM Stephen Woodbridge 
mailto:stephenwoodbridg...@gmail.com>> 
wrote:


I found response to question by Thomas on this subject that
suggested it might cause a deadlock if you ran out of connections.

Anyway I decided to build a new map file to do the vertical
assembly and then cache that through mapcache.

-Steve

Sent from my iPhone

On Jan 27, 2019, at 11:35 PM, Lime, Steve D (MNIT)
mailto:steve.l...@state.mn.us>> wrote:


I’ll try to derive something from the source and report back.

*From:* mapserver-users mailto:mapserver-users-boun...@lists.osgeo.org>> on behalf of
Stephen Woodbridge mailto:stephenwoodbridg...@gmail.com>>
*Sent:* Sunday, January 27, 2019 7:08:38 PM
*To:* mapserver-users
*Subject:* [mapserver-users] mamcache vertical assembly
Hi,

The mapcache docs has a page for vertical assembly but it is blank :(

I have 7 layers in mapcache and I would like to vertically assemble
these into a composite layer. In the past I have been loading all
7 in
openlayers but it makes more sense to just composite them into a new
layer. There are some scale limits that apply to the various layers.

Does anyone have some info on how to do this in mapcache directly
rather
than create a mapfile and compositing them in mapserver and then
making
that a new layer in mapcache.

Thanks,
   -Steve W

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
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



--
Richard W. Greenwood, PLS
www.greenwoodmap.com 


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

Re: [mapserver-users] mamcache vertical assembly

2019-02-05 Thread Richard Greenwood
Stephen,

I was watching this thread hoping for a reply to your original question
because it's an interesting problem. If you have time to provide a more
detailed explanation of your solution I'd be interested.

Best regards,
Rich


On Tue, Feb 5, 2019 at 4:38 PM Stephen Woodbridge <
stephenwoodbridg...@gmail.com> wrote:

> I found response to question by Thomas on this subject that suggested it
> might cause a deadlock if you ran out of connections.
>
> Anyway I decided to build a new map file to do the vertical assembly and
> then cache that through mapcache.
>
> -Steve
>
> Sent from my iPhone
>
> On Jan 27, 2019, at 11:35 PM, Lime, Steve D (MNIT) 
> wrote:
>
> I’ll try to derive something from the source and report back.
> --
> *From:* mapserver-users  on
> behalf of Stephen Woodbridge 
> *Sent:* Sunday, January 27, 2019 7:08:38 PM
> *To:* mapserver-users
> *Subject:* [mapserver-users] mamcache vertical assembly
>
> Hi,
>
> The mapcache docs has a page for vertical assembly but it is blank :(
>
> I have 7 layers in mapcache and I would like to vertically assemble
> these into a composite layer. In the past I have been loading all 7 in
> openlayers but it makes more sense to just composite them into a new
> layer. There are some scale limits that apply to the various layers.
>
> Does anyone have some info on how to do this in mapcache directly rather
> than create a mapfile and compositing them in mapserver and then making
> that a new layer in mapcache.
>
> Thanks,
>-Steve W
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> ___
> 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



-- 
Richard W. Greenwood, PLS
www.greenwoodmap.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] MVT Tiles status?

2019-02-05 Thread Lime, Steve D (MNIT)
It's in 7.2 although there are a couple of useful bug fixes set for 7.2.2...

-Original Message-
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Stephen Woodbridge
Sent: Tuesday, February 05, 2019 5:44 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] MVT Tiles status?

Is the MVT vector tiles stuff released yet? If not what’s the plan for that? I 
saw some posts in the archives that Steve L had stuff on github but would 
prefer to get it from Ubuntu packages. 

Thanks,
  -Steve W

Sent from my iPhone
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-usersdata=02%7C01%7Csteve.lime%40state.mn.us%7Ce7118d8fe1684447cf1b08d68bc3c6cf%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C636850070304631443sdata=%2BLnYvAsWuU7%2F7oKP55JKHsHW7fFIjVlPokyM3M0YAhQ%3Dreserved=0
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] MVT Tiles status?

2019-02-05 Thread Stephen Woodbridge
Is the MVT vector tiles stuff released yet? If not what’s the plan for that? I 
saw some posts in the archives that Steve L had stuff on github but would 
prefer to get it from Ubuntu packages. 

Thanks,
  -Steve W

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

Re: [mapserver-users] mamcache vertical assembly

2019-02-05 Thread Stephen Woodbridge
I found response to question by Thomas on this subject that suggested it might 
cause a deadlock if you ran out of connections. 

Anyway I decided to build a new map file to do the vertical assembly and then 
cache that through mapcache. 

-Steve 

Sent from my iPhone

> On Jan 27, 2019, at 11:35 PM, Lime, Steve D (MNIT)  
> wrote:
> 
> I’ll try to derive something from the source and report back. 
> From: mapserver-users  on behalf of 
> Stephen Woodbridge 
> Sent: Sunday, January 27, 2019 7:08:38 PM
> To: mapserver-users
> Subject: [mapserver-users] mamcache vertical assembly
>  
> Hi,
> 
> The mapcache docs has a page for vertical assembly but it is blank :(
> 
> I have 7 layers in mapcache and I would like to vertically assemble 
> these into a composite layer. In the past I have been loading all 7 in 
> openlayers but it makes more sense to just composite them into a new 
> layer. There are some scale limits that apply to the various layers.
> 
> Does anyone have some info on how to do this in mapcache directly rather 
> than create a mapfile and compositing them in mapserver and then making 
> that a new layer in mapcache.
> 
> Thanks,
>-Steve W
> 
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
> 
> ___
> 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] styling based on attribute for MapServer derived MVTiles

2019-02-05 Thread karsten
Great, Thanks Steve 
I added  "gml_include_items" "mapcolor7"
to the Metadata block and got it working. 
One quirk seems to be that when I am trying to the values as integer (from
the mapcolor7 column) specifying the style as in 1.) below did not work. 
However it I treat them as characters instead, quoted them and used "type":
"categorical" in the json file for the style as in 2.) below it is working.
 
Cheers
Karsten

1.)

{
"id": "country-fill",
"type": "fill",
"source": "compass",
"source-layer": "allcountries",
"paint": {
  "fill-color": {
"property": "mapcolor7",
"stops": [
[1, "#fdaf6b"],
[2, "#fdc663"],
[3, "#fae364"],
[4, "#d3e46f"],
[5, "#aadb78"],
[6, "#a3cec5"],
[7, "#ceb5cf"]
]
  }
}
}
 
2.)

{
"id": "country-fill",
"type": "fill",
"source": "compass",
"source-layer": "allcountries",
"paint": {
  "fill-color": {
"property": "mapcolor7",
"type": "categorical",
"stops": [
["1", "#fdaf6b"],
["2", "#fdc663"],
["3", "#fae364"],
["4", "#d3e46f"],
["5", "#aadb78"],
["6", "#a3cec5"],
["7", "#ceb5cf"]
]
  }
}
}

  _  

From: Lime, Steve D (MNIT) [mailto:steve.l...@state.mn.us] 
Sent: Tuesday, February 05, 2019 21:15
To: karsten; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] styling based on attribute for MapServer
derived MVTiles



I believe the default WxS behavior is to expose no attributes. You need to
be explicit and I don't see the gml_include_items metadata property in the
mapfile for the layer allcountries. You'd need something like:

 

"gml_include_items""mapcolor7"

 

Added to the allcountries layer. The mvt-demo does this for most layers.

 

--Steve

 

From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On
Behalf Of karsten
Sent: Monday, February 04, 2019 4:33 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] styling based on attribute for MapServer derived
MVTiles

 

Dear All,

 

I was working on the configuration of MapServer generated MVT tiles for a
demo country world map and had success with MS v 7.2 outputting tiles in MVT
format ( all thanks to https://github.com/sdlime/mvt-demo

).

I am trying to work on the client side style for my demo map (using
mapbox-gl.js) and defined them in a similar way as JSON as in Steve's
mvt-demo above. The whole thing is later intended to be used in a benchmark
for MapServer MVT rendering speed versus T-Rex ( see
http://blog.sourcepole.ch/2018/09/06/the-tale-of-a-vector-tile-benchmark/
  ) .

 

For now I am struggling with specifying the correct style syntax for the
client side and it seem that I missing something as I was not yet able to
successfully use attribute properties to render Countries as different
colors based on an attribute field of my PostGIS source.

Below is the configuration of my 'allcountries' layer. The mapcolor7 filed
is an integer field (in the input PostGIS source) but my set-up fails to
output multiple colors , instead I am getting all default black for the
country fill color. A second layer where I specified only Italy as one
Country 'country-italy' to show up renders fine -  see
https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/countries_mv
t.png
 

 

My complete style JSON is at
https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/ms_ne_simple
.json
 

and the corresponding map file is here

Re: [mapserver-users] styling based on attribute for MapServer derived MVTiles

2019-02-05 Thread Lime, Steve D (MNIT)
I believe the default WxS behavior is to expose no attributes. You need to be 
explicit and I don't see the gml_include_items metadata property in the mapfile 
for the layer allcountries. You'd need something like:

"gml_include_items""mapcolor7"

Added to the allcountries layer. The mvt-demo does this for most layers...

--Steve

From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of karsten
Sent: Monday, February 04, 2019 4:33 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] styling based on attribute for MapServer derived 
MVTiles

Dear All,

I was working on the configuration of MapServer generated MVT tiles for a demo 
country world map and had success with MS v 7.2 outputting tiles in MVT format 
( all thanks to 
https://github.com/sdlime/mvt-demo
 ).
I am trying to work on the client side style for my demo map (using 
mapbox-gl.js) and defined them in a similar way as JSON as in Steve's mvt-demo 
above. The whole thing is later intended to be used in a benchmark for 
MapServer MVT rendering speed versus T-Rex ( see 
http://blog.sourcepole.ch/2018/09/06/the-tale-of-a-vector-tile-benchmark/
 ) .

For now I am struggling with specifying the correct style syntax for the client 
side and it seem that I missing something as I was not yet able to successfully 
use attribute properties to render Countries as different colors based on an 
attribute field of my PostGIS source.
Below is the configuration of my 'allcountries' layer. The mapcolor7 filed is 
an integer field (in the input PostGIS source) but my set-up fails to output 
multiple colors , instead I am getting all default black for the country fill 
color. A second layer where I specified only Italy as one Country 
'country-italy' to show up renders fine -  see 
https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/countries_mvt.png

My complete style JSON is at 
https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/ms_ne_simple.json
and the corresponding map file is here 
https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/ne.map

Would anyone know what I need to change in order to render the countries with 
different colors according to the 'mapcolor7' attribute ?
To me it seems that somehow the attribute is not available to the renderer even 
though in the MapServer map file I am selecting all fields in the sub-query ...

Thanks
Karsten


{
"id": "country-fill",
"type": "fill",
"source": "compass",
"source-layer": "allcountries",
"paint": {
  "fill-color": {
"property": "mapcolor7",
"stops": [
[1, "#fdaf6b"],
[2, "#fdc663"],
[3, "#fae364"],
[4, "#d3e46f"],
[5, "#aadb78"],
[6, "#a3cec5"],
[7, "#ceb5cf"]
]
  }
}
},{
"id": "country-italy",
"type": "fill",
"source": "compass",
"source-layer": "italy",
"paint": {
  "fill-color": "#fdc663"
  }
  }

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

[mapserver-users] OSGeo Local Chapter (aka TCMUG) Meeting

2019-02-05 Thread Basques, Bob (CI-StPaul)
All,


Next Meeting.

Location :  http://www.flatearthbrewing.com/
Date : Feb. 13th.
Time : 4:30 PM





TCMUG Meeting

Scheduled: Feb 13, 2019 at 4:30 PM to 6:00 PM

Location: http://www.flatearthbrewing.com/

http://www.flatearthbrewing.com/


https://goo.gl/maps/4sXKnj1nn9J2



"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when 
you do, it blows away your whole leg."
- Bjarne Stroustrup



BEGIN:VCALENDAR
CALSCALE:GREGORIAN
VERSION:2.0
X-WR-CALNAME:TCMUG Meeting
METHOD:PUBLISH
PRODID:-//Apple Inc.//Mac OS X 10.14//EN
BEGIN:VTIMEZONE
TZID:America/Chicago
BEGIN:DAYLIGHT
TZOFFSETFROM:-0600
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
DTSTART:20070311T02
TZNAME:CDT
TZOFFSETTO:-0500
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0500
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
DTSTART:20071104T02
TZNAME:CST
TZOFFSETTO:-0600
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
TRANSP:OPAQUE
DTEND;TZID=America/Chicago:20190213T18
UID:0F0EF425-82D0-4E55-A93B-52594EB5C5DE
DTSTAMP:20190205T184117Z
LOCATION:http://www.flatearthbrewing.com/
DESCRIPTION:http://www.flatearthbrewing.com/\n\nhttps://goo.gl/maps/4sXK
 nj1nn9J2
SEQUENCE:0
X-APPLE-TRAVEL-ADVISORY-BEHAVIOR:AUTOMATIC
SUMMARY:TCMUG Meeting
LAST-MODIFIED:20190205T184117Z
CREATED:20190205T183926Z
DTSTART;TZID=America/Chicago:20190213T163000
END:VEVENT
END:VCALENDAR
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users