Re: [MAPSERVER-USERS] Fwd: CLOSE_CONNECTION=DEFER - Segmentation fault

2008-03-18 Thread Ivan Mincik
On Tuesday 18 March 2008 02:26, rich.fromm wrote:
 Dave Fuhry wrote:
  Oops, forgot to CC mapserver-users.
 
  -- Forwarded message --
  From: Dave Fuhry [EMAIL PROTECTED]
  Date: Wed, Mar 12, 2008 at 6:33 PM
  Subject: Re: [MAPSERVER-USERS] CLOSE_CONNECTION=DEFER - Segmentation
  fault To: Ivan Mincik [EMAIL PROTECTED]
 
  ...
 
   So essentially, the patch should be modified to remove the ROLLBACKs
   from msPOSTGISLayerGetShape() in a safe way.

 Just to make sure I'm properly interpreting the status of what's getting to
 be a bit of a long thread here...

 You're saying that this patch:
 http://trac.osgeo.org/mapserver/attachment/ticket/2497/ms_postgis_begin_to_
connect.diff from this bug:
 http://trac.osgeo.org/mapserver/ticket/2497
 is not entirely correct and should be modified?
I have applied this patch and it is not properly working when using 
{map,layer}Obj_queryBy{Point,Rect,etc.} functions. This was confirmed by Dave 
Fuhry.

 But this change has not happened yet, I gather?
I don't know about any other patch.


 I assume that if/when there's a new patch, notice will be posted either in
 this mailing list thread or that bug?
Yes. I am looking for the notice here in the mailinglist and to the bug 
thread.

 I ask b/c I build mapserver from source and am currently using that patch,
 and I want to make sure I recompile if that patch changes.
I want to recompile mapserver with the patch which is correctly working with 
{map,layer}Obj_queryBy{Point,Rect,etc.} functions.

So, I think the status of this problem is waiting for the new patch.
Ivan

 Thanks.

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


Re: [mapserver-users] AGG vs. GD: Label placement problems

2008-03-18 Thread thomas bonfort
Yes, that's exactly the problem, as there's a difference of a few
pixels between the size of the label calculated by gd and the size it
actually takes when rendered with agg. I realize now that it can cause
some quite visible problems in the case you show here (labels to the
left), as in that case the few pixels difference can cause the label
to overlap the point symbol. I'll see if I can fix this in the
days/weeks to come so this can be included in 5.2

cheers,
thomas

On Mon, Mar 17, 2008 at 8:25 PM, Daniel Morissette
[EMAIL PROTECTED] wrote:
 Doyon, Jean-Francois wrote:
  
   Labels that are to the left of the point seem to be placed differently ... 
 Look top-right (Les Escoumins, Saint Anne de Port Neuf, etc ...) for an 
 example, though it happens all over the place I think.  Labels to the right 
 of the point however seem ok.
  
   Is this a bug? A design change?  Can anything be done from the mapfiel to 
 mitigate this?
  

  A few days ago, ThomasB wrote on mapserver-dev that in AGG mode, gd is
  still used [...] for the calculation of label sizes (thus some subtle
  discreptancies in label placement, mostly visible if using a label
  backgroundcolor):

  http://lists.osgeo.org/pipermail/mapserver-dev/2008-March/006868.html

  Maybe that's what your running into? Hopefully Thomas will see this and
  comment.

  Daniel
  --
  Daniel Morissette
  http://www.mapgears.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] Rotate labels based on angle defined in attribute field

2008-03-18 Thread Gregor Mosheh

Steven De Vriendt wrote:

  I'd like to rotate my labels based on an angle defined in an attribute field.
  But I don't know if it's possible to do that in mapserver ?


Sure, it's called binding and is all the rage in 5.0  :)

LABEL
  ..blah..
  ANGLE [field]
END

This replaces the old ANGLEITEM keyword from 4.8, so if you're using 4.8 
search the docs for ANGLEITEM.


--
Gregor Mosheh / Greg Allensworth, BS, A+
System Administrator
HostGIS cartographic development  hosting services
http://www.HostGIS.com/

Remember that no one cares if you can back up,
 only if you can restore. - AMANDA
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Rotate labels based on angle defined in attribute field

2008-03-18 Thread Steven De Vriendt
thx !



On Tue, Mar 18, 2008 at 9:50 AM, Gregor Mosheh [EMAIL PROTECTED] wrote:
 Steven De Vriendt wrote:
 I'd like to rotate my labels based on an angle defined in an attribute 
 field.
 But I don't know if it's possible to do that in mapserver ?

  Sure, it's called binding and is all the rage in 5.0  :)

  LABEL
..blah..
ANGLE [field]
  END

  This replaces the old ANGLEITEM keyword from 4.8, so if you're using 4.8
  search the docs for ANGLEITEM.

  --
  Gregor Mosheh / Greg Allensworth, BS, A+
  System Administrator
  HostGIS cartographic development  hosting services
  http://www.HostGIS.com/

  Remember that no one cares if you can back up,
   only if you can restore. - AMANDA

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


Re: [MAPSERVER-USERS] cs2cs problems

2008-03-18 Thread Rahkonen Jukka
Hi Carla,
 
Please remember to use reply to all in order to send your message for the 
mailing list as well.  
 
 I hope I understand this  correctly. So your original data (the shapefile) is 
in epsg:23030? Then you should have in mapfile, in corresponding LAYER section
PROJECTION
init=epsg:23030
END
 
Next, because you are willing to deliver that layer through WMS in epsg:4230, 
it is good to add this to layer METADATA as 
wms_srsEPSG:4230
 
By looking at my old mapfiles wms_srs metadata seems not to be compulsory if 
WMS service will only be used in one output projection which is the same as the 
main MAP projection.  Anyway I believe it would be good habbit to have it.
 
Third, you should give the default output projection in MAP section as
PROJECTION
init=epsg:4230 
END
 
And last calculate the bounding box containing your data in the mapfile 
projection (epsg:4230) and feel in the values as EXTENT of the map object.
 
I try to read your messages once again faithfully and I feel you are giving a 
bit conflicting information. In one place you say you are willing to publish 
your data in ETRS89, wich I believe to mean epsg:4258.  If this is the case 
then insert that value to wms_srs and mapfile projection instead of 4230.  
Why do you play at all with epsg:4230 if your data are not using it, and you 
don't want to any output in that projection either?  Perhaps I have just not 
understood what you are aiming at, but I hope you will have luck with it.
 
-Jukka Rahkonen-
 
 




Lähettäjä: CARLA FERNANDEZ [mailto:[EMAIL PROTECTED] 
Lähetetty: 18. maaliskuuta 2008 11:50
Vastaanottaja: Rahkonen Jukka
Aihe: Re: [MAPSERVER-USERS] cs2cs problems


Thanks four your answer,

I've defined projections in my WMS before without problems. In this 
case I want to change the projection of my WMS (to ETRS89) with the layers in 
ED50, but if I just set the projection of the header's mapfile like ETRS89, and 
I leave the  layers' projections like ED50, it doesn't work :( 


Do you have any idea of how can I use the cs2cs??

Thanks!!






2008/3/17, Rahkonen Jukka [EMAIL PROTECTED]: 

Hi,

I you want to define projections in mapfile then there are two 
alternatives:
either give the espg code:

PROJECTION
  init=epsg:2393
END

or proj4 strings:

PROJECTION
+proj=tmerc +lat_0=0 +lon_0=27 +k=1.00 +x_0=350
+y_0=0 +ellps=intl 
+towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37
+units=m +no_defs
END

But perhaps you are aiming at something else by using cs2cs?

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: [EMAIL PROTECTED] puolesta: cfb
Lähetetty: ma 17.3.2008 15:49
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [MAPSERVER-USERS] cs2cs problems



Hi,

I'm having problems with the projection again. I've got a shape 
in
epsg:23030 (ED50 UTM 30N), but I want to set my service in 
epsg:4230
(ETRS89). I've changed the extent, the wms_boundingbox and the
wms_latlonboundingbox of my header's mapfile to geographic 
coordinates
(epsg:4230 for ED50), and in the projection object (always in 
the header, in
the layer object I leave epsg:23030) I put:

PROJECTION
   'cs2cs +from +init=epsg:4230 +to +proj=4258 +no_defs 
+no_defs +no_defs
+no_defs +ellps=GRS80 +datum=ETRS89 +no_defs +units=m'
END http://www.nabble.com/file/p16092875/epsg epsg

For the second reference system, I've also tried with 
+proj=longlat and
with +init=epsg:4258, but I get always the same error:

msProcessProjection(): Projection library error. projection not 
named

The epsg file of my proj4 is attached (ms4w v. 2.2.7, MapServer 
5.0.2)

Thanks in advance!!


--
View this message in context: 
http://www.nabble.com/cs2cs-problems-tp16092875p16092875.html
Sent from the Mapserver - User mailing list archive at 
Nabble.com http://nabble.com/ .

___

RE: [mapserver-users] AGG vs. GD: Label placement problems

2008-03-18 Thread Doyon, Jean-Francois
Thanks Thomas, that'd be great ... is there a ticket open for this, or
should I open one? (I'd like to track progress on this issue ...)

J.F. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of thomas
bonfort
Sent: March 18, 2008 03:42
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] AGG vs. GD: Label placement problems

Yes, that's exactly the problem, as there's a difference of a few pixels
between the size of the label calculated by gd and the size it actually
takes when rendered with agg. I realize now that it can cause some quite
visible problems in the case you show here (labels to the left), as in
that case the few pixels difference can cause the label to overlap the
point symbol. I'll see if I can fix this in the days/weeks to come so
this can be included in 5.2

cheers,
thomas

On Mon, Mar 17, 2008 at 8:25 PM, Daniel Morissette
[EMAIL PROTECTED] wrote:
 Doyon, Jean-Francois wrote:
  
   Labels that are to the left of the point seem to be placed
differently ... Look top-right (Les Escoumins, Saint Anne de Port
Neuf, etc ...) for an example, though it happens all over the place I
think.  Labels to the right of the point however seem ok.
  
   Is this a bug? A design change?  Can anything be done from the
mapfiel to mitigate this?
  

  A few days ago, ThomasB wrote on mapserver-dev that in AGG mode, gd 
 is  still used [...] for the calculation of label sizes (thus some 
 subtle  discreptancies in label placement, mostly visible if using a 
 label
  backgroundcolor):

  http://lists.osgeo.org/pipermail/mapserver-dev/2008-March/006868.html

  Maybe that's what your running into? Hopefully Thomas will see this 
 and  comment.

  Daniel
  --
  Daniel Morissette
  http://www.mapgears.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
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MAPSERVER-USERS] cs2cs problems

2008-03-18 Thread CARLA FERNANDEZ
Hi Jukka,

Thanks very much for your interest!! and sorry for the conflicting
information...

I explain you, I have all my layers in epsg:23030, and I don't want to
reproject them. However, I want to set my WMS in WGS84-epsg:4326 (not
ETRS89-epsg:4230, sorry), so that I can load my WMS in Google-Earth without
the difference that it has (almost 130 meters) because of the differents
reference systems...It seems like MapServer ignores the projection settings
in the map section!! (because I set WGS84, like GoogleEarth)

And googleing I've read that I can use the cs2cs in the projection object
(map section), but I get this error:
msProcessProjection(): Projection library error. projection not named

I've tried several combinations, but nothing works...

PROJECTION
 #cs2cs +from +proj=utm +zone=30 +ellps=intl +units=m +no_defs no_defs +to
+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs no_defs
 cs2cs +from +init=epsg:23030 +to +init=epsg:4326
 #init=epsg:4326
END



Thanks!!

2008/3/18, Rahkonen Jukka [EMAIL PROTECTED]:

  Hi Carla,

 Please remember to use reply to all in order to send your message for
 the mailing list as well.

  I hope I understand this  correctly. So your original data (the
 shapefile) is in epsg:23030? Then you should have in mapfile, in
 corresponding LAYER section
 PROJECTION
 init=epsg:23030
 END

 Next, because you are willing to deliver that layer through WMS in
 epsg:4230, it is good to add this to layer METADATA as
 wms_srsEPSG:4230

 By looking at my old mapfiles wms_srs metadata seems not to be compulsory
 if WMS service will only be used in one output projection which is the same
 as the main MAP projection.  Anyway I believe it would be good habbit to
 have it.

 Third, you should give the default output projection in MAP section as
 PROJECTION
 init=epsg:4230
 END

 And last calculate the bounding box containing your data in the mapfile
 projection (epsg:4230) and feel in the values as EXTENT of the map object.

 I try to read your messages once again faithfully and I feel you are
 giving a bit conflicting information. In one place you say you are willing
 to publish your data in ETRS89, wich I believe to mean epsg:4258.  If this
 is the case then insert that value to wms_srs and mapfile projection
 instead of 4230.  Why do you play at all with epsg:4230 if your data are not
 using it, and you don't want to any output in that projection either?
 Perhaps I have just not understood what you are aiming at, but I hope you
 will have luck with it.

 -Jukka Rahkonen-



  --
 *Lähettäjä:* CARLA FERNANDEZ [mailto:[EMAIL PROTECTED]
 *Lähetetty:* 18. maaliskuuta 2008 11:50
 *Vastaanottaja:* Rahkonen Jukka
 *Aihe:* Re: [MAPSERVER-USERS] cs2cs problems

 Thanks four your answer,

 I've defined projections in my WMS before without problems. In this case I
 want to change the projection of my WMS (to ETRS89) with the layers in ED50,
 but if I just set the projection of the header's mapfile like ETRS89, and I
 leave the  layers' projections like ED50, it doesn't work :(


 Do you have any idea of how can I use the cs2cs??

 Thanks!!





 2008/3/17, Rahkonen Jukka [EMAIL PROTECTED]:
 
  Hi,
 
  I you want to define projections in mapfile then there are two
  alternatives:
  either give the espg code:
 
  PROJECTION
init=epsg:2393
  END
 
  or proj4 strings:
 
  PROJECTION
  +proj=tmerc +lat_0=0 +lon_0=27 +k=1.00 +x_0=350
  +y_0=0 +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37
  +units=m +no_defs
  END
 
  But perhaps you are aiming at something else by using cs2cs?
 
  -Jukka Rahkonen-
 
  -Alkuperäinen viesti-
  Lähettäjä: [EMAIL PROTECTED] puolesta: cfb
  Lähetetty: ma 17.3.2008 15:49
  Vastaanottaja: mapserver-users@lists.osgeo.org
  Aihe: [MAPSERVER-USERS] cs2cs problems
 
 
 
  Hi,
 
  I'm having problems with the projection again. I've got a shape in
  epsg:23030 (ED50 UTM 30N), but I want to set my service in epsg:4230
  (ETRS89). I've changed the extent, the wms_boundingbox and the
  wms_latlonboundingbox of my header's mapfile to geographic coordinates
  (epsg:4230 for ED50), and in the projection object (always in the
  header, in
  the layer object I leave epsg:23030) I put:
 
  PROJECTION
 'cs2cs +from +init=epsg:4230 +to +proj=4258 +no_defs +no_defs
  +no_defs
  +no_defs +ellps=GRS80 +datum=ETRS89 +no_defs +units=m'
  END http://www.nabble.com/file/p16092875/epsg epsg
 
  For the second reference system, I've also tried with +proj=longlat
  and
  with +init=epsg:4258, but I get always the same error:
 
  msProcessProjection(): Projection library error. projection not named
 
  The epsg file of my proj4 is attached (ms4w v. 2.2.7, MapServer 5.0.2)
 
  Thanks in advance!!
 
 
  --
  View this message in context:
  http://www.nabble.com/cs2cs-problems-tp16092875p16092875.html
  Sent from the Mapserver - User mailing list archive at 
  Nabble.comhttp://nabble.com/
  .
 
  

Re: [MAPSERVER-USERS] cs2cs problems

2008-03-18 Thread Rahkonen Jukka
Hi,
 
I feel we are getting closer to common understandment.  First, for my mind you 
exactly _do_ want to reproject your data, even if just on-the-fly from 
epsg:23030 to epsg:4326.  I do not know what projection you need to use with 
Google Earth but let's hope that epsg:4326 is correct.
 
Mapserver is doing re-projection for you if you first tell it in LAYER the 
original projection of the data, and in the MAP level the output projection.  
Now I suppose your LAYER is ok if you have set the projection to 
+init=epsg:23030.
 
I have never heard about using cs2cs for setting Mapserver projection but it 
does not prove that it is not possible.  The methods I have used are using epsg 
code likeinit=epsg:4230  or proj4-strings. The usage of the projection 
strings is explained here:
http://mapserver.gis.umn.edu/docs/reference/mapfile/projection
Another document to look through is:
http://mapserver.gis.umn.edu/docs/howto/wms_server
 
I have to say that it was not very easy to find a document describing promptly 
how to use Proj4 strings in mapfile, even that possibility is often mentioned 
in discussions.
 
-Jukka-
 
 

 




Lähettäjä: CARLA FERNANDEZ [mailto:[EMAIL PROTECTED] 
Lähetetty: 18. maaliskuuta 2008 14:15
Vastaanottaja: Rahkonen Jukka
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [MAPSERVER-USERS] cs2cs problems


Hi Jukka,

Thanks very much for your interest!! and sorry for the conflicting 
information...

I explain you, I have all my layers in epsg:23030, and I don't want to 
reproject them. However, I want to set my WMS in WGS84-epsg:4326 (not 
ETRS89-epsg:4230, sorry), so that I can load my WMS in Google-Earth without the 
difference that it has (almost 130 meters) because of the differents reference 
systems...It seems like MapServer ignores the projection settings in the map 
section!! (because I set WGS84, like GoogleEarth)

And googleing I've read that I can use the cs2cs in the projection 
object (map section), but I get this error:
msProcessProjection(): Projection library error. projection not named

I've tried several combinations, but nothing works...

PROJECTION
 #cs2cs +from +proj=utm +zone=30 +ellps=intl +units=m +no_defs no_defs 
+to +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs no_defs
 cs2cs +from +init=epsg:23030 +to +init=epsg:4326
 #init=epsg:4326   
END 



Thanks!!


2008/3/18, Rahkonen Jukka [EMAIL PROTECTED]: 

Hi Carla,
 
Please remember to use reply to all in order to send your 
message for the mailing list as well.  
 
 I hope I understand this  correctly. So your original data 
(the shapefile) is in epsg:23030? Then you should have in mapfile, in 
corresponding LAYER section

PROJECTION
init=epsg:23030
END
 
Next, because you are willing to deliver that layer through WMS 
in epsg:4230, it is good to add this to layer METADATA as 
wms_srsEPSG:4230
 
By looking at my old mapfiles wms_srs metadata seems not to be 
compulsory if WMS service will only be used in one output projection which is 
the same as the main MAP projection.  Anyway I believe it would be good habbit 
to have it.
 
Third, you should give the default output projection in MAP 
section as
PROJECTION
init=epsg:4230 
END
 
And last calculate the bounding box containing your data in the 
mapfile projection (epsg:4230) and feel in the values as EXTENT of the map 
object.
 
I try to read your messages once again faithfully and I feel 
you are giving a bit conflicting information. In one place you say you are 
willing to publish your data in ETRS89, wich I believe to mean epsg:4258.  If 
this is the case then insert that value to wms_srs and mapfile projection 
instead of 4230.  Why do you play at all with epsg:4230 if your data are not 
using it, and you don't want to any output in that projection either?  Perhaps 
I have just not understood what you are aiming at, but I hope you will have 
luck with it.
 
-Jukka Rahkonen-
 
 




Lähettäjä: CARLA FERNANDEZ [mailto:[EMAIL PROTECTED] 
Lähetetty: 18. maaliskuuta 2008 11:50
Vastaanottaja: Rahkonen Jukka
Aihe: Re: [MAPSERVER-USERS] cs2cs problems



   

Re: VS: [mapserver-users] [UMN_MAPSERVER-USERS] can i pass variables toshp2img?

2008-03-18 Thread John Smith
thks so what's the difference between mapserv.exe and shp2img.exe? i
find the naming a little confusing (map2img? mapserver_cli?)
jzs

On Mon, Mar 17, 2008 at 6:51 PM, Stephen Woodbridge
[EMAIL PROTECTED] wrote:
 You can do it with the mapserv executable from the commandline via

 mapserv QUERY_STRING='map=/path/tofile.mapvalue=foovalue2=bar...'

 -Steve W

 John Smith wrote:
  thks but i fail to see the benefit of that- does shp2img.exe know what
  to do with these inserted variables?
 
  i want to use variables in the map file for a postgis query, like
  %var%. passing [-m ...map?value=%var%] throws a msEvalRegex() error.
  jzs
 
  On Mon, Mar 17, 2008 at 4:38 PM, Rahkonen Jukka
  [EMAIL PROTECTED] wrote:
  If you use Windows, make a batch file, let's say run.bat
  shp2img -m ...map -o ...gif %1% %2%
 
  Then send from command line:
 
  run.bat variable1 variable2 (they will be inserted in place of %1 and %2)
 
  -Jukka Rahkonen-
 
  -Alkuperäinen viesti-
  Lähettäjä: [EMAIL PROTECTED] puolesta: John Smith
  Lähetetty: ma 17.3.2008 22:33
  Vastaanottaja: mapserver-users@lists.osgeo.org
  Aihe: [mapserver-users] [UMN_MAPSERVER-USERS] can i pass variables 
  toshp2img?
 
  can i pass variables to shp2img, say?
 
  shp2img -m ...map -o ...gif %variable1% %variable2%
 
  jzs
  ___
  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