[mapserver-users] PHP mapscript recenter problem

2010-01-22 Thread Donatas Malinauskas

HGood day,

I have some problem. I want to recenter my map exactly to users given 
georeferenced coordinates. For that purpose I use php mapscript function 
- zoompoint(ZOOMFACTOR,$myXY, WIDTH, HEIGHT, EXTENT) with ZOOMFACTOR=1. 
But this function doesn't work correctly. ZoomPoint function centers map 
to rounded x,y position (then I have myX 235.5px and myY 330.42 it 
rounds to 235px, 330px) and moves map to incorect center coordinates. 
What should I do in this situation, please give me some advice, how  
recenter map with  best precision.


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


[mapserver-users] Projection error, RT90 in MapServer

2010-01-22 Thread Fia

Hello,

I have a problem showing data in the former Swedish standard reference
system RT90 2,5 gon V. The point is projected ~250 meters northwest of where
it should be. I have used the projection parameters for MapServer from
Spatialreference.org.

The underlying map projection is SWEREF 99 TM (the new standard Swedish
reference system), with the following projection parameters:
PROJECTION
'proj=utm'
'zone=33'
'ellps=GRS80'
'towgs84=0,0,0,0,0,0,0'
'units=m'
'no_defs'
END

I have then tested to pinpoint an intersection, in both WGS-84 and RT90, but
the RT90 point does not end up where it should be.  I have double checked
that the RT90 coordinates are correct by transforming them to WGS-84. See my
attached screenshot.
http://n2.nabble.com/file/n4438959/rt90_mapserver_error.jpg 

For the WGS-84 point I have the following projection parameters:
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
'units=m'
END

And the RT90 point has:
PROJECTION
proj=tmerc
lat_0=0
lon_0=15.808278
k=1
x_0=150
y_0=0
ellps=bessel
units=m
no_defs
END

I have also tried all the other RT90 projections provided by
Spatialreference.org, just to see if any of them would work better, but
without luck.

Have I made a mistake somewhere, or are there any suggestions of why this
error occurs? I'm out of ideas. 

Regards,
Sofia
-- 
View this message in context: 
http://n2.nabble.com/Projection-error-RT90-in-MapServer-tp4438959p4438959.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] required parameters WMS not used in client request: How to resolve?

2010-01-22 Thread RODIER BATISSE, ALEXANDRE
Hi everybody,

 

I am trying to resolve this problem: some wms client, like Arcgis 9.2, does not 
use some required wms parameters when it makes a request. Example: Arcgis does 
not use the FORMAT required parameter, from GetMap request, when I do a 
GetFeatureInfo request.

 

So the question is: How can I configure Apache/Mapserver to parse the inner 
request and add forgot required parameters when the request is not complete? 
Must I configure httpd.conf file, add intermediate CGI program or other 
solution?

 

Thanks a lot.

 

 

Hola a todos,

 

Estoy intentando resolver el siguiente problema: algunos clients sig, como 
Arcgis 9.2, no utilizan todos los parámetros requeridos cuando hacen una 
petición wms. Ejemplo: Arcgis no utiliza el parámetro FORMAT, de la petición 
GetMap incrustada, cuando hago una petición GetFeatureInfo.

 

La cuestión es entonces: ¿Cómo puedo configurar apache/mapserver para que se me 
chequee la petición de entrada y añadir los parámetros necesarios cuando la 
petición no es completa. ¿Tengo que actuar a nivel delfichero de configuración 
de Apache, añadir una interfaz intermedia de CGI u otra solución?

 

 

Muchas gracias.

 

-

Alexandre Rodier

Asistencia Técnica del SIGA

 

Servicio de Información e Integración Ambiental
Dirección General de Patrimonio Natural y Biodiversidad
Consejería de Agricultura y Agua.
c/ Arquitecto Emilio Piñero, 1 Entresuelo C

30.007 Murcia

Tel. 968246272

Correo-e: alexandre.rod...@carm.es mailto:alexandre.rod...@carm.es 

http://www.carm.es/medioambiente http://www.carm.es/medioambiente 

-

 

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


[mapserver-users] Raster layer as a way of branding

2010-01-22 Thread Frost89

Hi
I was wondering if it's possible to generate a map with a raster layer/png
in the bottom right corner? As a way of branding the map with our company
logo.
/Kristian
-- 
View this message in context: 
http://n2.nabble.com/Raster-layer-as-a-way-of-branding-tp4439127p4439127.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Projection error, RT90 in MapServer

2010-01-22 Thread Rahkonen Jukka
Hi, 

Have you tried adding 'towgs84=0,0,0,0,0,0,0' also to RT90 definitions?

-Jukka Rahkonen-


 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Fia
 Lähetetty: 22. tammikuuta 2010 10:56
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] Projection error, RT90 in MapServer
 
 
 Hello,
 
 I have a problem showing data in the former Swedish standard reference
 system RT90 2,5 gon V. The point is projected ~250 meters 
 northwest of where
 it should be. I have used the projection parameters for MapServer from
 Spatialreference.org.
 
 The underlying map projection is SWEREF 99 TM (the new 
 standard Swedish
 reference system), with the following projection parameters:
 PROJECTION
   'proj=utm'
   'zone=33'
   'ellps=GRS80'
   'towgs84=0,0,0,0,0,0,0'
   'units=m'
   'no_defs'
 END
 
 I have then tested to pinpoint an intersection, in both 
 WGS-84 and RT90, but
 the RT90 point does not end up where it should be.  I have 
 double checked
 that the RT90 coordinates are correct by transforming them to 
 WGS-84. See my
 attached screenshot.
 http://n2.nabble.com/file/n4438959/rt90_mapserver_error.jpg 
 
 For the WGS-84 point I have the following projection parameters:
 PROJECTION
   'proj=longlat'
   'ellps=WGS84'
   'datum=WGS84'
   'no_defs'
   'units=m'
 END
 
 And the RT90 point has:
 PROJECTION
   proj=tmerc
   lat_0=0
   lon_0=15.808278
   k=1
   x_0=150
   y_0=0
   ellps=bessel
   units=m
   no_defs
 END
 
 I have also tried all the other RT90 projections provided by
 Spatialreference.org, just to see if any of them would work 
 better, but
 without luck.
 
 Have I made a mistake somewhere, or are there any suggestions 
 of why this
 error occurs? I'm out of ideas. 
 
 Regards,
 Sofia
 -- 
 View this message in context: 
 http://n2.nabble.com/Projection-error-RT90-in-MapServer-tp4438
 959p4438959.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] required parameters WMS not used in client request: How to resolve?

2010-01-22 Thread RODIER BATISSE, ALEXANDRE
Hi Bart,

We use 5.0.0. So we Hill upgrade it.

Thanks.


-Mensaje original-
De: bart...@osgis.nl [mailto:bart...@osgis.nl] 
Enviado el: viernes, 22 de enero de 2010 10:52
Para: RODIER BATISSE, ALEXANDRE
CC: mapserver-users@lists.osgeo.org
Asunto: Re: [mapserver-users] required parameters WMS not used in client 
request: How to resolve?

Hi,

which version of Mapserver are you using, since this was fixed a long time
ago (Mapserver was made less strict):

http://trac.osgeo.org/mapserver/ticket/2517

Best regards,
Bart

 Hi everybody,



 I am trying to resolve this problem: some wms client, like Arcgis 9.2,
 does not use some required wms parameters when it makes a request.
 Example: Arcgis does not use the FORMAT required parameter, from GetMap
 request, when I do a GetFeatureInfo request.



 So the question is: How can I configure Apache/Mapserver to parse the
 inner request and add forgot required parameters when the request is not
 complete? Must I configure httpd.conf file, add intermediate CGI program
 or other solution?



 Thanks a lot.





 Hola a todos,



 Estoy intentando resolver el siguiente problema: algunos clients sig, como
 Arcgis 9.2, no utilizan todos los parámetros requeridos cuando hacen una
 petición wms. Ejemplo: Arcgis no utiliza el parámetro FORMAT, de la
 petición GetMap incrustada, cuando hago una petición GetFeatureInfo.



 La cuestión es entonces: ¿Cómo puedo configurar apache/mapserver para que
 se me chequee la petición de entrada y añadir los parámetros necesarios
 cuando la petición no es completa. ¿Tengo que actuar a nivel delfichero de
 configuración de Apache, añadir una interfaz intermedia de CGI u otra
 solución?





 Muchas gracias.



 -

 Alexandre Rodier

 Asistencia Técnica del SIGA



 Servicio de Información e Integración Ambiental
 Dirección General de Patrimonio Natural y Biodiversidad
 Consejería de Agricultura y Agua.
 c/ Arquitecto Emilio Piñero, 1 Entresuelo C

 30.007 Murcia

 Tel. 968246272

 Correo-e: alexandre.rod...@carm.es mailto:alexandre.rod...@carm.es

 http://www.carm.es/medioambiente http://www.carm.es/medioambiente

 -



 ___
 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] Re: PNG24 problem in IE6

2010-01-22 Thread Frost89

You can try this:  http://www.twinhelix.com/css/iepngfix/
http://www.twinhelix.com/css/iepngfix/ .
-- 
View this message in context: 
http://n2.nabble.com/PNG24-problem-in-IE6-tp4408017p4439253.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] VRT / CSV data sources are not displayed in a layer

2010-01-22 Thread Stefan Schantz

Hi Greg,
thank you!
The issue was the two blanks ahead the coordinates.
After I have removed them, the mapserver visualized the csv-file.

Nevertheless, I don't understand, why ogr2ogr could read  and transform 
the csv-file, but this is a different issue...


Thanks!
Stefan

greg.lu...@scu.edu.au schrieb:

Hi Stefan,

I'm not an expert, but I see 2 things that I have found might produce 
problems:


   x-utm,y-utm,Wert

Try renaiming your fields without hyphens ie
xutm,yutm,wert
and
encoding=PointFromColumns x=xutm y=yutm/

and remove the decimal point and convert to non-scientific number:

742226.,  5374978., 0.00E+00

try:
742226, 5374978,0

Does that help any?

Thanks,
Greg.

Greg Luker
GIS Lab Manager
Southern Cross University
Australia
61 2 66203026


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


[mapserver-users] mapserver using grib file

2010-01-22 Thread Martijn van der pauw
Hello,

I have searched quite long for good documentation and a working example of a
mapserver mapfile that uses a GRIB file. I need it to present meteorological
data on the map. I didn't find it. Can somebody help me with that?

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


[mapserver-users] mapscript - getting square map image from rectangular piece of space

2010-01-22 Thread wostok

Hello,

I am using mapscript to obtain square map image from rectangular
piece of space with method zoomPoint, but returned image isn't
transformed. It's cropped not coarcted.
I need something like gives wms request with BBOX=-180,-90,180,90 and
WIDTH=300HEIGHT=300.
How the parameters to the zoomPoint, zoomRectangle or zoomScale should be
passed
to coarct map piece?

Thanks in advance
wostok


-- 
View this message in context: 
http://n2.nabble.com/mapscript-getting-square-map-image-from-rectangular-piece-of-space-tp4439575p4439575.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] queryByAttributes syntax

2010-01-22 Thread Berend Veldkamp
Hi,

Where can I find more information about the queryByAttributes() function? I
found http://mapserver.org/mapscript/php/index.html#layerobj-class , but it
is not very detailed. By trial and error I found that for a PostGIS layer, I
should use this syntax:

layer.queryByAttributes(map, null, myfield='searchValue',
mapscript.MS_MULTIPLE);

but for shapefiles, it seems it should be:

layer.queryByAttributes(map, myfield, searchValue,
mapscript.MS_MULTIPLE);

I am trying to write some generic code, but that's hard if there is no
single way to call this method. Also, I haven't found a way yet to do a
partial match on a shapefile (PostGIS supports 'LIKE')

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


[mapserver-users] No bound at the line end

2010-01-22 Thread ibrahimsaricicek

Hi all;

I use for road segments and for segment borders;

STYLE
OUTLINECOLOR 25 25 25
WIDTH 3
ANTIALIAS TRUE
END  
STYLE
OUTLINECOLOR 255 225 5
WIDTH 2
ANTIALIAS TRUE
END

Is there a way for not to define border at the line end?
There is a Google Street Ex. on the screenshot...

Regards 
IBO...
http://n2.nabble.com/file/n4439927/line_end.jpg 

-- 
View this message in context: 
http://n2.nabble.com/No-bound-at-the-line-end-tp4439927p4439927.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] PHP mapscript recenter problem

2010-01-22 Thread Alan Boudreault
Donatas,

The x,y given to the zoomPoint function are in PIXEL, not lonlat. You cannot 
specify a half pixel. That said, pixel are integers, not double.
 
Alan

On January 22, 2010 03:22:30 am Donatas Malinauskas wrote:
 HGood day,
 
 I have some problem. I want to recenter my map exactly to users given
 georeferenced coordinates. For that purpose I use php mapscript function
 - zoompoint(ZOOMFACTOR,$myXY, WIDTH, HEIGHT, EXTENT) with ZOOMFACTOR=1.
 But this function doesn't work correctly. ZoomPoint function centers map
 to rounded x,y position (then I have myX 235.5px and myY 330.42 it
 rounds to 235px, 330px) and moves map to incorect center coordinates.
 What should I do in this situation, please give me some advice, how
 recenter map with  best precision.
 
 Thanks,
 Donatas.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 

-- 
Alan Boudreault
Mapgears
http://www.mapgears.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


SV: [mapserver-users] Projection error, RT90 in MapServer

2010-01-22 Thread Sofia Bryntse
Hi Jukka,

Thank you, I tried adding your line to my RT90 projection parameter list now, 
but it didn't help. The point moved 50 meters or so, but not in the right 
direction. (See attached screenshot.)

Regards,
Sofia

Från: Rahkonen Jukka [jukka.rahko...@mmmtike.fi]
Skickat: den 22 januari 2010 11:16
Till: Sofia Bryntse; mapserver-users@lists.osgeo.org
Ämne: Re: [mapserver-users] Projection error, RT90 in MapServer

Hi,

Have you tried adding 'towgs84=0,0,0,0,0,0,0' also to RT90 definitions?

-Jukka Rahkonen-


 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Fia
 Lähetetty: 22. tammikuuta 2010 10:56
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] Projection error, RT90 in MapServer


 Hello,

 I have a problem showing data in the former Swedish standard reference
 system RT90 2,5 gon V. The point is projected ~250 meters
 northwest of where
 it should be. I have used the projection parameters for MapServer from
 Spatialreference.org.

 The underlying map projection is SWEREF 99 TM (the new
 standard Swedish
 reference system), with the following projection parameters:
 PROJECTION
   'proj=utm'
   'zone=33'
   'ellps=GRS80'
   'towgs84=0,0,0,0,0,0,0'
   'units=m'
   'no_defs'
 END

 I have then tested to pinpoint an intersection, in both
 WGS-84 and RT90, but
 the RT90 point does not end up where it should be.  I have
 double checked
 that the RT90 coordinates are correct by transforming them to
 WGS-84. See my
 attached screenshot.
 http://n2.nabble.com/file/n4438959/rt90_mapserver_error.jpg

 For the WGS-84 point I have the following projection parameters:
 PROJECTION
   'proj=longlat'
   'ellps=WGS84'
   'datum=WGS84'
   'no_defs'
   'units=m'
 END

 And the RT90 point has:
 PROJECTION
   proj=tmerc
   lat_0=0
   lon_0=15.808278
   k=1
   x_0=150
   y_0=0
   ellps=bessel
   units=m
   no_defs
 END

 I have also tried all the other RT90 projections provided by
 Spatialreference.org, just to see if any of them would work
 better, but
 without luck.

 Have I made a mistake somewhere, or are there any suggestions
 of why this
 error occurs? I'm out of ideas.

 Regards,
 Sofia
 --
 View this message in context:
 http://n2.nabble.com/Projection-error-RT90-in-MapServer-tp4438
 959p4438959.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users

attachment: rt90_towgs84.JPG___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Projection error, RT90 in MapServer

2010-01-22 Thread Rahkonen Jukka
Hi,

How about these parameters?


+proj=tmerc +lat_0=0 +lon_0=15.808278 +k=1 +x_0=150 +y_0=0 
+ellps=bessel +units=m 
+towgs84=414.0978567149,41.3381489658,603.0627177516,-0.8550434314,2.1413465,-7.0227209516,0
 +no_defs

Taken from 
http://www.zonefivesoftware.com/SportTracks/Forums/viewtopic.php?t=3543postdays=0postorder=ascstart=25

By the way, I suppose the unint in your WGS84 definition are wrong. Maybe you 
do not need the line at all.

 PROJECTION
   'proj=longlat'
   'ellps=WGS84'
   'datum=WGS84'
   'no_defs'
   'units=m'
 END


-Jukka-


-Alkuperäinen viesti-
Lähettäjä: Sofia Bryntse [mailto:sofia.bryn...@et.slu.se]
Lähetetty: pe 22.1.2010 16:09
Vastaanottaja: Rahkonen Jukka; mapserver-users@lists.osgeo.org
Aihe: SV: [mapserver-users] Projection error, RT90 in MapServer
 
Hi Jukka,

Thank you, I tried adding your line to my RT90 projection parameter list now, 
but it didn't help. The point moved 50 meters or so, but not in the right 
direction. (See attached screenshot.)

Regards,
Sofia

Från: Rahkonen Jukka [jukka.rahko...@mmmtike.fi]
Skickat: den 22 januari 2010 11:16
Till: Sofia Bryntse; mapserver-users@lists.osgeo.org
Ämne: Re: [mapserver-users] Projection error, RT90 in MapServer

Hi,

Have you tried adding 'towgs84=0,0,0,0,0,0,0' also to RT90 definitions?

-Jukka Rahkonen-


 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Fia
 Lähetetty: 22. tammikuuta 2010 10:56
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] Projection error, RT90 in MapServer


 Hello,

 I have a problem showing data in the former Swedish standard reference
 system RT90 2,5 gon V. The point is projected ~250 meters
 northwest of where
 it should be. I have used the projection parameters for MapServer from
 Spatialreference.org.

 The underlying map projection is SWEREF 99 TM (the new
 standard Swedish
 reference system), with the following projection parameters:
 PROJECTION
   'proj=utm'
   'zone=33'
   'ellps=GRS80'
   'towgs84=0,0,0,0,0,0,0'
   'units=m'
   'no_defs'
 END

 I have then tested to pinpoint an intersection, in both
 WGS-84 and RT90, but
 the RT90 point does not end up where it should be.  I have
 double checked
 that the RT90 coordinates are correct by transforming them to
 WGS-84. See my
 attached screenshot.
 http://n2.nabble.com/file/n4438959/rt90_mapserver_error.jpg

 For the WGS-84 point I have the following projection parameters:
 PROJECTION
   'proj=longlat'
   'ellps=WGS84'
   'datum=WGS84'
   'no_defs'
   'units=m'
 END

 And the RT90 point has:
 PROJECTION
   proj=tmerc
   lat_0=0
   lon_0=15.808278
   k=1
   x_0=150
   y_0=0
   ellps=bessel
   units=m
   no_defs
 END

 I have also tried all the other RT90 projections provided by
 Spatialreference.org, just to see if any of them would work
 better, but
 without luck.

 Have I made a mistake somewhere, or are there any suggestions
 of why this
 error occurs? I'm out of ideas.

 Regards,
 Sofia
 --
 View this message in context:
 http://n2.nabble.com/Projection-error-RT90-in-MapServer-tp4438
 959p4438959.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users


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


RE: [mapserver-users] Raster layer as a way of branding

2010-01-22 Thread Fawcett, David (MPCA)
This example should help:  
http://mapserver.org/faq.html#how-do-i-add-a-copyright-notice-on-the-corner-of-my-map

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Frost89
Sent: Friday, January 22, 2010 3:48 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Raster layer as a way of branding


Hi
I was wondering if it's possible to generate a map with a raster layer/png
in the bottom right corner? As a way of branding the map with our company
logo.
/Kristian
-- 
View this message in context: 
http://n2.nabble.com/Raster-layer-as-a-way-of-branding-tp4439127p4439127.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] PHP layer-updateFromString problem setting type and symbol name

2010-01-22 Thread Daniel Morissette
Sounds like a bug to me. Could you please file a ticket in Trac 
(http://trac.osgeo.org/mapserver/) about this under the MapScript-PHP 
component and one of us will have a look?


Daniel


Joe Franklin wrote:

I really like the updateFromString functions in Mapserver Mapscript.  I've
eliminated my .map files, instead storing the layer definitions in a database and 
drawing them on-demand using PHP.  However, I've found a few values ($layer-type 
and $style-symbolname) that aren't correctly set using Mapserver 5.6.1 (also 
tried 5.4.2).  Here's an example:

?php
$mapDef=MAP
NAME 'test'
SIZE 400 400
EXTENT 0 0 100 100
END
;

$layerDef=LAYER
NAME 'Airports'
STATUS ON
TYPE point
FEATURE POINTS 10 10 50 50 1 50 70 10 END END
CLASS
STYLE
SYMBOL 'airport.gif'
END
END
END;

$oMap = ms_newMapObjFromString($mapDef);
$oLayer=ms_newLayerObj($oMap);
$oLayer-updateFromString($layerDef);
//First problem: returns -1
//echo $oLayer-type;
//$oLayer-set(type,MS_LAYER_POINT);

//Second problem is that the symbol gif isn't used
//unless it is explicitly set again below
//$cls = $oLayer-getClass(0);
//$style = $cls-getStyle(0);
//if($style-symbolname!='')$style-set(symbolname,$style-symbolname);
$oMap-selectOutputFormat('gif');
$img = $oMap-draw();
$img-saveImage(output.gif);
?


  
___

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



--
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] queryByAttributes syntax

2010-01-22 Thread Lime, Steve D (DNR)
There's a single way to call the method, it's that you don't always have to 
supply the query item. The method signature is

   queryByAttributes (map (mapObj, qitem (string), qstring (string), mode 
(int));

The qstring is given in a format compatible with the underlying driver. For the 
database drivers it's basically a where-clause. For others
you use MapServer expression syntax. Some expression types (e.g. string matches 
or regex) require the qitem.

To do a partial match you could use a regex, for example:

   layer.queryByAttributes(map, myfield, /myregex/, mapscript.MS_MULTIPLE);

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Berend Veldkamp
Sent: Friday, January 22, 2010 6:22 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] queryByAttributes syntax

Hi,

Where can I find more information about the queryByAttributes() function? I 
found http://mapserver.org/mapscript/php/index.html#layerobj-class , but it is 
not very detailed. By trial and error I found that for a PostGIS layer, I 
should use this syntax:

layer.queryByAttributes(map, null, myfield='searchValue', 
mapscript.MS_MULTIPLE);

but for shapefiles, it seems it should be:

layer.queryByAttributes(map, myfield, searchValue, mapscript.MS_MULTIPLE);

I am trying to write some generic code, but that's hard if there is no single 
way to call this method. Also, I haven't found a way yet to do a partial match 
on a shapefile (PostGIS supports 'LIKE')

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


Re: [mapserver-users] Raster layer as a way of branding

2010-01-22 Thread Rahkonen Jukka
Hi,

But I understood that the aim is to burn a logo from an image file in png 
format into output map, not a plain text annotation. Is that possible?

-Jukka Rahkonen-

Fawcett, David wrote:


 This example should help:  
 http://mapserver.org/faq.html#how-do-i-add-a-copyright-notice-on-the-corner-of-my-map

 David.

 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Frost89
 Sent: Friday, January 22, 2010 3:48 AM
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] Raster layer as a way of branding


 Hi
 I was wondering if it's possible to generate a map with a raster layer/png
in the bottom right corner? As a way of branding the map with our company
logo.
/Kristian
-- 
View this message in context: 
http://n2.nabble.com/Raster-layer-as-a-way-of-branding-tp4439127p4439127.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

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


RE: [mapserver-users] Raster layer as a way of branding

2010-01-22 Thread Lime, Steve D (DNR)
Sure, that's possible too. Just use the image in question as a symbol (e.g. 
SYMBOL 'mylogo.png') and the same
strategy should work.

# place a logo in the lower right corner
LAYER
  NAME 'logo'
  TYPE POINT
  STATUS DEFAULT
  TRANSFORM LR
  FEATURE POINTS -10 10 END END
  CLASS
STYLE SYMBOL 'mylogo.png' END
  END
END

Or something close to this...

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka
Sent: Friday, January 22, 2010 3:11 PM
To: Fawcett, David (MPCA); Frost89; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Raster layer as a way of branding

Hi,

But I understood that the aim is to burn a logo from an image file in png 
format into output map, not a plain text annotation. Is that possible?

-Jukka Rahkonen-

Fawcett, David wrote:


 This example should help:  
 http://mapserver.org/faq.html#how-do-i-add-a-copyright-notice-on-the-corner-of-my-map

 David.

 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Frost89
 Sent: Friday, January 22, 2010 3:48 AM
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] Raster layer as a way of branding


 Hi
 I was wondering if it's possible to generate a map with a raster layer/png
in the bottom right corner? As a way of branding the map with our company
logo.
/Kristian
-- 
View this message in context: 
http://n2.nabble.com/Raster-layer-as-a-way-of-branding-tp4439127p4439127.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
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] Raster layer as a way of branding

2010-01-22 Thread Jeff McKenna

Lime, Steve D (DNR) wrote:

Sure, that's possible too. Just use the image in question as a symbol (e.g. 
SYMBOL 'mylogo.png') and the same
strategy should work.

# place a logo in the lower right corner
LAYER
  NAME 'logo'
  TYPE POINT
  STATUS DEFAULT
  TRANSFORM LR
  FEATURE POINTS -10 10 END END
  CLASS
STYLE SYMBOL 'mylogo.png' END
  END
END

Or something close to this...

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka
Sent: Friday, January 22, 2010 3:11 PM
To: Fawcett, David (MPCA); Frost89; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Raster layer as a way of branding

Hi,

But I understood that the aim is to burn a logo from an image file in png 
format into output map, not a plain text annotation. Is that possible?

-Jukka Rahkonen-

Fawcett, David wrote:



This example should help:  
http://mapserver.org/faq.html#how-do-i-add-a-copyright-notice-on-the-corner-of-my-map



David.



-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Frost89
Sent: Friday, January 22, 2010 3:48 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Raster layer as a way of branding




Hi
I was wondering if it's possible to generate a map with a raster layer/png

in the bottom right corner? As a way of branding the map with our company
logo.
/Kristian


Steve beat me to it, but I would follow the FAQ example and just add in 
a symbol:


LAYER
  NAME copyright
  STATUS ON
  TYPE point
  TRANSFORM ll #set the image origin to be lower left
  FEATURE
POINTS
  60 -10 #set the offset from lower left position in pixels
END
#TEXT � xyz company 2006 #this is your displaying text
  END
  CLASS
STYLE
  SYMBOL '../etc/mylogo.gif'
END
  END
  UNITS PIXELS #sets the units for the feature object
END

-jeff


--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/


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