[mapserver-users] Offset a label based on map units?

2018-08-28 Thread Basques, Bob (CI-StPaul)
All,

This is actually a gridding question I think, but, here goes anyway,  I have a 
grid of polygons that I want to label, but I want to adjust the label position 
(OFFSET) based on ground units (not pixels) . Either from the edges in, or from 
the center out.  Looks like OFFSET only understands pixels, even if UNITS is 
set.

Anyone know of a way around this?

Thanks

bobb





We learn from history that we do not learn from history.

   ~ George Wilhelm Hegel



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

Re: [mapserver-users] INSPIRE xsd MapServer WFS 2.0

2018-08-28 Thread ann

Hello,

Did you solve this question about xsd? 



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] scaletoken data or tileindex

2018-08-28 Thread Travis Kirstine
I'm trying to use the scaletoken with a raster layer that is represented by
a combination of full resolution tiles (tileindex) and a stack of merged
lower resolution geotiffs.  Is is possible to use the scaletoken to use a
combination of a TILEINDEX and DATA to call the source data?   From the
error log it appears to expect one or the other (DATA or TILEINDEX)

 LAYER
NAME spot_z16
METADATA
wms_title "Zone 16 Spot"
wms_extent "275997 5109997 732003 6304003"
END
TYPE RASTER
PROCESSING "RESAMPLE=BILINEAR"
OFFSITE 0 0 0
PROJECTION
"init=epsg:26916"
END
SCALETOKEN
NAME "%pri%"
VALUES
"0" "spot_z16_rgb_2km_tindex"
"10" "z16_rgb_24m_mosaic"
"80" "z16_rgb_192m_mosaic"
END
END
TILEINDEX "/maps/spot_tindex/%pri%"
DATA "/maps/spot_overalls/%pri%.tif"
END
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] GetMap vs GetFeatureinfo sort

2018-08-28 Thread Lime, Steve D (MNIT)
Another idea might be to add a couple of columns to the data called GetMap and 
GetFeatureInfo and store the appropriate values to get you the order you want 
in them.

Then you can use runtime substitution in the DATA attribute to set the sort 
column based on the request type. E.g.

  DATA “... ORDER BY %request% ...”

You set validation on the the request accordingly. Might be some other SQL 
options to capitalize on.

—Steve

From: mapserver-users  on behalf of 
Rahkonen Jukka (MML) 
Sent: Tuesday, August 28, 2018 4:33:54 AM
To: Jörg Thomsen (WhereGroup); mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] GetMap vs GetFeatureinfo sort

Hi,

>From https://mapserver.org/mapfile/layer.html
"Inside a layer, only a single class will be used for the rendering of a 
feature. Each feature is tested against each class in the order in which they 
are defined in the mapfile. The first class that matches the its min/max scale 
constraints and its EXPRESSION check for the current feature will be used for 
rendering."

So in your example first geometry is rendered first with color 53 68 150 and 
the second one above it with color 188 34 115.

You wrote "I expect that the topmost feature returned in getfeatureinfo response
correspond to the topmost feature drawn on map". If you think of the rendering 
process, of yourself painting with brushes, the topmost feature on the map is 
the one that is painted last. If I understand it ight you would like to get a 
reversed order for GetFeatureInfo.

A workaround could be to make a copy of the layer you show on the map but with 
reversed sorting order. This layer would be used only for GetFeatureInfo 
requests. According to WMS specification QUERY_LAYERS must be a subset of 
LAYERS but if I remember right Mapserver is not strict with that and you could 
capture the GFT request on server side and change the name of the QUERY_LAYER 
on-the-fly. If Mapserver is strict, or you use some other server that follows 
the standard, you must also manipulate the request a bit more and add this 
extra layer into =.  Of course if you can control the client side you 
can make it to alter the GetFeatureInfo instead.

Another option could be to read the feature info with WFS GetFeature instead of 
WMS GetFeatureInfo. I also guess that heavy users of Mapserver will recommend 
you to use some MapScript dialect.

Be aware that Mapserver does not offer a real WYSIWYG experience with 
GetFeatureInfo. You can get also something what you do not see because 
Mapserver does not filter the GFI result by rendering rules like 
min/maxscaledenominators. I also believe that even if you have classes only for 
expression values 1 and 4 in your mapfile the GetFeatureInfo finds everything 
that appears in the data. I am not sure about this, though.

-Jukka Rahkonen-




-Alkuperäinen viesti-
Lähettäjä: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] 
Puolesta Jörg Thomsen (WhereGroup)
Lähetetty: 28. elokuuta 2018 10:13
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] GetMap vs GetFeatureinfo sort

Hi,

hm, I would have expected the classes to be drawn in the same order as in the 
mapfile.

You could try to use the label-section with geomtransform 'labelpoint'
[1], perhaps mapserver there takes care of the mapfile order...

Another option would be to use grouped layers, I guess you found this
already:
https://gis.stackexchange.com/questions/71152/mapserver-layer-classes-display-order
-> 2nd answer

Jörg


[1] https://mapserver.org/mapfile/label.html
[2] https://mapserver.org/mapfile/geomtransform.html

Am 27.08.2018 um 20:37 schrieb pe_lord:
> Thanks.
>
> Here more informations.
>
> I have 2 overlapping geometries.
>
> My class are based on a field ==> CLASSITEM "code_type" and appear in
> my mapfile in this order.
>
> CLASS
> NAME "Blue CLASS"
> EXPRESSION '1'
> STYLE
> SYMBOL "square"
> SIZE 8
>COLOR 53 68 150
> END
> END
> ...
> CLASS
> NAME "Red Class"
> EXPRESSION '4'
> STYLE
> SYMBOL "square"
> SIZE 8
>COLOR 188 34 115
> END
> END
>
> My data is stored in this order into PG, with this structure (id,
> code_type,geom):
> id1,4,geom
> id2,1,geom
>
> If I understand properly, my last geometrie (id2) is plotted on top of
> other classes. This is making sense.
>
> Otherwise, in the getfeatureinfo, the same order is kept, this a
> non-sense according to my classes's order.
>
> I would like to to present this data in a flipped order like,
> according to my classes's logic:
> id2,1
> id1,4
>
>
> I expect that the topmost feature returned in getfeatureinfo response
> correspond to the topmost feature drawn on map. I would like to have a
> constant response, independently from my template format (gml, html,
> json...)
>
> You will find an
> 
>
>
> Here what I tried without succes:
> - flip my 

Re: [mapserver-users] GetMap vs GetFeatureinfo sort

2018-08-28 Thread Rahkonen Jukka (MML)
Hi,

From https://mapserver.org/mapfile/layer.html
"Inside a layer, only a single class will be used for the rendering of a 
feature. Each feature is tested against each class in the order in which they 
are defined in the mapfile. The first class that matches the its min/max scale 
constraints and its EXPRESSION check for the current feature will be used for 
rendering."

So in your example first geometry is rendered first with color 53 68 150 and 
the second one above it with color 188 34 115.

You wrote "I expect that the topmost feature returned in getfeatureinfo 
response 
correspond to the topmost feature drawn on map". If you think of the rendering 
process, of yourself painting with brushes, the topmost feature on the map is 
the one that is painted last. If I understand it ight you would like to get a 
reversed order for GetFeatureInfo.

A workaround could be to make a copy of the layer you show on the map but with 
reversed sorting order. This layer would be used only for GetFeatureInfo 
requests. According to WMS specification QUERY_LAYERS must be a subset of 
LAYERS but if I remember right Mapserver is not strict with that and you could 
capture the GFT request on server side and change the name of the QUERY_LAYER 
on-the-fly. If Mapserver is strict, or you use some other server that follows 
the standard, you must also manipulate the request a bit more and add this 
extra layer into =.  Of course if you can control the client side you 
can make it to alter the GetFeatureInfo instead.

Another option could be to read the feature info with WFS GetFeature instead of 
WMS GetFeatureInfo. I also guess that heavy users of Mapserver will recommend 
you to use some MapScript dialect.

Be aware that Mapserver does not offer a real WYSIWYG experience with 
GetFeatureInfo. You can get also something what you do not see because 
Mapserver does not filter the GFI result by rendering rules like 
min/maxscaledenominators. I also believe that even if you have classes only for 
expression values 1 and 4 in your mapfile the GetFeatureInfo finds everything 
that appears in the data. I am not sure about this, though.

-Jukka Rahkonen-




-Alkuperäinen viesti-
Lähettäjä: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] 
Puolesta Jörg Thomsen (WhereGroup)
Lähetetty: 28. elokuuta 2018 10:13
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] GetMap vs GetFeatureinfo sort

Hi,

hm, I would have expected the classes to be drawn in the same order as in the 
mapfile.

You could try to use the label-section with geomtransform 'labelpoint'
[1], perhaps mapserver there takes care of the mapfile order...

Another option would be to use grouped layers, I guess you found this
already:
https://gis.stackexchange.com/questions/71152/mapserver-layer-classes-display-order
-> 2nd answer

Jörg


[1] https://mapserver.org/mapfile/label.html
[2] https://mapserver.org/mapfile/geomtransform.html

Am 27.08.2018 um 20:37 schrieb pe_lord:
> Thanks. 
> 
> Here more informations.
> 
> I have 2 overlapping geometries. 
> 
> My class are based on a field ==> CLASSITEM "code_type" and appear in 
> my mapfile in this order.
> 
> CLASS
> NAME "Blue CLASS"
> EXPRESSION '1'
> STYLE
> SYMBOL "square"
> SIZE 8
>   COLOR 53 68 150
> END
> END
> ...
> CLASS
> NAME "Red Class"
> EXPRESSION '4'
> STYLE
> SYMBOL "square"
> SIZE 8
>   COLOR 188 34 115
> END
> END
> 
> My data is stored in this order into PG, with this structure (id,
> code_type,geom):
> id1,4,geom
> id2,1,geom
> 
> If I understand properly, my last geometrie (id2) is plotted on top of 
> other classes. This is making sense.
> 
> Otherwise, in the getfeatureinfo, the same order is kept, this a 
> non-sense according to my classes's order.
> 
> I would like to to present this data in a flipped order like, 
> according to my classes's logic:
> id2,1
> id1,4
> 
> 
> I expect that the topmost feature returned in getfeatureinfo response 
> correspond to the topmost feature drawn on map. I would like to have a 
> constant response, independently from my template format (gml, html,
> json...)
> 
> You will find an
> 
> 
> 
> Here what I tried without succes:
> - flip my mapfile's classes
> - sort my data based on my field (code_type). In this case, either I 
> have the getmap sorted in the right order, or the getfeatureinfo. Both 
> behaviors are impossible at the same time.
> 
> 
> 
> 
> 
> --
> Sent from: 
> http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


Viele Grüße,
Jörg Thomsen

-- 

**
 FOSS Academy Sommerschule 2018
 Alles Wichtige zur Erstellung einer GDI in nur 5 

Re: [mapserver-users] GetMap vs GetFeatureinfo sort

2018-08-28 Thread WhereGroup
Hi,

hm, I would have expected the classes to be drawn in the same order as
in the mapfile.

You could try to use the label-section with geomtransform 'labelpoint'
[1], perhaps mapserver there takes care of the mapfile order...

Another option would be to use grouped layers, I guess you found this
already:
https://gis.stackexchange.com/questions/71152/mapserver-layer-classes-display-order
-> 2nd answer

Jörg


[1] https://mapserver.org/mapfile/label.html
[2] https://mapserver.org/mapfile/geomtransform.html

Am 27.08.2018 um 20:37 schrieb pe_lord:
> Thanks. 
> 
> Here more informations.
> 
> I have 2 overlapping geometries. 
> 
> My class are based on a field ==> CLASSITEM "code_type" and appear in my
> mapfile in this order.
> 
> CLASS
> NAME "Blue CLASS"
> EXPRESSION '1'
> STYLE
> SYMBOL "square"
> SIZE 8
>   COLOR 53 68 150
> END
> END
> ...
> CLASS
> NAME "Red Class"
> EXPRESSION '4'
> STYLE
> SYMBOL "square"
> SIZE 8
>   COLOR 188 34 115
> END
> END
> 
> My data is stored in this order into PG, with this structure (id,
> code_type,geom):
> id1,4,geom
> id2,1,geom
> 
> If I understand properly, my last geometrie (id2) is plotted on top of other
> classes. This is making sense. 
> 
> Otherwise, in the getfeatureinfo, the same order is kept, this a non-sense
> according to my classes's order.
> 
> I would like to to present this data in a flipped order like, according to
> my classes's logic:
> id2,1
> id1,4
> 
> 
> I expect that the topmost feature returned in getfeatureinfo response
> correspond to the topmost feature drawn on map. I would like to have a
> constant response, independently from my template format (gml, html,
> json...)
> 
> You will find an 
>  
> 
> 
> Here what I tried without succes:
> - flip my mapfile's classes
> - sort my data based on my field (code_type). In this case, either I have
> the getmap sorted in the right order, or the getfeatureinfo. Both behaviors
> are impossible at the same time.
> 
> 
> 
> 
> 
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


Viele Grüße,
Jörg Thomsen

-- 

**
 FOSS Academy Sommerschule 2018
 Alles Wichtige zur Erstellung einer GDI in nur 5 Tagen erlernen!
 https://www.foss-academy.com/kompaktkurse
 *


Jörg Thomsen
WhereGroup GmbH & Co. KG
Gillweg 3
14193 Berlin
Germany

Fon: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 89 09 53 21

joerg.thom...@wheregroup.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
---
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
---
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users