Re: [mapserver-users] How do I make a shapefile polygon thicker within UMN Mapserver

2008-05-08 Thread Jackey Cheung
The good news is, if I recall correctly, starting from MapServer 5.0, the
WIDTH parameter affects the width of the outline of polygon layers.


On Fri, May 9, 2008 at 1:14 AM, Bart van den Eijnden (OSGIS) <
[EMAIL PROTECTED]> wrote:

> See the FAQ under section
>
>
> How do I set line width in my maps?
>
> http://mapserver.gis.umn.edu/docs/faq
>
> Best regards,
> Bart
>
> John Mitchell wrote:
>
>> Hi,
>>
>> How do I make a shapefile polygon thicker within UMN Mapserver?
>>
>> I have listed below the layer that correctly displays the outlines
>> contained within the shapefile, but I can't figure out how to make the
>> polygon outlines thicker.
>>
>>
>> LAYER
>>  # name of layer
>>  NAME stlouisxdrive
>>  GROUP "gv:stlouisxdrive"
>>
>>  PROJECTION
>>   "init=epsg:26915"
>>  END
>># what type of data is this?
>>  TYPE POLYGON
>>DATA "C:/TEMP/64Resolution"
>>
>>  # always returned with interface
>>  STATUS ON
>>
>>CLASS
>>OUTLINECOLOR 255 0 0
>>END
>>  END
>>
>>
>> --
>> John J. Mitchell
>> 
>>
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> [EMAIL PROTECTED]
> http://www.osgis.nl
>
>
> ___
> 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] tiling (WMS-C)

2008-05-08 Thread Paul Ramsey

Chris,

That makes more sense.

So MapBuilder is magically noticing the WMS-C in your URL and  
converting its requests to a tiled mode. Unfortunately, Mapserver does  
not understand the WMS-C keyword and is croaking, even though there is  
no functional difference (from a WMS PoV) to serving a WMS-C request  
and a WMS request.


A quick and dirty fix would be to write a small PHP script to sit in  
front of mapserver, convert the WMS-C to a WMS and then pass the  
request onwards.


Alternately (and more elegantly), perhaps there is some way to trick  
mapbuilder into the tiled mode without the WMS-C keyword in the URL?  
Check your Mapbuilder docs.


Paul

On May 8, 2008, at 3:12 PM, csmith wrote:


Hi Paul,

I am using MapBuilder's latest instance, which renders with Open  
Layers, and is capable of tiling.  I load an initial map, querying a  
local http server and designating the WMS service type as WMS-C,  
and, voila, rendering of tiles where previously (service type plain  
WMS) the entire viewport is rendered as one.  When I attempt a  
similar request of my MapServer instance, which handles all of my  
hosted raster imagery, I get the error:


mapserv(): Web application error. Traditional BROWSE mode requires a  
TEMPLATE in the WEB section, but none was provided.


Which I meant to include in my first post, sorry.  Any guidance?

Thanks,
Chris



- Original Message - From: "Paul Ramsey" <[EMAIL PROTECTED] 
>

To: "csmith" <[EMAIL PROTECTED]>
Cc: 
Sent: Thursday, May 08, 2008 4:31 PM
Subject: Re: [mapserver-users] tiling (WMS-C)



Chris,

Tiling is a property of the client, not the server... the client
breaks the problem of filling the viewport up into files and sends  
the

tile requests, usually in parallel, to the server.  What user
interface are you building with?

P

On Thu, May 8, 2008 at 12:48 PM, csmith <[EMAIL PROTECTED]>  
wrote:

Hello,

I would like to take advantage of the expediency of visual  
feedback afforded
by presenting my raster image as a mosaic of tiles, rather than  
the user

waiting for, for example, a single .png in my viewport- typical,
now-ubiquitous tiling behavior.

I am able to initiate a WMS query with service type WMS-C (i.e.
SERVICE=WMS_C) successfully to another service, but am  
unsuccessful when
querying through my MapServer instance.  Is it possible that  
MapServer
doesn't support WMS-C?  Hopefully, it is just my ignorance.  I  
confess that
I merely changed my existing URL-encoded string, replacing WMS  
with WMS-C
(pretty optimistic, huh!).  I believe my shapefile refererenced by  
the

mapfile is properly comprised of appropriate tile images.  Can you
straighten me out, please?

Thanks,
Chris

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








--
Paul Ramsey
[EMAIL PROTECTED]
+1 250 885 0632

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


Re: [mapserver-users] tiling (WMS-C)

2008-05-08 Thread Paul Ramsey
Chris,

Tiling is a property of the client, not the server... the client
breaks the problem of filling the viewport up into files and sends the
tile requests, usually in parallel, to the server.  What user
interface are you building with?

P

On Thu, May 8, 2008 at 12:48 PM, csmith <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I would like to take advantage of the expediency of visual feedback afforded
> by presenting my raster image as a mosaic of tiles, rather than the user
> waiting for, for example, a single .png in my viewport- typical,
> now-ubiquitous tiling behavior.
>
> I am able to initiate a WMS query with service type WMS-C (i.e.
> SERVICE=WMS_C) successfully to another service, but am unsuccessful when
> querying through my MapServer instance.  Is it possible that MapServer
> doesn't support WMS-C?  Hopefully, it is just my ignorance.  I confess that
> I merely changed my existing URL-encoded string, replacing WMS with WMS-C
> (pretty optimistic, huh!).  I believe my shapefile refererenced by the
> mapfile is properly comprised of appropriate tile images.  Can you
> straighten me out, please?
>
> Thanks,
> Chris
>
> ___
> 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] tiling (WMS-C)

2008-05-08 Thread csmith
Hello,

I would like to take advantage of the expediency of visual feedback afforded by 
presenting my raster image as a mosaic of tiles, rather than the user waiting 
for, for example, a single .png in my viewport- typical, now-ubiquitous tiling 
behavior.  

I am able to initiate a WMS query with service type WMS-C (i.e. SERVICE=WMS_C) 
successfully to another service, but am unsuccessful when querying through my 
MapServer instance.  Is it possible that MapServer doesn't support WMS-C?  
Hopefully, it is just my ignorance.  I confess that I merely changed my 
existing URL-encoded string, replacing WMS with WMS-C (pretty optimistic, 
huh!).  I believe my shapefile refererenced by the mapfile is properly 
comprised of appropriate tile images.  Can you straighten me out, please?

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


[mapserver-users] Using PHPMapscript from php script called in console

2008-05-08 Thread Burgholzer,Robert
I am having a strange occurrence.  I have a php script that uses PHP
mapscript to manipulate some maps.  I have no problem with it if I call
the script from my web browser, however, when I call it via command line
PHP, i.e., "php scriptname.php", it fails when I try to do anything with
the map object.

 

I have done a phpinfo() from my script and verified that mapscript is in
fact loaded when php is invoked from the command line.  It looks as
thought the command that I am using to instantiate the map object
instance is failing.

To create the object, I use: 

$this->map = ms_newMapObj($map_path.$map_file);

 

To verify this creation I use:

print_r((array)$this->map );

 

Which yields, Array( [0] => ) when I call it from the command line, and
a fill set of object properties from the browser, as in:

Array ( [_handle_] => Resource id #41 [numlayers] => 8 [name] =>
PrecipMap [status] => 1 [debug] => 1 [width] => 720 [height] => 500
[maxsize] => 2048 [transparent] => - [interlace] => -
[imagetype] => AGG [imagequality] => - [extent] => ms_rect_obj
Object ( [_handle_] => Resource id #42 [minx] => -79.322914123535

... (etc. etc.)

 

The only difference that I can think of is that the php-cgi.exe is
getting used by the browser, while php.exe is used at the command line.
I tried executing the script with the cgi version, but to no avail, same
behaviour, script dies without any word whenever I try to call a mapObj
method.

 

System:

Windows XP

PHP 5.2.5 

Mapscript - PHP MapScript Version => ($Revision: 7251 $ $Date:
2008-01-08 12:04:53 -0500 (Tue, 08 Jan 2008) $)

 

Any guidance would be appreciated,

r.b.

 

Robert W. Burgholzer

Surface Water Modeler

Office of Water Supply and Planning

Virginia Department of Environmental Quality

[EMAIL PROTECTED]

804-698-4405

Open Source Modeling Tools:

http://sourceforge.net/projects/npsource/

 

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


Re: [mapserver-users] How do I make a shapefile polygon thicker within UMN Mapserver

2008-05-08 Thread Bart van den Eijnden (OSGIS)

See the FAQ under section


 How do I set line width in my maps?

http://mapserver.gis.umn.edu/docs/faq

Best regards,
Bart

John Mitchell wrote:

Hi,

How do I make a shapefile polygon thicker within UMN Mapserver?

I have listed below the layer that correctly displays the outlines 
contained within the shapefile, but I can't figure out how to make the 
polygon outlines thicker.



LAYER
  # name of layer
  NAME stlouisxdrive
  GROUP "gv:stlouisxdrive"

  PROJECTION
   "init=epsg:26915"
  END
 
  # what type of data is this?

  TYPE POLYGON
 
  DATA "C:/TEMP/64Resolution"


  # always returned with interface
  STATUS ON

CLASS
OUTLINECOLOR 255 0 0
END
 END


--
John J. Mitchell


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



--
Bart van den Eijnden
OSGIS, Open Source GIS
[EMAIL PROTECTED]
http://www.osgis.nl

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


Re: [mapserver-users] How do I make a shapefile polygon thicker within UMN Mapserver

2008-05-08 Thread Dean Gadoury
Oops. Sorry about that. Hit send by accident.

LAYER
  NAME stlouisxdrive
  GROUP "gv:stlouisxdrive"
  PROJECTION
   "init=epsg:26915"
  END

  TYPE LINE

  DATA "C:/TEMP/64Resolution"

  STATUS ON
CLASS
   STYLE
 COLOR 255 0 0
 WIDTH 2
   END
END
 END

If you are using Mapserver 5.x this will work. If you are using an older
version, you will need to use the method another user suggested using the
circle symbol.

Dean

On Thu, May 8, 2008 at 1:23 PM, Dean Gadoury <[EMAIL PROTECTED]> wrote:

> I don't think you can change the thickness of  a polygon's outline. You may
> have to draw the layer twice, once as TYPE POLYGON, then again ad TYPE LINE.
> MapServer actually allows you to draw polygon features as lines. With line
> layers you can change the thickness of features.
>
> Your second layer could be done like this:
>
> LAYER
>   NAME stlouisxdrive
>   GROUP "gv:stlouisxdrive"
>   PROJECTION
>"init=epsg:26915"
>   END
>
>   TYPE LINE
>
>   DATA "C:/TEMP/64Resolution"
>
>   STATUS ON
> CLASS
>   STYLE
> COLOR 255 0 0
> END
>  END
>
> On Thu, May 8, 2008 at 1:09 PM, John Mitchell <[EMAIL PROTECTED]>
> wrote:
>
>> Hi,
>>
>> How do I make a shapefile polygon thicker within UMN Mapserver?
>>
>> I have listed below the layer that correctly displays the outlines
>> contained within the shapefile, but I can't figure out how to make the
>> polygon outlines thicker.
>>
>>
>> LAYER
>>   # name of layer
>>   NAME stlouisxdrive
>>   GROUP "gv:stlouisxdrive"
>>
>>   PROJECTION
>>"init=epsg:26915"
>>   END
>>
>>   # what type of data is this?
>>   TYPE POLYGON
>>
>>   DATA "C:/TEMP/64Resolution"
>>
>>   # always returned with interface
>>   STATUS ON
>>
>> CLASS
>> OUTLINECOLOR 255 0 0
>> END
>>  END
>>
>>
>> --
>> John J. Mitchell
>> ___
>> 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 make a shapefile polygon thicker within UMN Mapserver

2008-05-08 Thread Dean Gadoury
I don't think you can change the thickness of  a polygon's outline. You may
have to draw the layer twice, once as TYPE POLYGON, then again ad TYPE LINE.
MapServer actually allows you to draw polygon features as lines. With line
layers you can change the thickness of features.

Your second layer could be done like this:

LAYER
  NAME stlouisxdrive
  GROUP "gv:stlouisxdrive"
  PROJECTION
   "init=epsg:26915"
  END

  TYPE LINE

  DATA "C:/TEMP/64Resolution"

  STATUS ON
CLASS
  STYLE
COLOR 255 0 0
END
 END

On Thu, May 8, 2008 at 1:09 PM, John Mitchell <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> How do I make a shapefile polygon thicker within UMN Mapserver?
>
> I have listed below the layer that correctly displays the outlines
> contained within the shapefile, but I can't figure out how to make the
> polygon outlines thicker.
>
>
> LAYER
>   # name of layer
>   NAME stlouisxdrive
>   GROUP "gv:stlouisxdrive"
>
>   PROJECTION
>"init=epsg:26915"
>   END
>
>   # what type of data is this?
>   TYPE POLYGON
>
>   DATA "C:/TEMP/64Resolution"
>
>   # always returned with interface
>   STATUS ON
>
> CLASS
> OUTLINECOLOR 255 0 0
> END
>  END
>
>
> --
> John J. Mitchell
> ___
> 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] Tile Indexing Shape files.

2008-05-08 Thread Paul Ramsey
Nelson,

If you are on Linux and can compile your own Mapserver, consider
compiling the svn trunk version, it has a shape file performance
improvement that may obviate the need for tiling.

Yours,

Paul

On Thu, May 8, 2008 at 8:49 AM, Nelson Soto <[EMAIL PROTECTED]> wrote:
> I'm trying to split up and index my parcel layer and perhaps other
> layers to address performance concerns. I have used the shp2tile
> program to split my files, but now where do I go from here? I have
> used gdaltindex before to utilize orthos that were already tiled, so I
> understand the concept but this is slightly different. What do I do
> from here?
> ___
> 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 make a shapefile polygon thicker withinUMN Mapserver

2008-05-08 Thread Burgholzer,Robert
John,

One very common approach is to use a symbol for your line style, and
then adjust the size. Viz:

 

   CLASS

  NAME "proj_seggroups"

  SYMBOL 'circle'

  SIZE 3

  COLOR -1 -1 -1

  BACKGROUNDCOLOR 0 0 0

  OUTLINECOLOR 0 0 0

   END

 

And then of course, you need to have the symbol 'circle' defined.  This
is done in the top portion of the mapfile (perhaps the order is not
important, but in all the examples I have seen it is there):

 

 

SYMBOL

  NAME 'circle'

  TYPE ELLIPSE

  POINTS 1 1 END

  FILLED TRUE

END

 

Robert W. Burgholzer

Surface Water Modeler

Office of Water Supply and Planning

Virginia Department of Environmental Quality

[EMAIL PROTECTED]

804-698-4405

Open Source Modeling Tools:

http://sourceforge.net/projects/npsource/

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
Mitchell
Sent: Thursday, May 08, 2008 1:09 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] How do I make a shapefile polygon thicker
withinUMN Mapserver

 

Hi,

How do I make a shapefile polygon thicker within UMN Mapserver?

I have listed below the layer that correctly displays the outlines
contained within the shapefile, but I can't figure out how to make the
polygon outlines thicker.


LAYER
  # name of layer
  NAME stlouisxdrive
  GROUP "gv:stlouisxdrive"

  PROJECTION
   "init=epsg:26915"
  END
  
  # what type of data is this?
  TYPE POLYGON
  
  DATA "C:/TEMP/64Resolution"

  # always returned with interface
  STATUS ON

CLASS
OUTLINECOLOR 255 0 0
END
 END


-- 
John J. Mitchell 

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


[mapserver-users] How do I make a shapefile polygon thicker within UMN Mapserver

2008-05-08 Thread John Mitchell
Hi,

How do I make a shapefile polygon thicker within UMN Mapserver?

I have listed below the layer that correctly displays the outlines contained
within the shapefile, but I can't figure out how to make the polygon
outlines thicker.


LAYER
  # name of layer
  NAME stlouisxdrive
  GROUP "gv:stlouisxdrive"

  PROJECTION
   "init=epsg:26915"
  END

  # what type of data is this?
  TYPE POLYGON

  DATA "C:/TEMP/64Resolution"

  # always returned with interface
  STATUS ON

CLASS
OUTLINECOLOR 255 0 0
END
 END


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


Re: [mapserver-users] Tile Indexing Shape files.

2008-05-08 Thread Dean Gadoury
The next step is to use tile4ms to create your tile index. You can find info
here: http://mapserver.gis.umn.edu/docs/reference/utilityreference/tile4ms

Dean

On Thu, May 8, 2008 at 11:49 AM, Nelson Soto <[EMAIL PROTECTED]> wrote:

> I'm trying to split up and index my parcel layer and perhaps other
> layers to address performance concerns. I have used the shp2tile
> program to split my files, but now where do I go from here? I have
> used gdaltindex before to utilize orthos that were already tiled, so I
> understand the concept but this is slightly different. What do I do
> from here?
> ___
> 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] Tile Indexing Shape files.

2008-05-08 Thread Stephen Woodbridge

Nelson Soto wrote:

I'm trying to split up and index my parcel layer and perhaps other
layers to address performance concerns. I have used the shp2tile
program to split my files, but now where do I go from here? I have
used gdaltindex before to utilize orthos that were already tiled, so I
understand the concept but this is slightly different. What do I do
from here?


cd /path/to/shapepath
find parcel_dir -name \*.shp -print > parcels.in
tile4ms parcels.in parcels-tidx
shptree parcels-tidx
find parcel_dir -name \*.shp -exec shptree {} \;


this should create a tile index based on the files in parcels.in
and create spatial indexes for all the tiled shapefiles.

If you are on windows, you are on you own :) or you can install cygwin 
to run the commands above.


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


[mapserver-users] Tile Indexing Shape files.

2008-05-08 Thread Nelson Soto
I'm trying to split up and index my parcel layer and perhaps other
layers to address performance concerns. I have used the shp2tile
program to split my files, but now where do I go from here? I have
used gdaltindex before to utilize orthos that were already tiled, so I
understand the concept but this is slightly different. What do I do
from here?
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] OpenLayers + dBox + Postgres text search

2008-05-08 Thread Richard Greenwood
I had a bad link in the site below, which I have fixed.

I've been working on an OpenLayers site that incorporates the dBox
tree legend that is popular with many MapServer users. dBox is based
on YUI and was developed by Steve Lime and others at the Minnesota
DNR. The site is still pretty sloppy but may be of interest:

  http://www2.tetonwyo.org/mapserver/ol.html

Also of possible interest is the use of the new PostgreSQL 8.3 full text search.

-- 
Richard Greenwood
[EMAIL PROTECTED]
www.greenwoodmap.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Simple polygon imagemap creation

2008-05-08 Thread Burgholzer,Robert
Charles,
I have done just this thing, and it is quite easy.  Coincidentally, I
have just completed a set of these for Virginia's Water Resources
division.  

I am doing this for a drought monitoring application, creating static,
clickable image maps that then connect to a small data retrieval
application.  Here is an example (coincidentally on the Virginia - North
Carolina border):
http://www.deq.virginia.gov/watersupplyplanning/drought/southside/curren
t.html 

I based my version on a good example by Steve Lime:
http://maps.dnr.state.mn.us/cgi-bin/mapserv48?map=/usr/local/www/docs_ma
ps/eco/rsg/search/search_example.map&qlayer=county&mode=nquery&searchmap
=true

Anyhow, the basics are: the layer that defines the image map needs to
have header, footer, and body templates set. The header just has to open
the  tag, and the footer closes it , and the bodytemplate has
to have the stuff that tells mapserver where to put the shapes.
Entities in brackets [] in these files are variables from your layer.
In my example, I am using a PostGIS layer, but the same holds true for
shapefiles.  The only other contingency is that you should have a
querymap defined (at least in the way that I am calling it, one needs
this), and that is simple:

QUERYMAP
 STATUS ON
 STYLE NORMAL
END

Please get in touch if I can help at all.

I call it with the following:
http://172.16.210.66/cgi-bin/mapserv.exe?map=C:\usr\local\home\httpd\deq
_website\watersupplyplanning\drought\state\imagemap.map&qlayer=proj_segg
roups&mode=nquery&layers=proj_seggroups%20sym_box%20sym_flow%20sym_preci
p%20poli_bounds%20copyright%20sym_pdi%20sym_gw%20statusnormal%20statuswa
rn%20statuswatch%20statusemerg%20statusblank

My layer, and templates are as follows:

LAYER
   CONNECTIONTYPE postgis
   CONNECTION "host=localhost user=dbfoo password=xoxoxo dbname=wsp"
   NAME proj_seggroups
   GROUP proj_seggroups
   TYPE POLYGON
   STATUS ON
   DEBUG OFF
   DATA "the_geom from proj_seggroups"
   TEMPLATE "bodytemplate.html"
   HEADER "imapheader.html"
   FOOTER "imapfooter.html"
   CLASS
  NAME "proj_seggroups"
  SYMBOL 'circle'
  SIZE 3
  COLOR -1 -1 -1
  BACKGROUNDCOLOR 0 0 0
  OUTLINECOLOR 0 0 0
   END
   TOLERANCE 10
   PROJECTION
 "proj=latlong"
   END
  METADATA
"DESCRIPTION"   "Stat Results"
  END
END

imapheader.html:


bodytemplate.html:


imapfooter.html:







Robert W. Burgholzer
Surface Water Modeler
Office of Water Supply and Planning
Virginia Department of Environmental Quality
[EMAIL PROTECTED]
804-698-4405
Open Source Modeling Tools:
http://sourceforge.net/projects/npsource/

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Charles
Theobald
Sent: Thursday, May 08, 2008 10:38 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Simple polygon imagemap creation

Does anyone have an code example of a simple polygon imagemap?  We want 
to display a county map, and go to a specific page for the county that 
is selected (clicked on).  Thanks in advance.

-- 
Charles Theobald
NC Division of Water Resources
[EMAIL PROTECTED]
919-715-5425 

___
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] Simple polygon imagemap creation

2008-05-08 Thread Fawcett, David
Charles, 

Take a look at this HowTo that I wrote quite a while ago.  

http://mapserver.gis.umn.edu/docs/howto/imagemaps

This gets you the imagemap, I used a separate mapserver request to get
the image.  A comment by Robert Burgholzer indicates that you can get
both the image and the imagemap if you add a querymap object to your map
file.

David.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Charles
Theobald
Sent: Thursday, May 08, 2008 9:38 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Simple polygon imagemap creation


Does anyone have an code example of a simple polygon imagemap?  We want 
to display a county map, and go to a specific page for the county that 
is selected (clicked on).  Thanks in advance.

-- 
Charles Theobald
NC Division of Water Resources
[EMAIL PROTECTED]
919-715-5425 

___
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] Simple polygon imagemap creation

2008-05-08 Thread Charles Theobald
Does anyone have an code example of a simple polygon imagemap?  We want 
to display a county map, and go to a specific page for the county that 
is selected (clicked on).  Thanks in advance.


--
Charles Theobald
NC Division of Water Resources
[EMAIL PROTECTED]
919-715-5425 


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


Re: [mapserver-users] Transparencies and IE6

2008-05-08 Thread bartvde
This a known issue/bug in IE6.

You can use a png hack to overcome this problem (though performance might
be an issue), e.g.:

http://code.google.com/p/pnghack/

Best regards,
Bart

On Thu, 8 May 2008 10:51:39 -0400, "Nelson Soto" <[EMAIL PROTECTED]>
wrote:
> I am having trouble getting cross-browser uniformity with MapServer.
> None of my transparent-enabled layers appear to draw at all under IE6
> and in Firefox 2 The layers draw, but without transparency enabled.
> They work as expected with IE7 however. Is there a known issue with
> this?
> ___
> 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] Transparencies and IE6

2008-05-08 Thread Nelson Soto
I am having trouble getting cross-browser uniformity with MapServer.
None of my transparent-enabled layers appear to draw at all under IE6
and in Firefox 2 The layers draw, but without transparency enabled.
They work as expected with IE7 however. Is there a known issue with
this?
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] ROSA applet with PHP Mapscript

2008-05-08 Thread Daniel Morissette

Carlo Pelliconi wrote:

Hi all.
I'm trying to use ROSA applet with PHPMapscript (I had jbox with cgi 
mapserver, and I'd like to have similar functions).
Looking for documentation (both in web and in downloaded .tar), I've 
found only few pages.

Does anyone know any link with deeper documentation or usage examples?
But it is not necessary to use ROSA: is there something other, which 
can  be used for the same tasks?


FYI the mapserv CGI also has support for ROSA applet parameters, see at 
the bottom of this page:

http://mapserver.gis.umn.edu/docs/reference/cgi/controls

Unfortunately that documentation doesn't include usage examples so you'd 
have to figure the way to setup your mapserv CGI template yourself.


With respect to ROSA with PHP MapScript, there is the good old GMap demo 
app that uses both. Not the best example of good coding, but at least 
that's something to get started. You can download the GMap demo with all 
scripts and data at http://dl.maptools.org/dl/gmap-ms46.zip and you can 
see it online at http://www.mapsherpa.com/gmap/


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] Re: How TO change color of a layer using mapscript(without editing mapfile)

2008-05-08 Thread Sucharita Samuel
 Hi Yatendra,

layer.close(); , here layer is the base layer. The code that I have provided
is used to colour features in the layer (You can change the entire layer
color also). The layer has many features, which can be retrieved using
shapeObj shape = layer.getFeature(shapeInd, -1);
"shapeInd" is the index of the shape.

This is the shape that i use to add into the temporary layer created
oTempLayer.addFeature(shape);
So, once I add the shape that I want to color to the temporary layer, I
close the base layer using layer.close();

I hope this helps.

Regards,
Sucharita

>


On Thu, May 8, 2008 at 11:09 AM, <[EMAIL PROTECTED]> wrote:

> Dear Sucharita,
> I have one more question. U have used
> "oTempLayer.addFeature(shape);"
>
> How to get shape?
>
> Which layers shape are you talking about? Please clarify my doubt.
> I am newbie to asp.net mapserver.
> Thanks Regards
> Yatendra Jaiswal
>
> Sucharita Samuel wrote:
> >
> >  Hi Yatendra,
> >   To change the colour of a layer, you can create a
> > temporary layer, assign the attributes (like color,outline color etc) and
> > then add the shape to your existing layer and redraw the map image..
> > The following code might help,
> >
> >  //*Code for creating a temporary layer to be added onto the
> > existing map**
> >
> > layerObj oTempLayer = new layerObj(map);
> > oTempLayer.type = MS_LAYER_TYPE.MS_LAYER_POLYGON;
> > oTempLayer.status = 1;
> > classObj oTempClass = new classObj(oTempLayer);
> > labelObj oLabel = oTempClass.label;
> > oLabel.color.setRGB(0,0,0);
> > styleObj oStyle = new styleObj(oTempClass);
> > oStyle.outlinecolor.setRGB(100, 12, 12);
> > oStyle.color.setRGB(221, 160, 221);
> > oTempLayer.addFeature(shape);
> > layer.close();
> > oImg = map.draw();
> > int i= oTempLayer.draw(map, oImg);
> >
> >
> //*
> >
> > Regards,
> > Sucharita
> >
> >
> > On Fri, May 2, 2008 at 12:18 PM, yatendra <[EMAIL PROTECTED]>
> > wrote:
> >
> >>
> >> Hi
> >> Thanks for reply
> >> i tried this code but there is null reference in
> >> "$style->color->setRGB( 255, 0, 0 );
> >> $style->outlinecolor->setRGB( 255, 0, 0 );"
> >> this step
> >> Please giude me...
> >> color of  a layer is not schanging
> >>
> >> Thanks Regards
> >>
> >>
> >> yatendra wrote:
> >> >
> >> > Hi friends,
> >> > I am using asp.net to develop application on mapserver.
> >> > I want to change layer color available in my mapfile.
> >> > Is it possible to change layer color without editing layer in mapfile?
> >> > What function do i need to use to do this?
> >> > Can i give unique value to each feature?
> >> > Is it also possible?
> >> > Please reply if any one know regarding this.
> >> > any idea will also be helpful to me...
> >> > Thanks regards
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-TO-change-color-of-a-layer-using-mapscript%28without-editing-mapfile%29-tp16983974p16997022.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 mailing list
> > mapserver-users@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> >
> Quoted from:
>
> http://www.nabble.com/How-TO-change-color-of-a-layer-using-mapscript%28without-editing-mapfile%29-tp16983974p17100215.html
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Coverting lat/long to pixel

2008-05-08 Thread Sucharita Samuel
 Thanks Brian.
 I actually need to find the intersection of a rectangle and circle. As you
must be aware that a  circle in mapserver terminology is a shapeobject drawn
using the upper left and bottom right co-ordinates of a rectangle.
 In the above case I get the intersection of two rectangles, but as the
circle lies inside the rectangle, i am not able to find whether my first
rectangle intersects with the bottom corner of the rectangle(that contains
the circle), which is not part of the circle.
Any solution in this case would be of great help.

Thanks,
Sucharita


On Wed, May 7, 2008 at 6:33 PM, Hulbert, Brian <[EMAIL PROTECTED]>
wrote:

>  Something else to consider if your map uses multiple (or switches
> between) "projections".
>
>
>
> My C# map application uses both equirectangular and orthographic
> projections.  Therefore, I do the following before the lines of code that
> Sandeep presented:
>
>
>
> // create a Mapserver pointObj for the point being converted
>
> pointObj pObj = new pointObj(location.LongitudeDeg,
> location.LatitudeDeg, 0, 0);
>
>
>
> // create 2 projection objects - a From projection object (a
> latlong projection) and a To projection object (the current projection)
>
> projectionObj projectionFrom = new projectionObj("+proj=latlong
> +ellps=WGS84 +datum=WGS84 +over");
>
> projectionObj projectionTo = new projectionObj
> (m_baseMap.getProjection());
>
>
>
> // perform the projection of the point from the current
> projection to a latlong projection; the point's x (lon) and y (lat) are
> updated in place
>
> bool bSuccess = (((int)MS_RETURN_VALUE.MS_SUCCESS) ==
> pObj.project(projectionFrom, projectionTo));
>
>
>
> if (bSuccess)
>
> {
>
>   // Sandeep's code here
>
> }
>
> // cleanup temporary objects
>
> pObj.Dispose();
>
> projectionFrom.Dispose();
>
> projectionTo.Dispose();
>
>
>
> Brian
>
>
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Sucharita Samuel
> *Sent:* Wednesday, May 07, 2008 7:42 AM
> *To:* Sandeep Kumar Jakkaraju
> *Cc:* mapserver-users
> *Subject:* Re: [mapserver-users] Coverting lat/long to pixel
>
>
>
>   Thanks a lot Sandeep. I think the code works.
>
> Regards,
> Sucharita
>
> On Wed, May 7, 2008 at 3:40 PM, Sandeep Kumar Jakkaraju <
> [EMAIL PROTECTED]> wrote:
>
>
>
> Hi Sucharita
>
>
>
>
>
> these are example values
>
>
>
>  private double minlat=28.6023 ;
> private double minlon=77.2018 ;
> private double maxlat=28.6382 ;
> private double maxlon=77.2493 ;
>
> private int screenwidth=2156;
> private int screenheight=1674;
> private Point p;
>
>
> public Point convertLatLonToPixel(double lat,double lon)
> {
> double cellsizex = (maxlon-minlon)/screenwidth;
> double cellsizey = (maxlat-minlat)/screenheight;
>
> int ix = (int) ((lon-minlon)/cellsizex);
> int iy1 = (int) ((maxlat-lat)/cellsizex);
> int iy2 = (int) ((maxlat-lat)/cellsizey);
> int iy = (int) (iy1+iy2)/2;
>
> p = new Point(ix,iy);
>
> return p;
> }
>
>
>
>
>
>
>
>
> On 5/7/08, *Sucharita Samuel* <[EMAIL PROTECTED]> wrote:
>
>  Hi Sandeep,
>A code fragment will be really helpful.
>
> Thanks,
> Sucharita
>
>
>
>  On Wed, May 7, 2008 at 3:20 PM, Sandeep Kumar Jakkaraju <
> [EMAIL PROTECTED]> wrote:
>
>
>
> This can be done using simple interpolation also
> 
>
>
>
> On 5/7/08, *Sucharita Samuel* <[EMAIL PROTECTED]> wrote:
>
>  Hi friends,
>   Can somebody please help me with a code to convert the
> latitude and longitude of a point to pixel co-ordinates? I am using
> ASP.NET . I have heard that GDAL has a method for this
> conversion. MS4W comes with GDAL as its tools, but I don't know how to
> implement it in C#.NET.
>
>
> Thanks in advance,
>
> Regards,
> Sucharita
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
>
> --
> Thanks
> Regards
>
> Sandeep Kumar Jakkaraju
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
>
>
>
> --
> Thanks
> Regards
>
> Sandeep Kumar Jakkaraju
>
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Layer always turn on (not possible to activate/deactivate)

2008-05-08 Thread Luca Casagrande
On Thu, May 8, 2008 at 12:22 PM, Emilio Ponce <[EMAIL PROTECTED]> wrote:

> Hi Luca, Thanks for your help.
>
> To set no GROUP is not working.. Maybe this is the solution using mapserver
> only, but with ka-map if I don't set group to this layer then the other
> layers disappear from the legend and in general everything stops work well.
> Is there other way?
>
> thanks anyway
>


Hy Emilio,

I think there's a problem with your mapfile. In ka-Map the layers without
the attribute GROUP, are all merged in the base layer; you can check this in
the Foss4g 2006 presentation (page 12).

Let me know.

Luca
[1]:
http://www.ominiverdi.org/ka-map/ka-map/presentations/foss4g2006/foss4g2006.html
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Layer always turn on (not possible to activate/deactivate)

2008-05-08 Thread Emilio Ponce
Hi Luca, Thanks for your help.

To set no GROUP is not working.. Maybe this is the solution using mapserver
only, but with ka-map if I don't set group to this layer then the other
layers disappear from the legend and in general everything stops work well.
Is there other way?

thanks anyway


2008/5/7 Luca Casagrande <[EMAIL PROTECTED]>:

>
> Il giorno 07/mag/08, alle ore 19:34, Emilio Ponce ha scritto:
>
> Hi everyone, here's a newbie question:
>
> I'm using mapserver with ka-map and I have different layers in a unique
> mapfile. I want to set ONE of this layers always visible, without
> possibility to turn off (deactivate) it. For this purpose I thought the
> STATUS tag on this LAYER was the solution: Status DEFAULT to turn on this
> layer permanently... but it didn't work.
>
>
> You have to set no GROUP at all for that layer.
> With this setting, layer will go in "base" group and will stays always on.
>
> Bye
>  --
> Luca Casagrande
> Gubbio (PG)
>
> "Siamo tutti in una fogna, ma che alcuni di noi guardano le stelle" O.
> Wilde
>
>


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