AW: [mapserver-users] Problem with Russia polygon

2010-01-06 Thread Arnd Wippermann
Hi,

Use ogr tools to convert the shapefile to mapinfo mif. Then you can look at
the coordinates for the polygons.

There are a couple of times with a longitude < -180.

179.86 -89.92
-180.14999 -89.779991
-179.99941 -84.4286809998 

If you change them to -180 (i have tested with -179. and it works,
perhaps -180 do not work) and convert the mapinfo file back to shape, then
your trouble should be vanished.

Arnd


-Ursprüngliche Nachricht-
Von: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von Nelson
Correia
Gesendet: Dienstag, 5. Januar 2010 15:05
An: Rahkonen Jukka; Barend Köbben; Lime, Steve D (DNR); Andy Colson
Cc: mapserver-users@lists.osgeo.org
Betreff: RE: [mapserver-users] Problem with Russia polygon

The problem seems to be with the re-projection from 4326 to 900913, which
I'm doing with mapserver (hence, the map file configuration).

If I configure the mapfile to use 4326 and make a request in 4326, the
problem disappear. So, the re-projection to 900913 should be screwing the
polygons at the edges of the map. 
I tried to re-project the polygons with postgis (st_transform), but I got
the following error:

ERROR:  transform: couldn't project point: -20 (tolerance condition
error)

Which I don't know the meaning.

In the project I'm doing, I have to use 900913, so, if anyone have some
ideas of how to solve this, they will be well appreciated.

Thanks,

Nelson

-Original Message-
From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi]
Sent: segunda-feira, 4 de Janeiro de 2010 22:03
To: Barend Köbben; Nelson Correia; Lime, Steve D (DNR); Andy Colson
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Problem with Russia polygon

Hi,

Unfortunately the extents are OK and the problem is something more
complicated.  Extents are indeed in meters but that's how they must be
because the MAP level projection looks like this:

PROJECTION
"init=epsg:900913"
END


-Jukka Rahkonen-


-Alkuperäinen viesti-
Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Barend Köbben
Lähetetty: ma 4.1.2010 22:52
Vastaanottaja: Nelson Correia; Lime, Steve D (DNR); Andy Colson
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Problem with Russia polygon
 
You've got data that is in latlong (units decimal degrees) in your
shapefile, however in the EXTENT part of the map file you use 
EXTENT -20037508 -13590765 20037508 11229864 Which are not latlomngs but
some projected coordinates, and
UNITS meters

IN the LAYER you tell mapserver that its:
PROJECTION
"proj=longlat"
"datum=WGS84"
"no_defs"
END

These two are contradictory. You'll have to match the PROJECTION in the
LAYER to the actual projection and units (apparentlt these are correct) ,
and make sure the EXTENT is expressed in the same system. So best thing is
to set the EXTENT in latlons (as its the whole world -180 -90 180 90 is a
safe bet) and UNITS to degrees...


Yours,


--
Barend Köbben
Senior Lecturer
University of Twente, Faculty of Geo-Information Science and Earth
Observation (ITC) PO Box 6, 7500AA Enschede, The Netherlands
+31 (0)53 4874253




On 04-01-10 19:34, "Nelson Correia"  wrote:

> Here is the simplified shapefile, along with a mapfile that uses it:
> http://www.2shared.com/file/10449234/a18d6a03/countries.html
> 
> Nelson
> 
> -Original Message-
> From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us]
> Sent: segunda-feira, 4 de Janeiro de 2010 17:28
> To: Nelson Correia; Barend Köbben; Andy Colson
> Cc: mapserver-users@lists.osgeo.org
> Subject: RE: [mapserver-users] Problem with Russia polygon
> 
> Would be interesting to get a copy of the data in shapefile format, plus
the
> mapfile that generates the error...
> 
> Steve
> 
> -Original Message-
> From: mapserver-users-boun...@lists.osgeo.org
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Nelson
Correia
> Sent: Monday, January 04, 2010 7:32 AM
> To: Barend Köbben; Andy Colson
> Cc: mapserver-users@lists.osgeo.org
> Subject: RE: [mapserver-users] Problem with Russia polygon
> 
> Hello,
> 
> All the russian polygons are valid (st_valid) and closed (st_closed). The
> problem seems to be in the vertical lines at 180º and -180º that divide
> certain areas of the country. It seems like when mapserver tries to draw
these
> lines, there's some kind of unknown behavior that make it draw horizontal
> lines instead, resulting in very strange polygons.
> 
> However, I have not solved the problem yet.
> 
> Nelson
> 
> -Original Message-
> From: Barend Köbben [mailto:kob...@itc.nl]
> Sent: sábado, 2 de Janeiro de 2010 15:33
> To: Andy Colson; Nelson Correia
> Cc: mapserver-users@lists.osgeo.org
> Subject: Re: [mapserver-users] Problem with Russia polygon
> 
> Hi,
> 
>> I guess to make a long story short, do you have any editors (like qgis)
that
>> you 

Re: [mapserver-users] Tilemode Projection Problem

2010-01-06 Thread Ian Dees
I tried this and am still not getting anything from my TIFFs. I switched
over to using the statesp020.shp data (which is epsg:4326, right?) and am
getting very oddly-garbled tiles:

http://209.98.160.119:8080/map.html

On Wed, Jan 6, 2010 at 2:41 PM, Fawcett, David (MPCA) <
david.fawc...@state.mn.us> wrote:

>  Ian,
>
>
>
> I haven’t used tilemode, but my assumption is that the map projection block
> is used to define what the output projection for your tile is (like in the
> other MapServer modes).
>
>
>
> Try setting map projection to epsg:3785 or using the proj4 text:
>
>
>
> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
> +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
>
>
>
> If tilemode requires a map extent, it should be expressed in units of the
> output projection.
>
>
>
> David.
>
>
>
> *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
> mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Ian Dees
> *Sent:* Wednesday, January 06, 2010 2:24 PM
> *To:* mapserver-users@lists.osgeo.org
> *Subject:* [mapserver-users] Tilemode Projection Problem
>
>
>
> Hi everyone,
>
> I've spent the better part of today scouring the internet for documentation
> and help on the tile mode present in mapserver, but I couldn't find an
> answer to my problem, so please forgive me if I'm missing some obvious
> documentation some where...
>
> I am attempting to show some GeoTIFFs (from here:
> ftp://geoftp.ibge.gov.br/mapas/ortofoto/). My research says they're in
> epsg:31984.
>
> I'm trying to use MapServer's tile mode to display them on a Google Map API
> instance, but can't seem to get any of the images to show up.
>
> Also, why am I required to give a PROJECTION statement as a child to the
> MAP statement (what I assume is the "viewing projection") if the tile mode
> is just going to reproject to spherical mercator?
>
> My .map file is below.
>
> Thanks!
>
> MAP
> NAME GMAP_TILE
> STATUS ON
>
> PROJECTION "init=epsg:31984" END
>
> IMAGECOLOR 192 192 192
> IMAGEQUALITY 95
> IMAGETYPE png
>
> OUTPUTFORMAT
> NAME png
> DRIVER 'GD/PNG'
> TRANSPARENT ON
> END
>
> LAYER
> NAME brazil
> TYPE raster
> DATA "/var/www/map/2414-1-SO.tif"
> STATUS ON
> PROJECTION "init=epsg:31984" END
> END
> END
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Tilemode Projection Problem

2010-01-06 Thread Fawcett, David (MPCA)
Ian,

I haven't used tilemode, but my assumption is that the map projection block is 
used to define what the output projection for your tile is (like in the other 
MapServer modes).

Try setting map projection to epsg:3785 or using the proj4 text:

+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137 
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs

If tilemode requires a map extent, it should be expressed in units of the 
output projection.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Ian Dees
Sent: Wednesday, January 06, 2010 2:24 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Tilemode Projection Problem

Hi everyone,

I've spent the better part of today scouring the internet for documentation and 
help on the tile mode present in mapserver, but I couldn't find an answer to my 
problem, so please forgive me if I'm missing some obvious documentation some 
where...

I am attempting to show some GeoTIFFs (from here: 
ftp://geoftp.ibge.gov.br/mapas/ortofoto/). My research says they're in 
epsg:31984.

I'm trying to use MapServer's tile mode to display them on a Google Map API 
instance, but can't seem to get any of the images to show up.

Also, why am I required to give a PROJECTION statement as a child to the MAP 
statement (what I assume is the "viewing projection") if the tile mode is just 
going to reproject to spherical mercator?

My .map file is below.

Thanks!

MAP
NAME GMAP_TILE
STATUS ON

PROJECTION "init=epsg:31984" END

IMAGECOLOR 192 192 192
IMAGEQUALITY 95
IMAGETYPE png

OUTPUTFORMAT
NAME png
DRIVER 'GD/PNG'
TRANSPARENT ON
END

LAYER
NAME brazil
TYPE raster
DATA "/var/www/map/2414-1-SO.tif"
STATUS ON
PROJECTION "init=epsg:31984" END
END
END
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Tilemode Projection Problem

2010-01-06 Thread Ian Dees
Hi everyone,

I've spent the better part of today scouring the internet for documentation
and help on the tile mode present in mapserver, but I couldn't find an
answer to my problem, so please forgive me if I'm missing some obvious
documentation some where...

I am attempting to show some GeoTIFFs (from here:
ftp://geoftp.ibge.gov.br/mapas/ortofoto/). My research says they're in
epsg:31984.

I'm trying to use MapServer's tile mode to display them on a Google Map API
instance, but can't seem to get any of the images to show up.

Also, why am I required to give a PROJECTION statement as a child to the MAP
statement (what I assume is the "viewing projection") if the tile mode is
just going to reproject to spherical mercator?

My .map file is below.

Thanks!

MAP
NAME GMAP_TILE
STATUS ON

PROJECTION "init=epsg:31984" END

IMAGECOLOR 192 192 192
IMAGEQUALITY 95
IMAGETYPE png

OUTPUTFORMAT
NAME png
DRIVER 'GD/PNG'
TRANSPARENT ON
END

LAYER
NAME brazil
TYPE raster
DATA "/var/www/map/2414-1-SO.tif"
STATUS ON
PROJECTION "init=epsg:31984" END
END
END
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] How do I have a polygon with an outline with a width?

2010-01-06 Thread Andreas Douvalis
I found the solution!
 
(finally my problem was chameleon issue)
 
The problem was that I changed my Symbol.sym file to start with  "SYMBOLSET" 
and finish with "END" but I didnt changed the Default Symbol.sym file ( 
/ms4w/apps/chameleon/cwc2/etc/symbols.sym)  which I have declared in cwc2.xml 
file.
 
Now I have declared my Symbol file as default and everything is OK.
 
Thanks


  
___ 
Χρησιμοποιείτε Yahoo!; 
Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail 
διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών 
μηνυμάτων http://login.yahoo.com/config/mail?.intl=gr 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Error configuring WMS app : Projection library error. Invalid argument...

2010-01-06 Thread Jeff McKenna

stela anders wrote:

Thanks Jeff!
Could you show me how combine my 2 layers?



I may not understand your scenario very well.  You might want to check 
an example mapfile for labeling roads (such as the labeled roads in 
http://svn.osgeo.org/osgeo/foss4g/benchmarking/mapserver/shapefile-merged.map)


-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


Re: [mapserver-users] Error configuring WMS app : Projection library error. Invalid argument...

2010-01-06 Thread stela anders
Thanks Jeff!
Could you show me how combine my 2 layers?

Stella

2010/1/6 Jeff McKenna 

> stela anders wrote:
>
>> Guys, other problem now ;(
>> I have 2 layers with same name ... One with LINE and other with ANNOTATION
>> ... It works fine in mapscript environment... But now, with WMS I got a
>> error when I use both layers with same name:
>>
>> msWMSLoadGetMapParams(): /WMS server error/. /Invalid layer/(s) given in
>> the /LAYERS/ parameter
>>
>> Both layer works separately...
>>
>> My 2 layers
>>
>> LAYER
>>NAME Road
>>METADATA
>>"wms_title""Road"  END
>>GROUP "Transport"
>>TYPE LINE
>>STATUS ON
>>INCLUDE "Connection.map"
>>DATA ...
>>PROJECTION
>>"+init=epsg:4326"
>>END
>>CLASS
>>TEMPLATE "dummy"  NAME "Rod x"
>>STYLE
>>SYMBOL "road"
>>COLOR 0 0 0
>>ANTIALIAS TRUE
>>END
>>END  END
>>  LAYER
>>NAME Road
>>METADATA
>>"wms_title""Road"  END
>>GROUP "Transport"
>>TYPE ANNOTATION
>>STATUS ON
>>INCLUDE "Connection.map"
>>DATA ...
>>PROJECTION
>>"+init=epsg:4326"
>>END
>>LABELITEM 'rod'
>>CLASS
>>TEMPLATE "dummy"
>>STYLE
>>SYMBOL 'roadsymbol'
>>END
>>LABEL
>>TYPE TRUETYPE
>>FONT Arial
>>SIZE 7
>>COLOR 70 70 70
>>MINDISTANCE 100
>>MINFEATURESIZE 10
>>PARTIALS FALSE
>>BUFFER 10
>>END
>>END  END
>>
>>
>> Why?
>>
>
> Hello Stella,
>
> Check your GetCapabilities response of your WMS service - your 2 layers of
> the same name were probably renamed by MapServer with unique names (such as
> "Road_01" and "Road_02"), so you should request the layers with those names.
>
> To avoid this you could:
>
> - use different names in your mapfile
> - combine your 2 layers into one layer
> - since you already have the layers in a group, add a group metadata tag in
> the layers, and then use the group name in your WMS LAYERS request (but
> first verify names through a GetCapabilities request), such as:
>
> LAYER
>  NAME "Road"
>  GROUP "Transport"
>  METADATA
>"wms_title" "Road"
>"wms_group_title" "groupname"
>  END
>  ...
> END
>
>
>
> http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.map&LAYERS=Transport&;.
> ..
>
> -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
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: wms output problem

2010-01-06 Thread Ludwig Kniprath
Just an idea:
Perhaps a missing "IMAGETYPE png" in the mapfile?
Regards
Ludwig
>
>Hi!
>
>   i have a problem with the output image of my wms, i define PNG but return
>JPEG.
>
>Source mapfile
>
>OUTPUTFORMAT
>NAME png
>DRIVER "AGG/PNG"
>MIMETYPE 'image/png'
>  IMAGEMODE RGB
>  EXTENSION "png"
>   FORMATOPTION "TRANSPARENT=OFF"
>   FORMATOPTION "INTERLACE=ON"
>  END
>
>source wms mapfile
>
>OUTPUTFORMAT
>NAME png
>DRIVER "AGG/PNG"
>MIMETYPE 'image/png'
>  IMAGEMODE RGB
>  EXTENSION "png"
>   FORMATOPTION "TRANSPARENT=OFF"
>   FORMATOPTION "INTERLACE=ON"
>  END
>
>
>can you help me please?
>
>RG
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Error configuring WMS app : Projection library error. Invalid argument...

2010-01-06 Thread Jeff McKenna

stela anders wrote:

Guys, other problem now ;(
I have 2 layers with same name ... One with LINE and other with 
ANNOTATION ... It works fine in mapscript environment... But now, with 
WMS I got a error when I use both layers with same name:


msWMSLoadGetMapParams(): /WMS server error/. /Invalid layer/(s) given in 
the /LAYERS/ parameter


Both layer works separately...

My 2 layers

LAYER
NAME Road
METADATA
"wms_title""Road"  
END

GROUP "Transport"
TYPE LINE
STATUS ON
INCLUDE "Connection.map"
DATA ...
PROJECTION
"+init=epsg:4326"
END
CLASS
TEMPLATE "dummy"   
NAME "Rod x"

STYLE
SYMBOL "road"
COLOR 0 0 0
ANTIALIAS TRUE
END
END   
END
   
LAYER

NAME Road
METADATA
"wms_title""Road"  
END

GROUP "Transport"
TYPE ANNOTATION
STATUS ON
INCLUDE "Connection.map"
DATA ...
PROJECTION
"+init=epsg:4326"
END
LABELITEM 'rod'
CLASS
TEMPLATE "dummy"
STYLE
SYMBOL 'roadsymbol'
END
LABEL
TYPE TRUETYPE
FONT Arial
SIZE 7
COLOR 70 70 70
MINDISTANCE 100
MINFEATURESIZE 10
PARTIALS FALSE
BUFFER 10
END
END   
END



Why?


Hello Stella,

Check your GetCapabilities response of your WMS service - your 2 layers 
of the same name were probably renamed by MapServer with unique names 
(such as "Road_01" and "Road_02"), so you should request the layers with 
those names.


To avoid this you could:

- use different names in your mapfile
- combine your 2 layers into one layer
- since you already have the layers in a group, add a group metadata tag 
in the layers, and then use the group name in your WMS LAYERS request 
(but first verify names through a GetCapabilities request), such as:


LAYER
  NAME "Road"
  GROUP "Transport"
  METADATA
"wms_title" "Road"
"wms_group_title" "groupname"
  END
  ...
END


http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.map&LAYERS=Transport&;...

-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


Re: [mapserver-users] cofigure problems on Ubuntu 9.10

2010-01-06 Thread Alan Boudreault
I would suggest to verify with the dpkg command line if the packages 
|libpng12-dev and ||libjpeg62-dev |are installed.


You can also take a look to these binarie packages: 
https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable  , which 
contain mapserver 5.6.0.


Alan

luftadler wrote:
Hi everyone, 


I try to install MapServer 5.6.0, for the first time, on my machine (using
Ubuntu 9.10).
The problem is that my configuration don't find few installed libraries
like: png and jpeg.

My configuration script:

./configure \
--enable-debug \
--prefix=/usr \
--with-xml2 \
--with-pdf \
--with-gd \
--with-jpeg \
--with-freetype \
--with-agg \
--with-eppl \
--with-proj \
--with-threads \
--with-sde \
--with-geos \
--with-ogr \
--with-gdal \
--with-tiff \
--with-postgis \
--with-wfs \
--with-wcs \
--with-wmsclient \
--with-wfsclient \
--with-sos \
--with-fribidi-config \
--with-php=/usr/include/php5 \
--with-httpd=/usr/sbin/apache2 \

__
MapServer is now configured for 

 -- Compiler Info - 
  C compiler:gcc -g  -fPIC -Wall  
  C++ compiler:  g++ -g  -fPIC -Wall  
  Debug: -g 
  Generic NINT:  

 -- Renderer Settings - 
  OpenGL support:
  zlib support:  -DUSE_ZLIB
  png support:   
  palette rgba png support:  
  jpeg support:  
  iconv support: -DUSE_ICONV

  AGG support:   -DUSE_AGG
  Cairo (SVG,PDF) support:   
  Ming(flash) support:   
  PDFLib support:-DUSE_PDF


 -- Support Libraries - 
  Proj.4 support:-DUSE_PROJ

  Libxml2 support:   -DUSE_LIBXML2
  FriBidi support:   -DUSE_FRIBIDI
  Curl support:  -DUSE_CURL
  FastCGI support:   
  Threading support: -DUSE_THREAD

  GEOS support:  -DUSE_GEOS -DGEOS_HAS_SIMPLIFY

 -- Data Format Drivers --- 
  native tiff support:   -DUSE_TIFF

  PostGIS support:   -DUSE_POSTGIS
  EPPL7 support: -DUSE_EPPL
  ArcSDE support:
  OGR support:   -DUSE_OGR

  GDAL support:  -DUSE_GDAL
  Oracle Spatial support:

 -- OGC Services -- 
  WMS Server:-DUSE_WMS_SVR

  WMS Client:-DUSE_WMS_LYR
  WFS Server:-DUSE_WFS_SVR
  WFS Client:-DUSE_WMS_LYR
  WCS Server:-DUSE_WCS_SVR
  SOS Server:-DUSE_SOS_SVR

 -- MapScript - 
  PHP MapScript: yes

___

#Vasi

  



--
Alan Boudreault
Mapgears
http://www.mapgears.com/ 


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


Re: [mapserver-users] wms output problem

2010-01-06 Thread Valeria Muñoz
i will do that thanks a lot.

Saludos

2010/1/6 Rahkonen Jukka 

> Hi,
>
> Mapserver can always return images at least in png, jpeg and gif formats.
> You must explicitly tell it what format you want with WMS &FORMAT=
> parameter. You can check what kind of requests the client is sending from
> your Apache access.log file.
>
> -Jukka-
>
>
> Valeria Muñoz wrote:
>
> I define PNG in the mapfile.
>
> RG
>
> 2010/1/6 Rahkonen Jukka 
>
> > Hi,
> >
> > Are you sure you are asking for png?  Your client may have a default
> > setting for jpeg. The request should look like
> >
> > http://localhost/cgi-bin/mapserv.exe?map=c
> > :\ms4w\osm.map&REQUEST=GetMap&SERVICE=WMS
> > &VERSION=1.1.1&WIDTH=1059&HEIGHT=687&LAYERS=default&TRANSPARENT=TRUE
> > &FORMAT=image/png
> > &BBOX=3430775,6764522,3430932,6764624
> > &SRS=epsg:2393&STYLES=
> >
> > -Jukka Rahkonen-
> >
> > Valeria Muñoz wrote:
> >
> >
> > Hi!
> >
> >   i have a problem with the output image of my wms, i define PNG but
> return
> > JPEG.
> >
> > Source mapfile
> >
> > OUTPUTFORMAT
> >NAME png
> >DRIVER "AGG/PNG"
> >MIMETYPE 'image/png'
> >  IMAGEMODE RGB
> >  EXTENSION "png"
> >   FORMATOPTION "TRANSPARENT=OFF"
> >   FORMATOPTION "INTERLACE=ON"
> >  END
> >
> > source wms mapfile
> >
> > OUTPUTFORMAT
> >NAME png
> >DRIVER "AGG/PNG"
> >MIMETYPE 'image/png'
> >  IMAGEMODE RGB
> >  EXTENSION "png"
> >   FORMATOPTION "TRANSPARENT=OFF"
> >   FORMATOPTION "INTERLACE=ON"
> >  END
> >
> >
> > can you help me please?
> >
> > RG
> >
> >
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] wms output problem

2010-01-06 Thread Rahkonen Jukka
Hi,

Mapserver can always return images at least in png, jpeg and gif formats. You 
must explicitly tell it what format you want with WMS &FORMAT= parameter. You 
can check what kind of requests the client is sending from your Apache 
access.log file.

-Jukka-


Valeria Muñoz wrote:
 
I define PNG in the mapfile.

RG

2010/1/6 Rahkonen Jukka 

> Hi,
>
> Are you sure you are asking for png?  Your client may have a default
> setting for jpeg. The request should look like
>
> http://localhost/cgi-bin/mapserv.exe?map=c
> :\ms4w\osm.map&REQUEST=GetMap&SERVICE=WMS
> &VERSION=1.1.1&WIDTH=1059&HEIGHT=687&LAYERS=default&TRANSPARENT=TRUE
> &FORMAT=image/png
> &BBOX=3430775,6764522,3430932,6764624
> &SRS=epsg:2393&STYLES=
>
> -Jukka Rahkonen-
>
> Valeria Muñoz wrote:
>
>
> Hi!
>
>   i have a problem with the output image of my wms, i define PNG but return
> JPEG.
>
> Source mapfile
>
> OUTPUTFORMAT
>NAME png
>DRIVER "AGG/PNG"
>MIMETYPE 'image/png'
>  IMAGEMODE RGB
>  EXTENSION "png"
>   FORMATOPTION "TRANSPARENT=OFF"
>   FORMATOPTION "INTERLACE=ON"
>  END
>
> source wms mapfile
>
> OUTPUTFORMAT
>NAME png
>DRIVER "AGG/PNG"
>MIMETYPE 'image/png'
>  IMAGEMODE RGB
>  EXTENSION "png"
>   FORMATOPTION "TRANSPARENT=OFF"
>   FORMATOPTION "INTERLACE=ON"
>  END
>
>
> can you help me please?
>
> RG
>
>

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


Re: [mapserver-users] wms output problem

2010-01-06 Thread Valeria Muñoz
I define PNG in the mapfile.

RG

2010/1/6 Rahkonen Jukka 

> Hi,
>
> Are you sure you are asking for png?  Your client may have a default
> setting for jpeg. The request should look like
>
> http://localhost/cgi-bin/mapserv.exe?map=c
> :\ms4w\osm.map&REQUEST=GetMap&SERVICE=WMS
> &VERSION=1.1.1&WIDTH=1059&HEIGHT=687&LAYERS=default&TRANSPARENT=TRUE
> &FORMAT=image/png
> &BBOX=3430775,6764522,3430932,6764624
> &SRS=epsg:2393&STYLES=
>
> -Jukka Rahkonen-
>
> Valeria Muñoz wrote:
>
>
> Hi!
>
>   i have a problem with the output image of my wms, i define PNG but return
> JPEG.
>
> Source mapfile
>
> OUTPUTFORMAT
>NAME png
>DRIVER "AGG/PNG"
>MIMETYPE 'image/png'
>  IMAGEMODE RGB
>  EXTENSION "png"
>   FORMATOPTION "TRANSPARENT=OFF"
>   FORMATOPTION "INTERLACE=ON"
>  END
>
> source wms mapfile
>
> OUTPUTFORMAT
>NAME png
>DRIVER "AGG/PNG"
>MIMETYPE 'image/png'
>  IMAGEMODE RGB
>  EXTENSION "png"
>   FORMATOPTION "TRANSPARENT=OFF"
>   FORMATOPTION "INTERLACE=ON"
>  END
>
>
> can you help me please?
>
> RG
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] wms output problem

2010-01-06 Thread Rahkonen Jukka
Hi,

Are you sure you are asking for png?  Your client may have a default setting 
for jpeg. The request should look like 

http://localhost/cgi-bin/mapserv.exe?map=c:\ms4w\osm.map&REQUEST=GetMap&SERVICE=WMS
&VERSION=1.1.1&WIDTH=1059&HEIGHT=687&LAYERS=default&TRANSPARENT=TRUE
&FORMAT=image/png
&BBOX=3430775,6764522,3430932,6764624
&SRS=epsg:2393&STYLES=

-Jukka Rahkonen-

Valeria Muñoz wrote:

 
Hi!

   i have a problem with the output image of my wms, i define PNG but return
JPEG.

Source mapfile

OUTPUTFORMAT
NAME png
DRIVER "AGG/PNG"
MIMETYPE 'image/png'
  IMAGEMODE RGB
  EXTENSION "png"
   FORMATOPTION "TRANSPARENT=OFF"
   FORMATOPTION "INTERLACE=ON"
  END

source wms mapfile

OUTPUTFORMAT
NAME png
DRIVER "AGG/PNG"
MIMETYPE 'image/png'
  IMAGEMODE RGB
  EXTENSION "png"
   FORMATOPTION "TRANSPARENT=OFF"
   FORMATOPTION "INTERLACE=ON"
  END


can you help me please?

RG

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


Re: [mapserver-users] php mapscript

2010-01-06 Thread Jeff McKenna

John Callahan wrote:
Does anyone know of a php_mapscript.dll (this is for Windows) that works 
with MapServer 5.4+ and PHP 5.2?   Looking at MS4W 3.0 beta, it looks 
like it's for MS 5.4.2 and PHP 5.3.  Previous version of MS4W is for PHP 
5.2 and MS 5.2.4.   Thanks.




Hello John,

Happy new year.

Yes you are correct that recent versions of MS4W use PHP 5.3

If you require a custom build you can always contact me directly to 
discuss rates.


-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


Re: [mapserver-users] Error configuring WMS app : Projection library error. Invalid argument...

2010-01-06 Thread stela anders
Guys, other problem now ;(
I have 2 layers with same name ... One with LINE and other with ANNOTATION
... It works fine in mapscript environment... But now, with WMS I got a
error when I use both layers with same name:

msWMSLoadGetMapParams(): *WMS server error*. *Invalid layer*(s) given in the
 *LAYERS* parameter

Both layer works separately...

My 2 layers

LAYER
NAME Road
METADATA
"wms_title""Road"
END
GROUP "Transport"
TYPE LINE
STATUS ON
INCLUDE "Connection.map"
DATA ...
PROJECTION
"+init=epsg:4326"
END
CLASS
TEMPLATE "dummy"
NAME "Rod x"
STYLE
SYMBOL "road"
COLOR 0 0 0
ANTIALIAS TRUE
END
END
END

LAYER
NAME Road
METADATA
"wms_title""Road"
END
GROUP "Transport"
TYPE ANNOTATION
STATUS ON
INCLUDE "Connection.map"
DATA ...
PROJECTION
"+init=epsg:4326"
END
LABELITEM 'rod'
CLASS
TEMPLATE "dummy"
STYLE
SYMBOL 'roadsymbol'
END
LABEL
TYPE TRUETYPE
FONT Arial
SIZE 7
COLOR 70 70 70
MINDISTANCE 100
MINFEATURESIZE 10
PARTIALS FALSE
BUFFER 10
END
END
END


Why?

Thanks and sorry for noob questions

Stella



2010/1/5 Daniel Walton 

> You're welcome Stella. I struggled through the Windows WMS stuff a few
> months ago, glad to help.
>
> -Dan
>
>
> On Tue, Jan 5, 2010 at 10:18 AM, stela anders wrote:
>
>> Woww!
>> Thats it
>> Worked now!
>> Thanksss guysss ! Thanks Daniel!
>> iuupi!
>>
>> Stella
>>
>> 2010/1/5 Daniel Walton 
>>
>> Stella,
>>>
>>> Try adding a config entry to your mapfile that points to the folder
>>> containing your epsg configuration file:
>>>
>>> MAP
>>> ...
>>> CONFIG "PROJ_LIB" "C:/somedir/proj/nad/"
>>>
>>>
>>> ...
>>> END
>>>
>>>
>>>
>>>  Dan Walton
>>> dgwal...@gmail.com
>>> [image: Linkedin] [image:
>>> Twitter] 
>>>
>>>
>>> On Tue, Jan 5, 2010 at 9:56 AM, stela anders wrote:
>>>
 Hello Frank!
 Thanks for your time ;)

 I´m working on Windows 7...

 I made all modifications you suggest me, but got the same error...
 The URL now is :


 http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.map&LAYERS=Argentina&TRANSPARENT=true&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-62.9142,-17.3676,-57.2892,-11.7426&WIDTH=256&HEIGHT=256


 The only difference that I noticed is that the error in browser now is
 in TEXT format...
 Before the error was write in a Image...

 I´m completely lost ! :(

 Any other idea?

 ps.: Sorry for my bad english

 Stella

 2010/1/5 Frank Warmerdam 

 stela anders wrote:
>
>>LAYER
>>NAME Argentina
>>METADATA
>>"wms_title""Argentina"   ##required
>>END  TYPE POLYGON
>>STATUS ON
>>INCLUDE "Connection.map"DATA "the_geom from
>> tbl_argentina USING UNIQUE gid USING SRID=0"
>>PROJECTION
>>"proj=longlat"
>>"ellps=WGS84"
>>"datum=WGS84"
>>"no_defs"
>>END
>>
>>CLASS
>>COLOR 255 200 255
>>END
>>END
>>
>> END
>>
>> When I try to open that with my OpenLayer app, I got images with that
>> error :
>>
>> Error: msProcessProjection(): /Projection library error/. /Invalid
>> argument
>>
>
> Stella,
>
> I am not sure why you are getting this error.  I search high and low
> and can't
> find "Invalid argument" in either MapServer or PROJ.4.  Are you working
> on
> linux or Windows?  Were the "/" characters really in this message?  It
> is
> hard for me to understand how this could happen.
>
> With regard to your mapfile, I was surprised that you don't have
> wms_srs metadata on your layer.  It is a shot in the dark, but perhaps
> you
> could add wms_srs EPSG:4326 metadata on the layer, and reorder the
> wms_srs
> metadata on the map to put EPSG:4326 first.
>
> Also, you could try changing:
>
>
> > PROJECTION
> > "proj=longlat"
> > "ellps=WGS84"
> > "datum=WGS84"
> > "no_defs"
> > END
>
> to:
>
> PROJECTION
>  "+init=epsg:43

[mapserver-users] wms output problem

2010-01-06 Thread Valeria Muñoz
Hi!

   i have a problem with the output image of my wms, i define PNG but return
JPEG.

Source mapfile

OUTPUTFORMAT
NAME png
DRIVER "AGG/PNG"
MIMETYPE 'image/png'
  IMAGEMODE RGB
  EXTENSION "png"
   FORMATOPTION "TRANSPARENT=OFF"
   FORMATOPTION "INTERLACE=ON"
  END

source wms mapfile

OUTPUTFORMAT
NAME png
DRIVER "AGG/PNG"
MIMETYPE 'image/png'
  IMAGEMODE RGB
  EXTENSION "png"
   FORMATOPTION "TRANSPARENT=OFF"
   FORMATOPTION "INTERLACE=ON"
  END


can you help me please?

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


RE: [mapserver-users] Error configuring WMS app : Projection libr ary error. Invalid argument...

2010-01-06 Thread Fuchs Juan Carlos
Hi Stela
I will add my 10 cents to Frank´s answer
you put
DATA "the_geom from tbl_argentina USING UNIQUE gid USING SRID=0"
¿don´t it have to say
DATA "the_geom from tbl_argentina USING UNIQUE gid USING SRID=-1"
?
cheers
JC.

-Mensaje original-
De: Frank Warmerdam [mailto:warmer...@pobox.com]
Enviado el: Martes, 05 de Enero de 2010 12:03 p.m.
Para: stela anders
CC: MAPSERVER-USERS
Asunto: Re: [mapserver-users] Error configuring WMS app : Projection
library error. Invalid argument...


stela anders wrote:
> LAYER
> NAME Argentina
> METADATA
> "wms_title""Argentina"   ##required
> END   
> TYPE POLYGON
> STATUS ON
> INCLUDE "Connection.map"
> DATA "the_geom from tbl_argentina USING UNIQUE gid USING SRID=0"
> PROJECTION
> "proj=longlat"
> "ellps=WGS84"
> "datum=WGS84"
> "no_defs"
> END
> 
> CLASS
> COLOR 255 200 255
> END
> END
> 
> END
> 
> When I try to open that with my OpenLayer app, I got images with that 
> error :
> 
> Error: msProcessProjection(): /Projection library error/. /Invalid
argument

Stella,

I am not sure why you are getting this error.  I search high and low and
can't
find "Invalid argument" in either MapServer or PROJ.4.  Are you working on
linux or Windows?  Were the "/" characters really in this message?  It is
hard for me to understand how this could happen.

With regard to your mapfile, I was surprised that you don't have
wms_srs metadata on your layer.  It is a shot in the dark, but perhaps you
could add wms_srs EPSG:4326 metadata on the layer, and reorder the wms_srs
metadata on the map to put EPSG:4326 first.

Also, you could try changing:

 > PROJECTION
 > "proj=longlat"
 > "ellps=WGS84"
 > "datum=WGS84"
 > "no_defs"
 > END

to:

PROJECTION
   "+init=epsg:4326"
END

in both the layer and map.  This is slower to expand but it might
make it easier for mapserver to relate to epsg codes.

Best regards,
-- 
---+
--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
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] How do I have a polygon with an outline with a width?

2010-01-06 Thread Christy Nieman

Hi,

If you are indeed using MapServer 5.4, you should be able to control the 
width of a polygon's outline by specifying an OUTLINECOLOUR and a 
WIDTH.  I just tested with the 5.4 svn branch and had no trouble.


I'm not sure what you mean by it seems that MapServer cannot read a 
symbol file for polygons - I have no problem using it to specify a fill 
pattern, but I don't think it can be used to specify an outline style.


Christy

On 01/05/2010 02:59 PM, Andreas Douvalis wrote:
I test chameleon 2.6 with Mapserver 5.4 and I have problem with 
Polygons Symbols.
I have already  altered my Symbol.sym file to start with  "SYMBOLSET" 
and finish with "END".
 In fact  I have problem only with polygons and their WIDTH. Lines and 
points works perfect.

it seems like mapserver can not read Symbol.sym  for polygons.
Here is a part of Layer section in map file:
//--
LAYER
NAME "Perifereies"
GROUP "Διοικητικά Όρια"
STATUS OFF
DATA "C:\ms4w\apps\chameleon\samples\dataGreek\Dioikitika\Perifereies"
TYPE POLYGON
UNITS METERS
LABELITEM "NAME"
METADATA
  wms_name "Περιφέρειες"
  wms_title  "Περιφέρειες"
  SPATIALSEARCH "NAME,Έδρα_Περιφ,POP_1991_,POP_2001_,Embad_km2"
  SPATIALSEARCHLIST "NAME,Έδρα_Περιφ,POP_1991_,POP_2001_,Embad_km2"
END
TEMPLATE "Perifereies.dbf"
CLASS
  NAME "Perifereies"
  STYLE
SYMBOL "circle"
SIZE 3
COLOR 12 112 255
OUTLINECOLOR 0 112 255
WIDTH 5
  END
END
END
//--
If I dont use '..SYMBOL "circle".' and I write :
  STYLE
COLOR 12 112 255
OUTLINECOLOR 0 112 255
WIDTH 5
 END
 everything is ok  but then  I cannot control outline width.
Regarding the outputformat here is the part of my map file:
OUTPUTFORMAT
NAME 'AGG_Q'
DRIVER AGG/PNG
IMAGEMODE RGB
FORMATOPTION "QUANTIZE_FORCE=ON"
FORMATOPTION "QUANTIZE_DITHER=OFF"
FORMATOPTION "QUANTIZE_COLORS=256"
END

I HAVE ALREADY CHECK THE ABOVE LINK BUT THERE IS NO CHANGE REGARDING 
THE OUTLINE WIDTH


http://mapserver.org/faq.html#how-do-i-have-a-polygon-that-has-both-a-fill-and-an-outline-with-a-width 



ANY HELP PLEASE



Χρησιμοποιείτε Yahoo!
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την 
καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων

http://login.yahoo.com/config/mail?.intl=gr


___
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] Raster error - failed to reproject

2010-01-06 Thread Espen Isaksen
Hi!

I get some errors for some images in Norway. The images are in ECW
format and EPSG:32632 projection. We reproject these images to
Spherical Mercator on-the-fly in Mapserver, but we get this error on
some of the images:

msProjectRect(): all points failed to reproject, trying to fall back
to using world bounds ... hope this helps.

The peculiar thing is that this error only happens in areas way
outside of Norway. So I would expect that these images should not be
accessed at all.

Anybody have an idea what is going on?

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


[mapserver-users] cofigure problems on Ubuntu 9.10

2010-01-06 Thread luftadler

Hi everyone, 

I try to install MapServer 5.6.0, for the first time, on my machine (using
Ubuntu 9.10).
The problem is that my configuration don't find few installed libraries
like: png and jpeg.

My configuration script:

./configure \
--enable-debug \
--prefix=/usr \
--with-xml2 \
--with-pdf \
--with-gd \
--with-jpeg \
--with-freetype \
--with-agg \
--with-eppl \
--with-proj \
--with-threads \
--with-sde \
--with-geos \
--with-ogr \
--with-gdal \
--with-tiff \
--with-postgis \
--with-wfs \
--with-wcs \
--with-wmsclient \
--with-wfsclient \
--with-sos \
--with-fribidi-config \
--with-php=/usr/include/php5 \
--with-httpd=/usr/sbin/apache2 \

__
MapServer is now configured for 

 -- Compiler Info - 
  C compiler:gcc -g  -fPIC -Wall  
  C++ compiler:  g++ -g  -fPIC -Wall  
  Debug: -g 
  Generic NINT:  

 -- Renderer Settings - 
  OpenGL support:
  zlib support:  -DUSE_ZLIB
  png support:   
  palette rgba png support:  
  jpeg support:  
  iconv support: -DUSE_ICONV
  AGG support:   -DUSE_AGG
  Cairo (SVG,PDF) support:   
  Ming(flash) support:   
  PDFLib support:-DUSE_PDF

 -- Support Libraries - 
  Proj.4 support:-DUSE_PROJ
  Libxml2 support:   -DUSE_LIBXML2
  FriBidi support:   -DUSE_FRIBIDI
  Curl support:  -DUSE_CURL
  FastCGI support:   
  Threading support: -DUSE_THREAD
  GEOS support:  -DUSE_GEOS -DGEOS_HAS_SIMPLIFY

 -- Data Format Drivers --- 
  native tiff support:   -DUSE_TIFF
  PostGIS support:   -DUSE_POSTGIS
  EPPL7 support: -DUSE_EPPL
  ArcSDE support:
  OGR support:   -DUSE_OGR
  GDAL support:  -DUSE_GDAL
  Oracle Spatial support:

 -- OGC Services -- 
  WMS Server:-DUSE_WMS_SVR
  WMS Client:-DUSE_WMS_LYR
  WFS Server:-DUSE_WFS_SVR
  WFS Client:-DUSE_WMS_LYR
  WCS Server:-DUSE_WCS_SVR
  SOS Server:-DUSE_SOS_SVR

 -- MapScript - 
  PHP MapScript: yes
___

#Vasi

-- 
View this message in context: 
http://n2.nabble.com/cofigure-problems-on-Ubuntu-9-10-tp4260091p4260091.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] Mapserver OSM data render problem

2010-01-06 Thread Marek Wawoczny
2010/1/5 Rahkonen Jukka :
> What options did you use when importing data with osm2pgsql?  The mapfile is 
> set to use projection epsg:4326 and that requires the use of some switch with 
> osm2pgsql, perhaps it is -l. README.txt of ogr2pgsql tells about osm2pgsql 
> projections:
>
> Try either by importing data again by using a swith suitable for epsg:4326 or 
> by editing your mapfile to use epsg:900913 instead of epsg:4326.

Hello,

Thank you! It's working now :) Default projection for osm2pgsql is
epsg:900913 (it was changed some time ago) - maybe it's a good idea to
update tutorial and mapnik-utils?

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


[mapserver-users] about label in mapfile

2010-01-06 Thread 王连波
Hi all,
I configured my mapfile with label as follows:
labelitem "name"
CLASS
NAME"river"
   STYLE
   color 0 200 0
   width 3
   END

label
angle auto
COLOR 0 255 0
SHADOWCOLOR 218 0 0
SHADOWSIZE 1 1
TYPE truetype
encoding GB2312
font simsun
SIZE 10
POSITION auto
PARTIALS FALSE
 #  MINDISTANCE 30
BUFFER 4
FORCE true
END # end of label
 END
everything is ok except two problems:
1、some texts did not display wholly, part of the word disapear.
2、in the river layer, some rivers were labeled two or more times while I
want that each river is labeled once.
Anyone can help me to resolve those two problems, thank you very much.

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


Re: [mapserver-users] MAPSCRIPT - queryByAttributes on WFS layer

2010-01-06 Thread Charlotte DECLERCQ
I forgot to tell, the error I get with $oLayer->queryByAttributes($m_Champs, 
"(".stripslashes($m_Requete).")", 
MS_MULTIPLE ) is 

Warning: [MapServer Error]: msQueryByAttributes(): No matching record(s) found.
Warning: [MapServer Error]: msEvalExpression: Failed to parse expression


- Mail Original -
De: "Charlotte DECLERCQ" 
À: "Daniel Morissette" 
Cc: mapserver-users@lists.osgeo.org
Envoyé: Mercredi 6 Janvier 2010 09:07:43
Objet: Re: [mapserver-users] MAPSCRIPT - queryByAttributes on WFS layer

Hello Daniel and thanks for the quick answer.

$oLayer->queryByAttributes($m_Champs, "(".stripslashes($m_Requete).")", 
MS_MULTIPLE );

doesn't seem to work with $m_Requete : upper(gid) = upper(\'140\').

Is it possible to do some comparison like gid > 140 ... on a WFS layer?
I know it is possible on other types of layers.

-- 
Charlotte DECLERCQ

ALKANTE SAS
Ingénieur R&D SIG
1, rue du Chêne Morand
35 510 Cesson-Sévigné
Bur: + 33 (0) 2 99 22 25 70
fax : + 33 (0) 2 99 32 12 76

- Mail Original -
De: "Daniel Morissette" 
À: mapserver-users@lists.osgeo.org
Envoyé: Mardi 5 Janvier 2010 17:10:28
Objet: Re: [mapserver-users] MAPSCRIPT - queryByAttributes on WFS layer

Charlotte DECLERCQ wrote:
> Hello,
> 
> I am trying to launch a query on a WFS layer.
> The query is :
> $oLayer->queryByAttributes($m_Champs, "\"".stripslashes($m_Requete)."\"", 
> MS_MULTIPLE );
> with $m_Champs : gid
> $m_Requete : upper(gid) = upper(\'140\')
> 
> Whereas there is one record matching, mapserver can't find it : No matching 
> record(s) found.
> 
> I obtain the same result with $m_Requete : gid = '140', or gid = 140, or gid 
> = \'140\'
> 
> But if $m_Requete is equals to 140, then mapserver returns the element.
> 
> Any idea?
> 
> Thanks,
> 

If $m_Requete contains a logical expression such as "gid = '140'" then 
you need to enclose it inside round brackets for the parser to detect 
that it is a logical expression. If you enclose it inside double quotes 
(as you did above) then it treats $m_requete as a constant that is 
matched against $m_champs. That's why things work when you use 
$m_requete = "140";

So the best fix is to use $m_requete = "140" with the 
queryByAttributes() statement above since constant expressions are the 
fastest.

However, if you want to pass a logical expression for some reason, then 
you should use:

$oLayer->queryByAttributes($m_Champs, "(".stripslashes($m_Requete).")", 
MS_MULTIPLE );

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




-- 
Charlotte DECLERCQ

ALKANTE SAS
Ingénieur R&D SIG
1, rue du Chêne Morand
35 510 Cesson-Sévigné
Bur: + 33 (0) 2 99 22 25 70
fax : + 33 (0) 2 99 32 12 76


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


Re: [mapserver-users] MAPSCRIPT - queryByAttributes on WFS layer

2010-01-06 Thread Charlotte DECLERCQ
Hello Daniel and thanks for the quick answer.

$oLayer->queryByAttributes($m_Champs, "(".stripslashes($m_Requete).")", 
MS_MULTIPLE );

doesn't seem to work with $m_Requete : upper(gid) = upper(\'140\').

Is it possible to do some comparison like gid > 140 ... on a WFS layer?
I know it is possible on other types of layers.

-- 
Charlotte DECLERCQ

ALKANTE SAS
Ingénieur R&D SIG
1, rue du Chêne Morand
35 510 Cesson-Sévigné
Bur: + 33 (0) 2 99 22 25 70
fax : + 33 (0) 2 99 32 12 76

- Mail Original -
De: "Daniel Morissette" 
À: mapserver-users@lists.osgeo.org
Envoyé: Mardi 5 Janvier 2010 17:10:28
Objet: Re: [mapserver-users] MAPSCRIPT - queryByAttributes on WFS layer

Charlotte DECLERCQ wrote:
> Hello,
> 
> I am trying to launch a query on a WFS layer.
> The query is :
> $oLayer->queryByAttributes($m_Champs, "\"".stripslashes($m_Requete)."\"", 
> MS_MULTIPLE );
> with $m_Champs : gid
> $m_Requete : upper(gid) = upper(\'140\')
> 
> Whereas there is one record matching, mapserver can't find it : No matching 
> record(s) found.
> 
> I obtain the same result with $m_Requete : gid = '140', or gid = 140, or gid 
> = \'140\'
> 
> But if $m_Requete is equals to 140, then mapserver returns the element.
> 
> Any idea?
> 
> Thanks,
> 

If $m_Requete contains a logical expression such as "gid = '140'" then 
you need to enclose it inside round brackets for the parser to detect 
that it is a logical expression. If you enclose it inside double quotes 
(as you did above) then it treats $m_requete as a constant that is 
matched against $m_champs. That's why things work when you use 
$m_requete = "140";

So the best fix is to use $m_requete = "140" with the 
queryByAttributes() statement above since constant expressions are the 
fastest.

However, if you want to pass a logical expression for some reason, then 
you should use:

$oLayer->queryByAttributes($m_Champs, "(".stripslashes($m_Requete).")", 
MS_MULTIPLE );

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