Re: [mapserver-users] Dynamic symbols

2017-12-13 Thread Björn Danielsson
Hej Lars,

Thanks for your help. I have tried method 1 to produce bars and pies 
successfully, and it helped me a lot.
But it would be nice to be able to construct any type of graphics and place 
them on polygons to visualize some feature.
Can you do that with your SQL method?

Björn D


-Original Message-
From: Frode Wiseth Jørgensen 
To: Lars Schylberg 
Cc: mapserver-users@lists.osgeo.org
Date: Mon, 11 Dec 2017 07:50:19 +0100
Subject: Re: [mapserver-users] Dynamic symbols


Hi Lars

Some examples regarding "Construct graphics with SQL" would be great!


Frode
On 9 December 2017 at 20:21, mailto:lars.schylb...@blixtmail.se]> wrote:
Hi,

I know three ways to do that, but I guess there must be more ways.

1) Pie charts and tables with:

http://mapserver.org/output/dynamic_charting.html

2) [http://mapserver.org/output/dynamic_charting.html]Construct graphics 
with Javascript support:

http://mapserver.org/mapfile/styleitem.html 
[http://mapserver.org/mapfile/styleitem.html]

This option requires that You compile the javascript support. That is a 
little hard to get to work. Had problems to complile V8 support myself last 
year.
I have seen nice examples in the past and this is on my personal TO DO list 
to try out, when I get some spare time.

3) Construct graphics with SQL. This is the way I have solved things myself. 
What I have done, is to construct circle sectors for instance with spatial 
sql expressions. I wrap GDAL sql expression with spatialite syntax in VRT 
files. These can then be used "on the fly" within mapserver or for 
preprossing of the data.
I could show some examples if any one is interested.

Actually I heard that someone was doing dynamic SVGs but I don't now the 
procedure for that.

/Lars Schylberg
December 9, 2017 12:56 PM, "Björn Danielsson" mailto:%22bj%c3%b6rn%20danielsson%22%20%3cbjorn.daniels...@falubo.se%3E]> 
wrote:
Hi,
Is it possible to create dynamic symbols on the fly with regard to some data 
in a polygon, and place them on the map?
Piecharts etc.
SVG?

Björn Danielsson
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org [mailto:mapserver-users@lists.osgeo.org]
https://lists.osgeo.org/mailman/listinfo/mapserver-users 
[https://lists.osgeo.org/mailman/listinfo/mapserver-users]

--
Frode Wiseth Jørgensen
+47 99 03 41 42___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Dynamic symbols

2017-12-09 Thread Björn Danielsson
Hi,
Is it possible to create dynamic symbols on the fly with regard to some data 
in a polygon, and place them on the map?
Piecharts etc.
SVG?

Björn Danielsson___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Polygon border with marker line symbol

2017-10-12 Thread Björn Danielsson
Hi,

Jukka R,
I would love to learn how to prevent polygon borders to be drawn twice.

Björn D


-Original Message-
From: "Rahkonen Jukka (MML)" 
To: Anton Bakker , "lars.schylb...@blixtmail.se" 

Cc: "mapserver-users@lists.osgeo.org" 
Date: Thu, 12 Oct 2017 08:59:28 +
Subject: Re: [mapserver-users] Polygon border with marker line symbol


Hi,

I fear that you will run into another problem later because polygons are 
closed rings and therefore common borders will be drawn two times.  Because 
of that rendering with sparse symbols may look ugly.

I would consider preprocessing the data so that you will have a clean line 
data where duplicate sections of the borders have been removed for rendering 
the borders and polygon layer for the rest.

-Jukka Rahkonen-

Lähettäjä:mapserver-users 
[mailto:mapserver-users-boun...@lists.osgeo.org] PuolestaAnton Bakker
Lähetetty: 12. lokakuuta 2017 11:55
Vastaanottaja: lars.schylb...@blixtmail.se
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Polygon border with marker line symbol

Hi Lars,

On second thought setting the TYPE to LINE does not fit my usecase exactly. 
I would like to achieve the following for a polygon layer: 
https://i.imgur.com/3stwHw4.png [https://i.imgur.com/3stwHw4.png] . So the 
two requirements for the symbology are:
- Marker line symbol on border
- Polygon fill

With setting the type to line I can only achieve the marker line symbol, but 
I cannot specify a fill: https://i.imgur.com/tk6vJ4b.png 
[https://i.imgur.com/tk6vJ4b.png] . Do you know if there is a way of 
achieving this effect?

I guess it maybe could be done by grouping two layers, together and treating 
them as one, but preferably the solution is restricted to one layer.

Cheers,
Anton


On 12 Oct 2017, at 10:22, Anton Bakker mailto:anton.bak...@geocat.net]> wrote:

Hi Lars,

The fill of the square was set to true, but I guess that is what happens 
when you only set the OUTLINECOLOR and a SYMBOL on a polygon type style.

In any case setting the type of the polygon layer to LINE did the trick. I 
was not aware this was possible, but it does make sense. Thanks for the 
quick answer!

Kind regards,
Anton
On 11 Oct 2017, at 18:50, lars.schylb...@blixtmail.se 
[mailto:lars.schylb...@blixtmail.se] wrote:

Hi,

I guess that your symbol definition of square says filled false,  it should 
be be filled true. Do another symbol.
Next thing is that if You would like to do fancy borders symbols along a 
polygon you could set LAYER - TYPE  to line.
The syntax becomes easier.  Last thing is to get the symbols to rotate with 
the line you should set gap to a negative value.

I made a small example to show this.  Save this to line-with-squares.map and 
run it with:
shp2img -m line-square-test.map -o line-square-test.png

/Lars S.
_

MAP
  SIZE 1000 1000
  IMAGETYPE png24
  EXTENT -30 -10 60 30
  UNITS DD

SYMBOL
NAME "square_filled"
TYPE VECTOR
POINTS
0 0
0 1
1 1
1 0
0 0
END
FILLED TRUE
END

LAYER  # Simple polygon
  STATUS DEFAULT
  TYPE LINE
  FEATURE
POINTS
  5 25
  25 20
  45 20
  35 15
  50 0
  0 5
  5 25
END # Points
  END # Feature

  CLASS 
NAME "Symboltest"
STYLE
SYMBOL "square_filled"
COLOR 255 0 0
SIZE 12
INITIALGAP 15
GAP -30
OUTLINECOLOR 0 0 0
WIDTH 2.0
END  #STYLE   
END # CLASS
END # LAYER
END # MAP

---

-Originalmeddelande-
Från: "Anton Bakker" mailto:anton.bak...@geocat.net]>
Till: mapserver-users@lists.osgeo.org 
[mailto:mapserver-users@lists.osgeo.org]
Datum: 2017-10-11 17:45
Ämne: [mapserver-users] Polygon border with marker line symbol
Hi list,

I am trying to create the following symbology in MapServer, a marker line 
symbol on the border of a polygon, see the following ArcMap screenshot 
(https://i.imgur.com/9qN16tx.png [https://i.imgur.com/9qN16tx.png]).

I tried the two following options, but could not manage to recreate the 
above symbology:

1. Renders with marker fill on polygon (https://i.imgur.com/sFFznbq.png 
[https://i.imgur.com/sFFznbq.png]):

CLASS
NAME "countries_europe"
STYLE
ANTIALIAS TRUE
COLOR 204 204 204
END
STYLE
ANTIALIAS TRUE
GAP 30
OUTLINECOLOR 0 0 0
COLOR 255 0 0
SIZE 6
SYMBOL 'square'
WIDTH 1.0
END
END

2. Renders with marker line symbol on polygon border 
(https://i.imgur.com/Qwrw8wP.png [https://i.imgur.com/Qwrw8wP.png]), but the 
marker is missing the fill:

CLASS
NAME "countries_europe"
STYLE
ANTIALIAS TRUE
COLOR 204 204 204
END
STYLE
ANTIALIAS TRUE
GAP 30
OUTLINECOLOR 0 0 0
SIZE 6
SYMBOL 'square'
WIDTH 1.0
END
END

Does anyone know whether it is possible to achieve this symbology? It seems 
the only way to set a picture line symbol on the border of a polygon is to 
only set the outlinecolor, but then there is no way to set the fill color 
for the marker. I could not find 

[mapserver-users] Issue with label offset

2017-02-28 Thread Björn Danielsson
We are using different mapfiles for different users and sometimes over the 
same geographical area.

Funny thing is that in one of the cases where two mapfiles cover the same 
area a label for a line works ok in  mapfile A but not in mapfile B despite 
the fact that the label code for one particular line feature is identical in 
the two mapfiles.

I have traced this to OFFSET. OFFSET 3 99 works in mapfile A but gives Error 
500 Internal Server Error in mapfile B. On the other hand OFFSET 1 99 and -2 
99 works fine in mapfile B.

The two mapfiles use different epsg and have different scale levels and as 
far as I can see that is the only thing that differs.

I can contribute with more data if anyone will dig into this.

   LABEL
TEXT   "[text]"
COLOR  0 0 255
OUTLINECOLOR 255 255 255
TYPE   TRUETYPE
FONT   arial
SIZE   8
ANTIALIAS  FALSE
POSITION   CC
PARTIALS   FALSE
FORCE  TRUE
MINDISTANCE 0
BUFFER  0
ANGLE  FOLLOW
MAXOVERLAPANGLE 180
OFFSET 3 99
  END

Björn Danielsson___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Road shields on Mapserver 7

2017-02-27 Thread Björn Danielsson
Interesting discussion!
I have an issue with geotransform 'labelpnt' I so far have failed to solve.

Consider a line that depicts a creek. Sometimes it is important to show the 
direction of flow. That is mostly achieved on maps by placing arrows along 
the creek showing which way the water flows.

I have tried to use LABEL and GEOMTRANSFORM 'labelpoint' with an arrow 
symbol and where the label has no text but has REPEATDISTANCE and ANGLE. 
Problem is that the symbol is not affected by ANGLE ( neither FOLLOW, AUTO 
or AUTO2 ). Does anybody know how to rotate labelpoint symbols or is it not 
possible?.

Plan B is to use a LABEL with TEXT = ">" which works fine but is not that 
elegant.

Björn D
-Original Message-
From: lars.schylb...@blixtmail.se
To: mapserver-users@lists.osgeo.org
Date: Thu, 23 Feb 2017 21:15:36 +0100
Subject: Re: [mapserver-users] Road shields on Mapserver 7


Hi,

I more detail in my previous example the offset in the style block is 
because the example is part of a block with three road shields stacked.

/Lars S.

One single shield would be like this:

LABEL
EXPRESSION ('[VAGNR1]' ~ '^[0-9][0-9]$' )
# Blue two digits
STYLE
GEOMTRANSFORM "labelpnt"
SYMBOL VAGNRBOX
COLOR 64 168 217
SIZE 10
END
TEXT '[VAGNR1]'
FONT 'sc'
TYPE truetype
POSITION cc
COLOR 255 255 255
SIZE 7
# FORCE: TRUE
REPEATDISTANCE 150
MINDISTANCE 300
PRIORITY 2
END


-Originalmeddelande-
Från: lars.schylb...@blixtmail.se [mailto:lars.schylb...@blixtmail.se]
Till: mapserver-users@lists.osgeo.org 
[mailto:mapserver-users@lists.osgeo.org]
Datum: 2017-02-23 21:04
Ämne: Re: [mapserver-users] Road shields on Mapserver 7


Hi,

This is how I do it in MS7.0.  This is just part of the class with the first 
two labels.  I have different shield depending on the number of digits.
I also have different color depending on the color of the shield.  This is 
following European road label standard.

/Lars S

CLASS
EXPRESSION ("[VAGNR1]" ~ "^[E0-9]*$" AND "[VAGNR2]" ~ 
"^[E0-9]*$" AND "[VAGNR3]" ~ "^[E0-9]*$"  )
LABEL
EXPRESSION ('[VAGNR1]' ~ '^E.$')
# first shield - green - one digit
STYLE
GEOMTRANSFORM "labelpnt"
SYMBOL VAGNRBOX
COLOR 115 179 115
OFFSET 0 -13
SIZE 10
END
TEXT '[VAGNR1]'
FONT 'sc'
TYPE truetype
POSITION CC
COLOR 255 255 255
SIZE 7
OFFSET 0 -13
REPEATDISTANCE 100
MINDISTANCE 100
PRIORITY 9
FORCE GROUP
END
LABEL
EXPRESSION ('[VAGNR1]' ~ '^E..$')
# first shield - green - two digits
STYLE
GEOMTRANSFORM "labelpnt"
SYMBOL VAGNRBOX_3TKN
COLOR 115 179 115
OFFSET 0 -13
SIZE 10
END
TEXT '[VAGNR1]'
FONT 'sc'
TYPE truetype
POSITION CC
COLOR 255 255 255
SIZE 7
OFFSET 0 -13
REPEATDISTANCE 100
MINDISTANCE 100
PRIORITY 9
FORCE GROUP
END___
mapserver-users mailing list
mapserver-users@lists.osgeo.org [mailto:mapserver-users@lists.osgeo.org]
https://lists.osgeo.org/mailman/listinfo/mapserver-users 
[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] Georef output

2016-12-14 Thread Björn Danielsson
Hi,

I am trying to get georeferenced maps from Mapserver.

For geoTiff the maps get georeferenced allright but gdalinfo shows that 
there is no data under 'Coordinate system is:'. The epsg is set in the 
mapfile but does not seem to get passed to the gTiff driver. How can I fix 
that?

For geoPDF ( using CAIRO ) neither extents nor coordinate system are added 
to the output file. Fixable?

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