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 Rahkonen Jukka (MML)
Hi,

With OSM and Mapnik it is a two phase process. First osm2pgsql tries to 
generate sensible z-index values and then Mapnik makes “order by” queries to 
the database. The queries are here 
https://github.com/gravitystorm/openstreetmap-carto/blob/master/project.yaml 
and as an example

(SELECT way,
COALESCE((
'highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 
'pedestrian', 'service', 'footway', 'cycleway', 'track', 'path', 'platform') 
THEN highway ELSE NULL END)),
('railway_' || (CASE WHEN railway IN ('platform') THEN railway ELSE NULL END))
) AS feature
FROM planet_osm_polygon
WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 
'footway', 'track', 'path', 'platform')
OR railway IN ('platform')
ORDER BY z_order, way_area DESC
) AS highway_area_casing

-Jukka Rahkonen-


Vladimir wrote:


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] 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] 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 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] mapserver 7 wfs_encoding

2015-02-13 Thread thomas bonfort
http://mapserver.org/development/rfc/ms-rfc-103.html

--
thomas

On 13 February 2015 at 10:17,  steve.tout...@inspq.qc.ca wrote:
 Congratulations for the huge  improve performance for WFS filtering with
 postgis and oracle...


 Mapserver 7 doesn't use wfs_encoding specified in the mapfile anymore, I see
 anything in the changelog about that.

 Is there something change?
 ___
 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: 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] [EXTERNAL] Re: the lines one above other

2015-02-13 Thread thomas bonfort
You can do it in a single layer, provided that you have someway of
determining via attributes that a given road segment isn't connected
to other road segments below it (typically that would be something
saying it's a bridge rather than a regular road). The behavior is
undocumented and relies on the knowledge of how mapserver treats the
line cache for casing.

CLASS
  EXPRESSION ([type]=bridge)
  STYLE
  END
  STYLE
WIDTH 5
COLOR bridge_outline_color
LINECAP butt
  END
  STYLE
WIDTH 3
COLOR highway_color
  END
END
CLASS
  STYLE
WIDTH 5
COLOR highway_outline_color
  END
  STYLE
WIDTH 3
COLOR highway_color
  END
END

(The trick is to add an empty style block so the rendering order for
bridges is offset by one compared to normal roads)

In your sql query, you also use an order by z_level asc so higher
roads get drawn after (=over) lower ones.
You might want to take a look at https://github.com/mapserver/basemaps
where this (along with other tricks for dealing with complex road
maps) is used.

--
thomas

On 13 February 2015 at 07:52, Vladimir f...@inbox.ru wrote:
 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
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] mapserver 7 wfs_encoding

2015-02-13 Thread Steve . Toutant
Congratulations for the huge  improve performance for WFS filtering with 
postgis and oracle...


Mapserver 7 doesn't use wfs_encoding specified in the mapfile anymore, I 
see anything in the changelog about that.

Is there something change?___
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 thomas bonfort
Richard,
Allowing for image/gif in requests and GIF outputformats is to allow
existing mapfiles and requests to still be serviced without breaking,
even though the returned format will be png. The gif dependency is
there to allow loading of gif pixmap symbols, as was already the case.

--
thomas

On 12 February 2015 at 22:13, Richard Greenwood
richard.greenw...@gmail.com wrote:
 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
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserver 7 wfs_encoding

2015-02-13 Thread Steve . Toutant
oh!

That means that if our database or datasource is encoded iso-8859-1, we 
need to set ENCODING iso-8859-1 in all our layers, there is no parameter 
at the MAP level right?

And,
Mapfiles themselves will be expected to be UTF8-encoded. Non UTF8-encoded 
mapfiles will need to be iconv?d to utf8.

That means we cannot right any mapfile in iso-8859-1. we need to set our 
IDe to write in utf-8.


Is my understanding correct?





thomas bonfort thomas.bonf...@gmail.com 
2015-02-13 10:21

A
steve.tout...@inspq.qc.ca
cc
MapserverList OSGEO mapserver-users@lists.osgeo.org
Objet
Re: [mapserver-users] mapserver 7 wfs_encoding








http://mapserver.org/development/rfc/ms-rfc-103.html

--
thomas

On 13 February 2015 at 10:17,  steve.tout...@inspq.qc.ca wrote:
 Congratulations for the huge  improve performance for WFS filtering with
 postgis and oracle...


 Mapserver 7 doesn't use wfs_encoding specified in the mapfile anymore, I 
see
 anything in the changelog about that.

 Is there something change?
 ___
 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 7 wfs_encoding

2015-02-13 Thread thomas bonfort
Yes, that is correct. We need to update the migration guide to include this.

On 13 February 2015 at 10:39, steve.tout...@inspq.qc.ca wrote:

 oh!

 That means that if our database or datasource is encoded iso-8859-1, we
 need to set ENCODING iso-8859-1 in all our layers, there is no parameter
 at the MAP level right?

 And,

- Mapfiles themselves will be expected to be UTF8-encoded. Non
UTF8-encoded mapfiles will need to be iconv’d to utf8.


 That means we cannot right any mapfile in iso-8859-1. we need to set our
 IDe to write in utf-8.


 Is my understanding correct?




  *thomas bonfort thomas.bonf...@gmail.com thomas.bonf...@gmail.com*

 2015-02-13 10:21
   A
 steve.tout...@inspq.qc.ca
 cc
 MapserverList OSGEO mapserver-users@lists.osgeo.org
 Objet
 Re: [mapserver-users] mapserver 7 wfs_encoding






 http://mapserver.org/development/rfc/ms-rfc-103.html

 --
 thomas

 On 13 February 2015 at 10:17,  steve.tout...@inspq.qc.ca wrote:
  Congratulations for the huge  improve performance for WFS filtering with
  postgis and oracle...
 
 
  Mapserver 7 doesn't use wfs_encoding specified in the mapfile anymore, I
 see
  anything in the changelog about that.
 
  Is there something change?
  ___
  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] 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