Creating a designated graphics file
stevem at SPATIALMAPPING.COM
Thu Jan 5 11:39:20 EST 2006
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.
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.
> 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
>Again, all of the above is web-based.
>Any and all suggestions welcome (except for change in environment...)
>Prepared Response, Inc
>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
>shp2img -m mymap.map > c:\temp\out.png
>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\
>>Prepared Response, Inc
>Bart van den Eijnden
>OSGIS, Open Source GIS
More information about the mapserver-users