Re: [mapserver-users] map file paths

2010-11-04 Thread Waberzeck, Thomas
Jukka Rahkonen wrote:
 P Kishor wrote:
 
  So you have 15 copies of the binary floating around on your computer.
  What a nightmare. If you upgrade, you have to make 15 copies of the
  new version and replace the old version.
 
  What would happen when you publish the 150th geologic map?
 
  Use a single binary, and use a wrapper (or the env variable) to get
  the right query.
 
 I do not believe there are handy wrappers for Windows and the only way
 I have been able to get SetEnvIf to work is to make copies of
 mapserv.exe with different names. I maintain a batch file about our
 services with lines like COPY mapserv.exe WMS_service1 etc. and then
 I only need to run the batch after update and publishing the 150th
 service does not change anything.


If you have php it's quite easy to write a small wrapper for it. See 
http://www.mapserver.org/ogc/mapscript.html#php-example so the only thing to do 
is to write the wrappers once and you have a single setup of Mapserver.

Thomas
BTW: The Example should be updated - I think php_mapscript_4.10.0.dll is out of 
date. The name of the .dll is just php_mapscript.dll.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] map file paths

2010-11-04 Thread Wim Vanbelle
I'm pretty sure you can use the rewrite module in IIS to achieve what you
need. I use it myself for a couple of REST webservices. Do note that I am
using IIS 7.

Take a look here :
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/



On 4 November 2010 07:53, Waberzeck, Thomas 
thomas.waberz...@liag-hannover.de wrote:

 Jukka Rahkonen wrote:
  P Kishor wrote:
 
   So you have 15 copies of the binary floating around on your computer.
   What a nightmare. If you upgrade, you have to make 15 copies of the
   new version and replace the old version.
 
   What would happen when you publish the 150th geologic map?
 
   Use a single binary, and use a wrapper (or the env variable) to get
   the right query.
 
  I do not believe there are handy wrappers for Windows and the only way
  I have been able to get SetEnvIf to work is to make copies of
  mapserv.exe with different names. I maintain a batch file about our
  services with lines like COPY mapserv.exe WMS_service1 etc. and then
  I only need to run the batch after update and publishing the 150th
  service does not change anything.


 If you have php it's quite easy to write a small wrapper for it. See
 http://www.mapserver.org/ogc/mapscript.html#php-example so the only thing
 to do is to write the wrappers once and you have a single setup of
 Mapserver.

 Thomas
 BTW: The Example should be updated - I think php_mapscript_4.10.0.dll is
 out of date. The name of the .dll is just php_mapscript.dll.
 ___
 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] map file paths

2010-11-04 Thread John Callahan
The PHP mapscript wrapper looks promising.  Thanks. The examples would need
to be combined into one php file to handle both GetMap and GetCapabilities
requests. Seems doable.  I'm not a programmer and didn't want to get into
mapscript, however, modifying this script template doesn't seem too
difficult (if you already have PHP, which my server does.)

I'm not a big fan of copying and renaming the mapserv.exe file but it does
work well. We only publish a handful of services and do not expect to
significantly increase in the future.  If we do, scripting a batch file
would work just as well.  This is relatively easy and without the need to
install (re: maintenance, security) or learn additional programming
languages.

For me, it's also important to have short, easily readable URLs to send out
to people that use our WMS services.  I do not want the extra ?map=mymap
parameters at the end of the URLs.  For one reason or another, things always
get screwed up when people start pasting these URLs into their desktop GIS
or other apps.  Simpler the better, even if it's not elegant or involves
slightly more work on my part.

- John

**
John Callahan, Research Scientist
Delaware Geological Survey, University of Delaware
URL: http://www.dgs.udel.edu
**


On Thu, Nov 4, 2010 at 2:53 AM, Waberzeck, Thomas 
thomas.waberz...@liag-hannover.de wrote:

 Jukka Rahkonen wrote:
  P Kishor wrote:
 
   So you have 15 copies of the binary floating around on your computer.
   What a nightmare. If you upgrade, you have to make 15 copies of the
   new version and replace the old version.
 
   What would happen when you publish the 150th geologic map?
 
   Use a single binary, and use a wrapper (or the env variable) to get
   the right query.
 
  I do not believe there are handy wrappers for Windows and the only way
  I have been able to get SetEnvIf to work is to make copies of
  mapserv.exe with different names. I maintain a batch file about our
  services with lines like COPY mapserv.exe WMS_service1 etc. and then
  I only need to run the batch after update and publishing the 150th
  service does not change anything.


 If you have php it's quite easy to write a small wrapper for it. See
 http://www.mapserver.org/ogc/mapscript.html#php-example so the only thing
 to do is to write the wrappers once and you have a single setup of
 Mapserver.

 Thomas
 BTW: The Example should be updated - I think php_mapscript_4.10.0.dll is
 out of date. The name of the .dll is just php_mapscript.dll.
 ___
 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] map file paths

2010-11-03 Thread David Hildebrand
Is there a way of abbreviating pathnames to the map file?  For instance,
my URL to produce a map is

 

http://localhost/cgi-bin/mapserv.exe?map=//fileserver/PDP/Program_Dev/DH
ildebrand/geoprocessing_server/MapServer/sample.mapmode=map

 

In my apache configuration file I have
//fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/ aliased
to /test/ but the alias does not seem to work with CGI.  I'm just
wondering if there is a workaround so that I don't need to specify the
whole file path in my URL.

 

Thanks.

===
David V. Hildebrand
Agriculture Financial Services Corporation
(403) 782-8239   

www.afsc.ca about:www.afsc.ca  http://www.afsc.ca
http://www.afsc.ca/ 
This communication is intended for the use of the recipient to which it
is addressed, and may contain confidential, personal and/or privileged
information. Please contact Agriculture Financial Services Corporation
immediately if you are not the intended recipient of this communication,
and do not copy, distribute, or take action relying on it. Any
communication received in error, or subsequent reply, should be deleted
or destroyed. Please consider the environment before printing this
email.

 

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


Re: [mapserver-users] map file paths

2010-11-03 Thread Rahkonen Jukka
Hi,

See http://mapserver.org/ogc/wms_server.html#reference-section and there about 
wrapper shell script.

-Jukka Rahkonen-


-Alkuperäinen viesti-
Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: David Hildebrand
Lähetetty: ke 3.11.2010 22:42
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] map file paths
 
Is there a way of abbreviating pathnames to the map file?  For instance,
my URL to produce a map is

 

http://localhost/cgi-bin/mapserv.exe?map=//fileserver/PDP/Program_Dev/DH
ildebrand/geoprocessing_server/MapServer/sample.mapmode=map

 

In my apache configuration file I have
//fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/ aliased
to /test/ but the alias does not seem to work with CGI.  I'm just
wondering if there is a workaround so that I don't need to specify the
whole file path in my URL.

 

Thanks.

===
David V. Hildebrand
Agriculture Financial Services Corporation
(403) 782-8239   

www.afsc.ca about:www.afsc.ca  http://www.afsc.ca
http://www.afsc.ca/ 
This communication is intended for the use of the recipient to which it
is addressed, and may contain confidential, personal and/or privileged
information. Please contact Agriculture Financial Services Corporation
immediately if you are not the intended recipient of this communication,
and do not copy, distribute, or take action relying on it. Any
communication received in error, or subsequent reply, should be deleted
or destroyed. Please consider the environment before printing this
email.

 


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


Re: [mapserver-users] map file paths

2010-11-03 Thread Richard Greenwood
On Wed, Nov 3, 2010 at 2:42 PM, David Hildebrand
david.hildebr...@afsc.ca wrote:
 Is there a way of abbreviating pathnames to the map file?  For instance, my
 URL to produce a map is



 http://localhost/cgi-bin/mapserv.exe?map=//fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/MapServer/sample.mapmode=map



 In my apache configuration file I have
 //fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/ aliased to
 /test/ but the alias does not seem to work with CGI.  I’m just wondering if
 there is a workaround so that I don’t need to specify the whole file path in
 my URL.



 Thanks.

 ===
 David V. Hildebrand
 Agriculture Financial Services Corporation
 (403) 782-8239

In your Apache httpd.conf add:
   SetEnv MY_MAP  C:/path/to/my/mapfile.map

and then your URL can be:
   http://localhost/cgi-bin/mapserv.exe?map=MYMAPmode=map

Shorter URL, better security.

Rich

-- 
Richard Greenwood
richard.greenw...@gmail.com
www.greenwoodmap.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] map file paths

2010-11-03 Thread John Callahan
Basically what I do is copy and rename mapserv.exe to some name I want in
the URL.  Then, if a request goes to that file, set the MS_MAPFILE variable
to the relevant map file.  This has worked well for me so far.

For example, my organization recently published our 15th geologic map of out
state.  I want people to refer to it as geomap15.  Therefore, I copied and
renamed mapserv.exe to geomap15 (no exe extension, file still in cgi-bin
directory).  Then, I have the following in my httpd.conf file:

SetEnvIf Request_URI /cgi-bin/geomap15
MS_MAPFILE=C:/pathtomapfile/geomap15.map

My URLs then look something like: http://maps.dgs.udel.edu/cgi-bin/geomap15?

(This map file in action here:
http://www.dgs.udel.edu/datasets/dgs-geologic-map-no-15-georgetown-quadrangle-dataset
)

- John

**
John Callahan, Research Scientist
Delaware Geological Survey, University of Delaware
URL: http://www.dgs.udel.edu
**


On Wed, Nov 3, 2010 at 8:41 PM, Richard Greenwood 
richard.greenw...@gmail.com wrote:

 On Wed, Nov 3, 2010 at 2:42 PM, David Hildebrand
 david.hildebr...@afsc.ca wrote:
  Is there a way of abbreviating pathnames to the map file?  For instance,
 my
  URL to produce a map is
 
 
 
 
 http://localhost/cgi-bin/mapserv.exe?map=//fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/MapServer/sample.mapmode=map
 
 
 
  In my apache configuration file I have
  //fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/ aliased to
  /test/ but the alias does not seem to work with CGI.  I’m just wondering
 if
  there is a workaround so that I don’t need to specify the whole file path
 in
  my URL.
 
 
 
  Thanks.
 
  ===
  David V. Hildebrand
  Agriculture Financial Services Corporation
  (403) 782-8239

 In your Apache httpd.conf add:
   SetEnv MY_MAP  C:/path/to/my/mapfile.map

 and then your URL can be:
   http://localhost/cgi-bin/mapserv.exe?map=MYMAPmode=map

 Shorter URL, better security.

 Rich

 --
 Richard Greenwood
 richard.greenw...@gmail.com
 www.greenwoodmap.com
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users

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


Re: [mapserver-users] map file paths

2010-11-03 Thread P Kishor
On Wed, Nov 3, 2010 at 8:20 PM, John Callahan john.calla...@udel.edu wrote:
 Basically what I do is copy and rename mapserv.exe to some name I want in
 the URL.  Then, if a request goes to that file, set the MS_MAPFILE variable
 to the relevant map file.  This has worked well for me so far.

 For example, my organization recently published our 15th geologic map of out
 state.  I want people to refer to it as geomap15.  Therefore, I copied and
 renamed mapserv.exe to geomap15 (no exe extension, file still in cgi-bin
 directory).

So you have 15 copies of the binary floating around on your computer.
What a nightmare. If you upgrade, you have to make 15 copies of the
new version and replace the old version.

What would happen when you publish the 150th geologic map?

Use a single binary, and use a wrapper (or the env variable) to get
the right query.



 Then, I have the following in my httpd.conf file:

 SetEnvIf Request_URI /cgi-bin/geomap15
 MS_MAPFILE=C:/pathtomapfile/geomap15.map

 My URLs then look something like: http://maps.dgs.udel.edu/cgi-bin/geomap15?

 (This map file in action here:
 http://www.dgs.udel.edu/datasets/dgs-geologic-map-no-15-georgetown-quadrangle-dataset)

 - John

 **
 John Callahan, Research Scientist
 Delaware Geological Survey, University of Delaware
 URL: http://www.dgs.udel.edu
 **


 On Wed, Nov 3, 2010 at 8:41 PM, Richard Greenwood
 richard.greenw...@gmail.com wrote:

 On Wed, Nov 3, 2010 at 2:42 PM, David Hildebrand
 david.hildebr...@afsc.ca wrote:
  Is there a way of abbreviating pathnames to the map file?  For instance,
  my
  URL to produce a map is
 
 
 
 
  http://localhost/cgi-bin/mapserv.exe?map=//fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/MapServer/sample.mapmode=map
 
 
 
  In my apache configuration file I have
  //fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/ aliased
  to
  /test/ but the alias does not seem to work with CGI.  I’m just wondering
  if
  there is a workaround so that I don’t need to specify the whole file
  path in
  my URL.
 
 
 
  Thanks.
 
  ===
  David V. Hildebrand
  Agriculture Financial Services Corporation
  (403) 782-8239

 In your Apache httpd.conf add:
   SetEnv MY_MAP  C:/path/to/my/mapfile.map

 and then your URL can be:
   http://localhost/cgi-bin/mapserv.exe?map=MYMAPmode=map

 Shorter URL, better security.

 Rich

 --
 Richard Greenwood
 richard.greenw...@gmail.com
 www.greenwoodmap.com
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users


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





-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] map file paths

2010-11-03 Thread Richard Greenwood
John, Puneet,

Being able to leave the .exe extension off in Windows is new to me and
medium cool. Based on some rather foggy recollection, I think that it
is limited to Apache. I don't think it works under IIS. But it's handy
if you're developing on Windows and serving on *NIX.

I'm kind of with Puneet in that I don't think multiple copies of
binaries is generally good advise. However, under Windows (Apache or
IIS) there is far less flexibility in wrapper scripts[1] than under
*NIX, so I can see the appeal.

Regards,
Rich

[1] The most common wrapper under Windows in an ASP script, which not
only restricts you to IIS, but ASP has been superseded by ASPX, and I
haven't seen an ASPX wrapper yet. You can install Perl (I know Puneet
doesn't think a computer is worth booting if it doesn't have Perl) but
that's just one more dependency for most Windows users. And it seems
like there should be an option to wrap a CGI in PHP, but I have yet to
find it.




On Wed, Nov 3, 2010 at 7:20 PM, John Callahan john.calla...@udel.edu wrote:
 Basically what I do is copy and rename mapserv.exe to some name I want in
 the URL.  Then, if a request goes to that file, set the MS_MAPFILE variable
 to the relevant map file.  This has worked well for me so far.

 For example, my organization recently published our 15th geologic map of out
 state.  I want people to refer to it as geomap15.  Therefore, I copied and
 renamed mapserv.exe to geomap15 (no exe extension, file still in cgi-bin
 directory).  Then, I have the following in my httpd.conf file:

 SetEnvIf Request_URI /cgi-bin/geomap15
 MS_MAPFILE=C:/pathtomapfile/geomap15.map

 My URLs then look something like: http://maps.dgs.udel.edu/cgi-bin/geomap15?

 (This map file in action here:
 http://www.dgs.udel.edu/datasets/dgs-geologic-map-no-15-georgetown-quadrangle-dataset)

 - John

 **
 John Callahan, Research Scientist
 Delaware Geological Survey, University of Delaware
 URL: http://www.dgs.udel.edu
 **


 On Wed, Nov 3, 2010 at 8:41 PM, Richard Greenwood
 richard.greenw...@gmail.com wrote:

 On Wed, Nov 3, 2010 at 2:42 PM, David Hildebrand
 david.hildebr...@afsc.ca wrote:
  Is there a way of abbreviating pathnames to the map file?  For instance,
  my
  URL to produce a map is
 
 
 
 
  http://localhost/cgi-bin/mapserv.exe?map=//fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/MapServer/sample.mapmode=map
 
 
 
  In my apache configuration file I have
  //fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/ aliased
  to
  /test/ but the alias does not seem to work with CGI.  I’m just wondering
  if
  there is a workaround so that I don’t need to specify the whole file
  path in
  my URL.
 
 
 
  Thanks.
 
  ===
  David V. Hildebrand
  Agriculture Financial Services Corporation
  (403) 782-8239

 In your Apache httpd.conf add:
   SetEnv MY_MAP  C:/path/to/my/mapfile.map

 and then your URL can be:
   http://localhost/cgi-bin/mapserv.exe?map=MYMAPmode=map

 Shorter URL, better security.

 Rich

 --
 Richard Greenwood
 richard.greenw...@gmail.com
 www.greenwoodmap.com
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users





-- 
Richard Greenwood
richard.greenw...@gmail.com
www.greenwoodmap.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users