Creating a designated graphics file

Steven Monai stevem at SPATIALMAPPING.COM
Thu Jan 5 08:39:20 PST 2006


Chip:

How about using the mapserv CGI in "map" mode? From within an ASP script,
you should be able to send an HTTP GET request (with all relevant
parameters, particularly "mode=map") to the mapserv CGI, and then save its
output (the map image) to a file of your choice.

HTH,
-SM
--

On Wed, 4 Jan 2006 13:15:06 -0800, Chip Taylor <work at XWB.COM> wrote:

>Unfortunately I do need the capability from the web and I don't have access
>to MapScript (yet).  We are newly ASP.NET 2.0 and from what I am told SWIG
>does not play well with C# under 2.0, at least not well enough to work for
>what we need to do.
>
>Here is the scenario I am facing.  There may be a better way to do things.
>
>Environment:
> Windows Server 2003
> IIS 6.0
> ASP.NET 2.0
> VB.NET preferred, but C# OK
> SQL Server 2005
>
>1. I create an image using GDI and stream it to a web page.  I need to be
>able to generate a map as a background image for this GDI, passing latitude
>and longitude to mapserver.exe (along with other params, of course.  The
>resulting image would be imported into GDI using System.Drawing.Image and
>other graphics drawn on top of that.
>
>2. I need to be able to allow an admin to "design" a map using a web
>interface, inputting lat and lon, layers, size, etc.  When the admin is
>satisfied with the result, a static map image is generated and stored and
>the path/name is stored in SQL Server.  The static image is then available
>to a web application and may also be exported for use in a detached VB 6.0
>application.
>
>Again, all of the above is web-based.
>
>Any and all suggestions welcome (except for change in environment...)
>
>Chip Taylor
>Prepared Response, Inc
>
>-----Original Message-----
>From: Bart van den Eijnden (OSGIS) [mailto:bartvde at xs4all.nl]
>Sent: Wednesday, January 04, 2006 1:03 PM
>To: Chip Taylor
>Cc: MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: Re: [UMN_MAPSERVER-USERS] Creating a designated graphics file
>
>Do you need this functionality to be available from the web? Then as Tom
>said you'll probably need Mapscript.
>
>If you don't need it from the web, you could use shp2img and use > to
>output it to a file. Ofcourse you can write your files to a
>web-accessible directory.
>
>shp2img -m mymap.map > c:\temp\out.png
>
>Best regards,
>Bart
>
>Chip Taylor wrote:
>
>>Is there a way to use MapServer CGI to output a graphics file (GIF or JPG)
>>to a designated location with a designated name on a Windows/IIS server?
>>For example, I'd like to be able to call  mapserver.exe and tell it to name
>>the file "thismap.jpg" and create it in directory c:\wwwroot\projects\maps\
>>
>>
>>
>>Chip Taylor
>>
>>Prepared Response, Inc
>>
>>
>>
>>
>
>
>--
>Bart van den Eijnden
>OSGIS, Open Source GIS
>http://www.osgis.nl



More information about the MapServer-users mailing list