[mapserver-users] Getting cellsize with Mapscript

2020-05-11 Thread Vladimir

Hi All!
 
As I noticed, the 'cellsize' is calculated during 'OWSDispatch' performing.
Is it possible to get it right after setting of request parameters?
 
Code sample:
 
    map_obj = mapscript.mapObj('mapfile.map')
    request = mapscript.OWSRequest()
    for key, value in params:
        request.setParameter(key, value)#setting BBOX, HEIGHT, WIDTH etc
   
    cellsize = map_obj.cellsize ???
 
    …
 
    mapscript.msIO_installStdoutToBuffer()
    map_obj.OWSDispatch(request)
    mapscript.msIO_getStdoutBufferBytes()
 
--
Regards, Vladimir.
 ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Question about python mapscript and point style.

2019-11-15 Thread Vladimir

Hi all!
 
I unsuccessfully try to style ‘Point’ layer with following code:
(first)
    style = mapscript.styleObj(classObj)
    style.symbolname = 'circle'
    style.size = 10
    style.color = mapscript.colorObj(255, 0, 0)
 
No error, no picture as result of using this method.
But similar approach works for ‘Line’ and ‘Polygon’ layers.
 
Also I figured out working method for the ‘Point’ layer:
(second)
classObj.updateFromString("CLASS STYLE COLOR 255 0 0 SIZE 10  SYMBOL 'circle' 
END END")
 
O utput of ‘layer.convertToString()’ is the same  for both methods :
LAYER
    CONNECTION \"dbname='db' host='db' user='user' password='1'\"
    CONNECTIONTYPE POSTGIS  
    DATA \"value FROM (SELECT value FROM points WHERE ST_Intersects(value, 
!BOX!)) AS subquery USING UNIQUE id USING srid = 3857\"
    LABELITEM \"name\"
    NAME \"points\"
    STATUS ON
    TYPE POINT
    UNITS METERS
    CLASS
    NAME \"points\"
    STYLE     
    COLOR 255 0 0
    SIZE 10     
    SYMBOL \"circle\"
    END # STYLE
    END # CLASS
END # LAYER
 
How to get working ‘Point’ style using first method?
MapServer version: 7.2.1
 
Thanks!
--
Regards, Vladimir.
 ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] MapServer FastCGI

2018-09-24 Thread Vladimir
Hi list!

A proper image is generated by WMS request like this:
http://myhost/cgi-bin/mapserv.fcgi?SERVICE=WMS=1.3.0=GetMap=png8=true=mylayer=/path/to/myfile.map=EPSG%3A3857==2881=1375=%2C%2C%2C

Could anybody help to figure out whether mapserver runs as fcgid?

a) MapServer version 7.0.0 (... SUPPORTS=FASTCGI ...)

b) Apache 2.2(prefork mpm)  was configured as described here  
https://mapserver.org/optimization/fastcgi.html

c) Typing '$ top -u apache' in terminal shows several processes with 
COMMAND=mapserv.fcgi

d) Log file contains following records:

    [Mon Sep 24 18:32:19 2018].456315 CGI Request 23 on process 31611
    ...
    [Mon Sep 24 18:32:28 2018].730044 CGI Request 24 on process 31611
    ...
    [Mon Sep 24 18:32:38 2018].823934 CGI Request 25 on process 31611
    ...
    - looks like a single process  is used by multiple requests.


Does it mean that FastCGI i n action ?

Regards.








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

Re: [mapserver-users] What is the best way to generate WMS?

2018-09-21 Thread Vladimir
Does it work with PHP 7?

Regards.
>
>I have no experience with other programming languages at mapserver, so far I 
>only used php and that works well, e.g. I use a wrapper here:
>https://geodaten.naturschutz.rlp.de/kartendienste_nature_protection/mod_ogc/
>
>I developed this on the basis of this example:
>https://mapserver.org/ogc/mapscript.html
>
>Greetings
>Sven
>
>
>Von: Vladimir [mailto:f...@inbox.ru] 
>Gesendet: Freitag, 21. September 2018 13:50
>An: Sven Schroeter; 'mapserver-users'
>Betreff: Re: AW: [mapserver-users] What is the best way to generate WMS?
>
>Thank you very much, Sven.
>
>Is it right to use FastCGI for less resource consumption?
>What language of MapScript is more suitable the best performance?
>
>Regards.
>
>Hi Vladimir,
>
>the fastest way is probably the CGI variant. You write your mapfiles and 
>deliver the data via mapserv and the corresponding parameters.
>In the case of PHP you have to build a wrapper, which is no problem. If your 
>server runs under windows, this is the better variant, because many firewalls 
>close when you call mapserv.exe.
>When it comes to custom programming, the php (or python or C# or Java) variant 
>has more influence.
>
>Greetings
>Sven
>
>
>
>Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
>Auftrag von Vladimir
>Gesendet: Freitag, 21. September 2018 09:51
>An: mapserver-users
>Betreff: [mapserver-users] What is the best way to generate WMS?
>
>Hi list,
>
>There are several tables with a lot of objects in PostGis database.
>Fields of the tables contain styles(color, width etc)
>
>The goal is fast getting a single image(WMS) on client .
>I am aware about two ways to do it:
>mapserv as FactCGI and some kind of MapScript(PHP in my case)
>
>What is the best for performance?
>Is there more productive way? 
>
>Regards.
>
>

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

Re: [mapserver-users] What is the best way to generate WMS?

2018-09-21 Thread Vladimir
Thank you very much, Sven.

Is it right to use FastCGI for less resource consumption?
What language of MapScript is more suitable the best performance?

Regards.

>
>Hi Vladimir,
>
>the fastest way is probably the CGI variant. You write your mapfiles and 
>deliver the data via mapserv and the corresponding parameters.
>In the case of PHP you have to build a wrapper, which is no problem. If your 
>server runs under windows, this is the better variant, because many firewalls 
>close when you call mapserv.exe.
>When it comes to custom programming, the php (or python or C# or Java) variant 
>has more influence.
>
>Greetings
>Sven
>
>
>
>Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
>Auftrag von Vladimir
>Gesendet: Freitag, 21. September 2018 09:51
>An: mapserver-users
>Betreff: [mapserver-users] What is the best way to generate WMS?
>
>Hi list,
>
>There are several tables with a lot of objects in PostGis database.
>Fields of the tables contain styles(color, width etc)
>
>The goal is fast getting a single image(WMS) on client .
>I am aware about two ways to do it:
>mapserv as FactCGI and some kind of MapScript(PHP in my case)
>
>What is the best for performance?
>Is there more productive way? 
>
>Regards.
>

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

[mapserver-users] What is the best way to generate WMS?

2018-09-21 Thread Vladimir
Hi list,

There are several tables with a lot of objects in PostGis database.
Fields of the tables contain styles(color, width etc)

The goal is fast getting a single image(WMS) on client .
I am aware about two ways to do it:
mapserv as FactCGI and some kind of MapScript(PHP in my case)

What is the best for performance?
Is there more productive way? 

Regards.

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

[mapserver-users] Bad appearance of dual line

2017-01-26 Thread Vladimir

Hi all!
I use MapServer v 7.0.0 
OUTPUTFORMAT
  NAME "AGG"
  DRIVER AGG/PNG
  MIMETYPE "image/png"
  IMAGEMODE RGB
  EXTENSION "png"
  FORMATOPTION "GAMMA=0.75"
  FORMATOPTION "COMPRESSION=9"
END
There is very bad appearance of dual lines(carriageways) at a big scale while 
single line is good, please see the pic:
http://pasteboard.co/qDTwvh718.jpg

 Is it possible to solve this?
Regards!
Regards
в том, что касается___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] MapCache resolution

2017-01-22 Thread Vladimir

Hi!

I didn't found a rule and took the resolutions that my client(OpenLayers 3) 
sends in its request. So grid section looks like:

   8238077.16046298 5283327.39507164 9001224.45086216 
5792092.25533779
    EPSG:3857
    EPSG:900913
    m
    256 256
    
  76.43702828517625 
  38.21851414258813 
  19.109257071294063
    


There are no performance problem using "disk" type in "on-demand"(not seeder) 
mode.

Hope it'll help.

>Hello list,
>   regarding the resolution element in mapcache.xml, according to the 
>documentation it is a " is a list of resolutions for each of the zoom levels 
>defined by the grid ". I guess this means that it's up to define  the 
>units-per-pixel in each service. Do we define these numbers arbitrarily? Is 
>there some kind of a rule?
>   And another thing. I've tried the "disk" cache and the "sqlite" cache. In 
>both cases my processor is struggling until caching the tiles for the first 
>time. Is this normal ?   (I'm doing it in localhost)
>
>Regards,
>Stefanos
>___
>mapserver-users mailing list
>mapserver-users@lists.osgeo.org
>https://lists.osgeo.org/mailman/listinfo/mapserver-users

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

[mapserver-users] PhpMapScript 7.0: Property 'type' does not exist in this object

2015-10-01 Thread Vladimir

I try to set a label font using:
$label->set('type', MS_TRUETYPE);
$label->set('font', 'arial');
but get MapScriptException: Property 'type' does not exist in this object using.
Moreover, the labeling works well without these two strings. 
The docs contain the reference to 'type' member of labelObj:
http://mapserver.org/mapscript/php/phpmapscript.html#labelobj
it seems the property should be legal.
Could anybody clarify the situation?

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

Re: [mapserver-users] map server (map script mode) zoom in and zoom out like google zooming

2015-07-10 Thread Vladimir

Hi  Ankur,

Why don' t you use client-side interaction?
For example Openlayers has this ability out-of-box.
Dear All, 

 Kindly help me out, for improving my map server(map script ) Zoom In  Zoom 
Out , work as similar to google zooming ..

thanks in advance

-- 
thanks  regards
Ankur Chitranshi
___
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] map server (map script mode) zoom in and zoom out like google zooming

2015-07-10 Thread Vladimir
 Ankur, 

i am not familiar with ms4w, but it seems the principle is general.
First you need to configure WMS service, then to request it from client-side.
Example for a line data in Postgis, PHP Mapscript 6.4.1 and OpenLayers 3: 
yourMapFile.map
--
MAP
NAME youMapName
STATUS ON
UNITS METERS
OUTPUTFORMAT
NAME 'AGG'
DRIVER AGG/PNG
IMAGEMODE RGB
END #OUTPUTFORMAT
STATUS ON
WEB 
METADATA
wms_title youMap
wms_abstract youMap
wms_onlineresource http://localhost/youCode.php;
wms_srs EPSG:3857 
wms_enable_request *
wms_encoding utf-8
END # end METADATA 
END # end WEB 
PROJECTION
init=epsg:3857
END # end PROJECTION 
END # end MAP
-
youCode.php
--- 
$map = new Mapobj(yourMapFile.map); 
$request = new OwsrequestObj();
foreach ($_GET as $key = $value){ 
$request-setparameter($key, $value); 
}
$layer = ms_newLayerObj($map);
$layer-set('status', MS_ON);
$layer-set('name', 'yourLayerName');
$layer-setConnectionType(MS_POSTGIS);
$layer-set('connection', 'user=yourUser password=yourPass dbname=yourDB 
host=localhost');
$layer-set('type',MS_LAYER_LINE);
$layer-set(data,geom from (select id, geom from yourTable
where ST_Intersects(geom, !BOX!)) as subquery using unique id using srid=3857);
$class = ms_newClassObj($layer);
$class-set('name', 'yourClassName');
$style = ms_newStyleObj($class);
$style-color-setRGB(255,174,0);
$style-outlinecolor-setRGB(255,255,255);
$style-set('outlinewidth', 1); 
$style-set('minwidth',5);
ms_ioinstallstdouttobuffer();
$map-owsDispatch($request); 
$contenttype = ms_iostripstdoutbuffercontenttype();
header('Content-type:'.$contenttype);
ms_iogetStdoutBufferBytes();
ms_ioresethandlers();
---
request from client-side
---
var youWmsSource = new ol.source.ImageWMS({
url: 'http://localhost/youCode.php?', 
params: {'LAYERS':'yourLayerName'},
serverType: 'mapserver'
});
see for more details: 
http://openlayers.org/en/v3.7.0/examples/wms-image.html?q=ImageWMS
---

Hope this helps___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Where is a Mapserver v 6.4.1 documentation?

2015-07-09 Thread Vladimir

Hi all!
I've searched through the whole site mapserver.org, but can't find 
Mapserver/PHP MapScript v 6.4.1 documentation.
The page http://mapserver.org/download.html#docspreviousreleases doesn't 
contain 6.4.1 docs.
Where else should I look for?
Thanx___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [SOLVED] width of line

2015-05-15 Thread Vladimir

I've found how to solve this.
$style-set('maxwidth',100); - overrides default value 32 
$style-set('width',100); - sets necessary value
http://osgeo-org.1560.x6.nabble.com/Maximum-width-of-line-setting-is-ignored-td4232197.html
Thanx to Thomas 


Hi All!
I am trying to get a thick line on my map, for example:
$style-set('width',50) or $style-set('width',70); 
but it seems always = 32.
PHP MapScript 6.4.1
UNITS METERS in maplile.
Is it possible to set width of line more?

Thanx
___
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] with of line

2015-05-14 Thread Vladimir

Hi All!
I am trying to get a thick line on my map, for example:
$style-set('width',50) or $style-set('width',70); 
but it seems always = 32.
PHP MapScript 6.4.1
UNITS METERS in maplile.
Is it possible to set width of line more?

Thanx
___
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-13 Thread Vladimir
 Lars, 

Thanx in any event for devoting your attention.

Vladimir,

I see, so you do not need the order of the LAYERS but the order of
  the FEATURES. I did not understand that correctly at first, sorry.
  In that case, I guess Andreas approach would be the one.

Best

Lars

___
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-13 Thread Vladimir

Bobb
Thanks you very much for detailed answer.
I'll have to place the parts of lines in various layers.
There is no other elegant decision as i understood, but I wonder how 
web-map-giants like GOOGLE or OSM get out of this scrape.
Vladimir,
 
I’ve faked this in the past by drawing the same layer many times in one pass 
(inside of the same mapfile), you need at least one complete layer pass, with 
other partial layers for
 the over/under situations.  You can do the partial layer grouping with 
attributes on the segments that need to go under or over, and this is a manual 
process for the most part, but it’s a real pain to keep that up to date over 
time (I’m talking over years)
 .  I could probably find a programmer that thought of this as a challenge, but 
you still need a human to decide what is over something else as a last QA.
 
The much harder task is defining which layers (partial segments are over/under 
other layers..  You need to remove some line segments form at least one of the 
layers in order to make
 things display correctly.  Sometimes a layer is over, sometime it’s under.  I 
actually have two instances in my mapping system, where I have three different 
bridges stacked on top of each other, two of them a roadways, with the odd one 
in between them.  The
 other has a Railway bridge over a roadway bridge crossing.
 
The z-index stuff has always been a painful thing thing to keep updated, but 
it is doable.
 
I’ve rencetly been looking at this myself for hardcopy pringing purposes. As 
well.
 
Bobb  
___
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 Vladimir
 Sorry, I have some correction, it is right illustrations:

Result when order by asc:
http://s28.postimg.org/lqs8nxw31/asc.jpg
Result when order by desc:
http://s12.postimg.org/xondilekt/desc.jpg

___
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 Vladimir

I would draw your attention to the source of this discussion.
http://osgeo-org.1560.x6.nabble.com/the-lines-one-above-other-td5187093.html
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, also the definition $highwayStyle2 besides $highwayStyle1 works 
fine.
Please see the code and the illustrations below:

--
$highwayLayer-set('status', MS_ON);
$highwayLayer-set('name', 'highway');
$highwayLayer-set('labelitem', 'name');
$highwayLayer-setConnectionType(MS_POSTGIS);
$highwayLayer-set('connection', 'user=my_user password=my_pass dbname=my_db 
host=localhost');
$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);
$highwayLayer-setprocessing(close_connection=defer);
$highwayLayer-set(type,MS_LAYER_LINE);
$highwayClass = new ClassObj($highwayLayer);
$highwayClass-set('name', 'highway');
$highwayStyle1 = new styleObj($highwayClass); 
$highwayStyle1-color-setRGB(254,173,0);
$highwayStyle1-set('linecap','square'); 
$highwayStyle1-set('width',4);
$respdorStyle1-outlinecolor-setRGB(255,0,0); 
$respdorStyle1-set('outlinewidth',2);
$highwayStyle2 = new styleObj($highwayClass); 
$highwayStyle2-color-setRGB(254,173,0);
$highwayStyle2-set('linecap','square'); 
$highwayStyle2-set('width',4);
$respdorStyle2-outlinecolor-setRGB(255,0,0); 
$respdorStyle2-set('outlinewidth',2);

-

Result when order by id asc:
http://s22.postimg.org/esbobf18x/order_by_id_asc.jpg

Result when order by id desc:
http://s10.postimg.org/qeokp2jrd/order_by_id_desc.jpg

-
That's the goods for me but there is the impression of using some undocumented 
singularity.
Thanx for any comments.




___
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-13 Thread Vladimir

There is question about placing the parts of lines in various layers.
I added the small part of line above the highway with linecap=butt for stops 
the line exactly at the end as described in
http://mapserver.org/mapfile/symbology/construction.html#linecap.
But butts of the line has some thin border, please see the pic:
http://s8.postimg.org/iymc3az9h/linecap_butt.jpg
How to escape this? 
Thanx.

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

[mapserver-users] the lines one above other

2015-02-12 Thread Vladimir
 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] the lines one above other

2015-02-12 Thread Vladimir

Andreas. Thanks for response too.
I use phpmapscript and postgis. How can I use order by  for this purpose?

Sorry. I have some correction:
What I have:  http://s18.postimg.org/vkvb8jprd/crossroad1.jpg
What I need:  http://s14.postimg.org/yk40e0nq9/crossroad.jpg




___
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 Vladimir

Lars. Thank you very much for response.
Please see the pics.
What I have: http://s14.postimg.org/yk40e0nq9/crossroad.jpg
What I need: http://s14.postimg.org/yk40e0nq9/crossroad.jpg
The problem is the orange roads lies in a one layer because they are identical 
features(has the same type). It is done accordingly to specificity the app. 
And I would like to escape a duplication of layers if it is possible.
Therefore i need to locate the features one above other at a one layer.

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

Re: [mapserver-users] MapCache: substitution in GetMap

2014-12-11 Thread Vladimir

Thomas. Thank you very much. Sorry for the late response. 
There is question about type.
Performs intervals the validation or regex should be used? Best regards.

Fri, 28 Nov 2014 14:07:10 +0100 от thomas bonfort thomas.bonf...@gmail.com:
You need to add ZOOM as a dimension at the tileset level. It will be
validated in incoming requests and propagated to the WMS server.

--
thomas

On 28 November 2014 at 13:31, Vladimir  f...@inbox.ru  wrote:
 Hi All!

 I have getMap request to MapCache from OL3 with additional dynamic ZOOM
 parameter.


  
 http://myhost/mapcache/?SERVICE=WMSVERSION=1.3.0REQUEST=GetMapFORMAT=image%2FpngTRANSPARENT=trueLAYERS=testWIDTH=384HEIGHT=384CRS=EPSG%3A3857STYLES=MAP_RESOLUTION=135BBOX=8520588.417005166%2C5338362.055436708%2C8521811.40945773%2C5339585.047889271ZOOM=15

 Further MapCache send request to my WMS service accordingly the
 configuration:

 source name=vmap0 type=wms
 getmap
 params
 FORMATimage/png/FORMAT
 LAYERSmylayer/LAYERS
 /params
 /getmap
 http
 urlhttp://myhost/wms/url
 /http
 /source

 But the additional ZOOM parameter is lost at this stage.
 Adding ZOOM/ZOOM in params adds empty key without value.
 How can I substitute this parameter to final request ?

 Thanks  best regards




 ___
 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] MapCache: substitution in GetMap

2014-11-28 Thread Vladimir
 Hi All!

I have getMap request to MapCache from OL3 with additional dynamic ZOOM 
parameter.

http://myhost/mapcache/?SERVICE=WMSVERSION=1.3.0REQUEST=GetMapFORMAT=image%2FpngTRANSPARENT=trueLAYERS=testWIDTH=384HEIGHT=384CRS=EPSG%3A3857STYLES=MAP_RESOLUTION=135BBOX=8520588.417005166%2C5338362.055436708%2C8521811.40945773%2C5339585.047889271ZOOM=15

Further MapCache send request to my WMS service accordingly the configuration:

source name=vmap0 type=wms
getmap
params
FORMATimage/png/FORMAT 
LAYERSmylayer/LAYERS 
/params
/getmap
http
urlhttp://myhost/wms/url
/http
/source

But the additional ZOOM parameter is lost at this stage.
Adding ZOOM/ZOOM in params adds empty key without value.
How can I substitute this parameter to final request ?
Thanks  best regards

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

Re: [mapserver-users] Mapcache Question

2014-10-10 Thread Vladimir
 Hello ALL!

I dig into MapCache now and my modest comprehension is:
1) MapCache uses Mapserv for seeding tiles or more exactly -
sends WMS request to Mapserv for getting a map:
source/source section in a mapcache.xml file

2) Ol uses MapCache for rendering that tiles or more exactly -
sends WMS(or other) request to MapCache:
new ol.layer.Tile({ 
source: new ol.source.TileWMS(({
url: 'myhost/mapcache/?',
params: {'LAYERS': 'mytileset'},
serverType: 'mapserver'
}))
})
where
/mapcache/ is path to a mapcache.xml(aliased through Apache),
'mytileset' is tileset name=mytileset section in a mapcache.xml file

3)The Seeding and the rendering needs other configuration of mapcache.xml 
file(it is needs clarification).

4)The seeding may be through:
mapcache_seed -c mapcache.xml -t mytileset-g mygrid
or 
during a certain map area is requested by client (it is needs clarification).
Thanks for any correction.
Best regards.


Wed, 1 Oct 2014 19:33:12 -0400 от Travis Kirstine 
tkirst...@firstbasesolutions.com:
Tim,

MapCache Is simply a tiling server.  It will take images from a source and 
store them in a cache.  These tiles are exposed as services to clients - WMTS, 
WMS, TMS etc...  MapServer on the other hand will read source data (GIS files 
/ database) and render images based on rules defined in the mapfile.  These 
images are used as the source for MapCache.

On Wed, Oct 1, 2014 at 5:58 PM, Tim Nasman   tnas...@rollingleaf.com  wrote:
I have read through the Mapcache documentation but I feel like I am missing 
some basic elements to how it works.

 I am using Mapcache to display a mbtile that I have created. Now from what I 
understand, my mapcache .xml will list out the parameters of the mbtile and 
then I add a layer within my mapfile referencing the .xml which I should then 
be able to to use as WMTS using openlayers. I just haven't grasped how 
mapcache and mapserv work together so any clarification would be helpful. 
Thanks for your time. 

-- 
Timothy Nasman
Data Analyst | Programmer
Rolling Leaf Inc.
[V] :  910.274.1436
[E] :  tnas...@rollingleaf.com


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



-- 
Travis Kirstine , Web Development Supervisor 
t  905‑477‑3600  x  301  | m  905‑534‑4798  | tkirst...@firstbasesolution.com
First Base Solutions Inc.
140 Renfrew Drive, Suite 100  | Markham  | Ontario  | L3R 6B3
t  905‑477‑3600  | f  905‑477‑0892  | www.firstbasesolutions.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] Why $map-scaledenom returns -1 ?

2014-06-19 Thread Vladimir
 Hi Steve

Yes it is WMS request from OL3:
http://localhost/map,php?SERVICE=WMSVERSION=1.3.0REQUEST=GetMapFORMAT=image%2FpngTRANSPARENT=trueLAYERS=rayonCRS=EPSG%3A3857STYLES=MAP_RESOLUTION=135WIDTH=2025HEIGHT=1125BBOX=1950071.7561607715%2C1681030.6423115395%2C15158390.243839229%2C9018985.35768846

I considered MapServer captures width, height and extent from GetMap request  
parameters. 
But either 
$request-loadparams( )
or
foreach ($_GET as $key = $value) 
{
$request-setparameter($key, $value);
}
don't  calculate them and scaledenom=-1 as result. 
Is there another unknown method for me?

Now this works only with additional extracting from $_GET:
foreach ($_GET as $key = $value) 
{
$request-setparameter($key, $value);
}
if(!empty($_GET['BBOX'])  !empty($_GET['WIDTH'])  !empty($_GET['HEIGHT']))
{
$extentArray=explode(',',$_GET['BBOX']);
$minX=$extentArray[0];
$minY=$extentArray[1];
$maxX=$extentArray[2];
$maxY=$extentArray[3];
$width=(int)$_GET['WIDTH'];
$height=(int)$_GET['HEIGHT'];
$map-setSize($width,$height);
$map-setExtent($minX,$minY,$maxX,$maxY);
$map-preparequery();
$scale=$map-scaledenom;
} Can't understand what's wrong. Any idea ?

Best regards
Vladimir


Tue, 17 Jun 2014 14:29:53 + от Lime, Steve D (MNIT) 
steve.l...@state.mn.us:
This is a WMS request? I’d think MapServer would populate width, height and 
extent for you. What are the values for those parameters if you don’t set them 
explicitly?
 
Steve
 
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of  Vladimir
Sent: Tuesday, June 17, 2014 6:57 AM
To: mapserver-users
Subject: Re: [mapserver-users] Why $map-scaledenom returns -1 ?
 
Hello Steve.
Thank you very much for the thought.
I use OpenLayers 3 on client side whose query string contains: 
WIDTH=2025HEIGHT=1125BBOX=5252151,2C3515519,11856310613,7184496 

and futher scaledenom is computed:
$extentArray=explode(',',$_GET['BBOX']);
$minX=$extentArray[0];
$minY=$extentArray[1];
$maxX=$extentArray[2];
$maxY=$extentArray[3];
$width=(int)$_GET['WIDTH'];
$height=(int)$_GET['HEIGHT'];
$map-setExtent($minX,$minY,$maxX,$maxY);
$map-setSize($width,$height);
$map-preparequery();
$scale=$map-scaledenom;
It works for me, but I am not sure that is standard method.
Can this be used?

Best regards
Vladimir

16  2014, 15:43 UTC от Lime, Steve D (MNIT)  steve.l...@state.mn.us :
Scale can only be computed if there is a map extent and map size set. Are you 
doing so?
 
Steve
 
From: mapserver-users-boun...@lists.osgeo.org [ 
mailto:mapserver-users-boun...@lists.osgeo.org ] On Behalf Of  Vladimir
Sent: Monday, June 16, 2014 1:12 AM
To: mapserver-users
Subject: [mapserver-users] Why $map-scaledenom returns -1 ?
 
Hello list

I stuck on the scaledenom definition in my PHPMapScript v. 6.4.1.
The current scaledenom  required to embed in SQL-statement, but   
$map-scaledenom returns -1. Tons of googling got nothing. Please help!

 phpscript.php 
-
 
    $map = ms_newMapobj(/srv/www/htdocs/tez/design/mapfile.map);        
        $request = ms_newOwsrequestObj();
        if(!empty($_GET)){
            foreach ($_GET as $key = $value) {
            $request-setparameter($key, $value);
            }
        }
   
        $map-preparequery();
    $map-scaledenom;//returns -1          
        
        $rayonLayer = $map-getLayerByName(rayon);    
        $rayonLayer-set(data,geom from (select id, name, geom from location
        where ST_Intersects(geom, !BOX!)) as subquery using unique id using 
srid=3857);
        
        ms_ioinstallstdouttobuffer();
        $map-owsDispatch($request);        
        
        $contenttype = ms_iostripstdoutbuffercontenttype();
        header('Content-type:'.$contenttype);
        ms_iogetStdoutBufferBytes();
        ms_ioresethandlers(); 


mapfile.map-
   

MAP
    NAME    Map
    OUTPUTFORMAT
    NAME 'AGG'
    DRIVER AGG/PNG
    IMAGEMODE RGB
    END #OUTPUTFORMAT
    STATUS        ON
    FONTSET    fonts/fonts.list    
    CONFIG    PROJ_LIB /usr/lib/proj/
    WEB         
        METADATA
            wms_title    Map
            wms_abstract    Map
            wms_onlineresource     http://localhost/phpscript.php 
            wms_srs    EPSG:3857    
            wms_enable_request        *
            wms_encoding    utf-8
        END # end METADATA        
    END # end WEB    
    PROJECTION
        init=epsg:3857
    END # end PROJECTION    
    LAYER
        NAME    rayon            
        STATUS        ON
        CONNECTIONTYPE    postgis
        CONNECTION    user=ms_viewer password=1 dbname=ms_db host=localhost  
      
        TYPE    POLYGON
        LABELITEM    name
        CLASS 
            NAME    rayons            
                STYLE
                    OUTLINECOLOR    255 0 0

Re: [mapserver-users] Why $map-scaledenom returns -1 ?

2014-06-17 Thread Vladimir
 Hello Steve.
Thank you very much for the thought.
I use OpenLayers 3 on client side whose query string contains: 
WIDTH=2025HEIGHT=1125BBOX=5252151,2C3515519,11856310613,7184496 

and futher scaledenom is computed:
$extentArray=explode(',',$_GET['BBOX']);
$minX=$extentArray[0];
$minY=$extentArray[1];
$maxX=$extentArray[2];
$maxY=$extentArray[3];
$width=(int)$_GET['WIDTH'];
$height=(int)$_GET['HEIGHT'];
$map-setExtent($minX,$minY,$maxX,$maxY);
$map-setSize($width,$height);
$map-preparequery();
$scale=$map-scaledenom;
It works for me, but I am not sure that is standard method.
Can this be used?
Best regards
Vladimir

16  2014, 15:43 UTC от Lime, Steve D (MNIT) steve.l...@state.mn.us:
Scale can only be computed if there is a map extent and map size set. Are you 
doing so?
 
Steve
 
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of  Vladimir
Sent: Monday, June 16, 2014 1:12 AM
To: mapserver-users
Subject: [mapserver-users] Why $map-scaledenom returns -1 ?
 
Hello list

I stuck on the scaledenom definition in my PHPMapScript v. 6.4.1.
The current scaledenom  required to embed in SQL-statement, but   
$map-scaledenom returns -1. Tons of googling got nothing. Please help!

 phpscript.php 
-
 
    $map = ms_newMapobj(/srv/www/htdocs/tez/design/mapfile.map);        
        $request = ms_newOwsrequestObj();
        if(!empty($_GET)){
            foreach ($_GET as $key = $value) {
            $request-setparameter($key, $value);
            }
        }
   
        $map-preparequery();
    $map-scaledenom;//returns -1          
        
        $rayonLayer = $map-getLayerByName(rayon);    
        $rayonLayer-set(data,geom from (select id, name, geom from location
        where ST_Intersects(geom, !BOX!)) as subquery using unique id using 
srid=3857);
        
        ms_ioinstallstdouttobuffer();
        $map-owsDispatch($request);        
        
        $contenttype = ms_iostripstdoutbuffercontenttype();
        header('Content-type:'.$contenttype);
        ms_iogetStdoutBufferBytes();
        ms_ioresethandlers(); 


mapfile.map-
   

MAP
    NAME    Map
    OUTPUTFORMAT
    NAME 'AGG'
    DRIVER AGG/PNG
    IMAGEMODE RGB
    END #OUTPUTFORMAT
    STATUS        ON
    FONTSET    fonts/fonts.list    
    CONFIG    PROJ_LIB /usr/lib/proj/
    WEB         
        METADATA
            wms_title    Map
            wms_abstract    Map
            wms_onlineresource     http://localhost/phpscript.php 
            wms_srs    EPSG:3857    
            wms_enable_request        *
            wms_encoding    utf-8
        END # end METADATA        
    END # end WEB    
    PROJECTION
        init=epsg:3857
    END # end PROJECTION    
    LAYER
        NAME    rayon            
        STATUS        ON
        CONNECTIONTYPE    postgis
        CONNECTION    user=ms_viewer password=1 dbname=ms_db host=localhost  
      
        TYPE    POLYGON
        LABELITEM    name
        CLASS 
            NAME    rayons            
                STYLE
                    OUTLINECOLOR    255 0 0
                    OUTLINEWIDTH    5
                END # end STYLE
        END # end CLASS
        PROJECTION
            init=epsg:3857
        END # end PROJECTION
        METADATA
            wms_title    rayon
            wms_abstract    rayon            
            wms_srs    EPSG:3857
            wms_include_items    all
        END # end METADATA
    END # end LAYER    
END # end MAP
-

Best regards

-- 
Vladimir

--

-- 
Владимир
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Why $map-scaledenom returns -1 ?

2014-06-16 Thread Vladimir
 Hello list

I stuck on the scaledenom definition in my PHPMapScript v. 6.4.1.
The current scaledenom  required to embed in SQL-statement, but   
$map-scaledenom returns -1. Tons of googling got nothing. Please help!

 phpscript.php 
-
 
 
    $map = ms_newMapobj(/srv/www/htdocs/tez/design/mapfile.map);        
        $request = ms_newOwsrequestObj();
        if(!empty($_GET)){
            foreach ($_GET as $key = $value) {
            $request-setparameter($key, $value);
            }
        }
   
        $map-preparequery();
    $map-scaledenom;//returns -1          
        
        $rayonLayer = $map-getLayerByName(rayon);    
        $rayonLayer-set(data,geom from (select id, name, geom from location
        where ST_Intersects(geom, !BOX!)) as subquery using unique id using 
srid=3857);
        
        ms_ioinstallstdouttobuffer();
        $map-owsDispatch($request);        
        
        $contenttype = ms_iostripstdoutbuffercontenttype();
        header('Content-type:'.$contenttype);
        ms_iogetStdoutBufferBytes();
        ms_ioresethandlers(); 


mapfile.map-
    

MAP
    NAME    Map
    OUTPUTFORMAT
    NAME 'AGG'
    DRIVER AGG/PNG
    IMAGEMODE RGB
    END #OUTPUTFORMAT
    STATUS        ON
    FONTSET    fonts/fonts.list    
    CONFIG    PROJ_LIB /usr/lib/proj/
    WEB         
        METADATA
            wms_title    Map
            wms_abstract    Map
            wms_onlineresource    http://localhost/phpscript.php;
            wms_srs    EPSG:3857    
            wms_enable_request        *
            wms_encoding    utf-8
        END # end METADATA        
    END # end WEB    
    PROJECTION
        init=epsg:3857
    END # end PROJECTION    
    LAYER
        NAME    rayon            
        STATUS        ON
        CONNECTIONTYPE    postgis
        CONNECTION    user=ms_viewer password=1 dbname=ms_db host=localhost   
     
        TYPE    POLYGON
        LABELITEM    name
        CLASS 
            NAME    rayons            
                STYLE
                    OUTLINECOLOR    255 0 0
                    OUTLINEWIDTH    5
                END # end STYLE
        END # end CLASS
        PROJECTION
            init=epsg:3857
        END # end PROJECTION
        METADATA
            wms_title    rayon
            wms_abstract    rayon            
            wms_srs    EPSG:3857
            wms_include_items    all
        END # end METADATA
    END # end LAYER    
END # end MAP
-

Best regards

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

[mapserver-users] Styling labels in SLD

2014-06-10 Thread Vladimir

Hello All
There is full control of labels in mapfile, but TextSymbolizer offers simple 
facilities for styling them. 
Is it possible to define 
MAXSCALEDENOM,
MINSCALEDENOM, 
MINSIZE, 
MAXSIZE,
REPEATDISTANCE, 
MINDISTANCE, 
BUFFER 
parameters for labels in SLD document?

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

Re: [mapserver-users] RESOLVED php mapscript setFilter and signal Segmentation fault (11)

2014-02-17 Thread Vladimir
 Hello All. 
Apparently the mix of distros caused the segfault error. 
I installed Mapscript from openSuse repository instead
Mapserver from official site. 


Пятница, 14 февраля 2014, 14:33 +04:00 от Vladimir f...@inbox.ru:
Hello dear developers. 
Please could you give some direction for decision segfault problem. I tried  
execute php-script only without mapfile: 

$map=ms_newMapObjFromString(MAP NAME    \WMSRoadrs\  STATUS ON    CONFIG    
\PROJ_LIB\ \/usr/lib/proj/\    END);
$map-setMetaData(wms_title,Roadrs);
$map-setMetaData(wms_onlineresource, http://localhost/msscript.php );
$map-setMetaData(wms_srs,EPSG:3857);
$map-setMetaData(wms_enable_request,*);
$map-setMetaData(wms_encoding,utf-8);
...
and result of  first call $map-setMetaData  is ignal Segmentation fault 
(11) immediately as in my post above

Configuration: openSuse 13.1 Mapserver 6.4.1 php 5.4.3

Many Thanks.


Четверг, 13 февраля 2014, 15:08 +04:00 от Vladimir f...@inbox.ru:

Hello All. Please help me to understand what's wrong.

php mapscript version 6.4.1

request url:
localhost/script.php?LAYERS=roadsSRS=EPSG%3A3857SERVICE=WMSVERSION=1.1.1REQUEST=GetMapFORMAT=image%2FpngBBOX=8562963.8568664,5347815.0968664,8567741.1711336,5352592.4111336WIDTH=500HEIGHT=500

works in mapfile.map:
FILTER (id  in (386,400))
but
does not work in script.php:
$roadsLayer-setFilter(id  in (386,400));
at that no other errors except the string in apache log:
[Thu Feb 13 16:03:33.931054 2014] [core:notice] [pid 716] AH00052: child pid 
2626 exit signal Segmentation fault (11)


mapfile.map:
---
MAP
    NAME    WMSRoadrs
    CONFIG    PROJ_LIB /usr/lib/proj/
    STATUS        ON
    WEB         
        METADATA
            wms_title    Roadrs
            wms_abstract    Roadrs
            wms_onlineresource     http://localhost/msscr/script.php 
            wms_srs    EPSG:3857    
            wms_enable_request        *
            wms_encoding    utf-8
        END # end METADATA        
    END # end WEB    
    PROJECTION
        init=epsg:3857
    END # end PROJECTION
    LAYER
        NAME    roads    
        STATUS        ON
        CONNECTIONTYPE    postgis
        CONNECTION    user=user password=1 dbname=db host=localhost
        DATA    coor from tab using unique id using srid=3857

       FILTER (id  in (386,400))#---works

        TYPE    LINE        
        CLASS 
            NAME    дороги            
                STYLE
                    COLOR    255 255 255
                    WIDTH    10
                    OUTLINECOLOR    0 0 255 
                    OUTLINEWIDTH    1
                END # end STYLE                
        END # end CLASS
        PROJECTION
            init=epsg:3857
        END # end PROJECTION
        METADATA
            wms_title    Demo1
            wms_abstract    Roads Demo1            
            wms_srs    EPSG:3857
            wms_include_items    all
        END # end METADATA
    END # end LAYER
END # end MAP
---

script.php:

ini_set('display_errors', E_ALL); 
error_reporting(E_ALL);
$request = ms_newOwsrequestObj();
if(!empty($_GET)){
    foreach ($_GET as $key = $value) {
    $request-setparameter($key, $value);
    }
}
ms_ioinstallstdouttobuffer();
$map = ms_newMapobj(mapfile.map);
$roadsLayer = $map-getLayerByName(roads);

$roadsLayer-setFilter(id  in (386,400));//---does not work

$map-owsDispatch($request);
$contenttype = ms_iostripstdoutbuffercontenttype();
header('Content-type:'.$contenttype);
ms_iogetStdoutBufferBytes();
ms_ioresethandlers();


-- 
Thanks ___
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] php mapscript setFilter and signal Segmentation fault (11)

2014-02-14 Thread Vladimir
 Hello dear developers. 
Please could you give some direction for decision segfault problem. I tried  
execute php-script only without mapfile: 

$map=ms_newMapObjFromString(MAP NAME    \WMSRoadrs\  STATUS ON    CONFIG    
\PROJ_LIB\ \/usr/lib/proj/\    END);
$map-setMetaData(wms_title,Roadrs);
$map-setMetaData(wms_onlineresource, http://localhost/msscript.php );
$map-setMetaData(wms_srs,EPSG:3857);
$map-setMetaData(wms_enable_request,*);
$map-setMetaData(wms_encoding,utf-8);
...
and result of  first call $map-setMetaData  is ignal Segmentation fault (11) 
immediately as in my post above

Configuration: openSuse 13.1 Mapserver 6.4.1 php 5.4.3

Many Thanks.


Четверг, 13 февраля 2014, 15:08 +04:00 от Vladimir f...@inbox.ru:

Hello All. Please help me to understand what's wrong.

php mapscript version 6.4.1

request url:
localhost/script.php?LAYERS=roadsSRS=EPSG%3A3857SERVICE=WMSVERSION=1.1.1REQUEST=GetMapFORMAT=image%2FpngBBOX=8562963.8568664,5347815.0968664,8567741.1711336,5352592.4111336WIDTH=500HEIGHT=500

works in mapfile.map:
FILTER (id  in (386,400))
but
does not work in script.php:
$roadsLayer-setFilter(id  in (386,400));
at that no other errors except the string in apache log:
[Thu Feb 13 16:03:33.931054 2014] [core:notice] [pid 716] AH00052: child pid 
2626 exit signal Segmentation fault (11)


mapfile.map:
---
MAP
    NAME    WMSRoadrs
    CONFIG    PROJ_LIB /usr/lib/proj/
    STATUS        ON
    WEB         
        METADATA
            wms_title    Roadrs
            wms_abstract    Roadrs
            wms_onlineresource     http://localhost/msscr/script.php 
            wms_srs    EPSG:3857    
            wms_enable_request        *
            wms_encoding    utf-8
        END # end METADATA        
    END # end WEB    
    PROJECTION
        init=epsg:3857
    END # end PROJECTION
    LAYER
        NAME    roads    
        STATUS        ON
        CONNECTIONTYPE    postgis
        CONNECTION    user=user password=1 dbname=db host=localhost
        DATA    coor from tab using unique id using srid=3857

       FILTER (id  in (386,400))#---works

        TYPE    LINE        
        CLASS 
            NAME    дороги            
                STYLE
                    COLOR    255 255 255
                    WIDTH    10
                    OUTLINECOLOR    0 0 255 
                    OUTLINEWIDTH    1
                END # end STYLE                
        END # end CLASS
        PROJECTION
            init=epsg:3857
        END # end PROJECTION
        METADATA
            wms_title    Demo1
            wms_abstract    Roads Demo1            
            wms_srs    EPSG:3857
            wms_include_items    all
        END # end METADATA
    END # end LAYER
END # end MAP
---

script.php:

ini_set('display_errors', E_ALL); 
error_reporting(E_ALL);
$request = ms_newOwsrequestObj();
if(!empty($_GET)){
    foreach ($_GET as $key = $value) {
    $request-setparameter($key, $value);
    }
}
ms_ioinstallstdouttobuffer();
$map = ms_newMapobj(mapfile.map);
$roadsLayer = $map-getLayerByName(roads);

$roadsLayer-setFilter(id  in (386,400));//---does not work

$map-owsDispatch($request);
$contenttype = ms_iostripstdoutbuffercontenttype();
header('Content-type:'.$contenttype);
ms_iogetStdoutBufferBytes();
ms_ioresethandlers();


-- 
Thanks ___
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] php mapscript setFilter and signal Segmentation fault (11)

2014-02-13 Thread Vladimir


Hello All. Please help me to understand what's wrong.

php mapscript version 6.4.1

request url:
localhost/script.php?LAYERS=roadsSRS=EPSG%3A3857SERVICE=WMSVERSION=1.1.1REQUEST=GetMapFORMAT=image%2FpngBBOX=8562963.8568664,5347815.0968664,8567741.1711336,5352592.4111336WIDTH=500HEIGHT=500

works in mapfile.map:
FILTER (id  in (386,400))
but
does not work in script.php:
$roadsLayer-setFilter(id  in (386,400));
at that no other errors except the string in apache log:
[Thu Feb 13 16:03:33.931054 2014] [core:notice] [pid 716] AH00052: child pid 
2626 exit signal Segmentation fault (11)


mapfile.map:
---
MAP
    NAME    WMSRoadrs
    CONFIG    PROJ_LIB /usr/lib/proj/
    STATUS        ON
    WEB         
        METADATA
            wms_title    Roadrs
            wms_abstract    Roadrs
            wms_onlineresource    http://localhost/msscr/script.php;
            wms_srs    EPSG:3857    
            wms_enable_request        *
            wms_encoding    utf-8
        END # end METADATA        
    END # end WEB    
    PROJECTION
        init=epsg:3857
    END # end PROJECTION
    LAYER
        NAME    roads    
        STATUS        ON
        CONNECTIONTYPE    postgis
        CONNECTION    user=user password=1 dbname=db host=localhost
        DATA    coor from tab using unique id using srid=3857

       FILTER (id  in (386,400))#---works

        TYPE    LINE        
        CLASS 
            NAME    дороги            
                STYLE
                    COLOR    255 255 255
                    WIDTH    10
                    OUTLINECOLOR    0 0 255 
                    OUTLINEWIDTH    1
                END # end STYLE                
        END # end CLASS
        PROJECTION
            init=epsg:3857
        END # end PROJECTION
        METADATA
            wms_title    Demo1
            wms_abstract    Roads Demo1            
            wms_srs    EPSG:3857
            wms_include_items    all
        END # end METADATA
    END # end LAYER
END # end MAP
---

script.php:

ini_set('display_errors', E_ALL); 
error_reporting(E_ALL);
$request = ms_newOwsrequestObj();
if(!empty($_GET)){
    foreach ($_GET as $key = $value) {
    $request-setparameter($key, $value);
    }
}
ms_ioinstallstdouttobuffer();
$map = ms_newMapobj(mapfile.map);
$roadsLayer = $map-getLayerByName(roads);

$roadsLayer-setFilter(id  in (386,400));//---does not work

$map-owsDispatch($request);
$contenttype = ms_iostripstdoutbuffercontenttype();
header('Content-type:'.$contenttype);
ms_iogetStdoutBufferBytes();
ms_ioresethandlers();


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

Re: [mapserver-users] Different SIZEUNITS for line width and label fontsize

2009-02-03 Thread Vladimir Cvejanovic

Hi Thomas,

Thanks for elaborating on that, I was under the false impression that 
MINSIZE worked similar to MINSCALE in that it defined minimum criteria 
for the class to be applied.


Will try this now. Thanks again!
Vladimir

thomas bonfort wrote:

Hi again,

using:
size 8
minsize 8
maxsize 8

is *exactly* the same as using only size 8 with pixel sizeunits
i.e. this effectively prevents the labels scaling at all

regards,
thomas

On Tue, Feb 3, 2009 at 12:41, Vladimir Cvejanovic
vladi...@gessolutions.com wrote:
  

Hi Thomas,

Thanks for your reply. I have already plaid around with MINSIZE and MAXSIZE.
They are a good way to avoid the labels being displayed when they are too
small to read. Also coupled with MINSCALE and MAXSCALE class definitions I
was able to set up three classes for large, medium and small text depending
on the scale used.

This isn't a bad solution at all but I wanted to see if there is away to
prevent the labels scaling at all within the same layer definition as the
scalable (real-world sized) lines.

Thanks,
Vladimir


thomas bonfort wrote:


hi,
you can use minsize and maxsize in your label: these are always pixels:

size 8
minszie 8
maxsize 8

regards,
thomas

On Tue, Feb 3, 2009 at 12:17, Vladimir Cvejanovic
vladi...@gessolutions.com wrote:

  

Hi All,

In the Mapfile, Is it possible to have different SIZEUNTIS for line width
and label font in the same layer? The example is below.

I have managed to solve this by defining two layers one which only
displays
the line and one which only displays the labels however this seems like a
hack and very inefficient from a processing / querying point of view.

The context is a line layer containing road lines which have a width in
meters but labels in pixels. This would make things scale nicely Can this
be
done? Does anyone have a better approach?

Thanks,
Vladimir

LAYER
 NAME 'highway'
 TYPE LINE
 DATA 'highway.shp'

 STATUS DEFAULT
 TRANSPARENCY 30

 LABELITEM NAME
 SIZEUNITS meters

 CLASS
NAME 'highway'
STYLE
  WIDTH 5 #WANT THESE TO BE METERS
  COLOR 55 55 55
END
LABEL
 TYPE TRUETYPE
 FONT FreeSans
 SIZE 08 # WANT THESE TO BE PIXELS
 COLOR 0 0 0
 OUTLINECOLOR 255 255 255
 ANTIALIAS TRUE
 ANGLE AUTO
 MINFEATURESIZE AUTO
 FORCE true
   END
 END
 END
___
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] Different SIZEUNITS for line width and label fontsize

2009-02-03 Thread Vladimir Cvejanovic

Hi Thomas,

Thanks for your reply. I have already plaid around with MINSIZE and 
MAXSIZE. They are a good way to avoid the labels being displayed when 
they are too small to read. Also coupled with MINSCALE and MAXSCALE 
class definitions I was able to set up three classes for large, medium 
and small text depending on the scale used.


This isn't a bad solution at all but I wanted to see if there is away to 
prevent the labels scaling at all within the same layer definition as 
the scalable (real-world sized) lines.


Thanks,
Vladimir


thomas bonfort wrote:

hi,
you can use minsize and maxsize in your label: these are always pixels:

size 8
minszie 8
maxsize 8

regards,
thomas

On Tue, Feb 3, 2009 at 12:17, Vladimir Cvejanovic
vladi...@gessolutions.com wrote:
  

Hi All,

In the Mapfile, Is it possible to have different SIZEUNTIS for line width
and label font in the same layer? The example is below.

I have managed to solve this by defining two layers one which only displays
the line and one which only displays the labels however this seems like a
hack and very inefficient from a processing / querying point of view.

The context is a line layer containing road lines which have a width in
meters but labels in pixels. This would make things scale nicely Can this be
done? Does anyone have a better approach?

Thanks,
Vladimir

LAYER
  NAME 'highway'
  TYPE LINE
  DATA 'highway.shp'

  STATUS DEFAULT
  TRANSPARENCY 30

  LABELITEM NAME
  SIZEUNITS meters

  CLASS
 NAME 'highway'
 STYLE
   WIDTH 5 #WANT THESE TO BE METERS
   COLOR 55 55 55
 END
 LABEL
  TYPE TRUETYPE
  FONT FreeSans
  SIZE 08 # WANT THESE TO BE PIXELS
  COLOR 0 0 0
  OUTLINECOLOR 255 255 255
  ANTIALIAS TRUE
  ANGLE AUTO
  MINFEATURESIZE AUTO
  FORCE true
END
  END
 END
___
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] P.MAPPER 4.0 overrides rendering setting in map file?

2009-02-02 Thread Vladimir Cvejanovic

Hi Everyone,

I've joined the list to see if anyone else has encountered the following 
issue and can shed some light on how to resolve it.


I'm not getting any anti-aliasing in AGG rendered images when accessing 
the map through pmapper. The weird thing is that rendering the same 
mapfile using mapserver CGI does produce anti-aliased output:


CGI Example:
localhost/cgi-bin/mapserv?map=/var/www/pmapper-4.0-beta/config/default/example-proj.maplayer=polyshapemode=map

My suspicion is that the output I'm seeing in pmapper isn't actually 
rendered using AGG as instructed by the mapfile but is defaulting to GD. 
I haven't been able to confirm this suspicion because even with debug 
cranked up to 5 I can't seem to generate any debug info regarding the 
rendering engine.


My second suspicion is that I may be missing a crucial pmapper specific 
config param in either the mapfile or the pmapper config file 
(config_default.xml in 4.0-beta). I'm not able to find docs for v4.


OS: Ubuntu Intrepid (ssame behaviour confirmed on Debian Lenny)
PMAPPER v4.0-beta
HTTPD: Apache2
Mapserver 5.0.3
Mapscript for php5
Mapfile - included below

I would be very grateful for any help this list can offer!

Regards,
Vladimir

MAP
EXTENT  -1.212047 -0.966758 0.610465 0.446515
UNITS dd
SIZE 600 500
SHAPEPATH /var/www/example-proj
IMAGETYPE agg_png
RESOLUTION 96

DEBUG 5
CONFIG MS_ERRORFILE /var/log/php/ms-error.log


#
# Image formats for AGG
#
OUTPUTFORMAT   ### 24 bit PNG
 NAME 'agg_png'
 DRIVER AGG/PNG
 IMAGEMODE RGB
 MIMETYPE image/png
 TRANSPARENT OFF
 EXTENSION png
END

#
# Start of web interface definition
#
WEB
 TEMPLATE map.html
 IMAGEPATH /var/www/tmp/
 IMAGEURL /tmp/
 LOG /var/log/php/ms.log
END  # Web

#
# Start of Reference map definition
#
REFERENCE
 EXTENT -1.212047 -0.966758 0.610465 0.446515
 IMAGE ../../images/reference.png
 SIZE 199 149
 COLOR -1 -1 -1
 OUTLINECOLOR 255 0 0
END  # Reference

#== START OF LAYER SECTION =#

LAYER
 NAME polyshape
 TYPE line
 DATA polyshape
 CLASS
   STYLE
 WIDTH 10
 COLOR 255 155 155
   END
 END  # Class
END  # Layer

END  #Map


Pmapper Ini
pmapper
   ini
   pmapper
   pmTitlep.mapper - A MapServer PHP/MapScript 
Framework/pmTitle

   debugLevel3/debugLevel
   /pmapper
   config
   pm_config_locationdefault/pm_config_location
   pm_javascript_locationjavascript/pm_javascript_location
   pm_print_configfilecommon/print.xml/pm_print_configfile
   pm_search_configfileinline/pm_search_configfile
   /config
   map
   mapFileexample-proj.map/mapFile
   categories
   category name=cat_all
   grouppolyshape/group
   /category
   /categories
   allGroups
   grouppolyshape/group
   /allGroups
   defGroups
   grouppolyshape/group
   /defGroups
   layerAutoRefresh1/layerAutoRefresh
   imgFormatpng/imgFormat
   sliderMaxmax/sliderMax
   sliderMin10/sliderMin
   /map
   ui
   tocStyletree/tocStyle
   legendStyleattached/legendStyle
   useCategories0/useCategories
   catWithCheckbox0/catWithCheckbox
   scaleLayers1/scaleLayers
   icoW18/icoW
   icoH14/icoH
   /ui
   locale
   defaultLanguageen/defaultLanguage
   defaultCharsetUTF-8/defaultCharset
   map2unicode1/map2unicode
   /locale
   /ini
/pmapper

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


Re: [mapserver-users] P.MAPPER 4.0 overrides rendering setting in map file?

2009-02-02 Thread Vladimir Cvejanovic

Hi Again,

Just solved this.

Yes, pmapper does override the mapfile imagetype directive using it's 
own imgFormat parameter in config_default.xml. This needs to be set to 
the desired outputformat name and everyhitng appears to work fine.


Example:

map
...
imgFormatagg_png/imgFormat
...
/map

Cheers,
Vladimir



Vladimir Cvejanovic wrote:

Hi Everyone,

I've joined the list to see if anyone else has encountered the 
following issue and can shed some light on how to resolve it.


I'm not getting any anti-aliasing in AGG rendered images when 
accessing the map through pmapper. The weird thing is that rendering 
the same mapfile using mapserver CGI does produce anti-aliased output:


CGI Example:
localhost/cgi-bin/mapserv?map=/var/www/pmapper-4.0-beta/config/default/example-proj.maplayer=polyshapemode=map 



My suspicion is that the output I'm seeing in pmapper isn't actually 
rendered using AGG as instructed by the mapfile but is defaulting to 
GD. I haven't been able to confirm this suspicion because even with 
debug cranked up to 5 I can't seem to generate any debug info 
regarding the rendering engine.


My second suspicion is that I may be missing a crucial pmapper 
specific config param in either the mapfile or the pmapper config file 
(config_default.xml in 4.0-beta). I'm not able to find docs for v4.


OS: Ubuntu Intrepid (ssame behaviour confirmed on Debian Lenny)
PMAPPER v4.0-beta
HTTPD: Apache2
Mapserver 5.0.3
Mapscript for php5
Mapfile - included below

I would be very grateful for any help this list can offer!

Regards,
Vladimir

MAP
EXTENT  -1.212047 -0.966758 0.610465 0.446515
UNITS dd
SIZE 600 500
SHAPEPATH /var/www/example-proj
IMAGETYPE agg_png
RESOLUTION 96

DEBUG 5
CONFIG MS_ERRORFILE /var/log/php/ms-error.log


#
# Image formats for AGG
#
OUTPUTFORMAT   ### 24 bit PNG
 NAME 'agg_png'
 DRIVER AGG/PNG
 IMAGEMODE RGB
 MIMETYPE image/png
 TRANSPARENT OFF
 EXTENSION png
END

#
# Start of web interface definition
#
WEB
 TEMPLATE map.html
 IMAGEPATH /var/www/tmp/
 IMAGEURL /tmp/
 LOG /var/log/php/ms.log
END  # Web

#
# Start of Reference map definition
#
REFERENCE
 EXTENT -1.212047 -0.966758 0.610465 0.446515
 IMAGE ../../images/reference.png
 SIZE 199 149
 COLOR -1 -1 -1
 OUTLINECOLOR 255 0 0
END  # Reference

#== START OF LAYER SECTION =#

LAYER
 NAME polyshape
 TYPE line
 DATA polyshape
 CLASS
   STYLE
 WIDTH 10
 COLOR 255 155 155
   END
 END  # Class
END  # Layer

END  #Map


Pmapper Ini
pmapper
   ini
   pmapper
   pmTitlep.mapper - A MapServer PHP/MapScript 
Framework/pmTitle

   debugLevel3/debugLevel
   /pmapper
   config
   pm_config_locationdefault/pm_config_location
   pm_javascript_locationjavascript/pm_javascript_location
   pm_print_configfilecommon/print.xml/pm_print_configfile
   pm_search_configfileinline/pm_search_configfile
   /config
   map
   mapFileexample-proj.map/mapFile
   categories
   category name=cat_all
   grouppolyshape/group
   /category
   /categories
   allGroups
   grouppolyshape/group
   /allGroups
   defGroups
   grouppolyshape/group
   /defGroups
   layerAutoRefresh1/layerAutoRefresh
   imgFormatpng/imgFormat
   sliderMaxmax/sliderMax
   sliderMin10/sliderMin
   /map
   ui
   tocStyletree/tocStyle
   legendStyleattached/legendStyle
   useCategories0/useCategories
   catWithCheckbox0/catWithCheckbox
   scaleLayers1/scaleLayers
   icoW18/icoW
   icoH14/icoH
   /ui
   locale
   defaultLanguageen/defaultLanguage
   defaultCharsetUTF-8/defaultCharset
   map2unicode1/map2unicode
   /locale
   /ini
/pmapper

___
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