Re: [mapserver-users] Fwd: queryByPoint - Street Layer ?

2009-07-10 Thread Hussain Hashmi
On Wed, Jul 8, 2009 at 8:56 PM, Steve Lime wrote:

> May well be a tolerance issue. By default it's in pixels and based on the
> extent you're setting (I don't
> know what the map SIZE is set to) it's probably a super tiny value. Have
> you tried setting a tolerance
> in map units? E.g.
>
>  TOLERANCE 5
>  TOLERANCEUNITS meters # or whatever
>
> Just an idea...
>
> Steve
>
> >>> On 7/8/2009 at 12:20 PM, in message
> <28aabd160907081020g1a1482f4mabdfe3c24d747...@mail.gmail.com>, Hussain
> Hashmi
>   wrote:
> > hi
> >
> > Can someone here guide me on this issue please.
> > My Objective is to get attribute values for any selected street (Line).
> > My client application is based on KaMap.
> > I have a similar solution for Polygons which works perfectly.
> >
> >
> > I am trying to query a street layer which gives me the following error.
> >
> > Warning: [MapServer Error]: msQueryByPoint(): No matching record(s) found
> in
> > C:\... on line 84
> > Warning: [MapServer Error]: msShapefileOpen():
> > (/ms4w/maps/./city/./city/streets) in c:\... on line 84
> >
> >
> > MAPFILE
> > **
> >   LAYER
> > NAME 'streets_Query'
> > GROUP 'streets_Query'
> > DATA './city/streets'
> > TYPE line
> > MAXSCALE 3001
> > STATUS ON
> >
> > TOLERANCE 5
> > TEMPLATE './_templates/Streets_Identify.html'
> > METADATA
> >   "queryable" "true"
> >searchfield "ANAME"
> >fields "ZIP_CODE"
> > END
> >   END #end layer
> >
> >
> >
> > PHP MAPSCRIPT
> > **
> > //--- Get Input Parameters.
> > if (isset($_REQUEST['map'])){$szMap = $_REQUEST['map'];} else {echo
> "map
> > not defined"; die;}
> > if (isset($_REQUEST['coords'])) {$coords =
> > explode(',',$_REQUEST['coords']);} else {echo "coordinate not defined";
> > die;}
> >
> >
> > //--- Load Mapscript Module.
> > $szPHPMapScriptModule = 'php_mapscript.'.PHP_SHLIB_SUFFIX;
> > if (!extension_loaded('MapScript')) {
> >  dl($szPHPMapScriptModule);
> > }
> >
> > //--- Load Current Map file.
> > $szMapFile=str_replace('<>',$szMap,'/ms4w/maps/<>.map');
> > $oMap = ms_newMapObj($szMapFile);
> >
> >
> > //--- SETTING MAP EXTENT to query extent..
> > $mapExtent = $oMap->extent;
> > $oMap->setExtent($coords[0],$coords[1],
> > $coords[0]+0.01,$coords[1]+0.01);
> >
> > //--- SETTING QUERY POINT
> > $point = ms_newPointObj();
> > $point->setXY($coords[0], $coords[1]);
> >
> > //--- Initialize map query.
> > $oMap->preparequery();
> >
> > //--- LOOP ON LAYERS and get identify results.
> > $tot = $oMap->numlayers;
> > for ($i = 0; $i < $tot; $i++) {
> >//--- get map layer.
> >$oLayer = $oMap->getLayer($i);
> >
> >//--- Verify Layer type
> >if ($oLayer->name != 'streets_Query') continue;
> >
> >//--- Validate if query succeeds.
> >$check_query = $oLayer->queryByPoint($point, MS_SINGLE, 0);
> >if ($check_query != MS_SUCCESS) {continue;}
> >
> >//--- Open layer for data input.
> > $oLayer->open();
> >
> >//--- Get the record values corresponding to a result tileindex.
> >$oResultCache = $oLayer->getResult(0);
> >$oShape = $oLayer->getShape($oResultCache->tileindex,
> > $oResultCache->shapeindex);
> >$aValues = $oShape->values;
> >
> >//--- Get the field value.
> >echo $aValues['ZIP_CODE'];  echo ";";
> >
> >//--- FREE SHAPE
> >$oShape->free();
> >$oLayer->close();
> >break;
> > } // for i
> >
> >
> > Best regards,
> > Mir Hashmi
> >
> >
> >
> > --
> > This message may contain confidential and/or privileged information. If
> you
> > have received this message in error,please notify us immediately by
> > responding to this e-mail and delete it from your system. Thanks for your
> > cooperation.
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: Reprojecting cascading WMS requests (Rob)

2009-07-10 Thread Mark Volz
Rob,

Anyone can correct me if I am wrong on this however I think you have to enter
projection information in 3 times.

1) the projection of your map
2) the projection of your data, in this case the wms service so that
mapserver knows what to reproject from.
3) the projection that you are requesting from the wms service - in the
metadata section.

I am doing this on some of my applications so let me know if your having
trouble, otherwise if someone has a better thought let me know if I am
wasting lines of code.

Example:

MAP
...
Projection # of the Map
End Projection
...
..
Layer
Projection # of the Source
End Projection
...
Metadata
"wms_srs" "ESPG:27700"  #projection you are requesting in WMS

End #Metadata
...
End #layer

Mark Volz
GIS Specialist
Lyon County, MN
(507) 532-8218

--

Message: 1
Date: Fri, 10 Jul 2009 17:23:28 +0100
From: Rob 
Subject: [mapserver-users] Reprojecting cascading WMS requests
To: mapserver-users@lists.osgeo.org
Message-ID:
<2a955f950907100923m1ad368b7m8eb9e00727d29...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi

I'm obviously having Friday afternoon blindness, as I can't see what I
am doing wrong!  I am trying to set up a basic Mapserver install (MS4W
v3.0 Beta 4)

MapServer version 5.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=PDF
 OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
SUPPORTS=ICO
NV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI
SUP
PORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS
INPUT=OGR
 INPUT=GDAL INPUT=SHAPEFILE


which points to a WMS service which only supports a single projection.
I want to get my Mapserver to reproject that data on the fly to other
projection systems, but don't seem to be doing it right!

This is my mapfile

MAP
NAME SPIRIT
STATUS ON
SIZE 600 600
EXTENT 0 0 65 130
UNITS METERS
SHAPEPATH "temp"
IMAGECOLOR 255 255 255
#FONTSET 'fontset.txt'

#SYMBOLSET 'temp/examples.sym'

IMAGETYPE JPEG
IMAGEQUALITY 75

IMAGETYPE png
OUTPUTFORMAT
   NAME png
   DRIVER "GD/PNG"
   MIMETYPE "image/png"
   IMAGEMODE rgb
END

IMAGETYPE jpeg
OUTPUTFORMAT
   NAME jpeg
   DRIVER "GD/JPEG"
   MIMETYPE "image/jpeg"
   IMAGEMODE rgb
END

PROJECTION
 "init=epsg:27700"
END

WEB
  IMAGEPATH "c:\temp\"
  METADATA
WMS_TITLE "WMS Server"
WMS_ABSTRACT "WMS Server."
WMS_ONLINERESOURCE
"http://localhost/cgi-bin/mapserv.exe?map=example.map&";
WMS_SRS "EPSG:27700 ESPG:4326"
  END
END

  LAYER
NAME "layer"
TYPE RASTER
STATUS ON
CONNECTION "http://externalwmshost/&";
CONNECTIONTYPE WMS
METADATA
"wms_srs"   "EPSG:27700"
"wms_name"  "layername"
"wms_server_version""1.1.1"
"wms_formatlist""image/png,image/jpeg"
 END
   END

END

END # Map File


but when I make a WMS request against it

http://localhost/cgi-bin/mapserv.exe?map=example.map&request=getmap&service=w
ms&layers=layer&bbox=53.5,1.4,53.51,1.41&width=400&height=400&version=1.1.1&s
rs=EPSG:4326&format=jpeg

I get



http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd";>


msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS
must be valid for all requested layers.



I'm guessing I'm missing something simple, but I don't know what it
is.  Any help gratefully accepted!

Thanks

Rob

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


Re: [mapserver-users] Oracle native / Oracle OGR

2009-07-10 Thread Thomas Bonfort
this can be a solution in some cases yes. In ours the the query is
dynamically built and passed on through the url, so it isn't as simple
as that.

thomas

On Fri, Jul 10, 2009 at 21:29, Smith, Michael
ERDC-CRREL-NH wrote:
> Thomas,
>
> To solve the second issue, use a view.
>
> Mike
>
>
> --
> Michael Smith
> Remote Sensing GIS Center
> CRREL - ERDC
> US Army Corps of Engineers
> Hanover, NH
>
>
>
>
> On 7/10/09 2:38 PM, "Thomas Bonfort"  wrote:
>
>> some of our clients have come up with a few quirks in the native
>> oracle driver that should be taken into account:
>>
>> * the strings storing the fields returned by the database have a fixed
>> length in mapserver, so that might have to be overridden at compile
>> time if you are planning to return data longer than a certain value
>> (2048 bytes from memory). For normal map rendering this shouldn't be a
>> problem, but problems may arise when doing wfs queries and returning a
>> paragraph of text for example in an attribute.
>>
>> * I haven't investigated this much more, but we've also had problems
>> with long query strings (we're talking DATA mapfile strings of several
>> kbytes here)
>>
>> regards,
>>
>> thomas
>>
>> www.camptocamp.com
>> +33 4 79 26 57 97
>>
>>
>>
>> On Fri, Jul 10, 2009 at 17:59, Schlagel, Joel D
>> IWR wrote:
>>> For what it's worth - we've used the oracle direct connect in a production
>>> environment all day, every day for several years with no quirks to report.
>>>
>>> -joel
>>>
>>>
>>>
>>> On 7/10/09 11:36 AM, "Frank Warmerdam"  wrote:
>>>
 YOUNESS ELMEDRAOUI wrote:
> Hello everybody,
>
> i have a question:
> what's the difference between a connection to oracle DB with native
> oraclespatial and OGR?
> performance, ...??

 Youness,

 Generally speaking the direct connection should be faster since it avoids
 a lot of OGR overhead.  They are completely distict implementations so
 you might find each has quirks and strengths though I can't really identify
 them off hand.

 Best regards,
>>>
>>>
>>> -joel
>>>
>>> --
>>> Joel D. Schlagel
>>> US Army Engineer Institute for Water Resources
>>> http://www.iwr.usace.army.mil
>>>
>>>
>>> ___
>>> 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] Oracle native / Oracle OGR

2009-07-10 Thread Smith, Michael ERDC-CRREL-NH
Thomas,

To solve the second issue, use a view.

Mike


-- 
Michael Smith
Remote Sensing GIS Center
CRREL - ERDC 
US Army Corps of Engineers
Hanover, NH




On 7/10/09 2:38 PM, "Thomas Bonfort"  wrote:

> some of our clients have come up with a few quirks in the native
> oracle driver that should be taken into account:
> 
> * the strings storing the fields returned by the database have a fixed
> length in mapserver, so that might have to be overridden at compile
> time if you are planning to return data longer than a certain value
> (2048 bytes from memory). For normal map rendering this shouldn't be a
> problem, but problems may arise when doing wfs queries and returning a
> paragraph of text for example in an attribute.
> 
> * I haven't investigated this much more, but we've also had problems
> with long query strings (we're talking DATA mapfile strings of several
> kbytes here)
> 
> regards,
> 
> thomas
> 
> www.camptocamp.com
> +33 4 79 26 57 97
> 
> 
> 
> On Fri, Jul 10, 2009 at 17:59, Schlagel, Joel D
> IWR wrote:
>> For what it's worth - we've used the oracle direct connect in a production
>> environment all day, every day for several years with no quirks to report.
>> 
>> -joel
>> 
>> 
>> 
>> On 7/10/09 11:36 AM, "Frank Warmerdam"  wrote:
>> 
>>> YOUNESS ELMEDRAOUI wrote:
 Hello everybody,
 
 i have a question:
 what's the difference between a connection to oracle DB with native
 oraclespatial and OGR?
 performance, ...??
>>> 
>>> Youness,
>>> 
>>> Generally speaking the direct connection should be faster since it avoids
>>> a lot of OGR overhead.  They are completely distict implementations so
>>> you might find each has quirks and strengths though I can't really identify
>>> them off hand.
>>> 
>>> Best regards,
>> 
>> 
>> -joel
>> 
>> --
>> Joel D. Schlagel
>> US Army Engineer Institute for Water Resources
>> http://www.iwr.usace.army.mil
>> 
>> 
>> ___
>> 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] Displaying attribute data and

2009-07-10 Thread Jason M. Amador
Hi,

 

I'm new to GIS and MapServer and was hoping I could get some help with a
few questions.  Any help is greatly appreciated.

 

1.  From a high level, how do you display attribute data after
clicking on a map?  I've seen examples but am unsure how this is
accomplished.  Is this done by using a WMS GetFeatureInfo request or
through querying?
2.  Is it possible to change the attribute data (whether in files or
a spatial database) and what is the method to do this?

 

Thanks,

Jason

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


Re: [mapserver-users] Oracle native / Oracle OGR

2009-07-10 Thread Thomas Bonfort
some of our clients have come up with a few quirks in the native
oracle driver that should be taken into account:

* the strings storing the fields returned by the database have a fixed
length in mapserver, so that might have to be overridden at compile
time if you are planning to return data longer than a certain value
(2048 bytes from memory). For normal map rendering this shouldn't be a
problem, but problems may arise when doing wfs queries and returning a
paragraph of text for example in an attribute.

* I haven't investigated this much more, but we've also had problems
with long query strings (we're talking DATA mapfile strings of several
kbytes here)

regards,

thomas

www.camptocamp.com
+33 4 79 26 57 97



On Fri, Jul 10, 2009 at 17:59, Schlagel, Joel D
IWR wrote:
> For what it's worth - we've used the oracle direct connect in a production
> environment all day, every day for several years with no quirks to report.
>
> -joel
>
>
>
> On 7/10/09 11:36 AM, "Frank Warmerdam"  wrote:
>
>> YOUNESS ELMEDRAOUI wrote:
>>> Hello everybody,
>>>
>>> i have a question:
>>> what's the difference between a connection to oracle DB with native
>>> oraclespatial and OGR?
>>> performance, ...??
>>
>> Youness,
>>
>> Generally speaking the direct connection should be faster since it avoids
>> a lot of OGR overhead.  They are completely distict implementations so
>> you might find each has quirks and strengths though I can't really identify
>> them off hand.
>>
>> Best regards,
>
>
> -joel
>
> --
> Joel D. Schlagel
> US Army Engineer Institute for Water Resources
> http://www.iwr.usace.army.mil
>
>
> ___
> 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] access problems from cgi-bin on Mac OS X 10.4.11 / MAMP

2009-07-10 Thread William Kyngesburye

On Jul 10, 2009, at 11:28 AM, rmaurer wrote:

So I'm a first time MapServer user and have been trying to navigate  
the installation process. I think I almost have it, but I am having  
some last problems.


Just a check: are you using my installer, or compiling from source?   
What OSX version?


If you are using my installer, and are on OSX 10.4, Mapserver is built  
for Apache 1.3, as found in the system, and it probably won't work  
correctly, if at all with an added-on Apache 2.


If you are on OSX 10.5, why not just use the system Apache 2?

When I access my executable mapserv file from the command line, I  
get this:


This script can only be used to decode form results and should be  
initiated as a CGI process via a httpd server.


All sounds good, right? Well, I am using MAMP to host an Apache2.0  
server. The httpd.conf file has the following in it:

Alias /cgi-bin/ "[rootfile]/cgi-bin/"

Directory "[rootfile]/cgi-bin/\>
AllowOverride None
Options ExecCGI FollowSymLinks Indexes
Order allow,deny
Allow from all
/Directory\>

Are the starting '<' really missing, or did Mail strip them out?  I  
also see closing quotes missing and extra \ chars.  Should be:



AllowOverride None
Options ExecCGI FollowSymLinks Indexes
Order allow,deny
Allow from all



AddHandler cgi-script .cgi .py

I know that first line should probably be ScriptAlias, but I kept  
getting a "Permission Denied" message and read in a forum that this  
was a solution somebody had come up with, and indeed it worked for  
me as well.


Anyways, the problem is that in this cgi-bin I have my mapserv  
executable (though one of the things I'm thinking is that maybe I  
need to add something else to AddHandler to make it think that this  
file is executable?).


That addhandler is to run scripts as CGI.  Mapserv is a binary, so all  
it should need is ExecCGI.



But when I got to //localhost/cgi-bin/mapserv it tries to download  
the file as "Untyped Binary Data" and it doesn't execute anthing.


I'm not sure, but you may need to load the mod_cgi module in your  
httpd.conf.  Though it may only apply to script CGIs also.


In case its of any help the ls -l for my cgi-bin gives the following  
information: -rwxr-xr-x 1 Rebecca Rebecca 51244 Jul 9 07:52 mapserv


Do I not have this installed correctly? Or is my server just not  
realizing that this is executable. I would be thrilled if I could  
just get to the point where //localhost/cgi-bin/mapserv just brought  
up a "No query information to decode" message, since I think I can  
handle it from there.



And, make sure to restart Apache after changing httpd.conf ;)

Oh, and make sure that the system Apache is not running (System  
Preferences->Sharing->Web Sharing), as it will be using the same port  
and your MAMP Apache won't even start.


-
William Kyngesburye 
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy


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


Re: [mapserver-users] Oracle native / Oracle OGR

2009-07-10 Thread Tamas Szekeres
Hi,

I've already tested these 2 methods with a couple of mapfiles on Windows,
but I haven't found significant differences in the rendering speed.

In my special case the OGR option was more compelling, since in this case we
can use STYLEITEM "AUTO" option. Therefore I could easily migrate all the
stuff from OGR TAB files to Oracle spatial by keeping the labeling and style
information and only some trivial replaces had to be done in the existing
mapfiles to switch from the tabfiles to the Oracle data sources.

Best regards,

Tamas



2009/7/10 YOUNESS ELMEDRAOUI 

> Hello everybody,
>
> i have a question:
> what's the difference between a connection to oracle DB with native
> oraclespatial and OGR?
> performance, ...??
>
> thanks
>
>
> Best regards
> Youness ELMEDRAOUI
> Les informations figurant sur cet e-mail ont un caractère strictement
> confidentiel et sont exclusivement adressées au destinataire mentionné
> ci-dessus.Tout usage, reproduction ou divulgation de cet e-mail est
> strictement interdit si vous n'en êtes pas le destinataire.Dans ce cas,
> veuillez nous en avertir immédiatement par la même voie et détruire
> l'original. Merci
>
> ___
> 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] access problems from cgi-bin on Mac OS X 10.4.11 / MAMP

2009-07-10 Thread rmaurer

So I'm a first time MapServer user and have been trying to navigate the
installation process. I think I almost have it, but I am having some last
problems. When I access my executable mapserv file from the command line, I
get this: 


This script can only be used to decode form results and should be initiated
as a CGI process via a httpd server.


All sounds good, right? Well, I am using MAMP to host an Apache2.0 server.
The httpd.conf file has the following in it:

Alias /cgi-bin/ "[rootfile]/cgi-bin/"

 Directory "[rootfile]/cgi-bin/\>
 
   AllowOverride None
 
   Options ExecCGI FollowSymLinks Indexes
 
   Order allow,deny
 
   Allow from all
 /Directory\>

 AddHandler cgi-script .cgi .py


I know that first line should probably be ScriptAlias, but I kept getting a
"Permission Denied" message and read in a forum that this was a solution
somebody had come up with, and indeed it worked for me as well. 


Anyways, the problem is that in this cgi-bin I have my  mapserv  executable
(though one of the things I'm thinking is that maybe I need to add something
else to AddHandler to make it think that this file is executable?). But when
I got to //localhost/cgi-bin/mapserv it tries to download the file as
"Untyped Binary Data" and it doesn't execute anthing.  


In case its of any help the  ls -l for my cgi-bin gives the following
information:
-rwxr-xr-x   1 Rebecca  Rebecca   51244 Jul  9 07:52 mapserv


Do I not have this installed correctly? Or is my server just not realizing
that this is executable. I would be thrilled if I could just get to the
point where //localhost/cgi-bin/mapserv just brought up a "No query
information to decode" message, since I think I can handle it from there. 


Thank you very much,

Rebecca 
-- 
View this message in context: 
http://n2.nabble.com/access-problems-from-cgi-bin-on-Mac-OS-X-10.4.11---MAMP-tp3236919p3236919.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] Reprojecting cascading WMS requests

2009-07-10 Thread Rob
Hi

I'm obviously having Friday afternoon blindness, as I can't see what I
am doing wrong!  I am trying to set up a basic Mapserver install (MS4W
v3.0 Beta 4)

MapServer version 5.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF
 OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICO
NV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUP
PORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS INPUT=OGR
 INPUT=GDAL INPUT=SHAPEFILE


which points to a WMS service which only supports a single projection.
I want to get my Mapserver to reproject that data on the fly to other
projection systems, but don't seem to be doing it right!

This is my mapfile

MAP
NAME SPIRIT
STATUS ON
SIZE 600 600
EXTENT 0 0 65 130
UNITS METERS
SHAPEPATH "temp"
IMAGECOLOR 255 255 255
#FONTSET 'fontset.txt'

#SYMBOLSET 'temp/examples.sym'

IMAGETYPE JPEG
IMAGEQUALITY 75

IMAGETYPE png
OUTPUTFORMAT
   NAME png
   DRIVER "GD/PNG"
   MIMETYPE "image/png"
   IMAGEMODE rgb
END

IMAGETYPE jpeg
OUTPUTFORMAT
   NAME jpeg
   DRIVER "GD/JPEG"
   MIMETYPE "image/jpeg"
   IMAGEMODE rgb
END

PROJECTION
 "init=epsg:27700"
END

WEB
  IMAGEPATH "c:\temp\"
  METADATA
WMS_TITLE "WMS Server"
WMS_ABSTRACT "WMS Server."
WMS_ONLINERESOURCE 
"http://localhost/cgi-bin/mapserv.exe?map=example.map&";
WMS_SRS "EPSG:27700 ESPG:4326"
  END
END

  LAYER
NAME "layer"
TYPE RASTER
STATUS ON
CONNECTION "http://externalwmshost/&";
CONNECTIONTYPE WMS
METADATA
"wms_srs"   "EPSG:27700"
"wms_name"  "layername"
"wms_server_version""1.1.1"
"wms_formatlist""image/png,image/jpeg"
 END
   END

END

END # Map File


but when I make a WMS request against it

http://localhost/cgi-bin/mapserv.exe?map=example.map&request=getmap&service=wms&layers=layer&bbox=53.5,1.4,53.51,1.41&width=400&height=400&version=1.1.1&srs=EPSG:4326&format=jpeg

I get



http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd";>


msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS
must be valid for all requested layers.



I'm guessing I'm missing something simple, but I don't know what it
is.  Any help gratefully accepted!

Thanks

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


Re: [mapserver-users] Oracle native / Oracle OGR

2009-07-10 Thread Schlagel, Joel D IWR
For what it's worth - we've used the oracle direct connect in a production
environment all day, every day for several years with no quirks to report.

-joel



On 7/10/09 11:36 AM, "Frank Warmerdam"  wrote:

> YOUNESS ELMEDRAOUI wrote:
>> Hello everybody,
>>  
>> i have a question:
>> what's the difference between a connection to oracle DB with native
>> oraclespatial and OGR?
>> performance, ...??
> 
> Youness,
> 
> Generally speaking the direct connection should be faster since it avoids
> a lot of OGR overhead.  They are completely distict implementations so
> you might find each has quirks and strengths though I can't really identify
> them off hand.
> 
> Best regards,


-joel

-- 
Joel D. Schlagel
US Army Engineer Institute for Water Resources
http://www.iwr.usace.army.mil


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


Re: [mapserver-users] Oracle native / Oracle OGR

2009-07-10 Thread Frank Warmerdam

YOUNESS ELMEDRAOUI wrote:

Hello everybody,
 
i have a question:
what's the difference between a connection to oracle DB with native 
oraclespatial and OGR?

performance, ...??


Youness,

Generally speaking the direct connection should be faster since it avoids
a lot of OGR overhead.  They are completely distict implementations so
you might find each has quirks and strengths though I can't really identify
them off hand.

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] how to ignore tag from the getcapabilities

2009-07-10 Thread Martin Ouellet
Hi,
I have a URL (which is good and functionnal) but the GetCapabilities return
a invalid URL in the  tag.

Is there a way to tell Mapserver to use the url specified in the mapfile
(tag CONNECTION) instead of the url return in the  of the
getcapabilities request?

Thank you in advance!

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


[mapserver-users] [mapserver/ .net] connection to db oracle with OGR

2009-07-10 Thread YOUNESS ELMEDRAOUI
Hi,i'm trying to display data stored in DB oracle with ogr on my application .net.i'm testing my mapfile with shp2img command line ans it's work, but, when i want to display the data on my application .net, the error msg "msDrawMap(): Image handling error. Failed to draw layer named 'eau_troncon'.;msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `eau_troncon'.  File not found or unsupported format." is displayed in this statement : pImgObj = pMap.draw()Best regardsYounessLes informations figurant sur cet e-mail ont un caractère strictement confidentiel et sont exclusivement adressées au destinataire mentionné ci-dessus.Tout usage, reproduction ou divulgation de cet e-mail est strictement interdit si vous n'en êtes pas le destinataire.Dans ce cas, veuillez nous en avertir immédiatement par la même voie et détruire l'original. Merci ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Object reference not set to an instance of an object

2009-07-10 Thread Suman Chatterjee
Hi Pano,

Thank you very much. It worked. Yes, it was the thing I wanted to do.
Now I understand the meaning of the ConfigurationManager.

 

Thank You once again.

Suman

 

 

-Original Message-
From: Pano Voudouris [mailto:pvoudou...@gaiocorp.com] 
Sent: Thursday, July 09, 2009 11:48 AM
To: Suman Chatterjee
Cc: mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Object reference not set to an instance
of an object

 

Hi Suman,

Check your web.config file- You probably have an entry similar to:





...

 

In your code you want to create the mapfile object by reading the
mapfile path from web.config. So what you need to do is:

 

mapObj map= new
mapObj(System.Configuration.ConfigurationManager.AppSettings["mapfile"].
toString())

(or whatever the variable in the web.config is called)

 

You don't really want to use a constant to point to the mapfile...

 

Pano

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Suman
Chatterjee
Sent: 09 July 2009 17:50
To: Tamas Szekeres
Cc: mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Object reference not set to an instance
of an object

 

Hi,

I corrected my problem. Actually, I changed the code a little bit. 

 

Const string MAP_FILE = "c:/inetpub/wwwroot/Addison.map"

Map= new mapObj(MAP_FILE)

 

The line
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/ht
docs/mapservertest/Addison.map"]  

 Is throwing error. No idea what it is trying to do.

 

Now my application is working fine in IIS and C#.

 

Suman

 

-Original Message-
From: Tamas Szekeres [mailto:szeker...@gmail.com] 
Sent: Wednesday, July 08, 2009 6:22 PM
To: Suman Chatterjee
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Object reference not set to an instance
of an object

 

Hi Suman,

I suspect
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/ht
docs/mapservertest/Addison.map"]  evaluates to null in your case, and
therefore the ToString() operation on the null reference is failing
which problem is not related to the MapScript library itself.

Best regards,

Tamas

2009/7/8 Suman Chatterjee 

Hi all,

I am trying to develop an application in C# (VS2005) with mapscript. I
saw the material of Paolo. But I am facing a problem 

 

In the line 

 

mapObj map= new
mapObj(System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Ap
ache/htdocs/mapservertest/Addison.map"].toString())

 

It is generating the error " Object reference not set to an instance of
an object"

 

How can I correct this? If anyone helps me in correcting it, it will be
great.

 

Suman

 

 


*** 

This e-mail and any files or attachments transmitted with it contains
Information that is confidential and privileged. This document may
contain Protected Health Information (PHI) or other information that is
intended only for the use of the individual(s) and entity(ies) to whom
it is addressed. If you are the intended recipient, further disclosures
are prohibited without proper authorization. If you are not the intended
recipient, any disclosure, copying, printing, or use of this information
is strictly prohibited and possibly a violation of federal or state law
and regulations. If you have received this information in error, please
delete it and notify Hamid Khaleghipour at 972-450-2868 immediately.
Thank you. 


*** 


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

 


***
This e-mail and any files or attachments transmitted with it contains 
Information that is confidential and privileged. This document may contain 
Protected Health Information (PHI) or other information that is intended only 
for the use of the individual(s) and entity(ies) to whom it is addressed. If 
you are the intended recipient, further disclosures are prohibited without 
proper authorization. If you are not the intended recipient, any disclosure, 
copying, printing, or use of this information is strictly prohibited and 
possibly a violation of federal or state law and regulations. If you have 
received this information in error, please delete it and notify Hamid 
Khaleghipour at 972-450-2868 immediately. Thank you.

***


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


RE: [mapserver-users] Object reference not set to an instance of an object

2009-07-10 Thread Suman Chatterjee
 

 

-Original Message-
From: Pano Voudouris [mailto:pvoudou...@gaiocorp.com] 
Sent: Thursday, July 09, 2009 11:48 AM
To: Suman Chatterjee
Cc: mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Object reference not set to an instance
of an object

 

Hi Suman,

Check your web.config file- You probably have an entry similar to:





...

 

In your code you want to create the mapfile object by reading the
mapfile path from web.config. So what you need to do is:

 

mapObj map= new
mapObj(System.Configuration.ConfigurationManager.AppSettings["mapfile"].
toString())

(or whatever the variable in the web.config is called)

 

You don't really want to use a constant to point to the mapfile...

 

Pano

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Suman
Chatterjee
Sent: 09 July 2009 17:50
To: Tamas Szekeres
Cc: mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Object reference not set to an instance
of an object

 

Hi,

I corrected my problem. Actually, I changed the code a little bit. 

 

Const string MAP_FILE = "c:/inetpub/wwwroot/Addison.map"

Map= new mapObj(MAP_FILE)

 

The line
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/ht
docs/mapservertest/Addison.map"]  

 Is throwing error. No idea what it is trying to do.

 

Now my application is working fine in IIS and C#.

 

Suman

 

-Original Message-
From: Tamas Szekeres [mailto:szeker...@gmail.com] 
Sent: Wednesday, July 08, 2009 6:22 PM
To: Suman Chatterjee
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Object reference not set to an instance
of an object

 

Hi Suman,

I suspect
System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Apache/ht
docs/mapservertest/Addison.map"]  evaluates to null in your case, and
therefore the ToString() operation on the null reference is failing
which problem is not related to the MapScript library itself.

Best regards,

Tamas

2009/7/8 Suman Chatterjee 

Hi all,

I am trying to develop an application in C# (VS2005) with mapscript. I
saw the material of Paolo. But I am facing a problem 

 

In the line 

 

mapObj map= new
mapObj(System.Configuration.ConfigurationManager.AppSettings["C:/ms4w/Ap
ache/htdocs/mapservertest/Addison.map"].toString())

 

It is generating the error " Object reference not set to an instance of
an object"

 

How can I correct this? If anyone helps me in correcting it, it will be
great.

 

Suman

 

 


*** 

This e-mail and any files or attachments transmitted with it contains
Information that is confidential and privileged. This document may
contain Protected Health Information (PHI) or other information that is
intended only for the use of the individual(s) and entity(ies) to whom
it is addressed. If you are the intended recipient, further disclosures
are prohibited without proper authorization. If you are not the intended
recipient, any disclosure, copying, printing, or use of this information
is strictly prohibited and possibly a violation of federal or state law
and regulations. If you have received this information in error, please
delete it and notify Hamid Khaleghipour at 972-450-2868 immediately.
Thank you. 


*** 


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

 


***
This e-mail and any files or attachments transmitted with it contains 
Information that is confidential and privileged. This document may contain 
Protected Health Information (PHI) or other information that is intended only 
for the use of the individual(s) and entity(ies) to whom it is addressed. If 
you are the intended recipient, further disclosures are prohibited without 
proper authorization. If you are not the intended recipient, any disclosure, 
copying, printing, or use of this information is strictly prohibited and 
possibly a violation of federal or state law and regulations. If you have 
received this information in error, please delete it and notify Hamid 
Khaleghipour at 972-450-2868 immediately. Thank you.

***


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


[mapserver-users] Oracle native / Oracle OGR

2009-07-10 Thread YOUNESS ELMEDRAOUI
Hello everybody, i have a question:what's the difference between a connection to oracle DB with native oraclespatial and OGR?performance, ...??thanksBest regardsYouness ELMEDRAOUILes informations figurant sur cet e-mail ont un caractère strictement confidentiel et sont exclusivement adressées au destinataire mentionné ci-dessus.Tout usage, reproduction ou divulgation de cet e-mail est strictement interdit si vous n'en êtes pas le destinataire.Dans ce cas, veuillez nous en avertir immédiatement par la même voie et détruire l'original. Merci ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Raster layer with png legend

2009-07-10 Thread Thomas Bonfort
http://mapserver.org/mapfile/class.html
-> KEYIMAGE

regards,
thomas

www.camptocamp.com
+33 4 79 26 57 97



2009/7/10 Luis Almería Trenco :
> Hi,
>
>
>
> anybody knows how to associate an image legend (.png) to a raster layer? I’m
> trying to do so with this .map, but it doesn’t work.
>
>
>
> LAYER
>
>     NAME Mapabase20
>
>     TYPE raster
>
>     STATUS on
>
>     DATA "mapa_base20.png"
>
>     MINSCALE 6
>
>     MAXSCALE 40
>
>
>
>     PROJECTION
>
>     "init=epsg:23030"
>
>     END
>
>
>
>     METADATA
>
>     "wms_title" "Mapa Base 20"
>
>     "wms_abstract" "Imagen raster"
>
>     "wms_keywordlist" "WMS imagen raster"
>
>     "wms_srs" "EPSG:23030"
>
>     "wms_style" "leyendaMapabase20"
>
>     "wms_style_leyendaMapabase20_legendurl_href"
> "http://192.168.13.221/leyendaMapaBase/Leyendas/Leyenda_mapabase20.png";
>
>     "wms_style_leyendaMapabase20_legendurl_width" "75"
>
>     "wms_style_leyendaMapabase20_legendurl_height" "50"
>
>     "wms_style_leyendaMapabase20_legendurl_format" "image/png"
>
>     END
>
> END #fin de mapabase20
>
>
>
> Is there anything left? Is it possible to do it? Thank you.
>
> Luis
> ___
> 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 layer with png legend

2009-07-10 Thread Luis Almería Trenco
Hi,



anybody knows how to associate an image legend (.png) to a raster layer? I’m
trying to do so with this .map, but it doesn’t work.



LAYER

NAME Mapabase20

TYPE raster

STATUS on

DATA "mapa_base20.png"

MINSCALE 6

MAXSCALE 40



PROJECTION

"init=epsg:23030"

END



METADATA

"wms_title" "Mapa Base 20"

"wms_abstract" "Imagen raster"

"wms_keywordlist" "WMS imagen raster"

"wms_srs" "EPSG:23030"

"wms_style" "leyendaMapabase20"

"wms_style_leyendaMapabase20_legendurl_href" "
http://192.168.13.221/leyendaMapaBase/Leyendas/Leyenda_mapabase20.png";

"wms_style_leyendaMapabase20_legendurl_width" "75"

"wms_style_leyendaMapabase20_legendurl_height" "50"

"wms_style_leyendaMapabase20_legendurl_format" "image/png"

END

END #fin de mapabase20


Is there anything left? Is it possible to do it? Thank you.

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