Re: [MapServer-users] converting an expression to an OGC filter

2022-12-02 Thread Eichner, Andreas - SID
Your pattern seems to be wrong. You originally used a case insensitive regex 
0..$ meaning a value shall end with a '0' and to other arbitrary characters. 
Your PropertyIsLike filter is translated into an SQL "like": (for Postgres)
  postcode::text ilike '_%0__'
meaning a string as a whole shall consist of an arbitrary character followed by 
zero or more arbitrary characters followed by a '0' and two additional 
arbitrary characters. The corresponding regex would look like ^..*0..$
So I guess you would like want to use *0.. as pattern:
  
postcode
*0..
  

Regards, Andreas

-Ursprüngliche Nachricht-
Von: MapServer-users  Im Auftrag von 
Ian Turton
Gesendet: Freitag, 2. Dezember 2022 10:48
An: steve.l...@state.mn.us; mapserver-users@lists.osgeo.org
Betreff: Re: [MapServer-users] converting an expression to an OGC filter


On Thu, 1 Dec 2022 at 22:13, Lime, Steve D (MNIT) mailto:steve.l...@state.mn.us> > wrote:


Hi Ian: What’s the backend (e.g. shapefile, PostGIS, etc…)? MapServer 
expressions don’t support a wildcard operator (outside of a regex) so I’m not 
sure off the top of my head and things may vary by driver.


It's a postgis database on the backend, the original expression works fine but 
not when it's input as an OGC expression.

Ian 




 

--Steve

 

From: MapServer-users mailto:mapserver-users-boun...@lists.osgeo.org> > On Behalf Of Ian Turton
Sent: Thursday, December 1, 2022 9:50 AM
To: mapserver-users@lists.osgeo.org 
 
Subject: [MapServer-users] converting an expression to an OGC filter

 

I currently have an expression in my mapfile EXPRESSION ('[postcode]' 
~* '0..$') and I'm in the process of moving to using SLD for styling - I 
thought I could convert that expression to 

 

 
postcode
.*0..
  
Which I think should match from the start of the string (.*) to a 0 and 
then two characters (..) to the end of the string. But it doesn't work - 
neither does any variant on this work either.
Is there some issue with conversions between SLD Filters and internal 
expressions that I'm missing or is there something else I should know about 
LIKE filters?

Thanks

 

Ian

-- 

Ian Turton



-- 

Ian Turton



smime.p7s
Description: S/MIME cryptographic signature
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] using SCALETOKEN in an EXPRESSION

2022-11-10 Thread Eichner, Andreas - SID
According to RFC 86 SCALETOKENs are used to replace tokens inside a layer’s 
DATA statement - so it might simply not work within class expressions.
As a workaround you might use MINSCALEDENOM and MAXSCALEDENOM within CLASS.

Kind regards,
Andreas

-Ursprüngliche Nachricht-
Von: MapServer-users  Im Auftrag von 
Richard Greenwood
Gesendet: Donnerstag, 10. November 2022 03:00
An: mapserver 
Betreff: [MapServer-users] using SCALETOKEN in an EXPRESSION

Can anyone tell me what's wrong with my EXPRESSION below? I'm trying to filter 
features from the National Hydrology Dataset based on scale using SCALETOKEN 
and I can't seem to get it right. [Visibility] is a field in the data that 
suggests the scale at which a feature should be shown.

Thanks!

LAYER
  NAME "flowline"
  TYPE line
  DATA "shapefiles3857/nhd/flowline"
  SCALETOKEN
NAME "%priority%"
VALUES
  "0"   "0"
  "24000"   "24000"
  "5"   "5"
  "10"  "10"
  "25"  "25"
  "50"  "50"
  "100" "100"
  "200" "200"
  "500" "500"
END
  END
  CLASS
EXPRESSION ([Visibility] > %priority%)
STYLE
  COLOR 158 196 255
  MINSIZE 1
  SIZE 3
  MAXSIZE 6
END
  END
END


-- 

Richard W. Greenwood
www.greenwoodmap.com  


smime.p7s
Description: S/MIME cryptographic signature
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-20 Thread Eichner, Andreas - SID
Well, anti-aliased maps look much better and are basically the way to go. But 
in some corner cases it would be great to be able to turn this feature off. 
Cairo provides a single switch to do that and a patch that enables control over 
that from within MapServer can be simple and straight forward. With a little 
more effort this can be extended to switch between all possible 
CAIRO_ANTIALIAS_* values. So IMHO integrating this option for the Cairo 
renderer seems to be a good idea. For the AGG renderer it requires more work to 
make this runtime controllable. 

@Richard: The difference between both renderers is impressive. Since you are 
using this with much more complex maps can you give some feedback which one 
which one looks "better" (with tuning applied) and how usable the result is?

Regards, Andreas

-Ursprüngliche Nachricht-
Von: Steve Lime  
Gesendet: Mittwoch, 19. Mai 2021 18:24
An: Eichner, Andreas - SID 
Cc: Richard Greenwood ; mapserver 

Betreff: Re: [mapserver-users] anti-aliasing (was differing image size with 
different mapserver versions)

Worth adding to main?

On Wed, May 19, 2021 at 10:15 AM Eichner, Andreas - SID 
mailto:andreas.eich...@sid.sachsen.de> > wrote:


If you want to give Cairo a try, you could modify mapcairo.c like this:

diff --git a/mapcairo.c b/mapcairo.c
index 0f4cc094..d28947d6 100644
--- a/mapcairo.c
+++ b/mapcairo.c
@@ -517,6 +517,12 @@ imageObj* createImageCairo(int width, int height, 
outputFormatObj *format,colorO

 cairo_set_line_cap (r->cr,CAIRO_LINE_CAP_ROUND);
 cairo_set_line_join(r->cr,CAIRO_LINE_JOIN_ROUND);
+{
+const char* antialias = msGetOutputFormatOption(format, 
"ANTIALIAS", "TRUE");
+if (EQUAL(antialias, "OFF") || EQUAL(antialias, "FALSE") || 
EQUAL(antialias, "0")) {
+cairo_set_antialias(r->cr, CAIRO_ANTIALIAS_NONE);
+}
+}
 image->img.plugin = (void*)r;
   } else {
 msSetError(MS_RENDERERERR, "Cannot create cairo image of size 
%dx%d.",

This adds a FORMATOPTION "ANTIALIAS" to the CAIRO/*-Drivers that 
defaults to TRUE. But when explicitly set to 0/OFF/FALSE it calls 
cairo_set_antialias() to disable it. The raster buffer created by the CAIRO 
renderer is passed to the PNG writer which enables COMPRESSION, PALETTE_FORCE, 
QUANTIZE_FORCE. So you can combine it:

 OUTPUTFORMAT
   NAME "cairopng"
   DRIVER CAIRO/PNG
   MIMETYPE "image/png"
   IMAGEMODE RGB
   EXTENSION "png"
   FORMATOPTION "ANTIALIAS=FALSE"
   FORMATOPTION "QUANTIZE_FORCE=ON"
   FORMATOPTION "QUANTIZE_COLORS=256"
   FORMATOPTION "COMPRESSION=9"
 END

I used the msautotest/renderers/line_simple.map example to test and 
that crushed the resulting png from 5920 bytes down to 947 bytes. 

HTH, Andreas



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


Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Eichner, Andreas - SID
If you want to give Cairo a try, you could modify mapcairo.c like this:

diff --git a/mapcairo.c b/mapcairo.c
index 0f4cc094..d28947d6 100644
--- a/mapcairo.c
+++ b/mapcairo.c
@@ -517,6 +517,12 @@ imageObj* createImageCairo(int width, int height, 
outputFormatObj *format,colorO

 cairo_set_line_cap (r->cr,CAIRO_LINE_CAP_ROUND);
 cairo_set_line_join(r->cr,CAIRO_LINE_JOIN_ROUND);
+{
+const char* antialias = msGetOutputFormatOption(format, "ANTIALIAS", 
"TRUE");
+if (EQUAL(antialias, "OFF") || EQUAL(antialias, "FALSE") || 
EQUAL(antialias, "0")) {
+cairo_set_antialias(r->cr, CAIRO_ANTIALIAS_NONE);
+}
+}
 image->img.plugin = (void*)r;
   } else {
 msSetError(MS_RENDERERERR, "Cannot create cairo image of size %dx%d.",

This adds a FORMATOPTION "ANTIALIAS" to the CAIRO/*-Drivers that defaults to 
TRUE. But when explicitly set to 0/OFF/FALSE it calls cairo_set_antialias() to 
disable it. The raster buffer created by the CAIRO renderer is passed to the 
PNG writer which enables COMPRESSION, PALETTE_FORCE, QUANTIZE_FORCE. So you can 
combine it:

 OUTPUTFORMAT
   NAME "cairopng"
   DRIVER CAIRO/PNG
   MIMETYPE "image/png"
   IMAGEMODE RGB
   EXTENSION "png"
   FORMATOPTION "ANTIALIAS=FALSE"
   FORMATOPTION "QUANTIZE_FORCE=ON"
   FORMATOPTION "QUANTIZE_COLORS=256"
   FORMATOPTION "COMPRESSION=9"
 END

I used the msautotest/renderers/line_simple.map example to test and that 
crushed the resulting png from 5920 bytes down to 947 bytes. 

HTH, Andreas

-Ursprüngliche Nachricht-
Von: Richard Greenwood  
Gesendet: Mittwoch, 19. Mai 2021 16:12
An: Eichner, Andreas - SID 
Cc: mapserver 
Betreff: Re: [mapserver-users] anti-aliasing (was differing image size with 
different mapserver versions)

Andreas,

I have built a version of MapServer without AA enabled in mapagg.cpp as you 
have suggested. The reduction in file size is remarkable. In some cases it is 
1/2 the size of a GD/GIF or an optimized AGG/PNG8. Aesthetically the images are 
pretty bad at first, but by softening the colors in the map file and reducing 
the color contrast between adjacent features I'm getting images that are 
acceptable. I will try experimenting with Cairo driver modifications next. 
Thank you very much for your suggestion and detailed explanation.

Rich

On Wed, May 19, 2021 at 5:38 AM Eichner, Andreas - SID 
mailto:andreas.eich...@sid.sachsen.de> > wrote:


What AGG does with it's sub-pixel accuracy can be viewed as computing 
the contribution of the pixels of a virtually larger image to the pixels of the 
final image. It uses a gamma function to translate the amount of virtual pixels 
into an amount of visual impact on the final pixel - both expressed as a value 
in the range 0..1. AGG's default is a linear function that proportionally maps 
the range 0..1 onto 0..1 (i.e. y=x). MapServer (where applied) uses a linear 
gamma function that proportionally maps the range 0..gamma onto 0..1. All this 
results in intermediate color values giving a smoother and visually improved 
result as in this example: 
https://commons.wikimedia.org/wiki/File:Antialiasing.png#/media/Datei:Antialiasing.png

As PNG uses lossless compression these additional information enlarges 
the resulting files. So to reduce the size of your map image files it's best to 
turn anti-aliasing off. One way is to compile a special version with modified 
typedefs in mapagg.cpp to turn AA off. With Cairo you could use the method 
cairo_set_antialias(cairo_t*, CAIRO_ANTIALIAS_NONE) to switch it off. But then 
you would loose paletted image and compression control.

With the modified AGG you should still apply the other suggestions with 
reduced palette and maximum compression.

HTH


-Ursprüngliche Nachricht-
Von: mapserver-users mailto:mapserver-users-boun...@lists.osgeo.org> > Im Auftrag von Richard 
Greenwood
Gesendet: Dienstag, 18. Mai 2021 18:50
An: mapserver mailto:mapserver-users@lists.osgeo.org> >
Betreff: [mapserver-users] anti-aliasing (was differing image size with 
different mapserver versions)

Thanks to several helpful replies to my previous thread I know that the 
increased image size between MapServer 6 with the GD driver and MapServer 7 
with the AGG driver is due to differences in anti-aliasing (and lack of) in the 
two drivers. (AGG features anti-aliasing and sub-pixel resolution 
<https://en.wikipedia.org/wiki/Anti-Grain_Geometry> ).

Gamma setting from 0-1 affects the size of a filled polygon layer by a 
factor of almost 3x. But gamma has no effect on text, lines, and polygon 
outlines. So images comprised of these types of features are approximately 2x 
larger with th

Re: [mapserver-users] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Eichner, Andreas - SID
This should make the keyword ANTIALIAS in line styles work as expected and draw 
linestrings aliased if set to FALSE. But this works not only be adding another 
typedef. It also adds another member of that type and to use it the 
agg2Render*-methods need to selectively switch between the both according to 
the value set in the style. Currently only agg2RenderLine() does that. Others 
like agg2RenderPolygon() or agg2RenderGlyphsPath() for rendering polygons and 
text simply ignore that value and simply use the anti-aliasing one.

-Ursprüngliche Nachricht-
Von: Rahkonen Jukka (MML)  
Gesendet: Mittwoch, 19. Mai 2021 15:49
An: Eichner, Andreas - SID ; Richard Greenwood 
; mapserver 
Betreff: Re: [mapserver-users] anti-aliasing (was differing image size with 
different mapserver versions)

Hi,

Can someone say if the issue is already fixed or not by  
https://github.com/MapServer/MapServer/pull/6225/files

that adds:
typedef mapserver::renderer_scanline_bin_solid 
renderer_scanline_aliased;

Is this enough for turning antialiasing off and making png files with lots of 
linework smaller? Should/could there be something more for polygons which are 
rendered with plain fill without borderlines?

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: mapserver-users  Puolesta 
Eichner, Andreas - SID
Lähetetty: keskiviikko 19. toukokuuta 2021 14.39
Vastaanottaja: Richard Greenwood ; mapserver 

Aihe: Re: [mapserver-users] anti-aliasing (was differing image size with 
different mapserver versions)

What AGG does with it's sub-pixel accuracy can be viewed as computing the 
contribution of the pixels of a virtually larger image to the pixels of the 
final image. It uses a gamma function to translate the amount of virtual pixels 
into an amount of visual impact on the final pixel - both expressed as a value 
in the range 0..1. AGG's default is a linear function that proportionally maps 
the range 0..1 onto 0..1 (i.e. y=x). MapServer (where applied) uses a linear 
gamma function that proportionally maps the range 0..gamma onto 0..1. All this 
results in intermediate color values giving a smoother and visually improved 
result as in this example: 
https://commons.wikimedia.org/wiki/File:Antialiasing.png#/media/Datei:Antialiasing.png

As PNG uses lossless compression these additional information enlarges the 
resulting files. So to reduce the size of your map image files it's best to 
turn anti-aliasing off. One way is to compile a special version with modified 
typedefs in mapagg.cpp to turn AA off. With Cairo you could use the method 
cairo_set_antialias(cairo_t*, CAIRO_ANTIALIAS_NONE) to switch it off. But then 
you would loose paletted image and compression control.

With the modified AGG you should still apply the other suggestions with reduced 
palette and maximum compression.

HTH


-Ursprüngliche Nachricht-
Von: mapserver-users  Im Auftrag von 
Richard Greenwood
Gesendet: Dienstag, 18. Mai 2021 18:50
An: mapserver 
Betreff: [mapserver-users] anti-aliasing (was differing image size with 
different mapserver versions)

Thanks to several helpful replies to my previous thread I know that the 
increased image size between MapServer 6 with the GD driver and MapServer 7 
with the AGG driver is due to differences in anti-aliasing (and lack of) in the 
two drivers. (AGG features anti-aliasing and sub-pixel resolution 
<https://en.wikipedia.org/wiki/Anti-Grain_Geometry> ).

Gamma setting from 0-1 affects the size of a filled polygon layer by a factor 
of almost 3x. But gamma has no effect on text, lines, and polygon outlines. So 
images comprised of these types of features are approximately 2x larger with 
the AGG/PNG8 driver than with the GD/GIF driver. 

Where else should I be looking to reduce my images sizes? I serve rural areas 
with poor internet so in my case, smaller image sizes are more important than 
higher quality images.

Thanks,
Rich

-- 

Richard W. Greenwood, PLS
www.greenwoodmap.com <http://www.greenwoodmap.com> 
___
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] anti-aliasing (was differing image size with different mapserver versions)

2021-05-19 Thread Eichner, Andreas - SID
What AGG does with it's sub-pixel accuracy can be viewed as computing the 
contribution of the pixels of a virtually larger image to the pixels of the 
final image. It uses a gamma function to translate the amount of virtual pixels 
into an amount of visual impact on the final pixel - both expressed as a value 
in the range 0..1. AGG's default is a linear function that proportionally maps 
the range 0..1 onto 0..1 (i.e. y=x). MapServer (where applied) uses a linear 
gamma function that proportionally maps the range 0..gamma onto 0..1. All this 
results in intermediate color values giving a smoother and visually improved 
result as in this example: 
https://commons.wikimedia.org/wiki/File:Antialiasing.png#/media/Datei:Antialiasing.png

As PNG uses lossless compression these additional information enlarges the 
resulting files. So to reduce the size of your map image files it's best to 
turn anti-aliasing off. One way is to compile a special version with modified 
typedefs in mapagg.cpp to turn AA off. With Cairo you could use the method 
cairo_set_antialias(cairo_t*, CAIRO_ANTIALIAS_NONE) to switch it off. But then 
you would loose paletted image and compression control.

With the modified AGG you should still apply the other suggestions with reduced 
palette and maximum compression.

HTH


-Ursprüngliche Nachricht-
Von: mapserver-users  Im Auftrag von 
Richard Greenwood
Gesendet: Dienstag, 18. Mai 2021 18:50
An: mapserver 
Betreff: [mapserver-users] anti-aliasing (was differing image size with 
different mapserver versions)

Thanks to several helpful replies to my previous thread I know that the 
increased image size between MapServer 6 with the GD driver and MapServer 7 
with the AGG driver is due to differences in anti-aliasing (and lack of) in the 
two drivers. (AGG features anti-aliasing and sub-pixel resolution 
 ).

Gamma setting from 0-1 affects the size of a filled polygon layer by a factor 
of almost 3x. But gamma has no effect on text, lines, and polygon outlines. So 
images comprised of these types of features are approximately 2x larger with 
the AGG/PNG8 driver than with the GD/GIF driver. 

Where else should I be looking to reduce my images sizes? I serve rural areas 
with poor internet so in my case, smaller image sizes are more important than 
higher quality images.

Thanks,
Rich

-- 

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] differing image size with different mapserver versions

2021-05-17 Thread Eichner, Andreas - SID
Hi,

Mapniks *-gamma-method defaults to "power" which means the transform pow(x, 
gamma) is applied to the original pixel value. I'd guess this is done before 
merging the color value to draw and the value currently stored in the pixel 
buffer. It's described as "producing slightly smoother line". I think 
technically this results in color values that are more nearby which might mean 
they computationally collapse to the same quantization value or are at least 
better compressable and therefore result in smaller image files. But might be 
wrong...

Greets, Andreas 

-Ursprüngliche Nachricht-
Von: Rahkonen Jukka (MML)  
Gesendet: Montag, 17. Mai 2021 16:14
An: Eichner, Andreas - SID ; Mapserver-Users 
(mapserver-users@lists.osgeo.org) 
Betreff: Re: [mapserver-users] differing image size with different mapserver 
versions

Hi,

Does it mean that Mapnik is using the many settings called *-gamma with range 
0-1 for a shortcut to adjust both the gamma and corresponding gamma method by 
the same http://mapnik.org/mapnik-reference/?

The goal of this thread is not actually to turn of antialiasing but to create 
smaller files and decreasing the antialiasing effect could probably do that. 
The original sample image "mapserv64.png" is antialiased to my eyes. Do you 
think that adjusting the gamma value alone could have an effect on the file 
size?

-Jukka Rahkonen-


-Alkuperäinen viesti-----
Lähettäjä: Eichner, Andreas - SID  
Lähetetty: maanantai 17. toukokuuta 2021 16.53
Vastaanottaja: Rahkonen Jukka (MML) ; 
Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: AW: [mapserver-users] differing image size with different mapserver 
versions

Hi Jukka,

as a result of the discussion IMO Erik created a patch to be able to switch 
AGGs anti-aliasing on and off using the ANTIALIAS keyword. This was merged by 
Even Rouault in https://github.com/MapServer/MapServer/pull/6225
It originally worked IMHO only for lines styles. But GAMMA is __not__ the way 
to turn anti-aliasing off.

Greets, Andreas

-Ursprüngliche Nachricht-
Von: mapserver-users  Im Auftrag von 
Rahkonen Jukka (MML)
Gesendet: Montag, 17. Mai 2021 15:26
An: Rahkonen Jukka (MML) ; Mapserver-Users 
(mapserver-users@lists.osgeo.org) 
Betreff: Re: [mapserver-users] differing image size with different mapserver 
versions

Hi,

 

Here is a long thread about turning off antialias 
http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html
 
<http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html>
 .

 

I had the same wrong idea about gamma=0 back then but perhaps gamma=0.01 could 
work.

 

-Jukka Rahkonen-

 

Lähettäjä: mapserver-users  Puolesta 
Rahkonen Jukka (MML)
Lähetetty: maanantai 17. toukokuuta 2021 16.06
Vastaanottaja: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions

 

Hi,

 

(Re-sent as edited to mailing list because the body was originally too long.

 

Are you sure about “I actually found that 6.4 produced small, aliased images 
with both the GD and AGG drivers”.  Originally the AGG library could only do 
anti-aliasing and that affected also Mapserver 5 
https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html 
<https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html> .

 

I guess that Mapnik folks have since that added support for controlling 
anti-aliasing with gamma setting http://mapnik.org/mapnik-reference/.

I can see that gamma can be used also with Mapserver 
https://www.mapserver.org/mapfile/outputformat.html

 

Have a try with gamma=0. However, Even wrote that turning off antialiasing is 
possible only in master, so perhaps gamma=0 does not work.

 

The documentation for Mapserver 5 tells that “All ANTIALIAS keywords are now 
ignored". But the keyword still appears in quite a many places:

https://mapserver.org/search.html?q=antialias

 

Would it be time to remove them as well as now not useful references to GD 
renderer (removed by RFC 99 in 2013)?

 

-Jukka Rahkonen-

 

 

Lähettäjä: mapserver-users mailto:mapserver-users-boun...@lists.osgeo.org> > Puolesta Richard Greenwood
Lähetetty: maanantai 17. toukokuuta 2021 15.26
Kopio: mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org> 
Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions

 

Thanks for the suggestions. The consensus seems to be that anti-aliasing is 
causing the increased size. The documentation here 
<https://mapserver.org/output/antialias.html>  says "Since version 6.0, 
MapServer will produce aliased output for the “gd/” drivers, and antialiased 
output for the “agg/” and “cairo/” ones" and it's also mentioned here 
<https://lists.osgeo.org/pipermail/mapserver-users/2012-April/072011.html>  in 
Thomas Bonfort's reply. I actuall

Re: [mapserver-users] differing image size with different mapserver versions

2021-05-17 Thread Eichner, Andreas - SID
Hi Jukka,

as a result of the discussion IMO Erik created a patch to be able to switch 
AGGs anti-aliasing on and off using the ANTIALIAS keyword. This was merged by 
Even Rouault in https://github.com/MapServer/MapServer/pull/6225
It originally worked IMHO only for lines styles. But GAMMA is __not__ the way 
to turn anti-aliasing off.

Greets, Andreas

-Ursprüngliche Nachricht-
Von: mapserver-users  Im Auftrag von 
Rahkonen Jukka (MML)
Gesendet: Montag, 17. Mai 2021 15:26
An: Rahkonen Jukka (MML) ; Mapserver-Users 
(mapserver-users@lists.osgeo.org) 
Betreff: Re: [mapserver-users] differing image size with different mapserver 
versions

Hi,

 

Here is a long thread about turning off antialias 
http://osgeo-org.1560.x6.nabble.com/Draw-roads-WITHOUT-anti-aliasing-td5338614.html
 

 .

 

I had the same wrong idea about gamma=0 back then but perhaps gamma=0.01 could 
work.

 

-Jukka Rahkonen-

 

Lähettäjä: mapserver-users  Puolesta 
Rahkonen Jukka (MML)
Lähetetty: maanantai 17. toukokuuta 2021 16.06
Vastaanottaja: Mapserver-Users (mapserver-users@lists.osgeo.org) 

Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions

 

Hi,

 

(Re-sent as edited to mailing list because the body was originally too long.

 

Are you sure about “I actually found that 6.4 produced small, aliased images 
with both the GD and AGG drivers”.  Originally the AGG library could only do 
anti-aliasing and that affected also Mapserver 5 
https://lists.osgeo.org/pipermail/mapserver-users/2007-September/025467.html 
 .

 

I guess that Mapnik folks have since that added support for controlling 
anti-aliasing with gamma setting http://mapnik.org/mapnik-reference/.

I can see that gamma can be used also with Mapserver 
https://www.mapserver.org/mapfile/outputformat.html

 

Have a try with gamma=0. However, Even wrote that turning off antialiasing is 
possible only in master, so perhaps gamma=0 does not work.

 

The documentation for Mapserver 5 tells that “All ANTIALIAS keywords are now 
ignored". But the keyword still appears in quite a many places:

https://mapserver.org/search.html?q=antialias

 

Would it be time to remove them as well as now not useful references to GD 
renderer (removed by RFC 99 in 2013)?

 

-Jukka Rahkonen-

 

 

Lähettäjä: mapserver-users mailto:mapserver-users-boun...@lists.osgeo.org> > Puolesta Richard Greenwood
Lähetetty: maanantai 17. toukokuuta 2021 15.26
Kopio: mapserver-users@lists.osgeo.org  
Aihe: Re: [mapserver-users] differing image size with different mapserver 
versions

 

Thanks for the suggestions. The consensus seems to be that anti-aliasing is 
causing the increased size. The documentation here 
  says "Since version 6.0, 
MapServer will produce aliased output for the “gd/” drivers, and antialiased 
output for the “agg/” and “cairo/” ones" and it's also mentioned here 
  in 
Thomas Bonfort's reply. I actually found that 6.4 produced small, aliased 
images with both the GD and AGG drivers and regardless of my ANTIALIAS 
true/false setting. 

 

Would anyone consider re-enabling the ANTIALIAS true/false option?

 

Thanks,

Rich

 

 

 

 

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


Re: [mapserver-users] Mapserver 7.6.2

2021-01-07 Thread Eichner, Andreas - SID
Hallo Stéphane,

glad to hear it works. The problem with this is how to keep those packags up to 
date. As long as this list is relatively static you might be able to use a 
script to synchronize them to a local directory, create the metadata and use 
this local repository with yum-priorities to favour those packages.
  The messages in to Apache httpd-log don't log like errors. AFAIK those a just 
normal message. CGI doesn't define a way to categorize messages so debug, info, 
err are all going the to same stderr channel. The CGI-Module simply logs 
everything as class "error". It should be possible to redirect those MapServer 
messages to a separate file using mapfile-directives (see 
https://mapserver.org/optimization/debugging.html)

Regards, Andreas

-Ursprüngliche Nachricht-
Von: Stephane Poissant  
Gesendet: Donnerstag, 7. Januar 2021 20:40
An: mapServer-users 
Cc: Jeff McKenna ; Eichner, Andreas - SID 

Betreff: Re: Mapserver 7.6.2

Good day Andreas,

Your suggestion about replacing boost packages from AWS with CentOS ones 
worked. 
Good catch. I was able to finally compile and install all my requirements. 
Thumbs up!
I had to download the whole list and install using rpm -ivh *.rpm.

One more thing. 
I am able to render many tiles (images) but I have trouble with some others. I 
double checked for librairies to avoid having duplicates or many versions...
But it does not seem to be the case.


I am getting a bunch of the following in my apache logs:
 (Some data was replaced with  on purpose for security reasons in the 
below log output) ###


[cgi:error] [pid 2512] [client 10.2.10.155:60456] AH01215: GDAL: 
GDALOpen(PG:host=.com <http://.com>  port= dbname=‘xx' 
user=‘x' password=XX schema='public' table=‘xx' 
mode='2', this=0x125df80) succeeds as PostGISRaster.: 
/var/www/html/map/mapserv.cgi, referer: http://x.com/
[cgi:error] [pid 2509] [client 10.2.10.155:60451] AH01215: GDAL: GDAL_CACHEMAX 
= 388 MB: /var/www/html/map/mapserv.cgi, referer: http://x.com/
…//snip//...
AH01215: GDAL: In GDALDestroy - unloading GDAL shared library.
...

What could cause that? Flags while doing cmake? (Python maybe)
(I am using the below one):
cmake -Wno-dev 
-DCMAKE_PREFIX_PATH="/usr/proj72/;/usr/pgsql-12/;/usr/gdal32;/usr/geos39/" 
-DWITH_PYTHON=0 -DWITH_JAVA=1 -DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=1 
-DWITH_FCGI=0 -DWITH_EXEMPI=0 -DWITH_GIF=0 -DWITH_FCGI=0 -DWITH_PROTOBUFC=0 
-DWITH_CLIENT_WMS=1 -DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 
-DCMAKE_BUILD_TYPE=Release ..

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


Re: [mapserver-users] Mapserver 7.6.2

2021-01-06 Thread Eichner, Andreas - SID
Good morning Stephane,

to me it seems to be an issue with the amazon boost packages. This is what I 
have installed:

# yum list installed SFCGAL CGAL geos* boost*
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-
  : disabled-repos, subscription-manager
Installed Packages
CGAL.x86_64  4.7-1.rhel7.1   @pgdg-common
SFCGAL.x86_641.3.1-2.rhel7   @pgdg-common
boost-date-time.x86_64   1.53.0-28.el7   @rhel-7-server-rpms
boost-serialization.x86_64   1.53.0-28.el7   @rhel-7-server-rpms
boost-system.x86_64  1.53.0-28.el7   @rhel-7-server-rpms
boost-thread.x86_64  1.53.0-28.el7   @rhel-7-server-rpms
geos39.x86_643.9.0-1.rhel7   @pgdg-common
geos39-devel.x86_64  3.9.0-1.rhel7   @pgdg-common

you might try to install the boost packages from CentOS over those from Amazon 
and cross fingers it causes no conflicts.
I think it's worth a try.

Regards, Andreas

-Ursprüngliche Nachricht-
Von: Stephane Poissant  
Gesendet: Donnerstag, 7. Januar 2021 00:13
An: mapServer-users 
Cc: Jeff McKenna ; Eichner, Andreas - SID 

Betreff: Re: Mapserver 7.6.2

Hi Andreas,

Big thanks for your suggestion.
I am just trying to build mapserver… Nothing else!

...But I can’t make it happen!

No matter what I try, I end up with the same error pushing me in the same loop 
over and over again… (rebuilding from scratch all components > which fails 
anyway)
I followed your recipe and it did produce the same error as I have from 
beginning. I have this SFCGAL error complaining about boost.
Then if I compile boost, I need to compile CGAL and SFCGAL, etc… Then I end up 
with a similar error from SFCGAL but one line error instead of three (if I 
recall).

Difference: My linux is Amazon Linux 2 which is ‘like’ a CentOS 7.

I installed all the packages successfully, used make 3.19, etc.  (as you 
suggested),
If you have other ideas, please let me know. I need to get this going by the 
end of this week (if possible).

PS: All my errors so far are related to SFCGAL / Boost.
Cmake works fine. It fails when I do ‘make’.

Could you tell me which boost version / packages you have installed?

Once again, thank you very much. Well appreciated.
SP


[root@mapserver-0290 build]# yum list SFCGAL CGAL geos39-de* boost*
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
270 packages excluded due to repository priority protections
Installed Packages
CGAL.x86_644.7-1.rhel7.1
   @pgdg-common
SFCGAL.x86_64  1.3.1-2.rhel7
   @pgdg-common
boost.x86_64   1.53.0-27.amzn2.0.3  
   @amzn2-core
boost-atomic.x86_641.53.0-27.amzn2.0.3  
   @amzn2-core
boost-chrono.x86_641.53.0-27.amzn2.0.3  
   @amzn2-core
boost-context.x86_64   1.53.0-27.amzn2.0.3  
   @amzn2-core
boost-date-time.x86_64 1.53.0-27.amzn2.0.3  
   installed
boost-filesystem.x86_641.53.0-27.amzn2.0.3  
   @amzn2-core
boost-graph.x86_64 1.53.0-27.amzn2.0.3  
   @amzn2-core
boost-iostreams.x86_64 1.53.0-27.amzn2.0.3  
   @amzn2-core
boost-locale.x86_641.53.0-27.amzn2.0.3  
   @amzn2-core
boost-math.x86_64  1.53.0-27.amzn2.0.3  
   @amzn2-core
boost-program-options.x86_64   1.53.0-27.amzn2.0.3  
   @amzn2-core
boost-python.x86_641.53.0-27.amzn2.0.3  
   @amzn2-core
boost-random.x86_641.53.0-27.amzn2.0.3  
   @amzn2-core
boost-regex.x86_64 1.53.0-27.amzn2.0.3  
   @amzn2-core
boost-serialization.x86_64 1.53.0-27.amzn2.0.3  
   @amzn2-core
boost-signals.x86_64   1.53.0-27.amzn2.0.3  
   @amzn2-core
boost-system.x86_641.53.0-27.amzn2.0.3  
   installed
boost-test.x86_64  1.53.0-27.amzn2.0.3  
   @amzn2-core
boost-thread.x86_641.53.0-27.amzn2.0.3  
   installed
boost-timer.x86

Re: [mapserver-users] Mapserver 7.6.2

2021-01-06 Thread Eichner, Andreas - SID
Hallo,

I'm still not sure what you're trying to achieve. I took a freshly installed 
RHEL7 maschine and did a simple installation with basically all packages from 
the repos and MapServer compiles just fine. This is what I did:

* enable the SCL, EPEL and the repo from postgresql.org:
yum install -y 
https://ftp.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install -y 
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
cat < /etc/yum.repos.d/sclo-rh.repo
# this is quick'n'dirty to use CentOS-SCLo on RHEL
[sclo-rh]
name=SCLo RH
baseurl=http://mirror.centos.org/centos/7/sclo/x86_64/rh/
enabled=1
gpgcheck=0
EOF

* grab cmake and MapServer from the web and unpack
wget https://download.osgeo.org/mapserver/mapserver-7.6.2.tar.gz && tar xzf 
mapserver-7.6.2.tar.gz
wget 
https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-Linux-x86_64.tar.gz
 && tar xzf cmake-3.19.2-Linux-x86_64.tar.gz
export PATH=$(pwd)/cmake-3.19.2-Linux-x86_64/bin:$PATH

* install additional build dependencies:
yum install -y gcc-c++ proj72-devel gdal32-devel libxml2-devel libcurl-devel 
postgis31_12-devel geos39-devel cairo-devel harfbuzz-devel fribidi-devel 
libjpeg-turbo-devel postgresql12-devel

* create and got into the build directory
mkdir mapserver-7.6.2/build && cd mapserver-7.6.2/build

* configure with cmake
cmake -Wno-dev 
-DCMAKE_PREFIX_PATH="/usr/proj72/;/usr/pgsql-12/;/usr/gdal32;/usr/geos39/" 
-DWITH_GIF=0 -DWITH_FCGI=0 -DWITH_PROTOBUFC=0 -DWITH_CLIENT_WMS=1 
-DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DCMAKE_BUILD_TYPE=Release ..

* and build
make

You might try to reprocude this and start from that.

HTH

-Ursprüngliche Nachricht-
Von: Stephane Poissant  
Gesendet: Mittwoch, 6. Januar 2021 14:41
An: Eichner, Andreas - SID 
Cc: mapServer-users ; Jeff McKenna 

Betreff: Re: Mapserver 7.6.2

I’ll give a try to 1.70 (compile)
The reason is that I cannot use 1.53 as it does not compile for the previously 
mentioned error with boost.
Even if I install (from repo) boost169) it installs almost everything but not 
de -devel has it breaks dependancies.
So using 1.75 was my first test. I am now trying 1.70. Fingers crossed it will 
work.

Would you have a specific version recommendation for the software stack?
(Without compilation)?

In any cases, I have to go with what I have in the repos available. 
I’ve been trying for quite sometime to find the right combination without 
success. Your input would be
Helpful to me.

Regards,
SP



Stéphane Poissant  
spoissan...@gmail.com <mailto:spoissan...@gmail.com> 


    On Jan 6, 2021, at 1:54 AM, Eichner, Andreas - SID 
mailto:andreas.eich...@sid.sachsen.de> > wrote:

Good morning,

//opt/boost/lib/libboost_serialization.so.1.75.0: undefined reference 
to `std::uncaught_exceptions()@GLIBCXX_3.4.22'
collect2: error: ld returned 1 exit status

it seems that libboost_serialization is build against a different 
(newer) libstdc++  as is used during the MapServer build. 
I'd suggest to use the distribution provided boost libraries (v1.53) 
and the system's default compiler packages (wich includes libstdc++).

HTH



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


Re: [mapserver-users] Mapserver 7.6.2

2021-01-05 Thread Eichner, Andreas - SID
Good morning,

//opt/boost/lib/libboost_serialization.so.1.75.0: undefined reference to 
`std::uncaught_exceptions()@GLIBCXX_3.4.22'
collect2: error: ld returned 1 exit status

it seems that libboost_serialization is build against a different (newer) 
libstdc++  as is used during the MapServer build. 
I'd suggest to use the distribution provided boost libraries (v1.53) and the 
system's default compiler packages (wich includes libstdc++).

HTH

-Ursprüngliche Nachricht-
Von: Stephane Poissant  
Gesendet: Dienstag, 5. Januar 2021 22:31
An: mapServer-users 
Cc: Jeff McKenna ; Eichner, Andreas - SID 

Betreff: Mapserver 7.6.2

Boost 1.75 (compiled) success
CGAL-4.14 (compiled) success
Gets-3.9.0 (compiled) success
SFCGAL-1.3.9 (compiled) success

From repo:
gdal32-devel.x86_643.2.0-3.rhel7@pgdg-common
postgis30_12-devel.x86_64  3.0.3-3.rhel7@pgdg12
postgresql12-devel.x86_64  12.5-1PGDG.rhel7 @pgdg12
proj72-devel.x86_647.2.0-3.rhel7@pgdg-common

[root@mapserver-0290 SFCGAL-v1.3.9]# ls -al /usr/lib64/libSFCGAL*
lrwxrwxrwx 1 root root   14 Jan  5 12:45 /usr/lib64/libSFCGAL.so -> 
libSFCGAL.so.1
lrwxrwxrwx 1 root root   18 Jan  5 19:55 /usr/lib64/libSFCGAL.so.1 -> 
libSFCGAL.so.1.3.9
-rwxr-xr-x 1 root root 13543200 Jan  5 19:55 /usr/lib64/libSFCGAL.so.1.3.9

Mapserver 7.6.2 (unable to fully compile)

//snip//

[ 79%] Building CXX object CMakeFiles/mapserver.dir/mapscript/v8/shape.cpp.o
[ 80%] Building CXX object 
CMakeFiles/mapserver.dir/mapscript/v8/v8_mapscript.cpp.o
[ 81%] Linking CXX shared library libmapserver.so
make[3]: Leaving directory `/root/inst/mapserver-7.6.2/build'
[ 81%] Built target mapserver
make[3]: Entering directory `/root/inst/mapserver-7.6.2/build'
Scanning dependencies of target shptreetst
make[3]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make[3]: Entering directory `/root/inst/mapserver-7.6.2/build'
[ 82%] Building C object CMakeFiles/shptreetst.dir/shptreetst.c.o
[ 82%] Linking C executable shptreetst
//opt/boost/lib/libboost_serialization.so.1.75.0: undefined reference to 
`std::uncaught_exceptions()@GLIBCXX_3.4.22'
collect2: error: ld returned 1 exit status
make[3]: *** [shptreetst] Error 1
make[3]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make[2]: *** [CMakeFiles/shptreetst.dir/all] Error 2
make[2]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make: *** [cmakebuild] Error 2

I am uncertain what could cause this issue.
Any suggestions?


Stéphane Poissant  

Portable: 514-793-3506
spoissan...@gmail.com <mailto:spoissan...@gmail.com> 

 

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


Re: [mapserver-users] mapserver 7.6.2

2021-01-05 Thread Eichner, Andreas - SID
You're using CGAL 5.1.2 which might be unsuitable. The SFCGAL v1.3.8 looks an 
ancient version. So I'd suggest to either retry with an older CGAL v4.x or a 
newer SFCGAL. At least v1.3.9 contains a "Fix with CGAL 5.1". See 
https://gitlab.com/Oslandia/SFCGAL/-/releases/v1.3.9  

-Ursprüngliche Nachricht-
Von: Stephane Poissant  
Gesendet: Dienstag, 5. Januar 2021 10:53
An: MapServer-users 
Cc: Eichner, Andreas - SID 
Betreff: Re: [mapserver-users] mapserver 7.6.2

I tried compiling it separately but it ends up having issues as well:

[root@mapserver-0290 SFCGAL-v1.3.8]# cmake -DCMAKE_BUILD_TYPE=Release .
-- CGAL 5.1.2 found
...
-- Build files have been written to: /root/inst/SFCGAL-v1.3.8

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


Re: [mapserver-users] mapserver 7.6.2

2021-01-04 Thread Eichner, Andreas - SID
Hi Stephane,

are you sure you installed boost-devel _and_ boost-serialization packages? 
While the first one gives "Headers and shared object symbolic links for the 
Boost C++ libraries." the second one contains "Run-Time support for 
serialization for persistence and marshaling." and contains the required 
libboost_serialization.so The -devel-package installed many boost components as 
dependencies but not all.

HTH, Andreas

-Ursprüngliche Nachricht-
Von: mapserver-users  Im Auftrag von 
Stephane Poissant
Gesendet: Montag, 4. Januar 2021 19:58
An: MapServer-users 
Betreff: Re: [mapserver-users] mapserver 7.6.2

I have tried many things but cannot get to compile ma-server successfully.
I rely on repository yum packages for everything but for geos (which I build 
manually).


My Makefile (relevant part)
CMAKEFLAGS=   -DWITH_GEOS=1 \
 -DCMAKE_SHARED_LINKER_FLAGS="-lgcov" -DWITH_CLIENT_WMS=1 \
 -DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_CSHARP=1 -DWITH_PHP=0 
-DWITH_PERL=1 \
 -DWITH_PYTHON=0 -DWITH_JAVA=1 -DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=1 
-DWITH_FCGI=0 -DWITH_EXEMPI=0 \
 -DCMAKE_BUILD_TYPE=Release -DWITH_RSVG=0 -DWITH_CURL=1 -DWITH_HARFBUZZ=1 
-DWITH_POINT_Z_M=1 -DWITH_MSSQL2008=OFF \
 -DCMAKE_PREFIX_PATH="/usr/proj72/;/usr/pgsql-12;/usr/gdal32/;/usr/lib64/“


Packages installed from repo:

- name: install postgresql pieces
  yum: pkg={{item}} state=latest
  with_items:
- postgresql12
- postgresql12-devel
- postgresql12-libs
- proj72
- proj72-devel
- postgis30_12
- postgis30_12-devel
- mpfr
- mpfr-devel
- gmp
- gmp-devel
- gdal32
- gdal32-devel
- gdal32-libs



Whenever I launch the build process, I get a boost error:

[ 82%] Building C object CMakeFiles/shptreetst.dir/shptreetst.c.o
[ 82%] Linking C executable shptreetst
//usr/lib64/libSFCGAL.so.1: undefined reference to 
`boost::archive::text_oarchive_impl::save(std::string
 const&)'
//usr/lib64/libSFCGAL.so.1: undefined reference to 
`boost::archive::basic_binary_oprimitive >::save(std::string const&)'
//usr/lib64/libSFCGAL.so.1: undefined reference to 
`boost::archive::text_iarchive_impl::load(std::string&)'
collect2: error: ld returned 1 exit status
make[3]: *** [shptreetst] Error 1
make[3]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make[2]: *** [CMakeFiles/shptreetst.dir/all] Error 2
make[2]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/inst/mapserver-7.6.2/build'
make: *** [cmakebuild] Error 2



Any suggestions are welcomed!

SP

Stéphane Poissant  
Portable: 514-793-3506
spoissan...@gmail.com  





On Dec 31, 2020, at 10:40 AM, Steve Lime mailto:sdl...@gmail.com> > wrote:

The original error looks like it was related to this:

  
https://stackoverflow.com/questions/39700537/undefined-reference-to-boost-serialization-functions

I think you do something like this (see 
https://stackoverflow.com/questions/25243336/specifying-libraries-for-cmake-to-link-to-from-command-line):

  cmake ... CMAKE_C_STANDARD_LIRBARIES="-lboost_serialization"

The new error looks to be related to multiple versions of GDAL 
installed. If you search on "AH01215: GDAL: In GDALDestroy - unloading GDAL 
shared library" you'll see that error referenced in a couple of forums, 
including mapserver-users. Do you have both a package and source-built GDAL? 
You might be better off uninstalling the source-built stuff. 

--Steve


On Wed, Dec 30, 2020 at 2:13 PM Jeff McKenna 
mailto:jmcke...@gatewaygeomatics.com> > wrote:


Hi Stephane,

I'm not sure about your last issue.  You could first execute 
'sudo 
ldconfig' so your last compiled libs are found, then try a 
shp2img 
command with your mapfile.

I have seen cases where there are conflicting library versions 
used by 
either the GDAL or MapServer dependencies: test this with a 
'ldd  command.

That's not a fun scenario, but, I've been there before ha.

Sorry maybe others have better advice for this.

-jeff



-- 
Jeff McKenna
GatewayGeo: MapServer Consulting and Training Services
co-founder of FOSS4G
http://gatewaygeo.com/



On 2020-12-30 1:36 p.m., Stephane Poissant wrote:
> HI Jeff,
> 
> That was a partial success! Thank you for you recommendation!
> It compiled successfully by compiling gems and recompiling 
goal as you 
> suggested.
> 
> I still 

Re: [mapserver-users] defining fallback source in WMS client definition

2020-03-30 Thread Eichner, Andreas - SID
Hallo Lars,

since you're on Ubuntu you're likely running MapServer in combination with an 
Apache HTTPd. So one option is to use an URL on localhost in your MapFile and 
let your webserver fordward it via mod_proxy using a fail over configuration.

HTH 

-Ursprüngliche Nachricht-
Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Lars Fricke
Gesendet: Montag, 30. März 2020 09:12
An: mapserver-users@lists.osgeo.org
Betreff: [mapserver-users] defining fallback source in WMS client definition

Dear all,

We use Mapserver 7.4.3 on Ubuntu. We use it as WMS client to collect several 
WMS into one place, serving them to our application. 
The task now is to define a fallback for one of the WMS source servers. That 
means: 

Mapserver will have two technically identical sources for the same output 
layer, only the URL is different. Is there a way to define (in mapfile 
preferably) that one source is only used if the other fails (is offline)? I 
thought of layer groups but then I will have a duplicate call if both sources 
are available. I do know this would be a better task for a load balancer or 
proxy but we do not have that option at this time.

Thank you for your time and thoughts.

Best

Lars


Lars Fricke
Forschung & Entwicklung


+49(0)39602-183097
+49(0)39602-183098


SkenData GmbH
Mühlendamm 8B
18055 Rostock
www.skendata.de



Wert14



www.wert14.de


Geschäftsführer: Jon Meis und Sven Jantzen
Amtsgericht Rostock HRB 12937


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

Re: [mapserver-users] OUTPUTFORMAT png 16-bits

2020-02-05 Thread Eichner, Andreas - SID
Hi Jukka,

you're damn right. Missed that he uses the GDAL-driver. Seems to be exactly as 
you say. For IMAGEMODE INT16 MapServer maps it to GDT_Int16 
(https://github.com/mapserver/mapserver/blob/master/mapgdal.c#L234). But GDAL's 
PNG-driver checks for GDT_UInt16 
(https://github.com/OSGeo/gdal/blob/master/gdal/frmts/png/pngdataset.cpp#L1477) 
and maps everything else to bitdepth=8

-Ursprüngliche Nachricht-
Von: Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi] 
Gesendet: Mittwoch, 5. Februar 2020 14:57
An: Eichner, Andreas - SID; Johannes Paul
Cc: mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] OUTPUTFORMAT png 16-bits

Hi,

But it is GDAL that is supposed to write the png because of
DRIVER GDAL/PNG

GDAL does support UInt16 fot png but it does not support int16. Perhaps this 
has something to do with the problem.

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: Eichner, Andreas - SID  
Lähetetty: keskiviikko 5. helmikuuta 2020 13.05
Vastaanottaja: Johannes Paul ; Rahkonen Jukka (MML) 

Kopio: mapserver-users@lists.osgeo.org
Aihe: AW: [mapserver-users] OUTPUTFORMAT png 16-bits

Hello Johannes,

16bit-PNGs are IMHO not supported by MapServer. Although libPNG supports 16bit 
depth (see http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-4.3) 
MapServer only supports 1, 2, 4 and 8bit palettes (see 
https://github.com/mapserver/mapserver/blob/master/mapimageio.c#L355).

HTH

-Ursprüngliche Nachricht-
Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Johannes Paul
Gesendet: Mittwoch, 5. Februar 2020 11:33
An: Rahkonen Jukka (MML)
Cc: mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] OUTPUTFORMAT png 16-bits

Hello Jukka,
Thanks for your reply, i've changed mimetype but i still get the 8-bits png...
Johannes 

Le mer. 5 févr. 2020 à 11:09, Rahkonen Jukka (MML) 
 a écrit :


Hi,

 

I would make a test by using some other mimetype, like image/png16, for 
eliminating the possibility that some internal  png configuration drives over 
your own outputformat.

 

I don’t know if it helps but it is cheap to test.

 

-Jukka Rahkonen-

 

Lähettäjä: mapserver-users  
Puolesta Johannes Paul
Lähetetty: keskiviikko 5. helmikuuta 2020 12.03
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] OUTPUTFORMAT png 16-bits

 

Hello,

I'm using Mapserver to output PNG 16-bits DEM raster from .HGT 
elevation data.

I'm using the below output format definition :

OUTPUTFORMAT
  NAME PNG16
  DRIVER GDAL/PNG
  MIMETYPE image/png
  IMAGEMODE INT16
  EXTENSION "png"
END

However I keep on getting the standard PNG 8-bits out of mapserver.

 

The strange thing being that when I use a similar config to get GeoTiff 
16-bits, I do get what I'm asking for :

 

OUTPUTFORMAT
  NAME GEOTIFF16
  DRIVER GDAL/GTiff
  MIMETYPE image/tiff
  IMAGEMODE INT16
  EXTENSION "tiff"
END



 




Could that be an issue with the GDAL/PNG driver ? It seems that the 
GDAL/PNG driver supports only CreateCopy() and not Create(), where the 
GDAL/GTiff driver supports both ... Could that be it ? I suspect the GDAL/PNG 
driver so I also sent my issue to the GDAL mailing list.

 

I can see from the mailing list that other users already had a similar 
issue, but there is no obvious reason or solution provided.

https://lists.osgeo.org/pipermail/mapserver-users/2011-April/068428.html


https://lists.osgeo.org/pipermail/mapserver-users/2012-January/071310.html

 

For information, I'm using GDAL v2.1.3 and Mapserver v7.0.1

Thanks,

Johannes

 

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

Re: [mapserver-users] OUTPUTFORMAT png 16-bits

2020-02-05 Thread Eichner, Andreas - SID
Hello Johannes,

16bit-PNGs are IMHO not supported by MapServer. Although libPNG supports 16bit 
depth (see http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-4.3) 
MapServer only supports 1, 2, 4 and 8bit palettes (see 
https://github.com/mapserver/mapserver/blob/master/mapimageio.c#L355).

HTH

-Ursprüngliche Nachricht-
Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Johannes Paul
Gesendet: Mittwoch, 5. Februar 2020 11:33
An: Rahkonen Jukka (MML)
Cc: mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] OUTPUTFORMAT png 16-bits

Hello Jukka,
Thanks for your reply, i've changed mimetype but i still get the 8-bits png...
Johannes 

Le mer. 5 févr. 2020 à 11:09, Rahkonen Jukka (MML) 
 a écrit :


Hi,

 

I would make a test by using some other mimetype, like image/png16, for 
eliminating the possibility that some internal  png configuration drives over 
your own outputformat.

 

I don’t know if it helps but it is cheap to test.

 

-Jukka Rahkonen-

 

Lähettäjä: mapserver-users  
Puolesta Johannes Paul
Lähetetty: keskiviikko 5. helmikuuta 2020 12.03
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] OUTPUTFORMAT png 16-bits

 

Hello,

I'm using Mapserver to output PNG 16-bits DEM raster from .HGT 
elevation data.

I'm using the below output format definition :

OUTPUTFORMAT
  NAME PNG16
  DRIVER GDAL/PNG
  MIMETYPE image/png
  IMAGEMODE INT16
  EXTENSION "png"
END

However I keep on getting the standard PNG 8-bits out of mapserver.

 

The strange thing being that when I use a similar config to get GeoTiff 
16-bits, I do get what I'm asking for :

 

OUTPUTFORMAT
  NAME GEOTIFF16
  DRIVER GDAL/GTiff
  MIMETYPE image/tiff
  IMAGEMODE INT16
  EXTENSION "tiff"
END



 




Could that be an issue with the GDAL/PNG driver ? It seems that the 
GDAL/PNG driver supports only CreateCopy() and not Create(), where the 
GDAL/GTiff driver supports both ... Could that be it ? I suspect the GDAL/PNG 
driver so I also sent my issue to the GDAL mailing list.

 

I can see from the mailing list that other users already had a similar 
issue, but there is no obvious reason or solution provided.

https://lists.osgeo.org/pipermail/mapserver-users/2011-April/068428.html


https://lists.osgeo.org/pipermail/mapserver-users/2012-January/071310.html

 

For information, I'm using GDAL v2.1.3 and Mapserver v7.0.1

Thanks,

Johannes

 

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

Re: [mapserver-users] cgi-error: End of script output before headers mapserv

2020-01-23 Thread Eichner, Andreas - SID
Hi,

below you called mapserv with mode=map, have you also tried with the original 
failing query you used for your WMS?
Is your original request reproducible, i.e. it fails every time or only 
sometimes? 

greets

-Ursprüngliche Nachricht-
Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Johannes Paul
Gesendet: Mittwoch, 22. Januar 2020 16:29
An: Jeff McKenna; Jörg Thomsen (WhereGroup)
Cc: mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] cgi-error: End of script output before headers 
mapserv

Thanks for your help.
1. the mapserv cgi command line gave me a proper png (./mapserv -nh 
"QUERY_STRING=map=/var/www/html/osm-transp-en-default.map=map" > 
/tmp/test.png)
2. i turned on CPL_DEBUG in my mapfile but it doesn't help
3. i ran : shp2img -m /var/www/html/osm-transp-en-default.map -o /tmp/test.png 
-all_debug 5 -e -9.1433 38.7460 -9.1406 38.7487 &> /tmp/shp2img_log.txt
and it looks fine to me...


On Wed, 22 Jan 2020 at 15:28, Jeff McKenna  
wrote:


The more tests the better :)

-jeff



On 2020-01-22 10:21 a.m., Jörg Thomsen (WhereGroup) wrote:
> Hello Jeff,
> 
> is shp2img exactly the same as mapserv? (My thought was to use the 
same
> executable the webserver calls)
> 
> Jo,
> did you get a proper result (image) from your command line request? 
the
> 'error'-messages look quite OK.
> 
> Jörg
> 
> 
> Am 22.01.20 um 15:12 schrieb Jeff McKenna:
>> Hi Jo,
>>
>> Are you passing the problem extents to the shp2img utility?  Such as:
>>
>>shp2img -m osm-transp-en-default.map -e -9.1433 38.7460 -9.1406
>> 38.7487 -o ttt.png -all_debug 5
>>
>> If that doesn't help, then I would start from the beginning: execute 
a
>> GetCapabilities request and make sure you remove all "WARNING" 
messages.
>>
>> -jeff
>>
>>
>>
> 
> 
> Viele Grüße,
> Jörg Thomsen
> 


-- 
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/
___
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] Mapcache - Is it possible to have two tilesets share a single cache at particular zoom levels?

2019-10-25 Thread Eichner, Andreas - SID
Hmm, seems the Composite-Cache would be the better way to go: 
https://mapserver.org/mapcache/caches.html#composite-caches

In the past symbolic links (aka soft links) worked for me on Linux. But with 
that tiles might be seeded through multiple caches giving error "unknown error 
(another thread/process failed to create the tile I was waiting for)" in the 
logs.
So better try a composite cache.

> -Original Message-
> From: mapserver-users [mailto:mapserver-users-
> boun...@lists.osgeo.org] On Behalf Of Mark Volz
> Sent: Thursday, October 24, 2019 10:35 PM
> To: mapserver-users@lists.osgeo.org
> Subject: Re: [mapserver-users] Mapcache - Is it possible to have
> two tilesets share a single cache at particular zoom levels?
> 
> Andreas,
> 
> Good idea.  It looks like Windows can create symlinks.  I suppose
> I could try symlinking the cache for levels 5-11.  Do you know if
> I would need to create hard or soft links to do this?   Also, I
> would like to make sure our backup software does not try to backup
> the actual data twice...
> Reference:  https://www.howtogeek.com/howto/16226/complete-guide-
> to-symbolic-links-symlinks-on-windows-or-linux/
> 
> Thanks!
> 
> Sincerely,
> Mark Volz, GISP
> Lyon County GIS Coordinator
> 504 Fairgrounds Rd
> Marshall, MN 56258
> Ph:  (507) 532-8218
> http://lyonco.org/
> http://geomoose.lyonco.org/
> 
> 
> >What about symlinking the level directories?
> 
> 
> > -Original Message-
> > From: mapserver-users [mailto:mapserver-users-
> > boun...@lists.osgeo.org] On Behalf Of Mark Volz
> > Sent: Wednesday, October 23, 2019 4:12 PM
> > To: mapserver-users@lists.osgeo.org
> > Subject: [mapserver-users] Mapcache - Is it possible to have two
> > tilesets share a single cache at particular zoom levels?
> >
> > Hello,
> >
> >
> >
> > I have two similar tilesets configured in Mapcache.  One of the
> > tilesets displays a political map at small scales, then changes
> to an
> > air photo map as the user zooms into the map.  The second
> tileset
> > displays air photos at every zoom level.  It would be useful if
> these
> > tilesets could share a single cache for zoom levels 5-11.  This
> way we
> > could save a significant amount of space on the server.
> >
> >
> >
> > Example #1:
> >
> > Political and Air Photo Basemap:
> >
> > * Zoom level 0-4:  Use the cache from the "political map
> > cache"
> >
> > * Zoom level 5-11: Use the cache from the "air photo
> > cache"
> >
> > Air Photo Basemap
> >
> > * Zoom level 0-11:  Use the cache from the "air photo
> > cache"
> >
> > Result:
> >
> > * Any tiles at level 5-11, which will take up the
> majority
> > of the space on the sever will not need to be duplicated between
> the
> > two tilesets.
> >
> >
> >
> > Please let me know if it is possible to share caches between
> different
> > tilesets.
> >
> >
> >
> > Thanks!
> >
> >
> >
> > Sincerely,
> >
> > Mark Volz, GISP
> >
> > Lyon County GIS Coordinator
> >
> >
> ___
> 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] Mapcache - Is it possible to have two tilesets share a single cache at particular zoom levels?

2019-10-24 Thread Eichner, Andreas - SID
What about symlinking the level directories?

> -Original Message-
> From: mapserver-users [mailto:mapserver-users-
> boun...@lists.osgeo.org] On Behalf Of Mark Volz
> Sent: Wednesday, October 23, 2019 4:12 PM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] Mapcache - Is it possible to have two
> tilesets share a single cache at particular zoom levels?
> 
> Hello,
> 
> 
> 
> I have two similar tilesets configured in Mapcache.  One of the
> tilesets displays a political map at small scales, then changes to
> an air photo map as the user zooms into the map.  The second
> tileset displays air photos at every zoom level.  It would be
> useful if these tilesets could share a single cache for zoom
> levels 5-11.  This way we could save a significant amount of space
> on the server.
> 
> 
> 
> Example #1:
> 
> Political and Air Photo Basemap:
> 
> * Zoom level 0-4:  Use the cache from the "political map
> cache"
> 
> * Zoom level 5-11: Use the cache from the "air photo
> cache"
> 
> Air Photo Basemap
> 
> * Zoom level 0-11:  Use the cache from the "air photo
> cache"
> 
> Result:
> 
> * Any tiles at level 5-11, which will take up the majority
> of the space on the sever will not need to be duplicated between
> the two tilesets.
> 
> 
> 
> Please let me know if it is possible to share caches between
> different tilesets.
> 
> 
> 
> Thanks!
> 
> 
> 
> Sincerely,
> 
> Mark Volz, GISP
> 
> Lyon County GIS Coordinator
> 
> 

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

Re: [mapserver-users] mapcache configuration for openlayers XYZ source

2019-07-11 Thread Eichner, Andreas - SID
Hello Sacha,

according to https://mapserver.org/mapcache/sources.html#wmts-sources MapCache 
has no direct support for such source. You might try the support through GDAL 
mentioned there using a service description 
(https://gdal.org/drivers/raster/wmts.html#local-service-description-xml-file ).

HTH


> -Original Message-
> From: mapserver-users [mailto:mapserver-users-
> boun...@lists.osgeo.org] On Behalf Of Sacha Fouchard
> Sent: Thursday, July 11, 2019 10:21 AM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] mapcache configuration for openlayers
> XYZ source
> 
> Hi Jeff,
> I followed the link you gave and it works perfectly but for
> ol.source.tileWMS.
> I need to use ol.source.XYZ and get tiles with
> http://my.server/z/x/y.png scheme.
> In my example, i have a source: http://{1-
> 4}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}.png
>  D.png> , declared in openlayers as  ol.source.XYZ
>     >.
> In line, no problem. Off line, I really don't know how to cache
> it. What could be a simple mapcache configuration? and what url
> from openlayers?
> regards
> Sacha
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Linux - map file in /tmp

2018-11-12 Thread Eichner, Andreas - SID
I'd guess you're using systemd and the unit file that controls your webserver 
contains "PrivateTmp=true". 

> -Original Message-
> From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org]
> On Behalf Of Ian Walberg
> Sent: Tuesday, November 13, 2018 12:32 AM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] Linux - map file in /tmp
> 
> Hello,
> 
> 
> 
> Calling a cgi request with a standalone map file that works in any
> location in the file system on a Linux install but does not work if the
> map file is in  /tmp.
> 
> 
> 
> msLoadMap(): Unable to access file. (/tmp/min01.map)
> 
> 
> 
> What I am missing?
> 
> 
> 
> Thanks
> 
> 
> 
> Ian

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

Re: [mapserver-users] TMS layer in mapfile

2018-06-26 Thread Eichner, Andreas - SID
MapServer uses GDAL to access rasters, so you can use a GDAL virtual raster:
http://www.gdal.org/frmt_wms.html


> -Original Message-
> From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org]
> On Behalf Of Hans Wapenaar (GIS Innovations)
> Sent: Tuesday, June 26, 2018 10:59 AM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] TMS layer in mapfile
> 
> Hi,
> 
> 
> 
> Is it possible to add a TMS layer to a mapfile? I have a connection to
> an external TMS server. I can connect to that server with Leaflet or
> OpenLayers. But I want to render maps serverside with mapserver/mapfiles
> and store these maps directly on the server as images. With almost all
> layer types that works including WMS, but I cannot find a way to do that
> with TMS layers.
> 
> 
> 
> Any suggestions?
> 
> 
> 
> Hans Wapenaar
> 
> 

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

Re: [mapserver-users] enabling browser cache from Mapcache?

2018-06-01 Thread Eichner, Andreas - SID
Hi,

I just tested with mod_mapcache and it seems to use 300 as the default for the 
"expires" child element of a tileset.
It sets the Cache-control and Expires headers appropriately - even in WMS mode.
Setting the value to 0 turns of the generation of these headers but the browser 
(at least FF) still uses the If-Modified-Since header when requesting the image 
again and the server responds with status 304 (not modified) and an empty body.
So client side caching seems to work as expected.

Kind regards


> -Original Message-
> From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org]
> On Behalf Of Mark Volz
> Sent: Wednesday, May 30, 2018 6:24 PM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] enabling browser cache from Mapcache?
> 
> Hello,
> 
> 
> 
> Using Apache, I would like to know if it is possible to set up a browser
> cache for images from mapcache so that images are stored on the client
> machine instead of having to get resent from the server.  I enabled
> mod_expires and noticed that the png files for the buttons are cached
> unfortunately the mapcache png files are not cached.  I presume it might
> not be possible to cache images from mapcache when used in WMS mode, but
> it might be possible when using either WMTS, or TMS mode.
> 
> 
> 
> Questions:
> 
> 1.   Am I correct that we cannot use browser or client caching with
> mapcache in wms mode?
> 
> 2.   Can we use browser cache when using WMTS or TMS services?
> 
> 
> 
> I am using GeoMOOSE which should be able to consume xyz TMS tiles.
> 
> 
> 
> Thanks!
> 
> 
> 
> Sincerely,
> 
> Mark Volz, GISP
> 
> Lyon County GIS Coordinator
> 
> 

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

Re: [mapserver-users] Wind direction files rotation using CONNECTIONTYPE uvraster

2018-03-05 Thread Eichner, Andreas - SID
Hi,

since you're using GDAL VRT have you tried the "Scale" and "Offset" child 
elements for a VRTRasterBand?
I'd guess, using


  -1.0
  360.0
  ...


might work for you.


Regards,
Andreas

> -Original Message-
> From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org]
> On Behalf Of Rousseau Lambert2, Louis-Philippe (EC)
> Sent: Monday, March 05, 2018 2:46 PM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] Wind direction files rotation using
> CONNECTIONTYPE uvraster
> 
> Hi all,
> 
> What I'm trying to do:
> 
> * I want to display wind arrows using 2 files: wind direction and
> wind speed. I am using the "CONNECTIONTYPE uvraster" feature to display
> our arrows. Because we don't have U and V wind vectors in the North-
> South direction for some models, we use the WIND and WDIR files which
> are respectively wind speed and wind direction (in the North-South
> direction, or Earth relative). So as input for my layer in MapServer I
> have a VRT where band 1 is the wind direction (from 0 to 360 degres) and
> band 2 is the wind speed. Instead of letting MapServer calculates the
> resulting arrows speed and direction I'm using the raw value of u ([u])
> as wind direction and the raw value of v ([v]) as my wind speed. So far
> so good.
> 
> 
> My problem is:
> 
> * The arrow rotation is done using the ANGLE keyword and [u] (wind
> direction). But the ANGLE rotates the arrows in the counter clockwise
> direction while the wind direction files increase in a clockwise
> direction... Because we are using wind direction and wind speed files
> (raw values of [u] and [v]) we can't use the [uv_minus_angle] and I know
> that MapServer docs says that no processing can be done on the ANGLE
> feature. I know that I would have to do some pre-processing (like 360-
> [u]) and that would solve the problem. But I would have to do this for
> hundreds of file per day and I'm trying to avoid as much as possible
> pre-processing.
> 
> Can you guys think of a solution that would not require pre-processing?
> I tried playing with the arrow position and other little things but I
> could not make it work correctly and I'm pretty much out of ideas...
> 
> 
> Thanks
> 
> LP
> 

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

Re: [mapserver-users] MapFile DATA Syntax for PostGIS raster with FILTER

2018-02-08 Thread Eichner, Andreas - SID
Hallo Paul,

> -Original Message-
> In a vector PostGIS DB case a layer can be configured to have a dynamic
> client-side filter through the following base syntax, which is fine and
> works for vector tables in the DB:
> 
> DATA "geom FROM some_table using unique id using srid=4326"
> FILTER (id = '%id%')
> 
> As I understand it this in effect this generates an SQL statement where
> the FILTER is created as a where clause in the DATA SQL.

this only works for a vector layer.

> However, in a raster DB example the DATA syntax shown at this link
> [http://postgis.net/docs/RT_FAQ.html#idm28328] is as follows:
> 
> DATA "PG:host=localhost port=5432 dbname='some_db' user='some_user'
> password='some_password' schema='some_schema' table='some_table'
> where='id=12' mode='2' "

Raster layers use GDAL internally and AFAIK don't support FILTER at all. But 
GDAL allows to pass a WHERE clause via the DATA string as described at the 
PostGIS docs or at 
https://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html#a3.2-Readingrasterdatafromthedatabase
 
Since runtime substitution is applied by MapServer before using the DATA string 
you can use something like
  DATA "PG: [...] where='id=%id%' [...]"
Together with a proper validation as described by Steve L.:
  VALIDATION
'id' '^[0-9]{1,3}$'
'default_id' '-1'
  END

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

Re: [mapserver-users] How use ogr provider with spatialite "read only" clause

2018-01-10 Thread Eichner, Andreas - SID
According to msOGRFileOpen(mapogr.cpp:1194):
hDS = OGROpen( pszDSSelectedName, MS_FALSE, NULL );
I would say that MapServer _always_ opens an OGR datasource readonly (See 
http://www.gdal.org/ogr__api_8h.html#a2da3630231780d519543d1679c83e62f ).

> -Original Message-
> From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org]
> On Behalf Of Andrea Peri
> Sent: Wednesday, January 10, 2018 12:29 PM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] How use ogr provider with spatialite "read
> only" clause
> 
> Hi,
> 
> Usually we use the spatialite db as ordinary datasource for ours
> mapserver wms.
> 
> 
> Now I discovered that the last versions of spatialite always test
> automatically the version of the DB sqlite and if verify that the db was
> create using an older spatialite version.
> 
> TRY TO UPDATE the spatialite system tables WHEN the connection was
> closed.
> 
> 
> This probably is a good strategy for an ordinary desktop application.
> 
> But more risk pendent when used on a mpaserver that could have more than
> one connection open on the same DB sqlite.
> 
> 
> To avoid this the standard solution used from the spatialite driver is
> to check if the DB is open in READ-ONLY mode.
> 
> 
> And avoid to write and update the db when it is in read-only mode.
> 
> 
> So my trouble now is how the change the usual connection string in the
> mapfile to say to the OGR driver to open the sqlite/spatialite using the
> "read-only" mode.
> 
> Is this possible ?
> 
> 
> Many thx
> 
> 
> A.
> 
> 
> --
> 
> -
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -
> 
> 

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

Re: [mapserver-users] How to cascade a WMTS service?

2017-11-16 Thread Eichner, Andreas - SID
Hi Jukka,

GDAL uses Curl for the HTTP client. At least under Linux it respects the 
conventional environment variables HTTP_PROXY, HTTPS_PROXY and HTTP_NOPROXY. 
AFAIK at least Apache uses a cleaned environment when running CGI programs. So 
you might need to specify
  PassEnv HTTP_PROXY HTTPS_PROXY HTTP_NOPROXY
in your httpd.conf to let them be passed through.

HTH

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Rahkonen Jukka (MML)
> Gesendet: Mittwoch, 15. November 2017 16:47
> An: Mapserver-Users (mapserver-users@lists.osgeo.org)
> Betreff: [mapserver-users] How to cascade a WMTS service?
> 
> Hi,
> 
> 
> 
> I would like to cascade a WMTS service. I know well how to cascade WMS
> with "connenctiontype WMS" but I suppose for cascading WMTS I must use
> GDAL instead.
> 
> 
> 
> My GDAL has WMTS driver
> 
> WMTS -raster- (rwv): OGC Web Mab Tile Service
> 
> 
> 
> I have created a definition file "wmts.xml" and "gdalinfo wmts.xml" is
> OK but I do not know how to make Mapserver to cascade this service.
> 
> I suppose that my layer is rather close to right:
> 
> 
> 
> LAYER
> 
>  NAME "cascaded_wmts"
> 
>  TYPE RASTER
> 
>  STATUS ON
> 
>  DATA "wmts.xml"
> 
>  METADATA
> 
>  "wms_title""cascaded_wmts"
> 
>   "wms_srs" "EPSG:3067 EPSG:4326"
> 
>  END
> 
> END
> 
> 
> 
> However, our server is behind a proxy. For cascading WMS with
> CONNECTIONTYPE WMS the proxy host and port can be set in the METADATA
> section http://mapserver.org/ogc/wms_client.html but so far I have not
> been able to guess how to do that for GDAL connection. Proxy settings do
> not seem to be supported as environment variables
> http://mapserver.org/environment_variables.html.
> 
> 
> 
> So, is it possible at the moment to cascade WMTS through a proxy with
> Mapverver?
> 
> 
> 
> -Jukka Rahkonen-

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

Re: [mapserver-users] Draw roads WITHOUT anti-aliasing

2017-11-06 Thread Eichner, Andreas - SID


> -Ursprüngliche Nachricht-
> Von: Erik H [mailto:erik.h11...@gmail.com]
> Gesendet: Montag, 6. November 2017 17:09
> An: Eichner, Andreas - SID
> Cc: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> 
> Thanks again - I'm getting there. I installed libxml2-devel and added
> flags for LIBXML2 and WMS, and now I can compile 'master'.
> 
> I was also able to merge it with my branch and compile it without
> problems.  Rebasing my branch onto the latest and greatest commit in
> 'master' worked as well.

That's great - glad to hear this!

> 
> Was unable to push my changes to the Github repo in order to create a
> PR, though.
> 
> The 'WorkingWithGit' Wiki page says that I have to checkout 'master',
> merge my branch, and push it back; this seems a bit strange to me (I
> expected to have to push my own branch), and it does not seem to work
> anyway:
> 
> 403 Forbidden while accessing https://erik-
> h...@github.com/mapserver/mapserver.git/info/refs
> 
> 
> 
> Same error when trying to push my own branch. Do I need to be granted
> access first, or should I somehow create a PR first?
> 

AFAIK only the core devs have write access to the mapserver/* repos. The usual 
way is to create an account on GitHub, fork off the MapServer-Repo, clone a 
local copy from this, do the changes, merge with latest master, push it back to 
your GitHub repo and create a PR on GitHub.
Not sure but I believe after creating your account and creating the fork you 
can simply set the '"pushurl' for '[remote "origin"]' in .git/config to your 
repo and push:

[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://github.com/mapserver/mapserver
pushurl = https://github.com//mapserver.git


You may also ask on the mapserver-dev mailing list for additional help to get 
it to work.

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

Re: [mapserver-users] Draw roads WITHOUT anti-aliasing

2017-11-06 Thread Eichner, Andreas - SID
Ah, you need libxml2, so enable it: -DWITH_LIBXML2=ON

> -Ursprüngliche Nachricht-
> Von: Erik H [mailto:erik.h11...@gmail.com]
> Gesendet: Montag, 6. November 2017 14:29
> An: Eichner, Andreas - SID
> Cc: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> 
> Thanks for looking into this, Andreas, but I tried again and I'm still
> getting errors.
> 
> 
> 
> This is my script:
> 
> git pull
> rm -Rf build
> mkdir build
> cd build
> export JAVA_HOME=/usr/java/jdk
> export PYTHON_INCLUDE_DIR=/usr/include/python2.6/
> export PYTHON_LIBRARY=/usr/lib64/python2.6/config/libpython2.6.so
> export GDAL_DIR=/usr/local/src/gdal-2.1.3/
> cmake -DCMAKE_PREFIX_PATH=/usr/local/ WITH_GDAL=$GDAL_DIR  -
> DWITH_FRIBIDI=OFF -DWITH_WFS=OFF   -DWITH_WCS=OFF -
> DWITH_PROJ=/usr/local/lib  -DWITH_LIBXML2=OFF   WITH_POSTGIS=/usr/bin
> -DWITH_CLIENT_WFS=OFF -DWITH_WMS=OFF-DWITH_CLIENT_WMS=OFF
> -DWITH_CURL=OFF -DWITH_SOS=OFF -DWITH_PHP=OFF -
> DWITH_PERL=OFF -DWITH_RUBY=OFF -DWITH_JAVA=ON -
> DWITH_CSHARP=OFF   -DWITH_HARFBUZZ=OFF  -DWITH_PYTHON=ON -
> DWITH_GEOS=0-DWITH_SVGCAIRO=OFF -DWITH_ORACLESPATIAL=OFF
> -DWITH_CAIRO=OFF -DWITH_THREAD_SAFETY=ON  -DWITH_FCGI=OFF   -DWITH_GIF=0
> ../ >../configure.out.txt
> make
> 
> -->
> 
> [ 61%] Building C object CMakeFiles/mapserver.dir/mapmetadata.c.o
> /home//work/mapserver/mapmetadata.c:41: error: expected ‘=’, ‘,’,
> ‘;’, ‘asm’ or ‘__attribute__’ before ‘_msMetadataGetCharacterString’
> ...
> 
> 
> 
> > git log
> commit bf73b5cdfe0bcecc06f8241ddf844a99b5fa7f4b
> Author: Even Rouault <even.roua...@spatialys.com>
> Date:   Fri Nov 3 15:45:20 2017 +0100
> 
> 
> 
> On Mon, Nov 6, 2017 at 3:23 AM, Eichner, Andreas - SID
> <andreas.eich...@sid.sachsen.de> wrote:
> 
> 
>   Hi Erik,
> 
>   just tried building a freshly pulled mapserver/master and I got
> strange CMake errors too.
>   In my case wiping the build/ directory recreating it solved the
> problem.
> 
>   HTH
> 
>   > -Ursprüngliche Nachricht-
>   > Von: mapserver-users [mailto:mapserver-users-
> boun...@lists.osgeo.org <mailto:mapserver-users-boun...@lists.osgeo.org>
> ] Im
>   > Auftrag von Erik H
>   > Gesendet: Freitag, 3. November 2017 21:24
>   > An: mapserver-users@lists.osgeo.org <mailto:mapserver-
> us...@lists.osgeo.org>
>   > Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
>   >
>   > I made some changes to the mapserver 7 source code that achieve
> what I
>   > want (I'm now able to switch between aliased and antialiased
> lines,
>   > based on the ANTIALIAS keyword in the STYLE section).
>   >
>   > I tried to put up a pull request for it but I'm having problems
>   > compiling the code in the 'master' branch - compilation errors
> for
>   > mapmetadata.c. My code was branched off the release-7 branch and
> did not
>   > have that problem.
>   >
>   > The cmake command I used was
>   >
>   > cmake -DCMAKE_PREFIX_PATH=/usr/local/ WITH_GDAL=$GDAL_DIR  -
>   > DWITH_FRIBIDI=OFF -DWITH_WFS=OFF   -DWITH_WCS=OFF -
>   > DWITH_PROJ=/usr/local/lib  -DWITH_LIBXML2=OFF
> WITH_POSTGIS=/usr/bin
>   > -DWITH_CLIENT_WFS=OFF -DWITH_WMS=OFF-
> DWITH_CLIENT_WMS=OFF
>   > -DWITH_CURL=OFF -DWITH_SOS=OFF -DWITH_PHP=OFF
> -
>   > DWITH_PERL=OFF -DWITH_RUBY=OFF -DWITH_JAVA=ON
> -
>   > DWITH_CSHARP=OFF   -DWITH_HARFBUZZ=OFF  -DWITH_PYTHON=ON
> -
>   > DWITH_GEOS=0-DWITH_SVGCAIRO=OFF -
> DWITH_ORACLESPATIAL=OFF
>   > -DWITH_CAIRO=OFF -DWITH_THREAD_SAFETY=ON  -DWITH_FCGI=OFF   -
> DWITH_GIF=0
>   > ../ >../configure.out.txt
>   >
>   >
>   > Any suggestions?
>   >
>   > Thanks
>   >
>   > On Thu, Oct 19, 2017 at 11:04 AM, Erik H <erik.h11...@gmail.com>
> wrote:
>   >
>   >
>   >   I just did what Andreas spelled out yesterday:
>   >
>   >   Simply changing the typedef in line 91 of mapagg.cpp from
>   >
>   > typedef
> mapserver::renderer_scanline_aa_solid
>   > renderer_scanline;
>   >
>   >   to
>   >
>   > typedef
> mapserver::renderer_scanline_bin_solid
>   > renderer_scanline;
>   >
>   >
>   >
> 

Re: [mapserver-users] Draw roads WITHOUT anti-aliasing

2017-11-06 Thread Eichner, Andreas - SID
Hi Erik,

just tried building a freshly pulled mapserver/master and I got strange CMake 
errors too. 
In my case wiping the build/ directory recreating it solved the problem.

HTH

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Erik H
> Gesendet: Freitag, 3. November 2017 21:24
> An: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> 
> I made some changes to the mapserver 7 source code that achieve what I
> want (I'm now able to switch between aliased and antialiased lines,
> based on the ANTIALIAS keyword in the STYLE section).
> 
> I tried to put up a pull request for it but I'm having problems
> compiling the code in the 'master' branch - compilation errors for
> mapmetadata.c. My code was branched off the release-7 branch and did not
> have that problem.
> 
> The cmake command I used was
> 
> cmake -DCMAKE_PREFIX_PATH=/usr/local/ WITH_GDAL=$GDAL_DIR  -
> DWITH_FRIBIDI=OFF -DWITH_WFS=OFF   -DWITH_WCS=OFF -
> DWITH_PROJ=/usr/local/lib  -DWITH_LIBXML2=OFF   WITH_POSTGIS=/usr/bin
> -DWITH_CLIENT_WFS=OFF -DWITH_WMS=OFF-DWITH_CLIENT_WMS=OFF
> -DWITH_CURL=OFF -DWITH_SOS=OFF -DWITH_PHP=OFF -
> DWITH_PERL=OFF -DWITH_RUBY=OFF -DWITH_JAVA=ON -
> DWITH_CSHARP=OFF   -DWITH_HARFBUZZ=OFF  -DWITH_PYTHON=ON -
> DWITH_GEOS=0-DWITH_SVGCAIRO=OFF -DWITH_ORACLESPATIAL=OFF
> -DWITH_CAIRO=OFF -DWITH_THREAD_SAFETY=ON  -DWITH_FCGI=OFF   -DWITH_GIF=0
> ../ >../configure.out.txt
> 
> 
> Any suggestions?
> 
> Thanks
> 
> On Thu, Oct 19, 2017 at 11:04 AM, Erik H <erik.h11...@gmail.com> wrote:
> 
> 
>   I just did what Andreas spelled out yesterday:
> 
>   Simply changing the typedef in line 91 of mapagg.cpp from
> 
> typedef mapserver::renderer_scanline_aa_solid
> renderer_scanline;
> 
>   to
> 
> typedef mapserver::renderer_scanline_bin_solid
> renderer_scanline;
> 
> 
> 
>   However, I'd like to be able to switch between rasterizer via some
> option in the .map file, so I'd welcome any suggestion on how to do
> that.
> 
>   On Thu, Oct 19, 2017 at 10:07 AM, Lime, Steve D (MNIT)
> <steve.l...@state.mn.us> wrote:
> 
> 
>   Glad this was figured out! What was the code change exactly?
> 
> 
>   From: mapserver-users  boun...@lists.osgeo.org <mailto:mapserver-users-boun...@lists.osgeo.org>
> > on behalf of Erik H <erik.h11...@gmail.com>
>   Sent: Wednesday, October 18, 2017 8:07:42 PM
>   To: Eichner, Andreas - SID
>   Cc: mapserver-users@lists.osgeo.org <mailto:mapserver-
> us...@lists.osgeo.org>
>   Subject: Re: [mapserver-users] Draw roads WITHOUT anti-
> aliasing
> 
>   Andreas,
> 
>   I made that change in mapagg.cpp and it seems to do exactly
> what I need. Wunderbar!
> 
>   As for providing an option to switch rasterizer based on an
> option, how about reviving the FORMATOPTION 'ANTIALIAS'?
> 
>   Thanks, Erik
> 
>   On Wed, Oct 18, 2017 at 9:18 AM, Eichner, Andreas - SID
> <andreas.eich...@sid.sachsen.de <mailto:andreas.eich...@sid.sachsen.de>
> > wrote:
> 
> 
>   Nope, this won't work:
> 
> r->default_gamma = atof(msGetOutputFormatOption(
> format, "GAMMA", "0.75" ));
> if(r->default_gamma <= 0.0 || r->default_gamma >=
> 1.0) {
>   r->default_gamma = 0.75;
> }
> 
>   From mapagg.cpp lines 844-847 forces 0 < GAMMA < 1
>   Also note that MapServer uses a linear gamma function
> defined as
> 
>  double operator() (double x) const
>   {
>   if(x < m_start) return 0.0;
>   if(x > m_end) return 1.0;
>   return (x - m_start) / (m_end - m_start);
>   }
> 
>   Where m_start is _always_ set to 0 and m_end is set to
> the GAMMA value given by you (or the default 0.75).
>   I think someone should check this - to me it seems a
> power function was intented...
> 
>   HTH
> 
>   > -Ursprüngliche Nachricht-
>   > Von: mapse

Re: [mapserver-users] Rewrite rule problem

2017-11-02 Thread Eichner, Andreas - SID
Damn,

the last RewriteRule should be

  RewriteEngine On
  RewriteRule "^/wms/([[:alnum:]]+)/([[:digit:]]+)$" 
/cgi-bin/mapserv?MAP=C:/ms4w/apps/Demo/$1.map=$2 [PT,QSA]
 
The character classes prevent bad file names and value for the "year" 
parameter. You should set up a proper validation for the year and/or 
MS_MAP_PATTERN too.

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

Re: [mapserver-users] Rewrite rule problem

2017-11-02 Thread Eichner, Andreas - SID
Hi Goran,

using a path segment to fill in a query parameter is pretty straight forward 
but the following assumes MapServer is installed under /cgi-bin/GDZ/wms:

  RewriteEngine On
  RewriteRule ^/cgi-bin/GDZ/([^/]+)/wms$ 
/cgi-bin/GDZ/wms?MAP=MS_MAPFILE=$1 [PT,QSA]

  
SetEnvIfExpr "%{QUERY_STRING} =~ /^(.*&)?map=([[:alnum:]]+.map)(&.*)?$/" 
MS_MAPFILE=C:/ms4w/apps/Demo/$2
  

If you have MapServer-CGI installed as "/cgi-bin/mapserv" you better abstain 
from using SetEnvIfExpr and do with plain rewriting:

  RewriteEngine On
  RewriteCond %{QUERY_STRING} "^(.*&)?map=([[:alnum:]]+.map)(&.*)?$" [NC]
  RewriteRule ^/cgi-bin/GDZ/([^/]+)/wms$ 
/cgi-bin/mapserv?MAP=MS_MAPFILE=$1 
[PT,QSA,E=MS_MAPFILE:C:/ms4w/apps/Demo/%2]

The basic question is: what are you trying to achieve? What's the reason to 
deal with the MAP parameter?
For WMS services you normally want plain URLs like "/wms/GDZ/2017?" be 
rewritten 
to "/cgi-bin/mapserv?MAP=GDZ.map=2017&" which could expressed by a 
really simple RewriteRule:

  RewriteEngine On
  RewriteRule "^/wms/([[:alnunm]]+)/([^/]+)$" 
/cgi-bin/mapserv?MAP=C:/ms4w/apps/Demo/$1.map=$2 [PT,QSA]

HTH

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von gorank
> Gesendet: Mittwoch, 1. November 2017 23:13
> An: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Rewrite rule problem
> 
> Hi Andreas,
> 
> Finally it works perfectly and it solved most of my problems.  I would
> like
> to go one step forward. How will looks   SetEnvIfExpr and Rewrite rule
> in
> case when in the mapfile there is a Real time substitution parameter (in
> my
> case year - 2015, 2016, ...)
> I would like to write url as you proposed in previous post but with
> added
> year parameter. Example for year 2015:
> from
> http://localhost:81/cgi-
> bin/GDZ/2015/wms?map=N1.map=GetCapabilities=WMS=
> 1.3.0
> 
> to get
> 
> http://localhost:81/cgi-
> bin/GDZ/wms?year=2015=N1.map=GetCapabilities=WMS
> SION=1.3.0
> 
> I tried to do it following your logic but not successfully.
> 
> Best regards,
> Goran
> 
> 
> 
> 
> --
> 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 mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Rewrite rule problem

2017-11-01 Thread Eichner, Andreas - SID
Hi Goran,

the RewriteRule should match the Location for SetEnvIfExpr:

  
SetEnvIfExpr "%{QUERY_STRING} =~/^(.*&)?map=([[:alnum:]]+.map)(&.*)?$/" 
MS_MAPFILE=C:/ms4w/apps/Demo/$2
  

  RewriteEngine On
  RewriteRule /cgi-bin/GDZ/wms /cgi-bin/GDZ/wms?MAP=MS_MAPFILE [PT,QSA]

And then the URL

  
http://localhost:81/cgi-bin/GDZ/wms?map=N1.map=GetCapabilities=WMS=1.3.0

should set the MS_MAPFILE environment variable to "C:/ms4w/apps/Demo/N1.map" 
and rewrite the URL to 
  
http://localhost:81/cgi-bin/GDZ/wms?MAP=MS_MAPFILE=N1.map=GetCapabilities=WMS=1.3.0
This should work as MapServer scans the query parameters from left to right. It 
first finds MAP=MS_MAPFILE 
and checks if there's an environment variable set assuming that it points to a 
valid map file. 
The SetEnvIfExpr has set this variable for the URL "/cgi-bin/GDZ/wms" if a 
"MAP" parameter was provided.

HTH

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von gorank
> Gesendet: Montag, 30. Oktober 2017 16:24
> An: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Rewrite rule problem
> 
> Hi Andreas,
> 
> As you sugested I have added in* httpd.conf* file following
> 
> 
> and when I put URL
> 
> I receive the following message:
> msLoadMap(): Unable to access file. (N1.map)
> 
> As addition in the C:/ms4w/httpd.d folder I have file httpd_Demo.conf
> file
> with following content
> 
> Alias /Demo/ "/ms4w/apps/Demo/"
> 
>   AllowOverride None
>   Options Indexes FollowSymLinks Multiviews
>   Order allow,deny
>   Allow from all
> 
> 
> What I'm doing wrong.
> 
> Best regards,
> Goran
> 
> 
> 
> --
> 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 mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Rewrite rule problem

2017-10-30 Thread Eichner, Andreas - SID
Hi,

I guess you should use SetEnvIfExpr to test the query string for 
the MAP parameter and set the environment variable using the value.
Wrap it into a  block to do this only for a specific URI:


  SetEnvIfExpr "%{QUERY_STRING} =~ /^(.*&)?map=([[:alnum:]]+.map)(&.*)?$/" 
MS_MAPFILE=C:/ms4w/apps/Demo/$2


IHMO this won't work though as MapServer's msCGILoadMap() function prefers the 
MAP param and uses the MS_MAPFILE environment variable only as a fallback.
As MS first checks if the MAP parameter points to the name of an environment 
variable containing the map file and scans the query parameters from left to 
right you can prepend a fake MAP parameter pointing to MS_MAPFILE.
For example a request to
  /cgi-bin/Demo/wms?map=N1.map=GetCapabilities
Needs to be written as
  /cgi-bin/Demo/wms?map=MS_MAPFILE=N1.map=GetCapabilities
You can do this using a RewriteRule like
  RewriteRule /cgi-bin/Demo/wms /cgi-bin/Demo/wms?MAP=MS_MAPFILE [PT,QSA]

HTH

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von gorank
> Gesendet: Samstag, 28. Oktober 2017 16:55
> An: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Rewrite rule problem
> 
> Hi Jeff,
> 
> Many thanks for your answer. I test it and works and solve my problem
> when
> have only one mapfile in the project. But when I have few mapfiles in
> the
> folder Demo under apps folder (C:/ms4w/apps/Demo) , how should look
> statement in SetEnvIf ?
> 
> When i try for different mapfiles
> 
> SetEnvIf Request_URI "/cgi-bin/Demo/wms"
> MS_MAPFILE=C:/ms4w/apps/Demo/N1.map
> SetEnvIf Request_URI "/cgi-bin/Demo/wms"
> MS_MAPFILE=C:/ms4w/apps/Demo/N2.map
> 
> the URL
> http://localhost:81/cgi-
> bin/Demo/wms?REQUEST=GetCapabilities=WMS=1.3.0
> opens XML for second mapfile - N2.map, and I suppose the second SetEnvIf
> statement overwrite the first one.
> 
> So, what is solution, in the URL to be included specific mapfile name,
> like
> http://localhost:81/cgi-
> bin/Demo/wms?*map=N1.map*=GetCapabilities=WMS=1.
> 3.0
> for first mapfile and
> http://localhost:81/cgi-
> bin/Demo/wms?*map=N2.map*=GetCapabilities=WMS=1.
> 3.0
> for second mapfile?
> 
> Best regards,
> Goran
> 
> 
> 
> --
> 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 mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Draw roads WITHOUT anti-aliasing

2017-10-18 Thread Eichner, Andreas - SID
Nope, this won't work:

  r->default_gamma = atof(msGetOutputFormatOption( format, "GAMMA", "0.75" ));
  if(r->default_gamma <= 0.0 || r->default_gamma >= 1.0) {
r->default_gamma = 0.75;
  }

From mapagg.cpp lines 844-847 forces 0 < GAMMA < 1
Also note that MapServer uses a linear gamma function defined as

   double operator() (double x) const
{
if(x < m_start) return 0.0;
if(x > m_end) return 1.0;
return (x - m_start) / (m_end - m_start);
}

Where m_start is _always_ set to 0 and m_end is set to the GAMMA value given by 
you (or the default 0.75).
I think someone should check this - to me it seems a power function was 
intented...

HTH

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von lars.schylb...@blixtmail.se
> Gesendet: Mittwoch, 18. Oktober 2017 14:05
> An: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> 
> Hi,
> 
> 
> 
> 
> I did some quick tests with :
> 
> 
> 
> 
>   OUTPUTFORMAT
> NAME "png_G0"
> DRIVER AGG/PNG
> MIMETYPE "image/png"
> IMAGEMODE RGB
> EXTENSION "png"
> FORMATOPTION "GAMMA=0.0"
>   END
> 
> 
> 
> 
> and shp2img with options -i
> 
> 
> eg: shp2img -m 01_polygon_td_poly.map -o 01_polygon_td_poly.png -i
> png_G0
> 
> 
> 
> 
> 
> I did some tests with both polygons, polygon outlines and lines and they
> all seems to have anti-aliasing as far as I could see.
> 
> Would this be an ok way to test it?  I also have some people that would
> like to do lines without anti-aliasing for a strange reason.
> 
> 
> 
> 
> 
> Lars Schylberg
> 
> 
> 
> 
> 
> -Originalmeddelande-
> > Från: "Rahkonen Jukka (MML)" <jukka.rahko...@maanmittauslaitos.fi>
> > Till: "Eichner, Andreas - SID" <andreas.eich...@sid.sachsen.de>, "Erik
> H" <erik.h11...@gmail.com>
> > Kopia: mapserver-users@lists.osgeo.org
> > Datum: 2017-10-18 11:13
> > Ämne: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> >
> > Hi,
> >
> > I suppose that the amount of antialiasing with AGG is set with "gamma"
> parameter.  Mapserver supports that at least for polygons as documented
> in http://www.mapserver.org/mapfile/outputformat.html but you could try
> if using gamma=0.0 has an effect on lines as well. It may be that it
> does not because search
> >
> https://github.com/mapserver/mapserver/search?utf8=%E2%9C%93=gamma
> e=
> > seems to find only something that is tied to polygon outlines
> > https://github.com/mapserver/mapserver/blob/branch-7-
> 0/renderers/agg/include/agg_renderer_outline_aa.h
> >
> >
> > If gamma does not work for lines then it could be worth making a
> feature request for adding a new formatoption "GAMMA_LINE=[].
> >
> > Couple of Mapnik links dealing with the same issue:
> > http://gis.19327.n8.nabble.com/Turning-off-anti-aliasing-
> td5339458.html
> > http://mapnik.org/mapnik-reference/#3.0.6/line-gamma-method
> >
> > -Jukka Rahkonen-
> >
> >
> >
> > -Alkuperäinen viesti-
> > Lähettäjä: mapserver-users [mailto:mapserver-users-
> boun...@lists.osgeo.org] Puolesta Eichner, Andreas - SID
> > Lähetetty: 18. lokakuuta 2017 9:57
> > Vastaanottaja: Erik H <erik.h11...@gmail.com>
> > Kopio: mapserver-users@lists.osgeo.org
> > Aihe: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> >
> > Damn... missed attaching the images.
> >
> > > -Ursprüngliche Nachricht-
> > > Von: mapserver-users [mailto:mapserver-users-
> boun...@lists.osgeo.org]
> > > Im Auftrag von Eichner, Andreas - SID
> > > Gesendet: Mittwoch, 18. Oktober 2017 08:28
> > > An: Erik H
> > > Cc: mapserver-users@lists.osgeo.org
> > > Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> > >
> > > Hi,
> > >
> > > I just meant that it seems to be pretty easy to implement aliased
> > > rendering with AGG.
> > > Simply changing the typedef in line 91 of mapagg.cpp from
> > >
> > >   typedef mapserver::renderer_scanline_aa_solid
> > > renderer_scanline;
> > >
> > > to
> > >
> > >   typedef mapserver::renderer_scanline_bin_solid
> > > renderer_scanline;
> > >
> > > turns of anti-aliased rendering. I've attached the output of
> "shp2img
> > > -m 

Re: [mapserver-users] Draw roads WITHOUT anti-aliasing

2017-10-18 Thread Eichner, Andreas - SID
Damn... missed attaching the images.

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Eichner, Andreas - SID
> Gesendet: Mittwoch, 18. Oktober 2017 08:28
> An: Erik H
> Cc: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> 
> Hi,
> 
> I just meant that it seems to be pretty easy to implement aliased
> rendering with AGG.
> Simply changing the typedef in line 91 of mapagg.cpp from
> 
>   typedef mapserver::renderer_scanline_aa_solid
> renderer_scanline;
> 
> to
> 
>   typedef mapserver::renderer_scanline_bin_solid
> renderer_scanline;
> 
> turns of anti-aliased rendering. I've attached the output of "shp2img -m
> line_simple.map" from the msautotests.
> An additional member in class AGG2Renderer for the aliased rasterizer
> and conditionally passing one or the other
> to render_scanlines() depending on some value of strokeStyleObj might be
> enough.
> 
> Regards
> 
> > -Ursprüngliche Nachricht-
> > Von: Erik H [mailto:erik.h11...@gmail.com]
> > Gesendet: Dienstag, 17. Oktober 2017 17:34
> > An: Eichner, Andreas - SID
> > Cc: Richard Greenwood; mapserver-users@lists.osgeo.org
> > Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> >
> > As for Andreas' remark about 'simply the use of another scanline
> > rasterizer.' - I'm sorry but I'm not much of a C++ developer. If I
> have
> > to do rasterizing, I'd skip MapServer altogether and generate the PNG
> in
> > Java.
> >
> ___
> 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] Draw roads WITHOUT anti-aliasing

2017-10-18 Thread Eichner, Andreas - SID
Hi,

I just meant that it seems to be pretty easy to implement aliased rendering 
with AGG.
Simply changing the typedef in line 91 of mapagg.cpp from

  typedef mapserver::renderer_scanline_aa_solid 
renderer_scanline;

to

  typedef mapserver::renderer_scanline_bin_solid 
renderer_scanline;

turns of anti-aliased rendering. I've attached the output of "shp2img -m 
line_simple.map" from the msautotests.
An additional member in class AGG2Renderer for the aliased rasterizer and 
conditionally passing one or the other
to render_scanlines() depending on some value of strokeStyleObj might be enough.

Regards

> -Ursprüngliche Nachricht-
> Von: Erik H [mailto:erik.h11...@gmail.com]
> Gesendet: Dienstag, 17. Oktober 2017 17:34
> An: Eichner, Andreas - SID
> Cc: Richard Greenwood; mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> 
> As for Andreas' remark about 'simply the use of another scanline
> rasterizer.' - I'm sorry but I'm not much of a C++ developer. If I have
> to do rasterizing, I'd skip MapServer altogether and generate the PNG in
> Java.
> 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Draw roads WITHOUT anti-aliasing

2017-10-17 Thread Eichner, Andreas - SID
I'd guess it's simply the use of another scanline rasterizer. The demo
  http://www.antigrain.com/demo/rasterizers.cpp.html
is an example of drawing as polygon aliased and anti-aliased side by side.


> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Richard Greenwood
> Gesendet: Dienstag, 17. Oktober 2017 03:44
> An: Erik H
> Cc: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing
> 
> On Mon, Oct 16, 2017 at 1:23 PM, Erik H  wrote:
> 
> 
>   I don't think we have much use for lines that are one pixel wide.
> 
>   I'm surprised at how difficult this is; isn't there some driver
> other than AGG/PNG I could use?
> 
> 
> In mapserver versions before 7.0 there is the GD driver. I use it for 8
> bit GIFs. Not sure what it does with 24 images.
> 
> Rich
> 
> 
> 
> 
> 
> 
>   On Mon, Oct 16, 2017 at 2:50 PM, Lime, Steve D (MNIT)
>  wrote:
> 
> 
>   So you really do need 24-bit output. I was looking back
> through the mailing list archives and it was mentioned back in 2012 that
> aliased output could be implemented for simple (1 pixel-wide) lines and
> polygons – so there is hope but I don’t believe (looking through the
> source) that Thomas ever fully implemented it. In mapagg.cpp there are
> ifdef’s for a symbol named AGG_ALIASED_ENABLED which makes me wonder if
> work was started. I tried setting that in mapagg.cpp but ran into
> compile errors and didn’t try and track those down.
> 
> 
> 
>   Of course you’d have to live with 1 pixel wide lines…
> 
> 
> 
>   Steve
> 
> 
> 
>   From: Erik H [mailto:erik.h11...@gmail.com]
>   Sent: Monday, October 16, 2017 1:15 PM
>   To: Lime, Steve D (MNIT) 
>   Cc: mapserver-users@lists.osgeo.org  us...@lists.osgeo.org>
>   Subject: Re: [mapserver-users] Draw roads WITHOUT anti-
> aliasing
> 
> 
> 
>   Thanks for your reply, but I should have mentioned that I
> have a LOT of different colors to be displayed, almost a million...
> 
> 
> 
>   I should also have mentioned that I've already tried to
> filter out the anti-aliased pixels by setting all alpha bytes to 255 and
> then assuming that all pixels that don't have alpha=255 in the PNG can
> be removed, but that assumption seems to be wrong.
> 
> 
> 
>   On Mon, Oct 16, 2017 at 2:00 PM, Lime, Steve D (MNIT)
>  wrote:
> 
>   Hmmm… I wonder if you just could use a pre-computed
> palette to control quantizing to 8 bits. You can supply a palette file
> (RGB or RGBA) and the MapServer will map 24/32-bit values to those in
> the palette. Format options are:
> 
> 
> 
>FORMATOPTION "PALETTE_FORCE=TRUE"
> 
>   FORMATOPTION "PALETTE=palette.txt"
> 
> 
> 
>   This will definitely limit the colors in your output
> image to those you specify. The question is whether or not the anti-
> aliased colors will map to the right color and that will depend on your
> palette. I did write a simple test with a 5 color palette (black, white,
> red, green and blue) and it seems to work ok but that’s a very simple
> palette… Based on your application it might work though.
> 
> 
> 
>   -  http://maps1.dnr.state.mn.us/cgi-
> bin/mapserv70?map=/usr/local/mapserver/apps/test/palette/test.map=m
> ap  bin/mapserv70?map=/usr/local/mapserver/apps/test/palette/test.map=m
> ap>  (24-bit)
> 
>   -  http://maps1.dnr.state.mn.us/cgi-
> bin/mapserv70?map=/usr/local/mapserver/apps/test/palette/test.map=m
> ap=png8  bin/mapserv70?map=/usr/local/mapserver/apps/test/palette/test.map=m
> ap=png8>  (8-bit w/5 colors)
> 
> 
> 
>   Steve
> 
> 
> 
>   From: mapserver-users [mailto:mapserver-users-
> boun...@lists.osgeo.org 
> ] On Behalf Of Erik H
>   Sent: Monday, October 16, 2017 10:58 AM
>   To: mapserver-users@lists.osgeo.org  us...@lists.osgeo.org>
>   Subject: [mapserver-users] Draw roads WITHOUT anti-
> aliasing
> 
> 
> 
>   I'm running a tiling server that uses MapServer 7.0.4
> to generate PNGs.
> 
> 
> 
>   My colleagues came up with an ingenious idea to animate
> traffic conditions that would require them to identify road segments
> based on their color. They asked me to generate tiles with a
> predetermined RGBA value per road segment.
> 
> 
> 
>   I configured a layer of type LINE, with a STYLE section
> containing 'COLOR [palette]' (palette being 

Re: [mapserver-users] Class maxscaledenom performance

2017-06-02 Thread Eichner, Andreas - SID
What about http://mapserver.org/development/rfc/ms-rfc-86.html ?


> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von pe_lord
> Gesendet: Donnerstag, 1. Juni 2017 19:26
> An: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Class maxscaledenom performance
> 
> I've verified if the issue was not linked to WMS. shp2img succeed to
> produce
> the png. But it's quite long.
> 
> I have tried at
> *1:102 000 *
> PGIS Query = 4 sec
> Nb of recors = 2859 records
> Mapserver render by WMS = 2.5 sec
> Mapserver render by shp2img =  shp2img total time: 3.677s
> 
> select
> "classitem_field",encode(ST_AsBinary(ST_Force2D("the_geom"),'NDR'),'hex'
> ) as
> geom,"ogc_fid" from ori_pee
> where the_geom && ST_GeomFromText('POLYGON((-8871026
> 6114309.70958512,-8871026 6140241.29041488,-8834701
> 6140241.29041488,-8834701 6114309.70958512,-8871026
> 6114309.70958512))',3857)
> 
> 
> *1:1 002 000*
> PGIS Query = 26 minutes
> Nb of records = 242832 records
> Mapserver render by WMS = "internal server error" = timout
> Mapserver render by shp2img =  shp2img total time: 156.299s
> 
> select
> "classitem_field",encode(ST_AsBinary(ST_Force2D("the_geom"),'NDR'),'hex'
> ) as
> geom,"ogc_fid" from ori_pee
> where the_geom && ST_GeomFromText('POLYGON((-9031284
> 504.71459227,-9031284 6254645.28540772,-8674443
> 6254645.28540772,-8674443 504.71459227,-9031284
> 504.71459227))',3857)
> 
> Here my validations
> 1-My layer have EXTENT
> 2-Mapserver do not reproject data
> 3-My layer has no label
> 4-Myconnection on postgis "DEFER"
> 5-My table have no OIDS
> 6-My table have GIST index on the_geom field
> 7-My table have a btree index on classitem field.
> 8-No warning in my GetCapabilities
> 
> 
> I have tried loading a new table with OIDS set to TRUE (on table, not on
> database)  and it's seem to be the same behavior? Do I really need to
> modify
> postgresql.conf?
> 
> 
> 
> When I read the query called from mapserver, I think there is a way to
> improve performance on maxscaledenom. Do you think there is a way for
> mapserver to know which class to render at current scale (based on bbox
> )
> and filter on them ...
> 
> the query might look like this:
> select
> "classitem_field",encode(ST_AsBinary(ST_Force2D("the_geom"),'NDR'),'hex'
> ) as
> geom,"ogc_fid" from ori_pee
> where the_geom && ST_GeomFromText('POLYGON((-9031284
> 504.71459227,-9031284 6254645.28540772,-8674443
> 6254645.28540772,-8674443 504.71459227,-9031284
> 504.71459227))',3857) and classitem_field = 'BBOX'
> 
> I think I will work on union layers :) .
> 
> 
> 
> 
> 
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/Class-
> maxscaledenom-performance-tp5322521p5322693.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> 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] Mapcache segmentation faults under high load

2017-03-09 Thread Eichner, Andreas - SID
Hi Pieter,

have you tried it on a different OS or just on different hardware?
To me it looks as if it happens somewhere in a C library call. 
Have you a chance to try it on another OS and/or library versions?

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Pieter Callewaert
> Gesendet: Donnerstag, 9. März 2017 09:09
> An: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Mapcache segmentation faults under high
> load
> 
> Hi,
> 
> I’ve been testing further, on other servers to eliminate hardware
> failures, but I keep getting consistent this problem.
> I made now consistent the same core dumps, I think my first core dump was
> not a correct one.
> 
> http://pastebin.com/L0Lhru4m
> 
> You can see at start:
> 1. Program terminated with signal SIGSEGV, Segmentation fault.
> 2. #0  process_socket (my_thread_num=42, my_child_num=,
> cs=0x7fee0d1042b8, sock=, p=, thd= out>)
> 3.     at event.c:1064
> 
> If you scroll down, the last thread is this thread, but I'm not sure yet
> what the problem exactly is. Any pointers?
> 
> Kind regards,
> Pieter Callewaert
> 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapcache segmentation faults under high load

2017-03-06 Thread Eichner, Andreas - SID
Hi Pieter,

have you checked the ulimit for the user the Apache runs under? See man core(5) 
for possible reasons why no core is dumped.

HTH

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Pieter Callewaert
> Gesendet: Montag, 6. März 2017 11:01
> An: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Mapcache segmentation faults under high
> load
> 
> Hi Thomas,
> 
> 
> 
> The documentation for debug compiling is not complete
> (http://mapserver.org/mapcache/install.html
>  ).
> 
> If I add -DCMAKE_BUILD_TYPE="Debug" to the cmake, it this enough?
> 
> Also added CoreDumpDirectory /tmp/apache2-gdb-dump to apache2.conf, and
> now I see this in the error log:
> 
> 
> 
> [Thu Mar 02 08:46:42.588518 2017] [core:notice] [pid 13:tid
> 140052444931968] AH00051: child pid 14 exit signal Segmentation fault
> (11), possible coredump in /tmp/apache2-gdb-dump
> 
> [Thu Mar 02 08:46:55.606507 2017] [core:notice] [pid 13:tid
> 140052444931968] AH00051: child pid 2097 exit signal Segmentation fault
> (11), possible coredump in /tmp/apache2-gdb-dump
> 
> 
> 
> Unfortunately, no dumps yet, so I’m afraid I did something wrong with the
> debug compiling.
> 
> 
> 
> Kind regards,
> 
> Pieter C
> 
> 
> 
> From: thomas bonfort [mailto:thomas.bonf...@gmail.com]
> Sent: Wednesday, 1 March, 2017 09:33
> To: Pieter Callewaert ; mapserver-
> us...@lists.osgeo.org
> Subject: Re: [mapserver-users] Mapcache segmentation faults under high
> load
> 
> 
> 
> Try to get a backtrace from the crashes by compiling mapcache in debug
> mode, and configuring apache to allow coredumps. The "stale lock" messages
> you are seeing are side effects of the crashes so that's not where I'd
> investigate at first.
> 
> 
> 
> regards,
> 
> thomas
> 
> 
> 
> 

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

Re: [mapserver-users] PostGIS date queries performance issues

2016-11-18 Thread Eichner, Andreas - SID
Besides comparing the execution plans for both query versions, you could try:
1. omit the outer ORDER BY clause (not present in MS6 and the inner one is not 
relevant for the result, so might be optimized away by the planner)
2. try the MS7 SQL without the superfluous st_intersects() part (it might not 
use the spatial index in the same way as the "&&" operator)
3. replace the time comparision part with the MS6 BETWEEN construct
4. try all at once and/or combinations of them

At least one should help you identify the cause. If you've found it post it 
here so that one could search the generating code.

HTH

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Kralidis, Tom (EC)
> Gesendet: Freitag, 18. November 2016 03:14
> An: mapserver-users@lists.osgeo.org
> Betreff: [mapserver-users] PostGIS date queries performance issues
> 
> Hi all: using 7.0.2 against a PostgreSQL 9.3/PostGIS 2.2 instance we're
> getting very long (timeouts even) response times when doing WFS filters
> against PostgreSQL date types.
> 
> I've posted a Gist at [1] to help in reporting.  Note that this
> functionality used to work with acceptable performance in 6.4.x.
> 
> Looking deeper (see Gist) it appears that the SQL queries that MapServer
> crafts for PostgreSQL are different.  When I try the 7.0.2 based SQL in a
> psql prompt, the same very long response time results.
> 
> Any idea what could be going on here?
> 
> Thanks
> 
> ..Tom
> 
> [1] https://gist.github.com/tomkralidis/006594382d6339c2047b441108a3991b
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] msOGRFileOpen

2016-11-03 Thread Eichner, Andreas - SID
As mentioned in
http://mapserver.org/input/vector/mssql.html#option-1-connect-through-ogr
adding ";Tables=()" might help. You can try to add 
  OPTION MSSQLSPATIAL_USE_GEOMETRY_COLUMNS NO
at MAP level to avoid reading the "geometry_columns"-Table. I guess the SRID 
will be reported as -1 then and you need to define a PROJECTION block at the 
LAYER. You can use the DATA statement to define the SQL for your layer.

HTH

> -Ursprüngliche Nachricht-
> Von: Vogt, Robert (RCIS) [mailto:robert.v...@rcis.com]
> Gesendet: Mittwoch, 2. November 2016 16:49
> An: Eichner, Andreas - SID; mapserver-users@lists.osgeo.org
> Betreff: RE: msOGRFileOpen
> 
> Yes, thank you! I figured that out(so many different configuration :))
> 
> I'm curious OGR doesn't seem to be able to find my SRID and it also looks
> like it pulls ALL fields...this seems inefficient
> 
> Is there a way to pass custom SQL to OGR and only include columns that are
> needed and the SRID?
> 
> -Bob
> 
> 
> 
> -Original Message-
> From: Eichner, Andreas - SID [mailto:andreas.eich...@sid.sachsen.de]
> Sent: Tuesday, November 01, 2016 12:30 PM
> To: Vogt, Robert (RCIS); mapserver-users@lists.osgeo.org
> Subject: AW: msOGRFileOpen
> 
> From http://www.gdal.org/drv_mssqlspatial.html and the linked page about
> ODBC driver connection string (http://msdn.microsoft.com/en-
> us/library/ms130822.aspx) it seems you need to use "UID" and "PWD" instead
> of "username" and "password"
> 
> HTH
> 
> > -Ursprüngliche Nachricht-
> > Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org]
> > Im Auftrag von Vogt, Robert (RCIS)
> > Gesendet: Dienstag, 1. November 2016 14:36
> > An: mapserver-users@lists.osgeo.org
> > Betreff: [mapserver-users] msOGRFileOpen
> >
> > Good morning,
> >
> > I have successfully tested my connection string with "ogrinfo", now
> > however when I try to use that connection string in my MapFile I
> > receive this error...
> >
> > msDrawMap(): Image handling error. Failed to draw layer named 'myLayer'.
> > msOGRFileOpen(): OGR error. Open failed for OGR connection in layer
> > `myLayer'. Unable to initialize connection to the server for
> > MSSQL:Database=mydatabase;Server=myServer;user=myUser;password=XXX
> >   SQL Server Driver][SQL
> > Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
> >
> > Any help is greatly appreciated!!
> >
> > ___
> > mapserver-users mailing list
> > mapserver-users@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] msOGRFileOpen

2016-11-01 Thread Eichner, Andreas - SID
From http://www.gdal.org/drv_mssqlspatial.html and the linked page about ODBC 
driver connection string 
(http://msdn.microsoft.com/en-us/library/ms130822.aspx) it seems you need to 
use "UID" and "PWD" instead of "username" and "password"

HTH

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Vogt, Robert (RCIS)
> Gesendet: Dienstag, 1. November 2016 14:36
> An: mapserver-users@lists.osgeo.org
> Betreff: [mapserver-users] msOGRFileOpen
> 
> Good morning,
> 
> I have successfully tested my connection string with "ogrinfo", now
> however when I try to use that connection string in my MapFile
> I receive this error...
> 
> msDrawMap(): Image handling error. Failed to draw layer named 'myLayer'.
> msOGRFileOpen(): OGR error. Open failed for OGR connection in layer
> `myLayer'. Unable to initialize connection to the server for
> MSSQL:Database=mydatabase;Server=myServer;user=myUser;password=XXX
>  SQL Server Driver][SQL
> Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
> 
> Any help is greatly appreciated!!
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] ogrinfo not recognized

2016-11-01 Thread Eichner, Andreas - SID
PowerShell does not execute programs from untrusted sources so you need to use 
".\ogrinfo".

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Vogt, Robert (RCIS)
> Gesendet: Montag, 31. Oktober 2016 19:51
> An: mapserver-users@lists.osgeo.org
> Betreff: [mapserver-users] ogrinfo not recognized
> 
> I'm trying to test my connection string in ogrinfo.
> These are the steps I'm taking...
> 
> 1. Open PowerShell as administrator
> 2. Navigate to directory where ogrinfo.exe is located
> 3. Enter command "ogrinfo
> MySQL:DatabaseName,host=Server,user=myUserName,password=myPassword,port=my
> Port"
> 
> Then I receive an error stating "ogrinfo : The term 'ogrinfo' is not
> recognized as the name of a cmdlet"
> 
> Not sure what I am doing wrong?
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Updating MapCache on feature edits

2016-10-04 Thread Eichner, Andreas - SID
Seth,

you can use OGR to retrieve the updated features and give it to mapcache_seed.
See 
http://mapserver.org/mapcache/seed.html#optional-commandline-options-when-using-ogr-geos
 .

The ows_updatesequence metadata signals changes in the metadata returned by a 
GetCapabilities request, i.e. when adding/removing layers, descriptions and the 
like.

HTH
 
> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Seth G
> Gesendet: Sonntag, 2. Oktober 2016 15:23
> An: mapserver-users@lists.osgeo.org
> Betreff: [mapserver-users] Updating MapCache on feature edits
> 
> Hi list,
> 
> I have a few MapServer layers based on data that can be edited at any
> time. In practice this usually happens in short bursts every month or so.
> The remaining time the layers would benefit greatly from using a tile
> cache.
> 
> Are there any suggested methods on how to automatically
> purge/delete/change the cache when an edit happens when using MapServer
> and Mapcache?
> 
> I see that GeoWebCache/Geoserver allows a GeoRSS feed to invalidate
> features
> http://geowebcache.org/docs/current/configuration/layers/georss.html
> 
> 
> The ows_updatesequence metadata parameter for a WMS layer looks like it
> could be used somehow (see http://mapserver.org/ogc/wms_server.html#web-
> object-metadata), but it seems that custom dimensions need to be requested
> by the client, and any Mapcache configurations would need Apache to be
> restarted.
> 
> Any best practices, or solutions appreciated,
> 
> Seth
> 
> 
> --
> web: http://geographika.co.uk 
> twitter: @geographika
> 
> 

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

Re: [mapserver-users] Filtering NULL values from Postgis Layer in Mapserver 7

2016-08-17 Thread Eichner, Andreas - SID
Hello Marco,

IMHO the best solution would be to implement a "IS NULL" operator or function 
for the mapserver expressions. I guess this was not implemented because MS was 
originally developed for rendering ESRI-Shapefiles which do not support NULL 
values.

According to http://mapserver.org/cgi/runsub.html#table-of-contents 
LAYER/PROCESSING should support runtime substitution since 7.0 so you could try 
to use the 'NATIVE_FILTER' processing option with something like '%MY_VAR1% is 
not null and %MY_VAR2% is not null' (very much like your FILTER in MS 6.4):

PROCESSING "NATIVE_FILTER=%MY_VAR1% is not null and %MY_VAR2% is not null"

If that does not work (check the debug log if the statement build has 
substitutions applied) your only solution would be to use the DATA statement 
with a sub-select. Something like:

DATA "the_geom from (select gid, the_geom, %MY_VAR1% as attr1, %MY_VAR2% as 
attr2 from
  geotable where %MY_VAR1% is not null and %MY_VAR2% is not null) as 
subquery
  using unique gid using srid=4326"

Hopefully one of that works for you...

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von deduikertjes
> Gesendet: Mittwoch, 17. August 2016 11:09
> An: mapserver-users@lists.osgeo.org
> Betreff: Re: [mapserver-users] Filtering NULL values from Postgis Layer in
> Mapserver 7
> 
> Andreas,
> 
> Thank you.
> 
> hmm, that's very interesting. Lets see if I understand correctly:
> 
> I observe that in the CLASS EXPRESSIONs in a Postgis layer NULL is treated
> as zero for numeric fields. So NULL gets visualized in the class where
> zero
> is visualized. In my opinion that is not very desirable. I actually would
> expect a default behaviour where NULL values will not match any CLASS
> EXPRESSION.
> 
> In Mapserver 6 we luckily had the FILTER option to filter out the NULL
> values to remedy this behaviour. Not very elegant but very doable.
> 
> Now in Mapserver 7 we lost the FILTER option and have to write a subselect
> in the DATA statement to get rid of NULL values. That seems to be a rather
> complicated solution for something which seems to be a very common task.
> 
> Or am I missing something and is there a way to avoid that NULL values end
> up as being treated as 0?
> 
> MArco
> 
> 
> 
> --
> View this message in context: http://osgeo-
> org.1560.x6.nabble.com/Filtering-NULL-values-from-Postgis-Layer-in-
> Mapserver-7-tp5280893p5281035.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Filtering NULL values from Postgis Layer in Mapserver 7

2016-08-16 Thread Eichner, Andreas - SID
Hello Marco,

in MapServer expressions you cannot test for NULL values and the NATIVE_FITLER 
processing key does not support runtime substitutions. You could try to use a 
sub-select directly in the DATA as described in 
http://mapserver.org/input/vector/postgis.html#table-of-contents 

HTH

> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von deduikertjes
> Gesendet: Dienstag, 16. August 2016 12:54
> An: mapserver-users@lists.osgeo.org
> Betreff: [mapserver-users] Filtering NULL values from Postgis Layer in
> Mapserver 7
> 
> Hi,
> 
> In mapserver 6 I use the following to filter out records containing NULL
> values in a Postgis layer (I am using runtime substitution for MY_VAR1 and
> MY_VAR2):
> 
> FILTER (NOT (%MY_VAR1% IS NULL OR %MY_VAR2% IS NULL))
> 
> This is working fine, but doesn't work in mapserver 7 anymore as
> documented
> in  http://mapserver.org/MIGRATION_GUIDE.html#mapserver-6-4-to-7-0-
> migration
> 
> According to that page I have to write the FILTER statement in the
> MapServer
> expression syntax.
> 
> So now I'm trying to do so but I am not winning. I cannot find a way to
> properly detect NULL values using MapServer expression syntax. Is there
> any
> way writing such a filter without using a PROCESSING 'NATIVE_FILTER='
> construct?
> 
> Any help greatly appreciated, MArco
> 
> 
> 
> 
> --
> View this message in context: http://osgeo-
> org.1560.x6.nabble.com/Filtering-NULL-values-from-Postgis-Layer-in-
> Mapserver-7-tp5280893.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Multiple styles in a MapServer WMS Service

2016-05-31 Thread Eichner, Andreas - SID
Hi Simon,

We had to create a CLASSGROUP for every style and on every layer:

LAYER
  CLASSGROUP 'Style1'
  CLASSGROUP 'Style2'

  CLASS
GROUP 'Style1'
STYLE
  [...]
END
  END

  CLASS
GROUP 'Style2'
STYLE
  [...]
END
  END
END

With this, they are advertised as:

  [...]
  
Style1
[...]
  
  
Style2
[...]
  


And you can request the one to use on GetMap-Requests using the STYLES 
parameter.

HTH


> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von Wright, Simon M.
> Gesendet: Dienstag, 31. Mai 2016 14:37
> An: mapserver-users@lists.osgeo.org
> Betreff: [mapserver-users] Multiple styles in a MapServer WMS Service
> 
> Dear All
> 
> 
> 
> I'm fairly new to MapServer and am trying to create a WMS Service.
> 
> 
> 
> I have defined two styles the following metadata section of a layer as
> follows:
> 
> 
> 
>   METADATA
> 
>  "wms_title"   "LC.LandCoverSurfaces"
> 
>  "wms_srs" "CRS:84 EPSG:4326 EPSG:27700 EPSG:4258
> EPSG:3857"
> 
>  "wms_metadataurl_type" "ISO19115:2003"
> 
>  "wms_metadataurl_format"   "text/xml"
> 
>  "wms_metadataurl_href"
> "https://catalogue.ceh.ac.uk//id/a1f88807-4826-44bc-994d-a902da5119c2?;
> 
>  "wms_style"   "default"
> 
>  "wms_style_default_legendurl_title"  ""
> 
>  "wms_style_default_legendurl_width"  "226"
> 
>  "wms_style_default_legendurl_height" "431"
> 
>  "wms_style_default_legendurl_format" "image/png"
> 
>  "wms_style_default_legendurl_href"
> "http://eidc.ceh.ac.uk/administration-folder/tools/wms/987544e0-22d8-11e4-
> 8c21-0800200c9a66/legends/LCM2007_DomTar.png"
> 
>  "wms_style"   "inspire_common:DEFAULT"
> 
>  "wms_style_inspire_common:DEFAULT_legendurl_title"
> "LC.LandCoverSurfaces Default Style"
> 
>  "wms_style_inspire_common:DEFAULT_legendurl_width"
> "226"
> 
>  "wms_style_inspire_common:DEFAULT_legendurl_height"
> "431"
> 
>  "wms_style_inspire_common:DEFAULT_legendurl_format"
> "image/png"
> 
>  "wms_style_inspire_common:DEFAULT_legendurl_href"
> "http://eidc.ceh.ac.uk/administration-folder/tools/wms/987544e0-22d8-11e4-
> 8c21-0800200c9a66/legends/LCM2007_DomTar.png"
> 
> 
> 
> But only one style is actually broadcast in the WMS GetCapabilities
> document:
> 
> 
> 
> 
> 
> LC.LandCoverSurfaces
> 
> LC.LandCoverSurfaces
> 
> CRS:84
> 
> EPSG:4326
> 
> EPSG:27700
> 
> EPSG:4258
> 
> EPSG:3857
> 
> 
> 
> -9.49714
> 
> 3.63202
> 
> 49.7668
> 
> 61.581
> 
> 
> 
>  maxy="61.581"/>
> 
>  maxy="3.63202"/>
> 
>  maxy="1.3e+06"/>
> 
>  maxy="3.63202"/>
> 
>  maxx="404315" maxy="8.76046e+06"/>
> 
> 
> 
> text/xml
> 
> http://www.w3.org/1999/xlink;
> xlink:type="simple" xlink:href="https://catalogue.ceh.ac.uk//id/a1f88807-
> 4826-44bc-994d-a902da5119c2?"/>
> 
> 
> 
> 
> 
> inspire_common:DEFAULT
> 
> inspire_common:DEFAULT
> 
> 
> 
> image/png
> 
> http://www.w3.org/1999/xlink";
> xlink:type="simple" xlink:href="http://eidc.ceh.ac.uk/administration-
> folder/tools/wms/987544e0-22d8-11e4-8c21-
> 0800200c9a66/legends/LCM2007_DomTar.png"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> It appears that the last defined style is the one that makes it through to
> the GetCapabilities file.
> 
> 
> 
> 
> 
> 
> 
> Therefore, am I specifying my styles incorrectly in the .map file?
> 
> 
> 
> Is it possible to define multiple styles for the GetCapabilities document?
> 
> 
> 
> Or, is this a bug in MapServer 6.4.2?  And if so, should I use a later
> version of MapServer?
> 
> 
> 
> 
> 
> 
> 
> Many thanks for any help that anyone can provide.
> 
> 
> 
> 
> 
> 
> 
> Best wishes, Simon.
> 
> 
> 
> This message (and any attachments) is for the recipient only. NERC is
> subject to the Freedom of Information Act 2000 and the contents of this
> email and any reply you make may be disclosed by NERC unless it is exempt
> from release under the Act. Any material supplied to NERC may be stored in
> an electronic records management system.
> 

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

Re: [mapserver-users] Mapserver: set symbol on lines according to line features length

2015-11-30 Thread Eichner, Andreas - SID
AFAIK you need to preprocess your data and use CLASSes in your map file. Using 
OGR or a SQL database you might be able to do this on the fly within your DATA. 
For example, the command
  $ ogrinfo -dialect sqlite -sql "select st_length(geometry) > 10 as longenough 
from water_pipes" water_pipes.shp
creates a computed field containing 1 if the line geometry has a length greater 
than 10. You can then classify on this an apply a symbolization conditionally:

LAYER
  CLASS
EXPRESSION "([longenough] != 0)"
STYLE
  SYMBOL "wp_arrow"
  GAP -100
  COLOR 255 0 0
  OFFSET -5 -99
  SIZE 6
END
  END
  CLASS
# default style goes here
  END
END

I have not tested this but it might give you a hint how to accomplish it.

HTH


> -Ursprüngliche Nachricht-
> Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im
> Auftrag von wiltomap
> Gesendet: Montag, 30. November 2015 13:34
> An: mapserver-users@lists.osgeo.org
> Betreff: [mapserver-users] Mapserver: set symbol on lines according to
> line features length
> 
> I need to display arrows alongside to line features. Lines represent water
> pipes. The issue I'm facing is that lines are a concatenation of numerous
> line features of various lengths. Therefore, symbols are attached to every
> line, whatever its length. This makes symbols either overlaying or
> touching
> eachother (as in example below).
> 
> 
> 
> Inside my mapfile, I define the display rules of my symbols in the STYLE
> element:
> 
> STYLE
> SYMBOL "wp_arrow"
> GAP -100
> COLOR 255 0 0
> OFFSET -5 -99
> SIZE 6
> END
> 
> I would like these rules to apply only to line features being more than 10
> meters long (or x map units).
> 
> Thanks in advance for help or any advice!
> 
> 
> Thomas
> 
> 
> 
> 
> --
> View this message in context: http://osgeo-
> org.1560.x6.nabble.com/Mapserver-set-symbol-on-lines-according-to-line-
> features-length-tp5239136.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] determining which map file is associated with which fast-cgi process

2015-07-28 Thread Eichner, Andreas - SID
For each request a MapServer FCGI process uses either the value of the map= 
query parameter or the value of the MS_MAPFILE environment variable. In most 
configurations a pool of those processes is used to work on multiple requests 
simultaneously. Essentially there's no fixed association between a FCGI process 
and a map file.

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Richard Greenwood
 Gesendet: Montag, 27. Juli 2015 23:28
 An: mapserver
 Betreff: [mapserver-users] determining which map file is associated with
 which fast-cgi process
 
 This is probably a more general Linux or fast-cgi question than strictly
 mapserver, but I don't know where else to ask so I'll give it a try here.
 I'm serving several different map files and I have several fast-cgi
 mapserv instances.
 
 Am I correct that each mapserv.fcgi is serving a different map file and
 that all mapserv requests for given map file go to the same fcig instance?
 
 And if I'm correct on that, when I use commands like 'top' or 'ps' they
 all show as mapserv.fcgi. I'd like to know which instance is serving which
 map file.
 
 
 Thanks,
 
 Rich
 
 
 --
 
 Richard W. Greenwood, PLS
 www.greenwoodmap.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapfile classifying using two separate raster files?

2015-07-23 Thread Eichner, Andreas - SID
You might be able to virtually combine those two rasters into one using GDAL's 
VRT format (http://www.gdal.org/gdal_vrttut.html).

HTH

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Matt McClelland
 Gesendet: Donnerstag, 23. Juli 2015 08:54
 An: mapserver-users@lists.osgeo.org
 Betreff: [mapserver-users] Mapfile classifying using two separate raster
 files?
 
 Hi
 
 I have two raster files one for vegetation and one for population density.
 The two rasters (tif's) are at different scales
 
 I am using value based classification to paint the map green where
 vegetation values are high.
 Is there a way I can classify based on values from the two separate files
 in the same layer
 I can't see how this will  work as you can only have one data item per
 layer?? (but worth asking)
 
 I am wanting to be able to do something like
 EXPRESSION ([veg] = 50 and [population]  500)
 
 The only option I can think of is to make the two files into a single
 multiband tiff?  This seems wasteful as one is much lower resolution then
 the other.
 
 thoughts??
 
 thanks
 
 Matt  :)
 
 
 http://www.wildwalks.com/office/newsletters/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Incompatibility at Filter - level between mapserver 6.x and the last mapserver-dev ?

2015-06-10 Thread Eichner, Andreas - SID
It seems the filter expression must not be given as string. So you should use

FILTER ([CODICE] = 107)

Otherwise MapServer will read the filter as string value to be used in 
combination with FILTERITEM.

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Andrea Peri
 Gesendet: Dienstag, 9. Juni 2015 23:40
 An: Schylberg Lars; Havard Tveite
 Cc: mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] Incompatibility at Filter - level between
 mapserver 6.x and the last mapserver-dev ?
 
 Unfortunately no.
 Its only a typo in e-mail.
 
 The bracket in the mapfile was correct close.
 
 Thx
 
 
 2015-06-09 12:15 GMT+02:00 Schylberg Lars lars.schylb...@saabgroup.com:
  It seems like You have a typing error.
 
FILTER ([CODICE[ = 107)
 
  Should be:
 
FILTER ([CODICE] = 107)
 
  /Lars
 
  -Original Message-
  From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] On Behalf Of Andrea Peri
  Sent: den 9 juni 2015 11:34
  To: Eichner, Andreas - SID
  Cc: mapserver-users@lists.osgeo.org
  Subject: Re: [mapserver-users] Incompatibility at Filter - level between
 mapserver 6.x and the last mapserver-dev ?
 
  Thx for response.
 
  I try this,
  FILTER (CODICE = 107)
  and also this
  FILTER ([CODICE[ = 107)
  and removing the filteritem,
 
  but still go in error:
  :(
 
  The log report this:
 
  [Tue Jun  9 11:29:53 2015].880265 LayerDefaultTranslateFilter():
  General error message. This data driver does not implement filter
 translation support [Tue Jun  9 11:29:53 2015].955070 msEvalExpression():
 General error message. Cannot evaluate expression, no item index defined.
 
  2015-06-09 11:06 GMT+02:00 Eichner, Andreas - SID
  andreas.eich...@sid.sachsen.de:
  I think you should use
 
  FILTER ([CODICE] = 107)
 
  i.e. without using FILTERITEM and the leading WHERE
 
  -Ursprüngliche Nachricht-
  Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
  boun...@lists.osgeo.org] Im Auftrag von Andrea Peri
  Gesendet: Dienstag, 9. Juni 2015 10:45
  An: mapserver-users@lists.osgeo.org
  Betreff: [mapserver-users] Incompatibility at Filter - level between
  mapserver 6.x and the last mapserver-dev ?
 
  Hi,
  I have just update my mapserver to the last mapserver-dev .
 
  After this update, I see an error on the filtering.
 
  In my mapfile the data configuration was originally this:
 
  CONNECTION /path-to-spatialite-db/zz_db_tematici.sqlite
  CONNECTIONTYPE OGR
  DATA IFT2009
  EXTENT 1554650.74 4678225.52 1771822.76 4924891.9
  FILTER WHERE ([CODICE] = 107)
  FILTERITEM CODICE

 
 
  The log report this error:
 
  [Tue Jun  9 10:39:46 2015].153296 msDrawMap(): rendering using
  outputformat named AGGA (AGG/PNG).
  [Tue Jun  9 10:39:46 2015].154698 msDrawMap(): WMS/WFS set-up and
  query, 0.001s [Tue Jun  9 10:39:46 2015].262330
  LayerDefaultTranslateFilter():
  General error message. This data driver does not implement filter
  translation support [Tue Jun  9 10:39:46 2015].282402 msDrawMap():
  Layer 239 (rt_ucs.idift.rt.107), 0.128s [Tue Jun  9 10:39:46
  2015].282550 msDrawMap(): Drawing Label Cache, 0.000s
 
  I'm using spatialite as db.
 
  After this error, I read this RFC:
  http://www.mapserver.org/ru/development/rfc/ms-rfc-91.html
 
  And try the new settings,
 
  FILTER (([FILTERITEM[ = string) AND (CODICE = 107))
 
  but it seem don't work.
 
  I don't understand if this is an issue of the new settings with
  spatialite or I'm wrong something.
 
  Thx,
 
 
  --
  -
  Andrea Peri
  . . . . . . . . .
  qwerty àèìòù
  -
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 
 
  --
  -
  Andrea Peri
  . . . . . . . . .
  qwerty àèìòù
  -
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 
 
 --
 -
 Andrea Peri
 . . . . . . . . .
 qwerty àèìòù
 -
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Incompatibility at Filter - level between mapserver 6.x and the last mapserver-dev ?

2015-06-09 Thread Eichner, Andreas - SID
I think you should use

FILTER ([CODICE] = 107)

i.e. without using FILTERITEM and the leading WHERE

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Andrea Peri
 Gesendet: Dienstag, 9. Juni 2015 10:45
 An: mapserver-users@lists.osgeo.org
 Betreff: [mapserver-users] Incompatibility at Filter - level between
 mapserver 6.x and the last mapserver-dev ?
 
 Hi,
 I have just update my mapserver to the last mapserver-dev .
 
 After this update, I see an error on the filtering.
 
 In my mapfile the data configuration was originally this:
 
 CONNECTION /path-to-spatialite-db/zz_db_tematici.sqlite
 CONNECTIONTYPE OGR
 DATA IFT2009
 EXTENT 1554650.74 4678225.52 1771822.76 4924891.9
 FILTER WHERE ([CODICE] = 107)
 FILTERITEM CODICE
   
 
 
 The log report this error:
 
 [Tue Jun  9 10:39:46 2015].153296 msDrawMap(): rendering using
 outputformat named AGGA (AGG/PNG).
 [Tue Jun  9 10:39:46 2015].154698 msDrawMap(): WMS/WFS set-up and query,
 0.001s
 [Tue Jun  9 10:39:46 2015].262330 LayerDefaultTranslateFilter():
 General error message. This data driver does not implement filter
 translation support
 [Tue Jun  9 10:39:46 2015].282402 msDrawMap(): Layer 239
 (rt_ucs.idift.rt.107), 0.128s
 [Tue Jun  9 10:39:46 2015].282550 msDrawMap(): Drawing Label Cache, 0.000s
 
 I'm using spatialite as db.
 
 After this error, I read this RFC:
 http://www.mapserver.org/ru/development/rfc/ms-rfc-91.html
 
 And try the new settings,
 
 FILTER (([FILTERITEM[ = string) AND (CODICE = 107))
 
 but it seem don't work.
 
 I don't understand if this is an issue of the new settings with
 spatialite or I'm wrong something.
 
 Thx,
 
 
 --
 -
 Andrea Peri
 . . . . . . . . .
 qwerty àèìòù
 -
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Named WMS styles - CLASSGROUP and GROUP

2015-05-29 Thread Eichner, Andreas - SID
Have you tried using GROUP ST instead of wms_layer_group metadata? This seems 
to be the intended way to create a named group that can be requested. There 
seems to be no way to declare styles at group (or root) level. Requesting the 
group ST with style grey or color works but clients might be confused if 
the capabilities advertise a style at each leaf layer but none at group level.

Changing your mapfile to

LAYER
NAME circle
GROUP ST
METADATA
# wms_layer_group /ST/circles
...

LAYER
NAME square
GROUP ST
METADATA
# wms_layer_group /ST/squares

At least allows requesting the group ST with style color or grey:
...layers=STstyles=grey... or ...layers=STstyles=color...
and requesting each single leaf layer:
...layers=circle,squarestyles=color,grey...

HTH

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von lars.schylb...@blixtmail.se
 Gesendet: Donnerstag, 28. Mai 2015 15:38
 An: mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] Named WMS styles - CLASSGROUP and GROUP
 
 Hi again,
 
 I have modified my example and found out some things that works and some
 that don't work.
 Actually I got a little furhter looking at:
 https://github.com/mapserver/mapserver/issues/4660
 
 One layer with layer name as Layer=square gives correct result with both
 styles=color and styles=grey.
 That is the layer name from the Layer name declaration.
 
  http://localhost/cgi-
 bin/mapserv?map=/home/lars/Maps/Style_test/style_test_5.mapSERVICE=WMSRE
 QUEST=GetmapVERSION=1.1.1
 LAYERS=squarestyles=grey
 srs=EPSG:4326BBOX=0,0,20,15FORMAT=image/pngWIDTH=200HEIGHT=150
 
 Two layers with layer name as Layer=square,circle  gives correct result
 if I give two arguments to  styles ie. styles=grey,grey or
 styles=color,color or styles=grey,color.
 
 http://localhost/cgi-
 bin/mapserv?map=/home/lars/Maps/Style_test/style_test_5.mapSERVICE=WMSRE
 QUEST=GetmapVERSION=1.1.1
 LAYERS=circle,squarestyles=grey,grey
 srs=EPSG:4326BBOX=0,0,20,15FORMAT=image/pngWIDTH=200HEIGHT=150
 
 If I specify the layer with layers from wms_layer_group /ST/circles
 and /ST/squares that is layers=circles,squares it seem like the style
 given with styles parameter is ignored. It is only showing the default
 CLASSGROUP regardless of how styles is specified. as long as I have two
 arguments.
 
 http://localhost/cgi-
 bin/mapserv?map=/home/lars/Maps/Style_test/style_test_5.mapSERVICE=WMSRE
 QUEST=GetmapVERSION=1.1.1
 LAYERS=squares,circlesstyles=grey,grey
 srs=EPSG:4326BBOX=0,0,20,15FORMAT=image/pngWIDTH=200HEIGHT=150
 
 It seems like the style is not assosiated with the the layer handling with
 wms_layer_groups.
 I suspect that there is some undocumented way to do that.
 
 If I specify the layers with the root layer name ,  ST
 
 http://localhost/cgi-
 bin/mapserv?map=/home/lars/Maps/Style_test/style_test_5.mapSERVICE=WMSRE
 QUEST=GetmapVERSION=1.1.1
 LAYERS=STstyles=grey
 srs=EPSG:4326BBOX=0,0,20,15FORMAT=image/pngWIDTH=200HEIGHT=150
 
 I get the following error.
 
 ServiceException code=StyleNotDefined
 msWMSLoadGetMapParams(): WMS server error. Style (grey) not defined on
 root layer.
 /ServiceException
 
 So to conclude, I am wordering if there is a way to  specify the style for
 the root layer?
 Because that is really what I would like to do.
 
 Second question is how do I associate the style to layers in
 wms_layer_group instead of the layers specified in the layer name.
 
 I hope this wasn't to long. All input would be welcome.
 
 Lars Schylberg
 
 New mapfile: style_test_5.map
 --
 MAP
 NAME ST
 EXTENT 0 0 20 15
 SIZE 200 150
 UNITS DD
 IMAGECOLOR 200 200 200
 CONFIG MS_ERRORFILE /tmp/style_test.log
 DEBUG 5
 
 OUTPUTFORMAT
   NAME 'AGG'
   DRIVER AGG/PNG
   IMAGEMODE RGB
 END
 
 WEB
   IMAGEPATH /tmp/ms_tmp/
   IMAGEURL /ms_tmp/
   METADATA
 wms_srs EPSG:3006 EPSG:4326
 ows_enable_request *
   END
 END
 
 PROJECTION
   init=epsg:4326
 END
 
 SYMBOL
 NAME circle
 TYPE ELLIPSE
 FILLED TRUE
 POINTS 1 1 END
 END
 SYMBOL
 NAME square
 TYPE VECTOR
 FILLED TRUE
 POINTS 0 0 0 1 1 1 1 0 0 0 END
 END
 #
 # Start of layer definitions
 #
 LAYER
 NAME circle
 TYPE POINT
 FEATURE POINTS 10 5 END END
 FEATURE POINTS 15 10 END END
 METADATA
 wms_title Circles
 wms_enable_request   *
 wms_layer_group /ST/circles
 END
 STATUS on
 CLASSGROUP color
 CLASS
 NAME circle-color
 GROUP color
 STYLE
 COLOR 255 0 0
 SIZE 15
 WIDTH 1
 SYMBOL circle
 END
 

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-29 Thread Eichner, Andreas - SID
But the original post was about a WFS filter and it's schema defines the 
Literal element very loosely as

   xsd:element name=Literal type=ogc:LiteralType 
substitutionGroup=ogc:expression/
   xsd:complexType name=LiteralType
  xsd:complexContent mixed=true
 xsd:extension base=ogc:ExpressionType
xsd:sequence
   xsd:any minOccurs=0/
/xsd:sequence
 /xsd:extension
  /xsd:complexContent
   /xsd:complexType

And the implementation specification is also very imprecise about it:

  The Literal element is used to encode literal scalar and geometric values.

So the schema does not restrict the Literal's value to be xsd:double nor does 
the spec. FES 2.0 adds a type attribute and uses a XML schema datatype as 
example. Therefore I guess it's intended that a Literal element holds content 
matching the datatype advertised by a DescribeFeatureType request.


 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Gertjan van Oosten
 Gesendet: Donnerstag, 28. Mai 2015 15:07
 An: Rahkonen Jukka (MML); mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs
 getFeature with filter on numeric field
 
 As quoted from Rahkonen Jukka (MML)
 jukka.rahko...@maanmittauslaitos.fi:
  By reading the GML 3 standard it for example defines that Real and
 Number are
  of type xsd:double, and following that path to
 
  http://books.xmlschemata.org/relaxng/ch19-77065.html
 
 [Missed Jukka's reply first time round.]
 Yes, xsd:double (not xsd:float as in my previous reply).
 
 Which means the gory details are in:
 
   http://www.w3.org/TR/xmlschema11-2/#nt-doubleRep
 
 but everything else remains the same, notably: a decimal *point*.
 
 Cheers,
 --
 -- Gertjan van Oosten, Principal Consultant, West Consulting B.V.
 -- gert...@west.nl +31 15 2191 600   www.west.nl
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-15 Thread Eichner, Andreas - SID
Hey guys,

 Its not clear to me that commas as the decimal separator is supported in
 XML/GML. I can't find any documentation to indicate that it is. Can you
 point some out to me?

 Is there a documentation that says that it is not?
 Folks from gdal list also think that it is not supported...I guess you are
 right. But as I said on the gdal list, many countries are using a comma as
 a decimal separatorwhat other people on the planet do?
 Anyway the comma is another problem that I try to manage later..

I just had a look at the discussion on the list and tried to find some hints in 
the specs and that's what I found:

The Filter Encoding Specification v1.1.0 just states:

  The Literal element is used to encode literal scalar and geometric values.

but FES v2.0.0 adds:

  Literals can, optionally, be typed using the type attribute. The value of 
the attribute type is the name of type from some type system.

and give as an example:

  The following XML fragment: Literal type=xs:date1963-10-13/Literal 
encodes a date value. The type of the value is xs:date as defined in (see W3C 
XML Schema Part 2).

From that I would conclude that if it's not a geometric value a Literal is 
basically an untyped character representation unless otherwise specified using 
the type attribute in which case the content should be treated as the 
character representation of the specified type. The type of comparison needs 
to be inferred from its operands. But the spec does not mandate any type 
conversion or inference rules. So how it is done is implementation defined. In 
the case of PropertyIs-operations the type of the named property usually 
selects the type any other operand will be converted to. In other cases this 
will mostly be done using the strongest type that all operands can be 
converted to. I assume an implementation should support at least the basic 
datatypes defined in the XML Schema spec. So implementations will most 
probably treat numerical literals with decimals as xs:float, xs:double or 
xs:decimal and their lexical representation uses . as decimal separator. But 
they are free to suppo
 rt any other representation including one using , as decimal separator.
Geometric literals must be encoded using GML and that uses a list of xs:double 
for pos and posList and therefore uses . as decimal separator too. AFAIK 
only the deprecated coordinates element supports the decimal attribute to 
set it to something else.

Regarding the matchCase handling the spec (FES 1.1) states:
  This type definition includes the matchCase attribute which is of type 
Boolean and controls whether string comparisons are caseless or not.
So this attribute has no meaning for all other comparison types and should 
therefore be ignored.

All that said I think it is a mistake to use the matchCase attribute to 
determine the type of the comparison and its operands. And numeric literals 
should be written using the lexical representation of a XML schema basic type 
like float or double using . as the decimal separator because they are 
expected to be the most commonly supported ones.

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


Re: [mapserver-users] mapcache config troubles, Tile parameter not set

2015-04-29 Thread Eichner, Andreas - SID
I guess you're using an older version which doesn't check the type attribute 
and defaults to WMS. The mode=tile parameter is part of your URL and not 
build by MapCache. Everything else is an ordinary WMS request for a 5x5 
metatile with 10px buffer: 5*256 + 2*10 = 1300. 
So simly omit the mode parameter from the URL and let MapCache do it's WMS 
request. It will then itself respond using the requested tile service 
interface. 

HTH


Von: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] im Auftrag von Hal Mueller 
[h...@mobilegeographics.com]

Gesendet: Mittwoch, 29. April 2015 05:47
An: mapserver-users@lists.osgeo.org
Betreff: [mapserver-users] mapcache config troubles, Tile parameter not set

That request generates the following internal request, from Mapcache to 
Mapserver. It’s pretty close; the layers are right, but not the SERVICE, BBOX, 
WIDTH,
 and HEIGHT parameters.


GET 
/cgi-bin/mapserv?mode=tileVERSION=1.1.1REQUEST=GetMapSERVICE=WMSSTYLES=BBOX=-20135347.738994,-7611905.024751,-7416226.232341,5107216.481902WIDTH=1300HEIGHT=1300FORMAT=image/pngSRS=EPSG:3857MAP=/data/web/www/mapserver/sites.mapLAYERS=property_pt%20property_poly


Mapcache.xml:
   source name=hpsites type=tms
  getmap
 params
FORMATimage/png/FORMAT
MAP/data/web/www/mapserver/sites.map/MAP
LAYERSproperty_pt%20property_poly/LAYERS

   

 /params
  /getmap

  

  http
 urlhttp://a.historypointer.com/cgi-bin/mapserv?mode=tile;/url
  /http
   /source

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


Re: [mapserver-users] RE ows_allowed_ip_list / ows_denied_ip_list not working

2015-04-24 Thread Eichner, Andreas - SID
Since *_ip_list supports ranges using CIDR notation, you might use
Ows_denied_ip_list 0.0.0.0/0
But instead of blocking _all_ IPs you should probably disable requests 
to this layer or service using
ows_enable_request !*

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Vladimiro Bellini
 Gesendet: Donnerstag, 23. April 2015 16:29
 An: steve.toutant
 Cc: mapserver-users; mapserver-users-bounces
 Betreff: Re: [mapserver-users] RE ows_allowed_ip_list / ows_denied_ip_list
 not working
 
 checking my access_log did the job for denied specific ip (i was using a
 wrong public ip).
 
 but it didnt worked for * neither all
 
 but hey, specific ip works for me.
 
 Thanks!!
 
 :)
 
 
 Vladimiro Bellini  __
 \ /| _ _|. _ . _ |__) _||. _ .
 
 2015-04-23 11:22 GMT-03:00 steve.tout...@inspq.qc.ca:
 
 
   Anything in your mapserver log? perhaps there is another problem in
 your mapfile
 
 
 
 
 
 
 
 
 
 Vladimiro Bellini vlasvlasv...@gmail.com
 
 2015-04-23 10:06
 
 A
 steve.tout...@inspq.qc.ca
 cc
 mapserver-users mapserver-users@lists.osgeo.org, mapserver-users-
 boun...@lists.osgeo.org
 Objet
 Re: RE [mapserver-users] ows_allowed_ip_list / ows_denied_ip_list not
 working
 
 
 
 
 
 
 
 
   Hi, i tried all and my ip, but i got the same result.. what could
 it be?
 
   here's my full metadata (header metadata of mapfile, not in layers)
 
   METADATA
   ows_denied_ip_list all
   wms_service_onlineresource http:///cgi-
 bin/mapserv6?map=//mapase.map http:///cgi-
 bin/mapserv6?map=//mapase.map 
   ows_onlineresource http:///cgi-
 bin/mapserv6?map=//mapase.map http:///cgi-
 bin/mapserv6?map=//mapase.map 
   wms_title Mapa
   wms_abstract Capas
   wms_srs EPSG:4326 EPSG:900913 EPSG:3857 EPSG:4694 EPSG:4928
 EPSG:4929 EPSG:22181  EPSG:22182  EPSG:22183  EPSG:22184  EPSG:22185
 EPSG:22186  EPSG:22187
   wms_onlineresource http:///cgi-
 bin/mapserv6?map=//mapase.map http:///cgi-
 bin/mapserv6?map=//mapase.map 
   wms_enable_request GetCapabilities GetMap GetLegendGraphic
 GetFeatureInfo
   wfs_enable_request !*
   wms_server_version 1.1.1
   wms_feature_info_mime_type  text/html
   wms_include_items all
   gml_include_items all
   wms_contactelectronicmailaddress
 x...@.xxx.xx
   END
 
 
   and here's my layer metadata:
 
   METADATA wms_title Concesiones de Distribuidoras electricas
 wms_extent -73,566078 -55,057765 -53,635586 -21,778191
 gml_include_items all gml_featureid gid
 wms_feature_info_mime_type text/html wms_server_version 1.1.1
 wms_include_items all wms_srs EPSG:4326 END
 
 
   is there any other problem? i can still see my png when i do a
 GetMap request.. :(
 
   thanks a lot.
   Vladimiro.
 
 
 
 
   Vladimiro Bellini  __
   \ /| _ _|. _ . _ |__) _||. _ .
 
   2015-04-23 10:37 GMT-03:00 steve.tout...@inspq.qc.ca
 mailto:steve.tout...@inspq.qc.ca :
   Does this works
   ows_denied_ip_list all
 
   or
   ows_denied_ip_list youripaddress
 
 
 
 
 
 
 
 
 
 Vladimiro Bellini vlasvlasv...@gmail.com mailto:vlasvlasv...@gmail.com
 @lists.osgeo.org http://lists.osgeo.org/
 Envoyé par : mapserver-users-boun...@lists.osgeo.org mailto:mapserver-
 users-boun...@lists.osgeo.org
 
 2015-04-23 09:33
 
 
 
 A
 mapserver-users@lists.osgeo.org mailto:mapserver-users@lists.osgeo.org
 
 cc
 
 Objet
 [mapserver-users] ows_allowed_ip_list / ows_denied_ip_list not
 working
 
 
 
 
 
 
 
 
 
 
   Hi.
   i was testing ows_denied_ip_list or allowed ip list on my 6.4.1
 mapserver and it does not work at all.
./mapserv -v
   MapServer version 6.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML
 SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
 SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
 SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=GEOS
 INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
 
 
 
   METADATA
   #inside top mapfile metadata
 
  ows_denied_ip_list *
   #(other metadata..)
   END
 
 
   even blocking * (all ip's) it doesnt work,
   i always receive a GetMap response using wms
   ..
   i can still see my request (cgi-bin,wms,getmap, see the full png, no
 denied at all...) why?
   :S
 
   Thanks,
 
   Vladimiro Bellini___
   mapserver-users mailing list
   mapserver-users@lists.osgeo.org mailto:mapserver-
 us...@lists.osgeo.org
   http://lists.osgeo.org/mailman/listinfo/mapserver-users
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 
 
 
 
 
 
 
 
 
 
 
 
 


Re: [mapserver-users] ms7 How to use FILTER

2015-03-27 Thread Eichner, Andreas - SID
Days ago I voted to keep native filters in MS7 via a processing instruction. 
It's value is a SQL expression that is ANDed to every query MS builds. The 
intended use is mainly to build dynamic filters when using MapScript or the C 
API. This avoids parsing and modifying the DATA statement.
So into DATA goes the main query including subqueries and static WHERE clauses. 
The FILTER statement contains a MapServer expression either from MAP file, 
build dynamically by the CGI (e.g. a translated WFS filter) or set via 
MapScript.

HTH

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Lime, Steve D (MNIT)
 Gesendet: Donnerstag, 26. März 2015 15:56
 An: steve.tout...@inspq.qc.ca
 Cc: mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] ms7 How to use FILTER
 
 With Postgres I'd use the DATA statement. I don't use Oracle so someone
 else might be in a better position to comment.
 
 
 
 From: steve.tout...@inspq.qc.ca [mailto:steve.tout...@inspq.qc.ca]
 Sent: Thursday, March 26, 2015 9:27 AM
 To: Lime, Steve D (MNIT)
 Cc: mapserver-users@lists.osgeo.org
 Subject: RE: [mapserver-users] ms7 How to use FILTER
 
 
 
 Thanks Steve, yes it helps!
 
 If an SQL query is needed, would you suggest to do it in the DATA
 statement as a subquery or use PROCESSING native_filter=native SQL
 string
 
 steve
 
 
 
 Lime, Steve D (MNIT) steve.l...@state.mn.us
 
 2015-03-26 10:20
 
 A
 
 steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca, mapserver-
 us...@lists.osgeo.org mapserver-users@lists.osgeo.org
 
 cc
 
 
 Objet
 
 RE: [mapserver-users] ms7 How to use FILTER
 
 
 
 
 
 
 
 
 
 
 MapServer FILTERs are now only written using MapServer expression syntax
 (e.g. ([someitem] != someval)). Drivers can support translation
 capabilities to create native SQL under the hood. This was done to
 standardize the syntax across all drivers. Prior to 7.0 the syntax varied
 by driver. In addition, FILTER values are preserved when used with WFS or
 native MapServer attribute queries.
 
 With database backends there has been little reason to use FILTERs since
 you could often just extend the DATA statement.
 
 Note that if need to you can still define a native SQL independently of
 the DATA statement using the processing tag native_filter, for example:
 
   PROCESSING native_filter=native SQL string
 
 This is also preserved with WFS. Does this help?
 
 Steve
 
 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org mailto:mapserver-users-boun...@lists.osgeo.org ]
 On Behalf Of steve.tout...@inspq.qc.ca
 Sent: Thursday, March 26, 2015 8:20 AM
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] ms7 How to use FILTER
 
 I'm confused on how to use FILTER when datasource is postgis or Oracle
 Spatial (Native Connection)
 
 In an old thread, I was told to not use FILTER, but use a WHERE clause in
 the Data statement.
 In the ms7 Mapfile-Layer-Data doc, I see for Oracle
 Note that there are important performance impacts when using spatial
 subqueries however. Try using MapServer's FILTER
 http://mapserver.org/mapfile/layer.html#filter  whenever possible
 instead.
 
 I remember I had a bug with MS6 when using FILTER using WFS. A getfeature
 on the layer with a spatial or logical filter, the FILTEr in the mapfile
 was overwritten.
 
 Please, how should we define/use FILTER int a mapfile with postgis and
 also oracle (using native connection, not ogr)?
 
 THANKS!
 
 

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


Re: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config?

2015-03-12 Thread Eichner, Andreas - SID
Behavior might be unstable as msOWSGetEPSGProj() returns a pointer to a 
character buffer on the local stack frame.
While WFS 1.0.0 code uses the result directly the WFS 1.1.0 code uses 
msOWSGetProjURN() as a wrapper around it which might disrupt the character 
buffer. I'm wondering how this could ever work at all...

 -Ursprüngliche Nachricht-
 
 If you use version=1.1.0 you'll see the warnings:
 
 http://194.66.252.155/cgi-
 bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFSrequest=GetCap
 abilitiesVERSION=1.1.0
 


 You are missing the required parameter VERSION in your request.  If I add
 it to your request I get no warnings:
 http://194.66.252.155/cgi-
 bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/ows?service=WFSrequest=GetCap
 abilitiesVERSION=1.0.0
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] KML in mapserver

2015-03-10 Thread Eichner, Andreas - SID
 
 To get this to work You have to cast the Style value to a string also.
 
 DATA SELECT Name as NAME, CAST(OGR_STYLE AS character(32)) AS STYLE FROM
 'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'
 

Good catch, Lars! With this bit of OGR magic classification work as intented.
To summarize the relevant parts:

LAYER
NAME kml_line
TYPE LINE
CONNECTIONTYPE OGR
CONNECTION doc_test.kml
# restrict features to geometry type LINESTRING and make OGR_STYLE accessible 
as (class)item
DATA SELECT NAME, CAST(OGR_STYLE AS character(32)) AS STYLE FROM 
'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'
LABELITEM NAME
CLASSITEM STYLE
CLASS
EXPRESSION @msn_ylw-pushpin4
...
END
CLASS
EXPRESSION @msn_ylw-pushpin8
...
END
END 

 The Mapfile should something like this:
 
 # Start of LAYER DEFINITIONS -
   LAYER
   NAME kml_example
   GROUP LINES
   TYPE LINE
   STATUS ON
   CONNECTIONTYPE OGR
   CONNECTION doc_test.kml
   DATA SELECT Name as NAME, CAST(OGR_STYLE AS character(32)) AS STYLE
 FROM 'Fibertech solution' WHERE OGR_GEOMETRY='LINESTRING'
 CLASSITEM STYLE
   LABELITEM NAME
 
   CLASS
 #   EXPRESSION ([STYLE] = '@msn_ylw-pushpin4')
EXPRESSION @msn_ylw-pushpin4
 NAME Fiber Names 4
   STYLE
 COLOR 250 0 0
WIDTH 2.5
  END
   LABEL
 SIZE TINY
 COLOR 255 100 100
 POSITION AUTO
   END
 END
 
 CLASS
 #   EXPRESSION ([STYLE] = '@msn_ylw-pushpin8')
 EXPRESSION @msn_ylw-pushpin8
 NAME Fiber Names 8
   STYLE
 COLOR 0 255 0
   WIDTH 3.1
   END
   LABEL
 SIZE TINY
 COLOR 100 255 100
 POSITION AUTO
   END
 END # Class
   END # Layer
 
   LAYER
 NAME kml_example_point
 GROUP PONITS
 TYPE POINT
 STATUS DEFAULT
 CONNECTIONTYPE OGR
 CONNECTION doc_test.kml
 DATA SELECT * FROM 'Fibertech solution' WHERE OGR_GEOMETRY='POINT'
 LABELITEM Name
 CLASS
   #NAME Fiber Names
   STYLE
 COLOR 0 0 255
 SYMBOL 'circlef'
 SIZE 16
   END
 END  # Class
   END # Layer
 END # Map
 

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


Re: [mapserver-users] KML in mapserver

2015-03-10 Thread Eichner, Andreas - SID
I would suggest using the Style attribute to classify your features.
From ogrinfo:

$ ogrinfo -al test.kml -where OGR_GEOMETRY='LINESTRING'
...
OGRFeature(Fibertech solution):1
  Name (String) = Westborough MSC - Build
...
  Style = @msn_ylw-pushpin4

OGRFeature(Fibertech solution):2
  Name (String) = Westborough MSC to Westborugh
...
  Style = @msn_ylw-pushpin8

So using CLASSITEM Style to classify your features might work:

LAYER
...
CLASSITEM Style
CLASS
EXPRESSION @msn_ylw-pushpin8
...
END
CLASS
EXPRESSION @msn_ylw-pushpin4
...
END
END


 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von alok mathur
 Gesendet: Dienstag, 10. März 2015 05:38
 An: mapserver-users@lists.osgeo.org
 Betreff: [mapserver-users] KML in mapserver
 
 Hi,
 
 I have a single folder with multiple Placemarks of different geometries in
 an input KML file.
 And I want to create a .map file using KML as input source. As mapserver
 ignores KML styling so i need to give styling in mapserver for each layer.
 I want to give styling at each placemark. Could you please help me out how
 to do the same.
 
 KML
 ---
 
 ?xml version=1.0 encoding=UTF-8?
 kml xmlns=http://www.opengis.net/kml/2.2;
 xmlns:gx=http://www.google.com/kml/ext/2.2;
 xmlns:kml=http://www.opengis.net/kml/2.2;
 xmlns:atom=http://www.w3.org/2005/Atom;
 Document
 Folder
 nameFibertech solution/name
 
   Placemark
 nameWestborough MSC - Build/name
 styleUrl#msn_ylw-pushpin4/styleUrl
 LineString
 tessellate1/tessellate
 coordinates
 -71.58570500983306,42.28745742866225,0 -
 71.58563778135751,42.28308954118536,0 -
 71.58466087108053,42.28307704913402,0
 /coordinates
 /LineString
 /Placemark
 Placemark
 nameWestborough MSC to Westborugh/name
 styleUrl#msn_ylw-pushpin8/styleUrl
 LineString
 tessellate1/tessellate
 coordinates
 -71.62172195712955,42.27186897741407,0 -
 71.6219495552,42.27189433043378,0 -
 71.6225634332947,42.27210480296427,0 -
 71.62308968672842,42.27236391420707,0 -
 71.62394597288645,42.27309147863262,0 -
 71.62737594489003,42.27740640295431,0 -
 71.62822373584245,42.27893783334968,0 -
 71.63091971519079,42.2816476278,0 -
 71.63207040059587,42.28370221254578,0 -
 71.62599732629406,42.28418518334991,0 -
 71.60795611539982,42.28517668969011,0 -
 71.60267209851122,42.28504601944216,0 -
 71.60188701357249,42.28516492137062,0 -
 71.58850360403626,42.28849573666959,0 -
 71.5858004650346,42.28852197680775,0 -71.58571706491037,42.2874804233345,0
 /coordinates
 /LineString
 /Placemark
 Placemark
 nameNEW Danbury/name
 Camera
 longitude-73.45375129836707/longitude
 latitude41.390460041635/latitude
 altitude419.0806930250601/altitude
 heading13.43312150541231/heading
 tilt28.58299225276625/tilt
 roll-0.685026358787494/roll
 gx:altitudeModerelativeToSeaFloor/gx:altitudeMode
 /Camera
 styleUrl#msn_ylw-stars/styleUrl
 Point
 gx:drawOrder1/gx:drawOrder
 coordinates-73.45404626023216,41.3929335947184,0/coordinates
 /Point
 /Placemark
 Placemark
 nameNEW Scotland Amp/name
 LookAt
 longitude-72.09703050755105/longitude
 latitude41.69579944328172/latitude
 altitude0/altitude
 heading-0.790587312931665/heading
 tilt19.0106770482321/tilt
 range445.0511788150669/range
 gx:altitudeModerelativeToSeaFloor/gx:altitudeMode
 /LookAt
 styleUrl#msn_ylw-stars/styleUrl
 Point
 gx:drawOrder1/gx:drawOrder
 coordinates-72.09643061038489,41.6960553015771,0/coordinates
 /Point
 /Placemark
 /Folder
 /Document
 /kml
 
 
 
 MAP
 --
 MAP
   NAME QGIS-MAP
   # Map image size
   SIZE 500 400
   UNITS meters
   EXTENT -73.454046 41.392934 -71.584661 42.288522
   #FONTSET './fonts/fonts.txt'
   SYMBOLSET 'symbols.txt'
   #PROJECTION
   #  'proj=longlat'
# 'datum=WGS84'
# 'no_defs'
   #END
   PROJECTION
init=epsg:4326
END
 
   # Background color for the map canvas -- change as desired
   IMAGECOLOR 255 255 255
   IMAGEQUALITY 95
   IMAGETYPE png
 
  OUTPUTFORMAT
 NAME png
 DRIVER GD/PNG
 MIMETYPE image/png
 IMAGEMODE RGBA
 EXTENSION png
 TRANSPARENT ON
   END
 
   # Legend
   LEGEND
   IMAGECOLOR 255 255 255
 STATUS ON
 KEYSIZE 18 12
 LABEL
   TYPE BITMAP
   SIZE MEDIUM
   COLOR 0 0 89
 END
   END
 
   # Web interface definition. Only the template parameter
   # is required to display a map. See MapServer documentation
   WEB
 # Set IMAGEPATH to the path where MapServer should
 # write its output.
 IMAGEPATH /tmp/ms_tmp/
 
 # Set IMAGEURL to the url that points to IMAGEPATH
 # as defined in your web server configuration
 IMAGEURL /ms_tmp/
 
 # WMS server settings
 METADATA
   wms_enable_request *
   wms_srs EPSG:900913 EPSG:4326 EPSG:3857 EPSG:2154 EPSG:310642901
 EPSG:4171 EPSG:310024802 EPSG:310915814 EPSG:310486805 EPSG:310702807
 

Re: [mapserver-users] Reading KML

2015-03-09 Thread Eichner, Andreas - SID
You need use the special field OGR_GEOMETRY to filter by geometry type.

With ogrinfo this can be done as follows:

$ ogrinfo -al test.kml -where OGR_GEOMETRY='LINESTRING'
$ ogrinfo -al test.kml -where OGR_GEOMETRY='POINT'

Not sure how to translate this into mapfile syntax. May be using LAYER.FILTER, 
LAYER.DATA or (on MapServer 7.0) PROCESSING_OPTION NATIVE_FILTER.
Using FILTER might not work due to MapServer blocking the virtual attribute...

LAYER
TYPE POINT
...
FILTER ('[OGR_GEOMETRY]' == 'POINT')
...
END

Or

LAYER
TYPE POINT
...
DATA SELECT * FROM 'Fibertech solution' WHERE OGR_GEOMETRY='POINT'
...
END

Or

LAYER
TYPE POINT
...
PROCESSING_OPTION NATIVE_FILTER=OGR_GEOMETRY='POINT'
...
END


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


Re: [mapserver-users] POST for WMS - supported

2015-03-05 Thread Eichner, Andreas - SID
 In Section 9.2.4 of the MapServer v6.0 Manual, under OGC Support and
 Configuration / WMS Server / WMS 1.3.0 Support / Some Missing features it
 lists WMS 1.3.0 Post request should be an XML document containing the
 different operations and parameters.  (Also appears in the current
 version
 documentation v7 beta, although page hasn't been updated since 2013.)
 
 - is this suggesting that POST is not supported?
 

Nope. Sending the KVP request with mimetype application/x-www-form-urlencoded 
via POST is fully supported. Simple example:

# wget -d -O- --post-data=service=WMSrequest=GetCapabilities 
http://host/cgi-bin/mapserv?map=/path/to/mapfile.map
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] transparecy for colored polygons

2015-03-05 Thread Eichner, Andreas - SID
 
 i want to set transparency for colored polygons iam displaying a polygon
 layer on the google image and i want to set transparency so that
 background image has to visible in the colored polygons

You should apply OPACITY at STYLE or LAYER.
http://mapserver.org/mapfile/style.html#index-37 
http://mapserver.org/mapfile/layer.html#opacity
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer 6.4.1 OGR output error

2015-02-23 Thread Eichner, Andreas - SID
To me it seems the WFS code uses msReturnTemplateQuery() from maptemplate.c but 
this is not exported to (PHP-)MapScript... I would guess that the only way to 
get OGR output would be to fake a OWS-Request:

?php
$map = ms_newMapObj(./toto.map);

$req = new OWSRequestObj();
$args = Array(service = WFS, request = GetFeature, version = 
1.1.0, typename = Bati);
foreach($args as $param = $value) $req-setParameter($param, $value);
$req-setParameter(outputformat, $_REQUEST[type_fichier]);

// $map-loadOWSParameters($req);
$map-owsDispatch($req);

?

Requires enabling the request type and the output format:
WEB
METADATA
Ows_enable_request *
Wfs_getfeature_formatlist dxf midmif shapezip csv kmz
END
END


HTH

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Bruno D
 Gesendet: Freitag, 20. Februar 2015 16:27
 An: mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] MapServer 6.4.1 OGR output error
 
 Hi Andreas,
 
 Thanks for your answer. I tried using savequeryasgml(), but it creates a
 blank gml file that only contains the following text :
 /?xml version=1.0 encoding=ISO-8859-1?
 msGMLOutput
xmlns:gml=http://www.opengis.net/gml;
xmlns:xlink=http://www.w3.org/1999/xlink;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 /msGMLOutput/
 
 I'll look into that, but as you stated there is almost no documentation...
 
 Could someone who succeeded in outputting a DXF/SHP/... file through OGR
 post a working example ?
 
 Thanks !
 
 Bruno
 
 
 
 --
 View this message in context: http://osgeo-
 org.1560.x6.nabble.com/MapServer-6-4-1-OGR-output-error-
 tp5172655p5188948.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer 6.4.1 OGR output error

2015-02-23 Thread Eichner, Andreas - SID
Maybe you tried to use the result directly?
The owsDispatch() method creates content _plus_ headers. To get the plain 
content you need to write the output into a buffer, strip off the headers and 
fetch the contents of the buffer:

ms_ioinstallstdouttobuffer();
$map-owsDispatch($req);
ms_iostripstdoutbuffercontentheaders();
$result = ms_iogetstdoutbufferstring();
print_r($result);

To correct my self: the Wfs_getfeature_formatlist is a comma separated list.

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Bruno D
 Gesendet: Montag, 23. Februar 2015 15:11
 An: mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] MapServer 6.4.1 OGR output error
 
 Thank you so much Andreas, your solution works perfectly ! I would never
 have
 thought of it by myself.
 
 Now all I have to do is understand why the generated zip files seem
 invalid
 (I can see their content with 7zip, but I can't extract them)...
 
 Thanks everyone for your help !
 
 
 
 
 --
 View this message in context: http://osgeo-
 org.1560.x6.nabble.com/MapServer-6-4-1-OGR-output-error-
 tp5172655p5189444.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer 6.4.1 OGR output error

2015-02-20 Thread Eichner, Andreas - SID
You can't use OGR output formats that way. Calling msPrepareImage() on them 
triggers a NULL pointer dereference (fixed in 
https://github.com/mapserver/mapserver/pull/5069). 

So using
$image = $map-draw()
$image_url = $image-saveWebImage()
is definitely the wrong way. The MapServer code hints to use msGMLWriteQuery() 
for that which seems to be exported as
$map-savequeryasgml(string filename, string namespace)

Documentation is rare on that...

 Am I the only one having problems outputting OGR files ? Does anybody know
 what I could be doing wrong ?
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserv 7.0 and gif

2015-02-13 Thread Eichner, Andreas - SID
According to 
http://www.mapserver.org/MIGRATION_GUIDE.html#mapserver-6-4-to-7-0-migration:

* GD graphics library support was removed 
(http://www.mapserver.org/development/rfc/ms-rfc-99.html) and had been optional 
since 6.2.
  * GIF output cannot be produced from MapServer although 8-bit PNG output can 
be be produced using the AGG/PNG8 driver.

It is no longer supported if I understand it correctly.


 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Richard Greenwood
 Gesendet: Freitag, 13. Februar 2015 04:13
 An: mapserver
 Betreff: [mapserver-users] mapserv 7.0 and gif
 
 Very exciting to see the 7.0 beta! So I built it and satisfied the gif
 dependency. I define a gif OUTPUTFORMAT definition in my map file, I
 request a map with map_imagetype=image/gif but I get a PNG. So is gif
 support truly gone in 7.0? And if so, it seems a little misleading to have
 a libgif dependency in the build, to allow a gif OUTPUTFORMAT definition,
 and to allow a map_imagetype=image/gif request.
 
 In any case - thanks for all the work getting to 7.0!
 
 
 Rich
 
 
 --
 
 Richard W. Greenwood, PLS
 www.greenwoodmap.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [EXTERNAL] Re: the lines one above other

2015-02-13 Thread Eichner, Andreas - SID
 It seems I found how to display multilevel junction of highway with ORDER
 BY in the case using a one layer. Adding order by id desc or order by
 id asc in subquery
 
 $highwayLayer-set(data,geom from (select id, 'id = '||id as name, geom
 from my_table
 where ST_Intersects(geom, !BOX!) order by id desc) as subquery using
 unique id using srid=3857);

Be careful with that as you cannot expect this to work consistently as long as 
MapServer wraps it in a subquery. The database will likely return your features 
either in storage order or in index order depending if it uses a sequential 
scan or the index. You should not rely on an ORDER BY within a subquery...
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] the lines one above other

2015-02-12 Thread Eichner, Andreas - SID
I'm not sure about this but AFAIK MapServer draws features in the order they 
are returned by the query. For Shapefiles there is the sortshp utility. If 
you're on a relational database like PostGIS or OracleSpatial you can try 
including the ORDER BY prio within the DATA. But since MS wraps it into a 
subquery the database might still return the features out of order. 

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Vladimir
 Gesendet: Donnerstag, 12. Februar 2015 12:02
 An: mapserver-users@lists.osgeo.org
 Betreff: [mapserver-users] the lines one above other
 
 Hello All!
 
 
 
 The task is to show multilevel junction of highway.
 The lines should be at the same layer and has the same style, for example
 see orange lines on attached pic:
 [img]http://s14.postimg.org/yk40e0nq9/crossroad.jpg[/img]
 Is it possible to draw the lines one above other by an one layer?
 May be some method of Z-index for features in a layer exists?
 Thanks for any guidance to display this kind of crossroads.
 
 Vladimir
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Label in SLD

2015-02-11 Thread Eichner, Andreas - SID
Basically yes as MapServer's SLD implementation does not support Literals. It 
only supports a property name optionally enclosed by PropertyName.

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Julien Cigar
 Gesendet: Mittwoch, 11. Februar 2015 14:11
 An: mapserver-users@lists.osgeo.org
 Betreff: [mapserver-users] Label in SLD
 
 Hello,
 
 With the following https://gist.github.com/silenius/1f4a020f35a4113cdd4d
 is it normal that the Label (line 29-31) within my TextSymbolizer is not
 rendered (the PointSymbolizer is) ?
 
 Thanks,
 Julien
 
 --
 Julien Cigar
 Belgian Biodiversity Platform (http://www.biodiversity.be)
 PGP fingerprint: EEF9 F697 4B68 D275 7B11  6A25 B2BB 3710 A204 23C0
 No trees were killed in the creation of this message.
 However, many electrons were terribly inconvenienced.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] copyright, logos, etc

2015-02-11 Thread Eichner, Andreas - SID

 
 Thanks, I'll try it that way. Another idea I had was to create a POINT
 layer with a FEATURE POINTS x y END END and use that layer in my SLD
 stylesheet (which is generated dynamically) with a
 TextSymbolizerLabelsometextblabla/Label ... /TextSymbolizer like
 on https://gist.github.com/silenius/1f4a020f35a4113cdd4d but it seems
 that it's unsupported by Mapserver (if I understand well
 https://github.com/mapserver/mapserver/blob/master/mapogcsld.c#L2706 )

You're right. That's unsupported. But to me it looks as you could cheat by 
using an empty PropertyName/:

TextSymbolizerLabelThis static text will be 
displayedPropertyName//Label/TextSymbolizer

 
 Would it be possible in the future to add support for a CDATA-like
 section that goes directly within the FEATURE - TEXT part of the layer?
 

I guess a basic implementation wouldn't be too hard to implement. But many 
elements of symbology encoding map to se:ParameterValueType which is a mixture 
of text nodes and ogc:expressions and this is generally not very well 
supported. I'd guess this needs huge reworking on both parser and engine...

So, to get at least the simple cases supported you might want to file a ticket.

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


Re: [mapserver-users] copyright, logos, etc

2015-02-11 Thread Eichner, Andreas - SID

 
 It's a little ugly but it works with:
 https://gist.github.com/silenius/f0b0fb856b82a7c70eaa

Being on PostGIS I'd suggest using the native driver with something like that:

  CONNECTIONTYPE postgis
  DATA geom FROM (select id, name, now() as generated_date, 
st_GeomFromText('POINT(-5 70)') AS geom FROM map WHERE id=%MYID%) AS tmp USING 
SRID=-1 USING UNIQUE id
  CLASS
LABEL
  TEXT Species name: [name] (last updated: [generated_date])
  FONT vera
  TYPE TRUETYPE
  SIZE 7
  BUFFER 1
  COLOR 0 0 0
  FORCE TRUE
  STYLE
GEOMTRANSFORM 'labelpoly'
COLOR 255 255 255
  END
END
  END
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] copyright, logos, etc

2015-02-11 Thread Eichner, Andreas - SID
 what I really need to do is to
 make an SQL query (something like select name from map where id=%MYID%)
 and use that attribute in the TEXT part of the FEATURE section (something
 like FEATURE POINTS x y END TEXT Species name: [name] END)
 
 Any idea is welcome on how to do that in the Mapserver way ..
 

I have not test it but I would suggest replacing the inlined feature with a OGR 
point layer connected to a MYSQL view or a OGR VRT datasource that associates 
every line with the position of the annotation.

1) MYSQL view:
CREATE OR REPLACE VIEW species_annotation AS SELECT id, GeomFromText('POINT(60 
-10)') AS Shape, name FROM map;

LAYER
...

#  FEATURE
#POINTS
#  60 -10# the offset (from lower left) in pixels
#END # Points
#TEXT © xyz company 2006  # this is your displaying text
#  END # Feature
  CONNECTIONTYPE ogr
  CONNECTION 'MYSQL: ...'
  DATA 'species_annotation'
  LABELITEM 'name'
  FILTER ([id]=%MYID%)

...
END # Layer


2) OGR VRT datasource:
In species_annotation.vrt:
OGRVRTDataSource
OGRVRTLayer name=species_annotation
SrcDataSourceMYSQL: .../SrcDataSource
SrcSQLSELECT id, 60 as x, -10 as y, name FROM map/SrcSQL
FIDid/FID
GeometryTypewkbPoint/GeometryType
LayerSRSNULL/LayerSRS
GeometryField encoding=PointFromColumns x=x y=y 
reportSrcColumn=false /
/OGRVRTLayer
/OGRVRTDataSource

Test with: ogrinfo -al species_annotation.vrt -fid existing id


LAYER
...
  CONNECTIONTYPE ogr
  CONNECTION 'species_annotation.vrt'
  DATA 'species_annotation'
  LABELITEM 'name'
  FILTER ([id] = %MYID%)
...
END # Layer


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

Re: [mapserver-users] Rasterlite

2015-01-19 Thread Eichner, Andreas - SID
Can be used via GDAL's RatserLite driver 
(http://www.gdal.org/frmt_rasterlite.html).

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Aaron Hunt
 Gesendet: Montag, 19. Januar 2015 21:29
 An: mapserver-users@lists.osgeo.org
 Betreff: [mapserver-users] Rasterlite
 
 Is there a way to connect a raster layer to a RasterLite database in
 Mapserver?
 
 Thank you for any help
 
 Aaron

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


Re: [mapserver-users] Help in plotting several tens of thousand 'pies'

2015-01-19 Thread Eichner, Andreas - SID
 We used to
 serve this data as a vector for smaller systems via GeoJSON and use
 Openlayers 2 to render on a slippery map. For a few hundred sites it was
 fine, no performance degradation or issues. When we started testing with
 larger real life samples, the browser would literally crawl. I understand
 it is because each vector feature adds to the DOM and there is a limit

Do you need to display all at once? I've read that OpenLayers can use different 
strategies to fetch data. Retrieving everything when the layer is created is of 
course the simplest one. A more sophisticated solution would be to use a BBOX 
filter and load data on demand. But this only makes sense if not every feature 
is required at the same time.

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


Re: [mapserver-users] Setting up a JSONP service

2015-01-15 Thread Eichner, Andreas - SID
Hey Lars,

that's great news ;) I did some minor modifications (full patch attached). Now 
if output format has the format option JSONP then default substitutions are 
applied to it and the Content-Disposition header is omitted (causes browsers 
to display the Save as dialog).

The map file should contain

OUTPUTFORMAT
  NAME 'jsonp'
  DRIVER 'OGR/GEOJSON'
  MIMETYPE 'text/javascript; charset=utf-8'
  FORMATOPTION 'LCO:COORDINATE_PRECISION=5'
  FORMATOPTION 'STORAGE=stream'
  FORMATOPTION 'FORM=simple'
  FORMATOPTION 'JSONP=%callback%'
END

WEB
  METADATA
  wfs_getfeature_formatlist jsonp
  END
VALIDATION
  callback '.*'
  default_callback 'my_callback'
  END
END

A WFS GetFeature request should then set the query string to contain 
OUTPUTFORMAT=jsonp and CALLBACK=callme. The default value might be useful if 
you want to run some javascript directly:

  default_callback '(function(j){alert(JSON.stringify(j));})'

creates an immediately called anonymous function that displays the JSON. Of 
course, the real validation pattern should be something more sophisticated.

Just to summarize for all those who didn't follow the thread: The same result 
could be achieved using the template engine as Steve mentioned and all this is 
a workaround for a missing datasource creation option in OGR's JSON driver. 
This patch might provide more performance and might save memory on large result 
sets.

Kind regards!


 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Lars Fricke
 Gesendet: Mittwoch, 14. Januar 2015 17:17
 An: mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] Setting up a JSONP service
 
 Hello Andreas,
 
 I confirm your solution is working perfectly well. I succeeded to
 integrate the JSONP output into my web application with no conflicts.
 Funny this depended so much on the version of code I happened to grab
 wrong. Sorry for producing extra work by that.
 
 I'd love to see this go to the repositories, it's really helpful until
 someone will extend OGR.
 
 So thanks again from Mecklenburg to Saxony :-)
 
 Best
 
 Lars
 


jsonp.diff
Description: jsonp.diff
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Setting up a JSONP service

2015-01-13 Thread Eichner, Andreas - SID
You need to append the callback parameter to the query string:

http://localhost:8082/wfs?SERVICE=WFSVERSION=1.1.0request=GetFeatureTYPENAME=HUoutputformat=geojsonSRS=EPSG:3857bbox=793732,6570204,793765,6570228callback=foobar

You can test on the command line, too:
MS_MAPFILE=/path/to/mapfile ./mapserv 
QUERY_STRING='service=WFSversion=1.1.0request=GetFeaturetypename=HU 
SRS=EPSG:3857bbox=793732,6570204,793765,6570228outputformat=application/json; 
subtype=geojson; charset=utf-8callback=foobar'

Please note that IMHO geojson alone isn't enough. The full mimetype string 
should be used as reported by GetCapabilities.

HTH

 -Ursprüngliche Nachricht-
 Von: Lars Fricke [mailto:fri...@gisberater.com]
 Gesendet: Dienstag, 13. Januar 2015 14:22
 An: Eichner, Andreas - SID; mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] Setting up a JSONP service
 
 Hi,
 
 I compiled MapServer after applying the patch (at least I think it was
 applied). Unfortunately the output is not JSONP format. Maybe I'm
 getting something wrong. So here is what I did:
 Applied
 patch -p1  jsonp.diff
 
 I got an updated mapogroutput.c.
 
 I then compiled with the following options:
 cmake -DCMAKE_INSTALL_PREFIX=/opt \
  -DCMAKE_PREFIX_PATH=/usr/local;/opt \
  -DWITH_CLIENT_WFS=ON \
  -DWITH_CLIENT_WMS=ON \
  -DWITH_CURL=ON \
  -DWITH_SOS=ON \
  -DWITH_PHP=0 \
  -DWITH_PYTHON=ON \
  -DWITH_SVGCAIRO=OFF \
  -DWITH_ORACLESPATIAL=0 \
  -DWITH_MSSQL2008=OFF \
  -DWITH_THREAD_SAFETY=ON \
  -DWITH_LIBXML2=ON \
  -DWITH_MYSQL=ON\
  -DWITH_SDE=0  .. ../configure.out.txt
 
 Which goes through without any warning.
 
 I do make next, getting a few warnings about the Python bindings but
 nothing about mapogroutput (ecept that it was compiled). Then sudo make
 install. No warnings.
 I then set a symlink to the new mapserv file inside cgi-bin and start my
 apache.
 
 I changed my mapfile as you indicated:
 WEB
  FOOTER test
  IMAGEPATH /var/www/html/tmp/
  TEMPPATH /var/www/html/tmp/
  IMAGEURL /html/tmp/
  METADATA
wfs_title  Test
ows_onlineresourcehttp://localhost:8082/wfs?;
ows_enable_request*
ows_srsEPSG:3857
wfs_srsEPSG:3857
wfs_getfeature_formatlist geojson,csv,ogrgml
wfs_encoding UTF-8
  END # METADATA
  VALIDATION
  callback .*
  END
END # WEB
 
 OUTPUTFORMAT
 NAME geojson
 DRIVER OGR/GEOJSON
 MIMETYPE application/json; subtype=geojson; charset=utf-8
 FORMATOPTION STORAGE=stream
 FORMATOPTION FORM=SIMPLE
 FORMATOPTION LCO:COORDINATE_PRECISION=5
 FORMATOPTION JSONP=%callback%
END
 
 Unfortunately calling:
 http://localhost:8082/wfs?SERVICE=WFSVERSION=1.1.0request=GetFeatureTYP
 ENAME=HUoutputformat=geojsonSRS=EPSG:3857bbox=793732,6570204,793765,657
 0228
 
 gives me a result as before without your changes:
 {
 type: FeatureCollection,
 crs: { type: name, properties: { name:
 urn:ogc:def:crs:EPSG::3857 } },
 features: [
 { type: Feature, properties: { gml_id: , UMRING_ID:
 36245586}, geometry: { type: Polygon, coordinates: [ [ [
 793757.73417, 6570202.31642 ], [ 793762.85989, 6570195.63821 ], [
 793770.20682, 6570201.30901 ], [ 793765.08276, 6570207.98411 ], [
 793757.73417, 6570202.31642 ] ] ] } },
 { type: Feature, properties: { gml_id: , UMRING_ID:
 36245583}, geometry: { type: Polygon, coordinates: [ [ [
 793752.31968, 6570224.89917 ], [ 793747.96097, 6570230.48534 ], [
 793732.07033, 6570218.01607 ], [ 793740.12777, 6570207.69188 ], [
 793742.99908, 6570209.94649 ], [ 793747.5696, 6570204.08902 ], [
 793761.16105, 6570214.75134 ], [ 793752.94726, 6570225.27397 ], [
 793752.31968, 6570224.89917 ] ] ] } },
 { type: Feature, properties: { gml_id: , UMRING_ID:
 36245550}, geometry: { type: Polygon, coordinates: [ [ [
 793735.55884, 6570231.00753 ], [ 793738.78194, 6570226.81082 ], [
 793746.26949, 6570232.5959 ], [ 793743.04798, 6570236.79266 ], [
 793735.55884, 6570231.00753 ] ] ] } }
 ]
 }
 
 I also tried this with an AJAX call from Javascript, giving me the
 exactly same result.
 
 I get an error message trying to use the result in Leaflet telling me a
 ; is missing. I assume it should look like this:
 
 var testlayer = [{
 type: FeatureCollection,
 crs: { type: name, properties: { name:
 urn:ogc:def:crs:EPSG::3857 } },
 features: [
 { type: Feature, properties: { gml_id: , UMRING_ID:
 36245586}, geometry: { type: Polygon, coordinates: [ [ [
 793757.73417, 6570202.31642 ], [ 793762.85989, 6570195.63821 ], [
 793770.20682, 6570201.30901 ], [ 793765.08276, 6570207.98411 ], [
 793757.73417, 6570202.31642 ] ] ] } },
 { type: Feature, properties: { gml_id: , UMRING_ID:
 36245583}, geometry: { type: Polygon, coordinates: [ [ [
 793752.31968, 6570224.89917 ], [ 793747.96097, 6570230.48534 ], [
 793732.07033, 6570218.01607 ], [ 793740.12777, 6570207.69188

Re: [mapserver-users] Setting up a JSONP service

2015-01-13 Thread Eichner, Andreas - SID
Arg.. outputformat=geojson also works, only had a typo...

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Eichner, Andreas - SID
 Gesendet: Dienstag, 13. Januar 2015 15:18
 An: 'lars.fri...@skendata.de'; mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] Setting up a JSONP service
 
 You need to append the callback parameter to the query string:
 
 http://localhost:8082/wfs?SERVICE=WFSVERSION=1.1.0request=GetFeatureTYP
 ENAME=HUoutputformat=geojsonSRS=EPSG:3857bbox=793732,6570204,793765,657
 0228callback=foobar
 
 You can test on the command line, too:
 MS_MAPFILE=/path/to/mapfile ./mapserv
 QUERY_STRING='service=WFSversion=1.1.0request=GetFeaturetypename=HU
 SRS=EPSG:3857bbox=793732,6570204,793765,6570228outputformat=application/
 json; subtype=geojson; charset=utf-8callback=foobar'
 
 Please note that IMHO geojson alone isn't enough. The full mimetype
 string should be used as reported by GetCapabilities.
 
 HTH
 
  -Ursprüngliche Nachricht-
  Von: Lars Fricke [mailto:fri...@gisberater.com]
  Gesendet: Dienstag, 13. Januar 2015 14:22
  An: Eichner, Andreas - SID; mapserver-users@lists.osgeo.org
  Betreff: Re: [mapserver-users] Setting up a JSONP service
 
  Hi,
 
  I compiled MapServer after applying the patch (at least I think it was
  applied). Unfortunately the output is not JSONP format. Maybe I'm
  getting something wrong. So here is what I did:
  Applied
  patch -p1  jsonp.diff
 
  I got an updated mapogroutput.c.
 
  I then compiled with the following options:
  cmake -DCMAKE_INSTALL_PREFIX=/opt \
   -DCMAKE_PREFIX_PATH=/usr/local;/opt \
   -DWITH_CLIENT_WFS=ON \
   -DWITH_CLIENT_WMS=ON \
   -DWITH_CURL=ON \
   -DWITH_SOS=ON \
   -DWITH_PHP=0 \
   -DWITH_PYTHON=ON \
   -DWITH_SVGCAIRO=OFF \
   -DWITH_ORACLESPATIAL=0 \
   -DWITH_MSSQL2008=OFF \
   -DWITH_THREAD_SAFETY=ON \
   -DWITH_LIBXML2=ON \
   -DWITH_MYSQL=ON\
   -DWITH_SDE=0  .. ../configure.out.txt
 
  Which goes through without any warning.
 
  I do make next, getting a few warnings about the Python bindings but
  nothing about mapogroutput (ecept that it was compiled). Then sudo make
  install. No warnings.
  I then set a symlink to the new mapserv file inside cgi-bin and start my
  apache.
 
  I changed my mapfile as you indicated:
  WEB
   FOOTER test
   IMAGEPATH /var/www/html/tmp/
   TEMPPATH /var/www/html/tmp/
   IMAGEURL /html/tmp/
   METADATA
 wfs_title  Test
 ows_onlineresourcehttp://localhost:8082/wfs?;
 ows_enable_request*
 ows_srsEPSG:3857
 wfs_srsEPSG:3857
 wfs_getfeature_formatlist geojson,csv,ogrgml
 wfs_encoding UTF-8
   END # METADATA
   VALIDATION
   callback .*
   END
 END # WEB
 
  OUTPUTFORMAT
  NAME geojson
  DRIVER OGR/GEOJSON
  MIMETYPE application/json; subtype=geojson; charset=utf-8
  FORMATOPTION STORAGE=stream
  FORMATOPTION FORM=SIMPLE
  FORMATOPTION LCO:COORDINATE_PRECISION=5
  FORMATOPTION JSONP=%callback%
 END
 
  Unfortunately calling:
 
 http://localhost:8082/wfs?SERVICE=WFSVERSION=1.1.0request=GetFeatureTYP
 
 ENAME=HUoutputformat=geojsonSRS=EPSG:3857bbox=793732,6570204,793765,657
  0228
 
  gives me a result as before without your changes:
  {
  type: FeatureCollection,
  crs: { type: name, properties: { name:
  urn:ogc:def:crs:EPSG::3857 } },
  features: [
  { type: Feature, properties: { gml_id: , UMRING_ID:
  36245586}, geometry: { type: Polygon, coordinates: [ [ [
  793757.73417, 6570202.31642 ], [ 793762.85989, 6570195.63821 ], [
  793770.20682, 6570201.30901 ], [ 793765.08276, 6570207.98411 ], [
  793757.73417, 6570202.31642 ] ] ] } },
  { type: Feature, properties: { gml_id: , UMRING_ID:
  36245583}, geometry: { type: Polygon, coordinates: [ [ [
  793752.31968, 6570224.89917 ], [ 793747.96097, 6570230.48534 ], [
  793732.07033, 6570218.01607 ], [ 793740.12777, 6570207.69188 ], [
  793742.99908, 6570209.94649 ], [ 793747.5696, 6570204.08902 ], [
  793761.16105, 6570214.75134 ], [ 793752.94726, 6570225.27397 ], [
  793752.31968, 6570224.89917 ] ] ] } },
  { type: Feature, properties: { gml_id: , UMRING_ID:
  36245550}, geometry: { type: Polygon, coordinates: [ [ [
  793735.55884, 6570231.00753 ], [ 793738.78194, 6570226.81082 ], [
  793746.26949, 6570232.5959 ], [ 793743.04798, 6570236.79266 ], [
  793735.55884, 6570231.00753 ] ] ] } }
  ]
  }
 
  I also tried this with an AJAX call from Javascript, giving me the
  exactly same result.
 
  I get an error message trying to use the result in Leaflet telling me a
  ; is missing. I assume it should look like this:
 
  var testlayer = [{
  type: FeatureCollection,
  crs: { type: name, properties: { name:
  urn:ogc:def:crs:EPSG::3857 } },
  features: [
  { type: Feature

Re: [mapserver-users] Setting up a JSONP service

2015-01-13 Thread Eichner, Andreas - SID
That's what I get on the console:

$ MS_MAPFILE=$(pwd)/IHK_Handelsflaechen.map ./mapserv 
QUERY_STRING='service=WFSversion=1.1.0request=GetFeaturefeatureid=IHK.71247outputformat=geojsoncallback=foobar'Content-Disposition:
 attachment; filename=result.dat
Content-Type: application/json; subtype=geojson; charset=utf-8

foobar({
type: FeatureCollection,

features: [
{ type: Feature, properties: { PLZ: 09648, ..., LANDKREIS: 
Mittelsachsen }, geometry: { type: Point, coordinates: [ 4568447.14, 
5650577.57 ] } }
]
}
);

In other words, the JSON is enclosed by foobar( and );: The relevant parts 
of the mapfile are:

OUTPUTFORMAT
NAME 'geojson'
#NAME 'jsonp'
DRIVER 'OGR/GEOJSON'
MIMETYPE 'application/json; subtype=geojson; charset=utf-8'
#MIMETYPE 'text/javascript; charset=utf-8'
FORMATOPTION 'STORAGE=stream'
FORMATOPTION 'FORM=simple'
FORMATOPTION 'LCO:COORDINATE_PRECISION=5'
FORMATOPTION 'JSONP=%callback%'
END

WEB
  VALIDATION
callback '.*'
#default_callback 'jsonp'
  END
END

The default value does not work, so the substitution parameter must be given.



 -Ursprüngliche Nachricht-
 Von: Lars Fricke [mailto:fri...@gisberater.com]
 Gesendet: Dienstag, 13. Januar 2015 16:39
 An: Eichner, Andreas - SID; mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] Setting up a JSONP service
 
 Hi Andreas,
 
 I guess I'm still doing something wrong. If I use
 http://localhost:8082/wfs?SERVICE=WFSVERSION=1.1.0request=GetFeatureTYP
 ENAME=HUoutputformat=geojsonSRS=EPSG:3857bbox=793732,6570204,793765,657
 0228callback=foobar
 
 I'm getting the exact same output as before. What are you getting? Can
 you post an example of your servers response?
 
 Thank you so much.
 
 Best
 
 Lars
 
 Am 13.01.2015 um 15:57 schrieb Eichner, Andreas - SID:
  Arg.. outputformat=geojson also works, only had a typo...
 
  -Ursprüngliche Nachricht-
  Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
  boun...@lists.osgeo.org] Im Auftrag von Eichner, Andreas - SID
  Gesendet: Dienstag, 13. Januar 2015 15:18
  An: 'lars.fri...@skendata.de'; mapserver-users@lists.osgeo.org
  Betreff: Re: [mapserver-users] Setting up a JSONP service
 
  You need to append the callback parameter to the query string:
 
 
 http://localhost:8082/wfs?SERVICE=WFSVERSION=1.1.0request=GetFeatureTYP
 
 ENAME=HUoutputformat=geojsonSRS=EPSG:3857bbox=793732,6570204,793765,657
  0228callback=foobar
 
  You can test on the command line, too:
  MS_MAPFILE=/path/to/mapfile ./mapserv
  QUERY_STRING='service=WFSversion=1.1.0request=GetFeaturetypename=HU
 
 SRS=EPSG:3857bbox=793732,6570204,793765,6570228outputformat=application/
  json; subtype=geojson; charset=utf-8callback=foobar'
 
  Please note that IMHO geojson alone isn't enough. The full mimetype
  string should be used as reported by GetCapabilities.
 
  HTH
 
  -Ursprüngliche Nachricht-
  Von: Lars Fricke [mailto:fri...@gisberater.com]
  Gesendet: Dienstag, 13. Januar 2015 14:22
  An: Eichner, Andreas - SID; mapserver-users@lists.osgeo.org
  Betreff: Re: [mapserver-users] Setting up a JSONP service
 
  Hi,
 
  I compiled MapServer after applying the patch (at least I think it was
  applied). Unfortunately the output is not JSONP format. Maybe I'm
  getting something wrong. So here is what I did:
  Applied
  patch -p1  jsonp.diff
 
  I got an updated mapogroutput.c.
 
  I then compiled with the following options:
  cmake -DCMAKE_INSTALL_PREFIX=/opt \
-DCMAKE_PREFIX_PATH=/usr/local;/opt \
-DWITH_CLIENT_WFS=ON \
-DWITH_CLIENT_WMS=ON \
-DWITH_CURL=ON \
-DWITH_SOS=ON \
-DWITH_PHP=0 \
-DWITH_PYTHON=ON \
-DWITH_SVGCAIRO=OFF \
-DWITH_ORACLESPATIAL=0 \
-DWITH_MSSQL2008=OFF \
-DWITH_THREAD_SAFETY=ON \
-DWITH_LIBXML2=ON \
-DWITH_MYSQL=ON\
-DWITH_SDE=0  .. ../configure.out.txt
 
  Which goes through without any warning.
 
  I do make next, getting a few warnings about the Python bindings but
  nothing about mapogroutput (ecept that it was compiled). Then sudo
 make
  install. No warnings.
  I then set a symlink to the new mapserv file inside cgi-bin and start
 my
  apache.
 
  I changed my mapfile as you indicated:
  WEB
FOOTER test
IMAGEPATH /var/www/html/tmp/
TEMPPATH /var/www/html/tmp/
IMAGEURL /html/tmp/
METADATA
  wfs_title  Test
  ows_onlineresourcehttp://localhost:8082/wfs?;
  ows_enable_request*
  ows_srsEPSG:3857
  wfs_srsEPSG:3857
  wfs_getfeature_formatlist geojson,csv,ogrgml
  wfs_encoding UTF-8
END # METADATA
VALIDATION
callback .*
END
  END # WEB
 
  OUTPUTFORMAT
   NAME geojson
   DRIVER OGR/GEOJSON
   MIMETYPE

Re: [mapserver-users] Setting up a JSONP service

2015-01-09 Thread Eichner, Andreas - SID
Hi,

I've attached a quick'n dirty solution (against master). When applied to 
mapogroutput.c you can set a JSONP formatoption to the callback name:

OUTPUTFORMAT
NAME 'geojson'
DRIVER 'OGR/GEOJSON'
MIMETYPE 'application/json; subtype=geojson; charset=utf-8'
FORMATOPTION 'STORAGE=stream'
FORMATOPTION 'FORM=simple'
FORMATOPTION 'LCO:COORDINATE_PRECISION=5'
FORMATOPTION 'JSONP=%callback%'
END

This needs of course a WEB.VALIDATION:
WEB
  ...
  VALIDATION
callback '.*'
  END
END

Would be great if you can test if this works (looks good to me). The Devs might 
have a look if this could be integrated into master until OGR has an 
appropriate layer creation option (solution described by Even).

Greetings

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Lars Fricke
 Gesendet: Freitag, 9. Januar 2015 11:24
 An: mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] Setting up a JSONP service
 
 Hello,
 
 first of all: Thank you for your support!
 Sorry for the late reply but I unfortunately was ill.
 
 @ Steve:
 I read about templating but also read that it is slower?
 I do not have a lot of experience in writing templates. Would you mind
 sharing a JSONP template?
 
 @ Even: Thank you for your thoughts. Who would implement that change
 though? I'm afraid I can't.
 
 @ Jeff: I followed those links but I only found threads referring to
 GeoServer or that were not related to my question. The GDAL page I did
 study and that's how I managed to set up the GeoJSON service but thats
 not the same unfortunately as it conflicts with the same origin policy.
 
 Best
 
 Lars
 
 Am 30.12.2014 um 16:24 schrieb Lime, Steve D (MNIT):
  You can also use MapServer templates to accomplish this. It's a little
 more work since you have to write the template but it's quite flexible
 then. Usually I write the template to produce JSON and then use a simple
 wrapper template to produce JSONP. For example, jsonp.js looks like
 (callback is passed in):
 
  // MapServer Template
  [callback](
 [include src=templates/json.js]
  )
 
  Output formats look like:
 
 OUTPUTFORMAT
   NAME 'JSON'
   DRIVER 'TEMPLATE'
   MIMETYPE 'application/json;'
   FORMATOPTION 'FILE=templates/json.js'
   FORMATOPTION 'ATTACHMENT=service.json'
 END
 
 OUTPUTFORMAT
   NAME 'JSONP'
   DRIVER 'TEMPLATE'
   MIMETYPE 'application/json;'
   FORMATOPTION 'FILE=templates/jsonp.js'
   FORMATOPTION 'ATTACHMENT=service.json'
 END
 
  Steve
 
  -Original Message-
  From:mapserver-users-boun...@lists.osgeo.org  [mailto:mapserver-users-
 boun...@lists.osgeo.org] On Behalf Of Lars Fricke
  Sent: Monday, December 29, 2014 5:34 AM
  To:mapserver-users@lists.osgeo.org
  Subject: [mapserver-users] Setting up a JSONP service
 
  Dear List,
 
  I have a WFS service running under MapServer that I would like to
 operate as JSONP service. I managed to set GEOJSON as output format but I
 get Cross-Origin-Request Blocked if I try to call it with a Javascript
 client (using Leaflet L.layerJSON.
  The question is: Is it possible to set up a JSONP service from Mapserver
 and if yes, how? My current mapfile looks like this (relevant parts):
 
  
  # in WEB - METADATA
  wfs_getfeature_formatlist geojson,csv,ogrgml
 
  OUTPUTFORMAT
   NAME geojson
   DRIVER OGR/GEOJSON
   MIMETYPE application/json; subtype=geojson; charset=utf-8
   FORMATOPTION STORAGE=stream
   FORMATOPTION FORM=SIMPLE
   FORMATOPTION LCO:COORDINATE_PRECISION=5
  END
  
  If this would already be a correct JSONP service, I have to look on the
 Leaflet side for the error...
  Thanks for your help.
 
  Cheers
 
  Lars
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users


jsonp.diff
Description: jsonp.diff
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [mapserver-dev] Is there a way to use REMOTE_USER environment variable in RunTime Substitution?

2014-12-22 Thread Eichner, Andreas - SID
Since you store the username in the cookie you are probably not concerned about 
security. In this case it might be sufficient to append the username by 
rewriting the query string:

RewriteRule ^/my/map /my/map?user=%{REMOTE_USER} [QSA,PT]

The loadParams() in cgiutil.c only works on the QUERY_STRING and COOKIE. If you 
like you can insert at line 267:

if ((s = getenv2(REMOTE_USER, thread_context)) != NULL) {
if(m = maxParams) {
maxParams *= 2;
request-ParamNames = (char **) 
msSmallRealloc(request-ParamNames,sizeof(char *) * maxParams);
request-ParamValues = (char **) 
msSmallRealloc(request-ParamValues,sizeof(char *) * maxParams);
}
request-ParamNames[m] = msStrdup(remote_user);
request-ParamValues[m] = msStrdup(s);
m++;
}

I haven't tested this but since it's pretty straight forward it should work. 
But that's not very generic. Probably the MAP.WEB.METADATA could be used to 
define a import_env_vars-key with a list of names to be imported from the 
environment...

HTH

 -Ursprüngliche Nachricht-
 Von: mapserver-dev-boun...@lists.osgeo.org [mailto:mapserver-dev-
 boun...@lists.osgeo.org] Im Auftrag von Smith, Michael ERDC-RDE-CRREL-NH
 Gesendet: Samstag, 20. Dezember 2014 14:25
 An: mapserver-users@lists.osgeo.org
 Cc: mapserver-...@lists.osgeo.org
 Betreff: [mapserver-dev] Is there a way to use REMOTE_USER environment
 variable in RunTime Substitution?
 
 I'm using apache basic auth to filter results. I have been able to use
 mod_rewrite to create a cookie with the authenticated username and use
 that in runtime subst but it would be much simpler and cleaner to just do
 it reading the environment variable. So far, I haven't found a way to do
 this in current master. Any ideas?
 
 --
 Michael Smith
 US Army Corps
 Remote Sensing GIS/Center
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Calculation of scale in mapserver

2014-10-27 Thread Eichner, Andreas - SID
This is part of section 7.2.4.6.9 Scale denominators of the WMS spec:
...
For the purposes of this International Standard, the common pixel size is 
defined to be 0,28 mm × 0,28 mm.
Because arbitrary clients can request maps from a server, the true pixel size 
of the final rendering device is
unknown to the server.
...
But in your case you simply need to use the same BBOX for the WFS filter as for 
the current WMS view.

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Malm Paul
 Gesendet: Montag, 27. Oktober 2014 11:23
 An: 'mapserver-users@lists.osgeo.org'
 Betreff: [mapserver-users] Calculation of scale in mapserver
 
 Hi,
 
 I wounder how MapServer can know the current scale I'm using in my client,
 it must be calculated from the URL BBOX. But how does WMS know the
 physical size of this box on the clients screen?
 
 
 
 The MIN/MAX-SCALEDENOM are used in WMS but not in WFS.
 
 I would like to search for WFS objects from objects that are visible om my
 screen (WMS).
 
 To do that I need to know what scale WMS is currently using, or how it's
 calculated. Otherwise I can't filter out the correct layers in my WFS
 query (layers that are not WMS-rendered).
 
 
 
 Any ideas?
 
 Kind regards,
 
 Paul
 
 

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


Re: [mapserver-users] Symbols in KML outout

2014-10-16 Thread Eichner, Andreas - SID
Never used it but it seems the KML driver creates PNG images on the fly and 
returns them as href. This seems to be independent of the type of symbol. So 
you should make sure MS is able to write those images into /tmp or 
$MS_TEMPPATH. The (null) indicates that it was unable to do so.

HTH

Von: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org]quot; im Auftrag von quot;Peter 
Hopfgartner [peter.hopfgart...@r3-gis.com]
Gesendet: Donnerstag, 16. Oktober 2014 10:09
An: mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] Symbols in KML outout

Just as a quick fix, I'd propose to drop the href node if no reasonable
value is given. Anything more elaborate can be added later on. Comments?

Peter

On 10/15/2014 11:57 AM, Peter Hopfgartner wrote:
 From http://mapserver.org/output/kml_output.html#id2, it should be
 possible to have icons for sysmbols. The pixmap of the ison should be
 referenced in the href node.
 In my output, the href ode looks like:

 href(null)/href

 Is there anything I missed?

 Regards,

 Peter



--
Peter Hopfgartner
R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
web  : www.r3-gis.com
mail : peter.hopfgart...@r3-gis.com
phone: +39 0473 494949
fax  : +39 0473 069902

ATTENZIONE! Le informazioni contenute nella presente e-mail e nei documenti 
eventualmente allegati sono confidenziali. La loro diffusione, distribuzione 
e/o riproduzione da parte di terzi, senza autorizzazione del mittente è vietata 
e può violare il D. Lgs. 196/2003. In caso di ricezione per errore, Vogliate 
immediatamente informare il mittente del messaggio e distruggere la e-mail.

ACHTUNG! Die in dieser Nachricht oder in den beigelegten Dokumenten 
beinhalteten Informationen sind streng vertraulich. Ihre Verbreitung und/oder 
ihre Wiedergabe durch Dritte ist ohne Erlaubnis des Absenders verboten und 
verstößt gegen das Legislativdekret 196/2003. Sollten Sie diese Mitteilung 
irrtümlicherweise erhalten haben, bitten wir Sie uns umgehend zu informieren 
und anschließend die Mitteilung zu vernichten.

WARNING! This e-mail may contain confidential and/or privileged information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any unauthorised 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden and could be against the law (D. Lgs. 196/2003)

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


Re: [mapserver-users] Oracle layer partially drawn

2014-09-04 Thread Eichner, Andreas - SID
Have you checked that the row of the SDO_COORD_REF_SYS table with SRID=23030 
really represents EPSG:23030? In our case for example we use SRID=82032 which 
represents EPSG:31468.

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Geograma
 Gesendet: Mittwoch, 3. September 2014 12:57
 An: mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] Oracle layer partially drawn
 
 Hello Tike,
 
 First, thanks for your help!
 
 - Checked that the layer has all the data (the same records in PostGis and
 Oracle).
 - DEBUG 5 is on
 - Cannot try ORG connection (it gives me an error, I do not know why)
 - Scaledoms, transparency, wms_extent and spatial index recreated in
 Oracle
 removed but no change
 
 - The test you suggested:
 
· Downloaded:
 http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_plac
 es.zip
· Loaded info to Oracle using ogr2ogr -f oci oci:user/pass@orcl
 ne_10m_populated_places.shp
· New NE_10M_POPULATED_PLACES.map, as follows:
 ---
 MAP
NAME TEST
EXTENT -180 -90 180 90
SYMBOLSET symbols.sym
FONTSET fonts.txt
DEBUG ON
LEGEND
   IMAGECOLOR -1 -1 -1
   LABEL
  FONT vera
  ANGLE FOLLOW
  COLOR 0 0 0
  ENCODING UTF-8
  TYPE truetype
  SIZE 8
   END
   STATUS ON
   TRANSPARENT ON
END
WEB
   METADATA
  wms_encoding UTF-8
  wms_title WMS
  wms_abstract 
  wms_srs epsg:4326 epsg:23030
wms_enable_request *
  wms_onlineresource
 http://v-0049:8080/fcgi-
 bin/mapserv.exe?map=C:\ms4w\maps\NE_10M_POPULATED_PLACES.map
  labelcache_map_edge_buffer -10
   END
END
PROJECTION
   init=epsg:4326
END
 
CONFIG MS_ERRORFILE
 c:\ms4w_3_0_6\maps\logs\NE_10M_POPULATED_PLACES.log
DEBUG 5
CONFIG CPL_DEBUG ON
CONFIG PROJ_DEBUG ON
 
IMAGECOLOR 153 179 204
 
OUTPUTFORMAT
 NAME png
 DRIVER AGG/PNG
 MIMETYPE image/png
 IMAGEMODE RGB
 EXTENSION png
 FORMATOPTION QUALITY=100
 FORMATOPTION INTERLACE=OFF
END
 
LAYER
   NAME NE_10M_POPULATED_PLACES
   STATUS ON
   TYPE POINT
   CONNECTIONTYPE oraclespatial
   CONNECTION FONDO_2014_06/FONDO_2014_06@orcl
   DATA ora_geometry from NE_10M_POPULATED_PLACES using unique ogr_fid
 srid 4326
   SIZEUNITS pixels
   LABELITEM name
   PROJECTION
  init=epsg:4326
   END
 TYPE truetype
   CLASS
  STYLE
 COLOR 254 0 0
 SIZE 1
  END
  SYMBOL circle
  NAME default
  LABEL
 FONT arial
 ANGLE 0
 COLOR 0 0 0
 TYPE truetype
 SIZE 10
 POSITION Auto
 PARTIALS FALSE
 FORCE FALSE
 OUTLINECOLOR 254 254 254
  END
 END
   METADATA
  wms_title public.smaltown_point_500k
  wms_abstract Capa del Servicio WMS
  #wms_extent -180 -90 180 90
  wms_layer_group /TINSAMaps
  gml_include_items all
   END
   PROCESSING CLOSE_CONNECTION=DEFER
END # Layer
 
 END # Map File
 ---
 
· Request made:
 http://v-0049:8081/fcgi-
 bin/mapserv.exe?map=C:\ms4w_3_0_6\maps\NE_10M_POPULATED_PLACES.mapLAYERS=
 NE_10M_POPULATED_PLACESTRANSPARENT=TRUESERVICE=WMSVERSION=1.1.1REQUEST
 =GetMapSTYLES=FORMAT=image%2FpngSRS=EPSG%3A4326BBOX=-180,-
 90,180,90WIDTH=768HEIGHT=384d
 
· Log got:
 ---
 [Wed Sep 03 12:57:47 2014].724000 CGI Request 1 on process 5764
 [Wed Sep 03 12:57:47 2014].74 msDrawMap(): rendering using
 outputformat
 named png (AGG/PNG).
 [Wed Sep 03 12:57:47 2014].74 msOracleSpatialLayerOpen called with:
 ora_geometry from NE_10M_POPULATED_PLACES using unique ogr_fid srid 4326
 (Layer pointer 02E88CB8)
 [Wed Sep 03 12:57:48 2014].49 msOracleSpatialLayerOpen. Shared
 connection not available. Creating one.
 [Wed Sep 03 12:57:48 2014].49
 msConnPoolRegister(NE_10M_POPULATED_PLACES,user/pass@orcl,02EB1D08)
 [Wed Sep 03 12:57:48 2014].505000 msOracleSpatialLayerFreeItemInfo was
 called.
 [Wed Sep 03 12:57:48 2014].505000 msOracleSpatialLayerInitItemInfo was
 called.
 [Wed Sep 03 12:57:48 2014].505000 msOracleSpatialLayerWhichShapes was
 called.
 [Wed Sep 03 12:57:48 2014].505000 msOracleSpatialLayerWhichShapes. Using
 this Sql to retrieve the data: SELECT name, ogr_fid,rownum, ora_geometry
 FROM NE_10M_POPULATED_PLACES WHERE SDO_FILTER( ora_geometry,
 MDSYS.SDO_GEOMETRY(2003, :srid,
 NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates ),'querytype=window')
 =
 'TRUE'
 [Wed Sep 03 12:57:48 2014].505000 msOracleSpatialLayerWhichShapes. Bind
 values: 

Re: [mapserver-users] MapCache - tiles stored with no transparency

2014-06-02 Thread Eichner, Andreas - SID
Since cache and source are basically unrelated it's probably a good idea to 
specify the request format in the source:

   source name=... type=wms
  getmap
 params
VERSION1.1.1/VERSION
FORMATimage/png/FORMAT
LAYERSlayerA,layerB/LAYERS
TRANSPARENTTRUE/TRANSPARENT
EXCEPTIONSapplication/vnd.ogc.se_xml/EXCEPTIONS
 /params
  /getmap
  http
   urlhttp://.../wmsservice/url
   connection_timeout10/connection_timeout
  /http
   /source

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Dejan Gambin
 Gesendet: Montag, 2. Juni 2014 10:29
 An: mapserver-users@lists.osgeo.org
 Betreff: [mapserver-users] MapCache - tiles stored with no transparency
 
 Hi,
 
 I just started playing with MapCache so this could be a pretty newbie
 question...
 
 I have a layer with transparency set, but my tiles, as I can see in
 filesystem, are stored with no transparency. When using mapcache wms demo,
 I get correct/transparent images but only after first getting non
 transparent ones. So this doesn't look very fine (non transparent image
 that gets blurred).
 
 I probably missed something in my configuration, but I don't know what
 because I set PNG format everywhere in mapcache.xml :-(
 
 Any hint that could help me (btw, I am using the newest
 MapServer/MapCache)?
 
 Thx very much
 
 regards, dejan
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] itemquery and validation

2014-05-26 Thread Eichner, Andreas - SID
 here s the part of the mapfile :
  LAYER
   NAME emprise
   STATUS on
   TYPE POLYGON
   CONNECTIONTYPE POSTGIS
   CONNECTION host=10.3.1.51 dbname=xxx user=xxx
 password=xxx port=5432
   DATA geom from activite.emprise using unique gid using srid = 2154
   TOLERANCE 1 #tampon autour du clic souris
   TOLERANCEUNITS kilometers
   VALIDATION
   numope ^[A-Z]{1}[0-9]{6}$
   END #end validation
   CLASSITEM tpeope
 

According to the source you need to define a validation pattern for qstring on 
LAYER or in WEB section, too.
This looks a bit weird to me as you specify the QITEM. Therefore a single 
validation pattern for QSTRING must cover all possible QITEM values... I've 
never used such modes but may be some else can shed some light on this.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] post to be accepted

2014-05-25 Thread Eichner, Andreas - SID
Have you set MODE=ITEMNQUERY? To me it seems you haven't and MapServer tries to 
use QSTRING for runtime substitution which it isn't configured for.

HTH


Von: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] im Auftrag von mathias cunault 
[mathias.cuna...@inrap.fr]

Gesendet: Samstag, 24. Mai 2014 17:38

An: mapserver-users@lists.osgeo.org

Betreff: [mapserver-users] post to be accepted





hello, 



(beginner with mapserver 6.4.2) 

Despite researchs on the forum, i did not find answers to my question. 



I cant perform an itemquery. 

I read that a validation block has to be created in LAYER (mapfile), it looks 
like : 



VALIDATION 

numope [a-z]+ 

END 



I set qlayer, qitem and querystring in template and, but i get : 

 mapserv(): Web application error. Parameter 'qstring' value fails to validate. 
msValidateParameter(): Regular expression error. Parameter pattern validation 
failed. 



it means that my regular exp is wrong or that at least 1 value in the field 
numope doesn't fit this exp ? 

thx



And the attribute in validation has to appear in a classe of the layer or not ? 



Thx 



-- 

Mathias Cunault

chargé d’opération et de recherche

Inrap Tours - 148 av. Maginot

37000 TOURS

06 32 05 98 96

mathias.cuna...@inrap.fr

www.inrap.fr

abonnez-vous à la lettre d'information de l'Inrap : 
http://www.inrap.fr/newsletter.php






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


Re: [mapserver-users] MapCache DB Backend

2014-05-19 Thread Eichner, Andreas - SID
There's already support for  BerkleyDB and TokyoCabinet as fast no-SQL 
backends. I've never seen some benchmarks and TokyoCabinet is currently not 
enabled in CMake build system. LevelDB hasn't support for concurrent processes. 
So it can only be used with worker and probably event MPM. I've already started 
implementing it but currently it has some problems. I'll will try to fix this 
in the next days and post back when there's a usable version.



Von: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] im Auftrag von TDS [t...@tds-net.de]

Gesendet: Mittwoch, 14. Mai 2014 13:59

An: List (MapServer Users)

Betreff: [mapserver-users] MapCache DB Backend





Hello,



is it possible that someone can implement LevelDB or similar into MapCache?



http://highscalability.com/blog/2012/11/29/performance-data-for-leveldb-berkley-db-and-bangdb-for-rando.html



-- 

MfG M. Martin

mailto:t...@tds-net.de



1+1=10

You have a question? - 42 or RTFM. 



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


Re: [mapserver-users] WFS with featureID, maxFeatures, BBOX

2014-05-19 Thread Eichner, Andreas - SID
AFAIK FeatureID and BBOX are mutually exclusive.

Von: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org]quot; im Auftrag von quot;Nathan 
Smith [nsmit...@nd.edu]
Gesendet: Montag, 19. Mai 2014 18:05
An: mapserver-users@lists.osgeo.org
Betreff: [mapserver-users] WFS with featureID, maxFeatures,  BBOX

Hi all,

I've been getting some unexpected results combining BBOX and MaxFeatures and 
was hoping someone might be able to explain why.  I have a web app that uses 
OpenLayers with a MapServer WFS layer.  A typical WFS request is POST with a 
bunch of featureID items, maxfeatures: 1000,  a bbox set by OL.  It seems that 
when the featureID list gets over 1000, instead of first filtering by BBOX and 
then truncating maxFeatures it applies the limit first.  Actually I’m not sure 
bbox is being applied at all.

Any ideas?  Is the the correct behavior?

Thanks,
- Nathan Smith

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


Re: [mapserver-users] Mapserver shows all nodes on a GeometryCollection

2014-05-14 Thread Eichner, Andreas - SID
You should take a look at the second column or rewrite the query as
  SELECT
  St_AsText( St_CollectionExtract( geom, 1 )) AS geom,
  element_type
  FROM
v_elements;

But the whole query doesn't make much sense in your case as don't have any real 
geometry collections. It doesn't filter your data but return an empty geometry 
and MapServer will effectively drop those lines. This isn't very efficient, so 
you should probably use something like
  SELECT
  St_AsText( geom ) AS geom,
FROM
  v_elements
WHERE
GeometryType( geom ) = 'POINT'
  AND
element_type = 'Voorziening';

However, the real problem is that the rendering engine implicitly converts the 
geometry to something useful for the current layer type. See 
http://mapserver.org/mapfile/layer.html regarding the layer's TYPE. So setting 
TYPE=point doesn't filter out lines and polygons - it converts them. But since 
points cannot be converted to lines or polygons, MapServer will skip them when 
TYPE=line, effectively filtering your data. Because of this implicit conversion 
you usually need to define a layer for each type. A very shortened version 
might look something like (assuming your primary key of the v_elements table is 
'ID' and SRID -1):
LAYER
  NAME elements_voorziening_point
  TYPE POINT
  STATUS ON
  CONNECTIONTYPE POSTGIS
  CONNECTION host=yourhostname dbname=yourdatabasename user=yourdbusername
  password=yourdbpassword port=yourpgport
  DATA geom FROM v_elements USING UNIQUE id USING SRID -1
  FILTER GeometryType( geom ) = 'POINT' AND element_type = 'Voorziening'
  CLASS
...
  END
END

HTH

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von drobins
 Gesendet: Dienstag, 13. Mai 2014 15:52
 An: mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] Mapserver shows all nodes on a
 GeometryCollection
 
 Hi Jukka,
 
 the queries don't show what they're supposed to show, they show more
 information than requested.
 I'm adding a few screenshots with the 3 different queries, each showing
 lines and points
 
 http://osgeo-org.1560.x6.nabble.com/file/n5140004/moz-screenshot-14.png
 http://osgeo-org.1560.x6.nabble.com/file/n5140004/moz-screenshot-15.png
 http://osgeo-org.1560.x6.nabble.com/file/n5140004/moz-screenshot-16.png
 
 
 
 --
 View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-
 Mapserver-shows-all-nodes-on-a-GeometryCollection-tp5138525p5140004.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Is PropertyIsNull supported by MapServer?

2014-05-02 Thread Eichner, Andreas - SID
Whitespace might be significant, can you try
ogc:PropertyIsNull
  ogc:PropertyNameYEAR/ogc:PropertyName
/ogc:PropertyIsNull

 -Ursprüngliche Nachricht-
 OpenLayers has a OpenLayers.Filter.Comparison.IS_NULL filter that produces
 XML such as:
 
 ogc:PropertyIsNull
   ogc:PropertyName
 YEAR
   /ogc:PropertyName
 /ogc:PropertyIsNull

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


Re: [mapserver-users] XML parsing error with extended Inspire WMS 1.1.1 capabilities

2014-01-31 Thread Eichner, Andreas - SID-NLKM

 I get this error: Namespace prefix xsi for type on MandatoryKeyword
 is not defined

You're right. The problem using DTD is that namespace declarations are done 
using FIXED attributes. Therefore the DTD part 
 !ATTLIST inspire_common:MandatoryKeyword
   xmlns:inspire_common CDATA #FIXED 
http://inspire.ec.europa.eu/schemas/common/1.0;
 

Should be:
 !ATTLIST inspire_common:MandatoryKeyword
   xmlns:inspire_common CDATA #FIXED 
http://inspire.ec.europa.eu/schemas/common/1.0;
   xmlns:xsi CDATA #FIXED http://www.w3.org/2001/XMLSchemainstance;
 

Because for element inspire_common:Keyword the xsi:type attribute is declared 
it should probably also be done for the inspire_common:MandatoryKeyword.

So I would consider this being an incomplete document type definition. Fixing 
this should be simple.

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


Re: [mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-28 Thread Eichner, Andreas - SID-NLKM
 Andreas, thanks for the explanation about the Berkeley Database.
 However, I have made several changes of permissions and owner of the
 files produced by mapcache_seed, and I still get the same error on
 the OpenLayers demo.
 
 I don't know if others users have had the same error with Mapcache
 and Berkeley Databases in Ubuntu Server.
 

Have you build mapcache yourself or do you use a prebuild one? Today I build 
mapcache with BerkeleyDB support on a Debian Testing box. Basically, this is 
what I did:

* check out latest master
* apt-get install libdb5.1-dev
* follow the install instructions in INSTALL, add -DWITH_BERKELEY_DB=ON to 
cmake .. and make sure * Berkeley DB: /usr/lib/... is listed under 
Optional components
* add the following config element to mapcache.xml if it does not exist yet:
   cache name=bdb type=bdb
  !-- base (required)
 absolute filesystem path where the berkeley db database file is to be 
stored.
 this directory must exist, and be writable
  --
  base/tmp/foo//base
  !-- key_template (optional)
 string template used to create the key for a tile entry in the 
database.
 defaults to the value below. you should include {tileset}, {grid} and 
{dim} here
 unless you know what you are doing, or you will end up with mixed tiles
  key_template{tileset}-{grid}-{dim}-{z}-{y}-{x}.{ext}/key_template
  --
   /cache
* create the base directory and grant access to web server:
  # mkdir /tmp/foo  chgrp www-data /tmp/foo  chmod g+rwx /tmp/foo
* set the cache element to bdb in a tileset
* populate the cache by seeding a tileset that uses a bdb-cache
* the base should look something like this:
# ls -l /tmp/foo/
insgesamt 11528
-rw-r--r-- 1 www-data www-data 9764864 Jan 28 13:30 bdb.db
-rw-r- 1 www-data www-data   24576 Jan 28 13:35 __db.001
-rw-r- 1 www-data www-data  253952 Jan 28 13:35 __db.002
-rw-r- 1 www-data www-data 1318912 Jan 28 13:35 __db.003
-rw-r- 1 www-data www-data  811008 Jan 28 13:35 __db.004

* to verify this worked use the strings command on the bdb.db and grep for the 
tileset name: # strings /tmp/foo/bdb.db|grep MyTilesetName
* use the demo service to check if it is working


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


Re: [mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-22 Thread Eichner, Andreas - SID-NLKM
 failed to aquire connection to bdb backend: unknown error
 
 How can I fix or connect to the Berkeley DB?. I'm using Ubuntu Server
 12.05 and Berkeley 5.1 (libdb5.1)

Have you checked the file permissions to allow access to the user the web 
server runs under? 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Automatic simplification based on resolution

2014-01-02 Thread Eichner, Andreas - SID-NLKM
Wasn't RFC 86 (http://mapserver.org/development/rfc/ms-rfc-86.html) intended to 
solve such problems? Does something like the following work and do the job?

  SCALETOKEN
NAME %geometry%
VALUES
  0 the_geom
  1000 st_simplify(the_geom, 100)
  1 st_simplify(the_geom, 1000)
END
  END
  DATA the_geom from (select %geometry% as the_geom, prop1 from roads) as foo

Would be nice to know if that would work...

Regards,
Andreas Eichner

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von thomas bonfort
 Gesendet: Dienstag, 31. Dezember 2013 18:46
 An: Rahkonen Jukka
 Cc: Mapserver-Users (mapserver-users@lists.osgeo.org)
 Betreff: Re: [mapserver-users] Automatic simplification based on
 resolution
 
 Jukka,
 IIRC this has already surfaced a few times on the mailing list or the
 bugtracker. MapServer already simplifies geometries at the pixel
 level
 before sending them to the renderers, and from my testing at the time
 was more efficient at doing so than using st_simplify(), with the
 added bonus that the cellsize (resolution, units per pixel) does not
 need to be factored in the actual SQL query, and that the
 simplification applies to all data backends.
 Doing the simplification inside postgis does however make sense if
 the
 data transfer from db to mapserver is a bottleneck, and/or
 potentially
 if reprojection is involved (as less points would need to be fed into
 proj). If you can come up with hard numbers to show there is a gain
 I'd be interested.
 
 regards,
 thomas
 
 
 
 On 31 December 2013 10:31, Rahkonen Jukka jukka.rahko...@mmmtike.fi
 wrote:
  Hi,
 
  Mapnik has such a feature
 http://blog.cartodb.com/post/20163722809/speeding-up-tiles-rendering
  Andrea Aime is experimenting with it with Geoserver and is reaching
 a 50% speedup.
  http://osgeo-org.1560.x6.nabble.com/Some-interesting-optmizations-
 from-Jonathan-s-load-test-td5095839.html
  Can Mapserver do the same?
 
  -Jukka Rahkonen-
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Rewarping/Reprojection with GDAL and -wo EXTRA_SOURCE parameter

2013-12-19 Thread Eichner, Andreas - SID-NLKM
Have you set the PROCESSING directive at the grid layer? With the patch 
applied, adding PROCESSING FORCE_FULL_EXTENT=YES at the GRID layer fixed 
it for me, ie:

 LAYER
 TYPE LINE
 STATUS DEFAULT
 EXTENT -180 -90 180 90
 NAME GRID
 OPACITY 50

 # the following line enables the hack:
PROCESSING FORCE_FULL_EXTENT=YES

I used the BBOXes from your examples below to generate the attached images.

 The POSTGIS (i.e. POLYGON) and RASTER layers are fine in any zoom or
 pan
 level. The LINE layer is ok if the BBOX has not been paned to far of
 center (for the ortho projection) and if extremly zoomed in the
 poles
 are cut.
 
 It looks like that POLYGON and LINE Layers are treated a little bit
 differently.
 
 If you like here is the test site with the patch included.
 
 Zoomed in, plus poles cut out in LINE layer:
 http://www.iup.uni-bremen.de/warehouse/cgi-bin/laura?BBOX=-250,-
 250,250,250FORMAT=IMAGE/PNGFROMDAT=2006-08-
 06%2000:00HOEHE=-
 1LAYERS=KARTE1,WILLI,GRIDMAP=/var/www/localhost/mapserver/laura.map
 PRODUKT=stro3_21REQUEST=GETMAPSERVICE=WMSSRS=EPSG:0816STYLES=TI
 ME=2006-10-06%2000:00/2006-10-08%2023:59TODAT=2006-08-
 07%2023:59TRANSPARENT=FALSEVERSION=1.1.1WIDTH=600HEIGHT=600
 
 Half a LINE layer missing when BBOX to far off center:
 http://www.iup.uni-bremen.de/warehouse/cgi-bin/laura?BBOX=-650,-
 650,250,250FORMAT=IMAGE/PNGFROMDAT=2006-08-
 06%2000:00HOEHE=-
 1LAYERS=KARTE1,WILLI,GRIDMAP=/var/www/localhost/mapserver/laura.map
 PRODUKT=stro3_21REQUEST=GETMAPSERVICE=WMSSRS=EPSG:0816STYLES=TI
 ME=2006-10-06%2000:00/2006-10-08%2023:59TODAT=2006-08-
 07%2023:59TRANSPARENT=FALSEVERSION=1.1.1WIDTH=600HEIGHT=600
 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


  1   2   3   >