Re: [MAPSERVER-USERS] help! agg palette quantize algorithmimperfection

2008-06-10 Thread Pål Kristensen

Hi!

Is the quantize mechanism for AGG now included as default, or do we still
need to build with the --with-experimental_png set?

Regards,
Pål Kristensen


Steve Lime wrote:
 
 I've generated palettes by rendering a large 24-bit sample image and then
 reducing colors using
 tools like Photoshop, GIMP or ImageMagick. Then I just run gdalinfo output
 on the reduced color
 image through a perl script to extract the palette.
 
 #!/usr/bin/perl
 
 $doit = 0;
 while() {
   if($_ =~ /Color Table/) {
 $doit = 1;
 next;
   }
 
   if($doit) {
 ($r,$g,$b,$a) = split /,/, substr($_,7); 
 print $r,$g,$b\n;
   }
 }
 
 Works just fine...
 
 Steve
 
 On 6/6/2008 at 3:24 PM, in message [EMAIL PROTECTED],
 BrainDrain
 [EMAIL PROTECTED] wrote:
 
 $? You're kidding)) Anyway, thanks for advise. Will try. 
 And what about agg rgba mode (bug, invalid color interpretation
 (inverting?)
 or something like that)? When
 this problem will be fixed? I need it, because I want to use map
 transparency (only rgba mode) to combine with google map layer in
 openlayers
 rich client app.
 
 Stephen Woodbridge wrote:
 
 Hey, that's what they pay you the BIG BUCKS for! :)
 
 Write a perl/bash/{your favorite} script to grab all the COLOR lines 
 from you mapfile and reformat the r g b to r,g,b in you palette file.
 
 I have a few hundred symbols in my symbol library, but I only use about 
 10 of them regularly so I made sure the primary colors were also in the 
 palette file. I make the script add them so I don't have to think about
 it.
 
 It sounds like a big deal, but it not that bad.
 
 YMMV,
-Steve W
 
 BrainDrain wrote:
 Thanks, i already read about preparing palette index file  I see 2
 obstacles:
 1) I need to monitor my map file (big size) to keep relevant my palette
 file. It is inflexible to extract rgb colors used in pixmap symbols
 (hundreds, updatable). Can I use html palette for ex. (or any other
 'universal' palette) - to make this process not so time-consuming?
 2) If I have strict palette, can I be sure that agg renderer will
 always
 use
 the nearest(?) color from my palette?
 
 pagameba wrote:
 Use:

 OUTPUTFORMAT
OUTPUTFORMAT
NAME AGG_Q
DRIVER AGG/PNG
MIMETYPE image/png; mode=8bit
IMAGEMODE RGB
EXTENSION png
FORMATOPTION PALETTE_FORCE=TRUE
FORMATOPTION PALETTE=/path/to/palette.txt
 END

 where palette.txt is a text file with RGB tuples in the form:

 RRR,GGG,BBB

 For example:

 0,0,0
 255,255,255
 127,127,127

 MapServer will use AGG 24 bit rendering but reduce the output file to  
 8 bit and reserve the colours in your palette.txt file.  This will  
 give you consistent colours for the ones you care about.   
 Specifically, you should reserve all the colours that you actually  
 reference in your map file plus any colours of pixmap symbols.  Don't  
 put in more colours than you actually need to because MapServer needs  
 to use whatever space is left (255 less your colours) for
 antialiasing.

 Cheers

 Paul

 On 6-Jun-08, at 7:53 AM, BrainDrain wrote:

 I use this output format in my map file:
 OUTPUTFORMAT
 NAME AGG_Q
 DRIVER AGG/PNG
 MIMETYPE image/png; mode=8bit
 IMAGEMODE RGB
 EXTENSION png
 FORMATOPTION QUANTIZE_FORCE=ON
 FORMATOPTION QUANTIZE_DITHER=OFF
 FORMATOPTION QUANTIZE_COLORS=256
 END
 but every time map draw called (or map image requested fom cgi  
 mapserv.exe)
 polygons has a little difference in fill color (I think this is  
 because
 color palette recalculated slightly different each time). This is
 unacceptable for me. How can i correct this? (maybe some  
 FORMATOPTION?)
 -- 
 View this message in context:
 
 http://www.nabble.com/help%21-agg-palette-quantize-algorithm-imperfection-tp1766773
  
 3p17667733.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 

 __

 Paul Spencer
 Chief Technology Officer
 DM Solutions Group Inc
 http://www.dmsolutions.ca/ 
 ___
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/help%21-agg-palette-quantize-algorithm-imperfection-tp17667733p17748999.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org

Re: [MAPSERVER-USERS] help! agg palette quantize algorithmimperfection

2008-06-10 Thread thomas bonfort
you still need --with-experimental-png

thomas

On Tue, Jun 10, 2008 at 9:01 AM, Pål Kristensen
[EMAIL PROTECTED] wrote:

 Hi!

 Is the quantize mechanism for AGG now included as default, or do we still
 need to build with the --with-experimental_png set?

 Regards,
 Pål Kristensen


 Steve Lime wrote:

 I've generated palettes by rendering a large 24-bit sample image and then
 reducing colors using
 tools like Photoshop, GIMP or ImageMagick. Then I just run gdalinfo output
 on the reduced color
 image through a perl script to extract the palette.

 #!/usr/bin/perl

 $doit = 0;
 while() {
   if($_ =~ /Color Table/) {
 $doit = 1;
 next;
   }

   if($doit) {
 ($r,$g,$b,$a) = split /,/, substr($_,7);
 print $r,$g,$b\n;
   }
 }

 Works just fine...

 Steve

 On 6/6/2008 at 3:24 PM, in message [EMAIL PROTECTED],
 BrainDrain
 [EMAIL PROTECTED] wrote:

 $? You're kidding)) Anyway, thanks for advise. Will try.
 And what about agg rgba mode (bug, invalid color interpretation
 (inverting?)
 or something like that)? When
 this problem will be fixed? I need it, because I want to use map
 transparency (only rgba mode) to combine with google map layer in
 openlayers
 rich client app.

 Stephen Woodbridge wrote:

 Hey, that's what they pay you the BIG BUCKS for! :)

 Write a perl/bash/{your favorite} script to grab all the COLOR lines
 from you mapfile and reformat the r g b to r,g,b in you palette file.

 I have a few hundred symbols in my symbol library, but I only use about
 10 of them regularly so I made sure the primary colors were also in the
 palette file. I make the script add them so I don't have to think about
 it.

 It sounds like a big deal, but it not that bad.

 YMMV,
-Steve W

 BrainDrain wrote:
 Thanks, i already read about preparing palette index file  I see 2
 obstacles:
 1) I need to monitor my map file (big size) to keep relevant my palette
 file. It is inflexible to extract rgb colors used in pixmap symbols
 (hundreds, updatable). Can I use html palette for ex. (or any other
 'universal' palette) - to make this process not so time-consuming?
 2) If I have strict palette, can I be sure that agg renderer will
 always
 use
 the nearest(?) color from my palette?

 pagameba wrote:
 Use:

 OUTPUTFORMAT
OUTPUTFORMAT
NAME AGG_Q
DRIVER AGG/PNG
MIMETYPE image/png; mode=8bit
IMAGEMODE RGB
EXTENSION png
FORMATOPTION PALETTE_FORCE=TRUE
FORMATOPTION PALETTE=/path/to/palette.txt
 END

 where palette.txt is a text file with RGB tuples in the form:

 RRR,GGG,BBB

 For example:

 0,0,0
 255,255,255
 127,127,127

 MapServer will use AGG 24 bit rendering but reduce the output file to
 8 bit and reserve the colours in your palette.txt file.  This will
 give you consistent colours for the ones you care about.
 Specifically, you should reserve all the colours that you actually
 reference in your map file plus any colours of pixmap symbols.  Don't
 put in more colours than you actually need to because MapServer needs
 to use whatever space is left (255 less your colours) for
 antialiasing.

 Cheers

 Paul

 On 6-Jun-08, at 7:53 AM, BrainDrain wrote:

 I use this output format in my map file:
 OUTPUTFORMAT
 NAME AGG_Q
 DRIVER AGG/PNG
 MIMETYPE image/png; mode=8bit
 IMAGEMODE RGB
 EXTENSION png
 FORMATOPTION QUANTIZE_FORCE=ON
 FORMATOPTION QUANTIZE_DITHER=OFF
 FORMATOPTION QUANTIZE_COLORS=256
 END
 but every time map draw called (or map image requested fom cgi
 mapserv.exe)
 polygons has a little difference in fill color (I think this is
 because
 color palette recalculated slightly different each time). This is
 unacceptable for me. How can i correct this? (maybe some
 FORMATOPTION?)
 --
 View this message in context:

 http://www.nabble.com/help%21-agg-palette-quantize-algorithm-imperfection-tp1766773
 3p17667733.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

 __

 Paul Spencer
 Chief Technology Officer
 DM Solutions Group Inc
 http://www.dmsolutions.ca/
 ___
 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



 --
 View this message in context: 
 http://www.nabble.com/help%21-agg-palette-quantize-algorithm-imperfection-tp17667733p17748999.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.

 ___
 

Re: [MAPSERVER-USERS] help! agg palette quantize algorithmimperfection

2008-06-10 Thread Pål Kristensen

Hi!

Thanks for the quick answer! Is this feature considered to be includes as
default in the 5.2 release? If not  I hope that the people maintaining the
MS4W would include this in that build. On Linux there is quite easy to build
MapServer, but on windows we still depends on the MS4W pre-build package.

Regards,
Pål Kristensen


tbonfort wrote:
 
 you still need --with-experimental-png
 
 thomas
 
 On Tue, Jun 10, 2008 at 9:01 AM, Pål Kristensen
 [EMAIL PROTECTED] wrote:

 Hi!

 Is the quantize mechanism for AGG now included as default, or do we still
 need to build with the --with-experimental_png set?

 Regards,
 Pål Kristensen


 Steve Lime wrote:

 I've generated palettes by rendering a large 24-bit sample image and
 then
 reducing colors using
 tools like Photoshop, GIMP or ImageMagick. Then I just run gdalinfo
 output
 on the reduced color
 image through a perl script to extract the palette.

 #!/usr/bin/perl

 $doit = 0;
 while() {
   if($_ =~ /Color Table/) {
 $doit = 1;
 next;
   }

   if($doit) {
 ($r,$g,$b,$a) = split /,/, substr($_,7);
 print $r,$g,$b\n;
   }
 }

 Works just fine...

 Steve

 On 6/6/2008 at 3:24 PM, in message [EMAIL PROTECTED],
 BrainDrain
 [EMAIL PROTECTED] wrote:

 $? You're kidding)) Anyway, thanks for advise. Will try.
 And what about agg rgba mode (bug, invalid color interpretation
 (inverting?)
 or something like that)? When
 this problem will be fixed? I need it, because I want to use map
 transparency (only rgba mode) to combine with google map layer in
 openlayers
 rich client app.

 Stephen Woodbridge wrote:

 Hey, that's what they pay you the BIG BUCKS for! :)

 Write a perl/bash/{your favorite} script to grab all the COLOR lines
 from you mapfile and reformat the r g b to r,g,b in you palette file.

 I have a few hundred symbols in my symbol library, but I only use
 about
 10 of them regularly so I made sure the primary colors were also in
 the
 palette file. I make the script add them so I don't have to think
 about
 it.

 It sounds like a big deal, but it not that bad.

 YMMV,
-Steve W

 BrainDrain wrote:
 Thanks, i already read about preparing palette index file  I see 2
 obstacles:
 1) I need to monitor my map file (big size) to keep relevant my
 palette
 file. It is inflexible to extract rgb colors used in pixmap symbols
 (hundreds, updatable). Can I use html palette for ex. (or any other
 'universal' palette) - to make this process not so time-consuming?
 2) If I have strict palette, can I be sure that agg renderer will
 always
 use
 the nearest(?) color from my palette?

 pagameba wrote:
 Use:

 OUTPUTFORMAT
OUTPUTFORMAT
NAME AGG_Q
DRIVER AGG/PNG
MIMETYPE image/png; mode=8bit
IMAGEMODE RGB
EXTENSION png
FORMATOPTION PALETTE_FORCE=TRUE
FORMATOPTION PALETTE=/path/to/palette.txt
 END

 where palette.txt is a text file with RGB tuples in the form:

 RRR,GGG,BBB

 For example:

 0,0,0
 255,255,255
 127,127,127

 MapServer will use AGG 24 bit rendering but reduce the output file
 to
 8 bit and reserve the colours in your palette.txt file.  This will
 give you consistent colours for the ones you care about.
 Specifically, you should reserve all the colours that you actually
 reference in your map file plus any colours of pixmap symbols. 
 Don't
 put in more colours than you actually need to because MapServer
 needs
 to use whatever space is left (255 less your colours) for
 antialiasing.

 Cheers

 Paul

 On 6-Jun-08, at 7:53 AM, BrainDrain wrote:

 I use this output format in my map file:
 OUTPUTFORMAT
 NAME AGG_Q
 DRIVER AGG/PNG
 MIMETYPE image/png; mode=8bit
 IMAGEMODE RGB
 EXTENSION png
 FORMATOPTION QUANTIZE_FORCE=ON
 FORMATOPTION QUANTIZE_DITHER=OFF
 FORMATOPTION QUANTIZE_COLORS=256
 END
 but every time map draw called (or map image requested fom cgi
 mapserv.exe)
 polygons has a little difference in fill color (I think this is
 because
 color palette recalculated slightly different each time). This is
 unacceptable for me. How can i correct this? (maybe some
 FORMATOPTION?)
 --
 View this message in context:

 http://www.nabble.com/help%21-agg-palette-quantize-algorithm-imperfection-tp1766773
 3p17667733.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

 __

 Paul Spencer
 Chief Technology Officer
 DM Solutions Group Inc
 http://www.dmsolutions.ca/
 ___
 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 

[MAPSERVER-USERS] how to specify polyline width in ground units

2008-06-10 Thread BrainDrain

how can I specify polyline width in ground units without querying (because I
will use queries for other tasks) and without variable substitution?
for ex, I need constant (in real world units) line width for my layer
'Street Axes'
TIA
-- 
View this message in context: 
http://www.nabble.com/how-to-specify-polyline-width-in-ground-units-tp17751833p17751833.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] Mapserver 5.0.3 true type problem

2008-06-10 Thread Wim Blanken
Hello list,

 

I have a strange problem with the most recent version of mapserver.

 

All my symbols that are using true type fonts return the same symbol in te
legend.

Is there a problem with AGG in combination with true type fonts? 

I think it may have something to do with the encoding type of the tryetype
fonts?

 

Regards,

 

Wim Blanken

The Netherlands

 

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


Re: [mapserver-users] show legend graphic with mapbuilder 1.5 andmapserverUID 4386)

2008-06-10 Thread bartvde
Hi,

I think you are missing the required parameter VERSION in your
GetLegendGraphic URL.

http://localhost/cgi-bin/mapserv.exe?map=d:/www/lliria_wms/lliria.mapREQUEST=GetLegendGraphicLAYER=EdificiosFORMAT=image/gifversion=1.1.1

Otherwise try the URL directly in your browser and see what error message
you get.

Best regards,
Bart

On Tue, 10 Jun 2008 13:49:31 +0200, Bernardo \(iNCARGiS\)
[EMAIL PROTECTED] wrote:
 I'm just begining with mapbuilde and i have problems in show the legend
 image in my web
 
 This is the part of my .map file
 
 LAYER
   NAME  EDIFICIOS
   DATA  LLIRIA
   STATUS  ON
   TYPE  POLYGON
   GROUPBASE
   
   PROJECTION
 init=epsg:23030
   END
   
   DUMP TRUE
   TOLERANCE 10
   TEMPLATE edificios.html
   
   METADATA
   wms_srs EPSG:23030
   wms_name  Edificios
   wms_server_version  1.1.0
   wms_formatimage/gif
   wms_legend_graphic true
   END
 
 And this is my map context
 
   Layer queryable=1 hidden=0
Server service=OGC:WMS version=1.0.0 title=OGC:WMS
   OnlineResource xlink:type=simple

xlink:href=http://localhost/cgi-bin/mapserv.exe?map=d:/www/lliria_wms/lliria.map/
/Server
NameEdificios/Name
TitleEdificios/Title
SRSEPSG:23030/SRS
FormatList
 Format current=1image/gif/Format
/FormatList
StyleList
 Style current=1
  Namedefault/Name
  Titledefault/Title
  LegendURL format=image/gif
   OnlineResource xlink:type=simple

xlink:href=http://localhost/cgi-bin/mapserv.exe?map=d:/www/lliria_wms/lliria.mapREQUEST=GetLegendGraphicLAYER=EdificiosFORMAT=image/gif/
  /LegendURL
 /Style
/StyleList
   /Layer
 
 The legend is defined inside the map file
 
 
   TRANSPARENCY 100
   CLASSITEM USO
   
   CLASS
   NAME ACERAS
   EXPRESSION ACERA
   COLOR   -1 -1 -1
   OUTLINECOLOR104 104 104
   END
   
   CLASS
   NAME BALSAS
   EXPRESSION BALSA
   COLOR   151 219 242
   OUTLINECOLOR64 101 235
   END
   
   CLASS
   NAME EDIFICIOS
   EXPRESSION EDIF
   COLOR   255 234 190
   OUTLINECOLOR255 211 127
   END
 
 
 The imgage map is right but the legend no.
 
 Thanks in advance

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


re: [mapserver-users] show legend graphic with mapbuilder 1.5 and mapserver

2008-06-10 Thread Josh Hevenor
First a note that your email text didn't come through in my list digest:

 Skipped content of type multipart/alternative-- next part
--

Now for legends. This might not be what you need but it's how I've worked with 
legends in mapbuilder before. So here's the app:

http://www.eman-rese.ca/mapbuilder/demo/citsci/index.html

More specifically the map context is here

http://www.eman-rese.ca/mapbuilder/demo/citsci/elements.xml

So we have MapBuilder showing a MapServer WMS layer. I set the legend graphic 
as part of the layer with

Layer queryable=1 hidden=1
Server service=OGC:WMS version=1.1.1 title=WHC CitizenScience 
WMS
OnlineResource xlink:type=simple 
xlink:href=http://emandev.cciw.ca/cgi-bin/mapserver/whc_ows_demo.asp/
/Server
NameLAND/Name
TitleLand/Title
SRSEPSG:4326/SRS
FormatList
Format current=1image/png/Format
/FormatList
StyleList
Style current=1
NameDefault/Name
TitleDefault/Title
LegendURL format=image/gif
OnlineResource xlink:type=simple 

xlink:href=http://emandev.cciw.ca/cgi-bin/mapserver/whc_ows_demo.asp?
VERSION=1.1.1
SERVICE=WMS
REQUEST=GetLegendGraphic
LAYER=LAND
STYLE=Default
FORMAT=image%2Fgif/
/LegendURL
/Style
/StyleList
/Layer

So this should take care of the client end...If I can find that mapfile
again I'll pass along the WMS definition also.
Hope this helps,

Josh Hevenor

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


RE: [mapserver-users] OGR doesn't grok GML3?

2008-06-10 Thread Burgholzer,Robert
This is excellent news! Thanks!  I will let you know how it goes for me. 

I am cc'ing the Mapserver listserv so as to keep a record of this online, and 
to see if others find it useful.

r.b.


-Original Message-
From:   Yewondwossen Assefa [mailto:[EMAIL PROTECTED]
Sent:   Tue 6/10/2008 10:22 AM
To: Frank Warmerdam; Burgholzer,Robert
Cc: 
Subject:Re: [mapserver-users] OGR doesn't grok GML3?

Hi There,

  Just few comments in case this might help:

  There is a patch submitted in  http://trac.osgeo.org/gdal/ticket/2311 
that could help in this case.  The patch was intended for the reading of 
gml3 profile 1.
  Couple of  issues I had when proposing the  patch is that the support 
for  things like gml:posList are limited. According to the specs for 
gml3.1/level 1 gml:posList does not have any attribute but for gml3.1, 
it could have attributes such as a dimension (gml:posList 
srsDimension=3.  The patch assumes a 2 dimension geometry.
  It is also my understanding  that currently the ogr gml parser strips 
out any attribute information from the gml file, and things like 
srsDimension are not available in gml2ogrgeometry.cpp.  I think any 
upgrade to the reader would have to address this.

Note that using this patch and modifying it a bit to assume a 3d 
geometries for posList elements, I was able to read polygon/line/points 
coming out of the wfs server (http://frameworkwfs.usgs.gov/) and display 
it in Mapserver.

Hope this helps.

Best Regards,



Frank Warmerdam wrote:
 Burgholzer,Robert wrote:
 Frank,
 Where would I start to look (i.e., which package) if I were wishing to
 help along on the development of this?  
 
 Robert,
 
 The bulk of my work on GML3 support for the NAS driver was implementing
 alternate GML geometry reading.  Possibly as an extension in the
 gdal/ogr/gml2ogrgeometry.cpp file.
 
 Best regards,


-- 

Assefa Yewondwossen
Software Analyst

Email: [EMAIL PROTECTED]
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925




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


Re: [mapserver-users] mapserver wms: srs problem

2008-06-10 Thread Matthew Pettis
Hi All,

Thanks to everyone that contributed.  The mapfile that renders (thanks
to Tom [Burlington] Kralidis for it) is below.  I am still working on
it not being the projection that makes the state of MN look short and
squat.  If anyone wants a screenshot, contact me and i'll send it to
you directly rather than to the listserv.

Thanks everybody for your help,
matt


===
MAP
# 
http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\wms.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetCapabilities
# 
http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\wms.mapmode=map


# Map attributes

  IMAGETYPE   PNG
  EXTENT  -100 30 90 55
  SIZE660 495
  IMAGECOLOR  255 255 255
  FONTSET C:/ms4w/Apache/htdocs/fonts/fonts.list

  PROJECTION
init=epsg:4326
  END


# Web settings

  WEB
IMAGEPATH   C:/ms4w/Apache/htdocs/tmp/
IMAGEURL/tmp/
METADATA
wms_title   WMS Demo Server
wms_onlineresource
http://localhost/cgi-bin/mapserv.exe?center=45,-95zoom=6;
wms_srs EPSG:4326 EPSG:26915
END
  END


# State
# Background shows through missing precincts to show where no
votes will be coming from

  LAYER
NAME  state
METADATA
wms_title   state
wms_format image/png
END
PROJECTION
  init=epsg:26915
END
CONNECTIONTYPEpostgis
CONNECTIONuser=postgres dbname=gisvote password=postgres
DATA  the_geom from shp_state
STATUSon
TYPE  polygon

CLASS
  NAMEstate
  COLOR   200 200 200
END

  END # Layer state

END
===


On Tue, Jun 10, 2008 at 12:48 AM, Rahkonen Jukka
[EMAIL PROTECTED] wrote:
 Hi,

 I have not followed this discussion closely, but at least map extents and map 
 level projection do not match. It may not have any effect on WMS but it does 
 not harm if they were correct.

 EXTENT  184056.505 4809728.25 767381.245 5478975.75
  ...

  PROJECTION
init=epsg:4326
  END

 -Jukka Rahkonen-





-- 
It is from the wellspring of our despair and the places that we are
broken that we come to repair the world.
-- Murray Waas
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserver wms: srs problem

2008-06-10 Thread Barend Kobben
Hi,

It looks like your mixing up several things that shouldn't be mixed:

1) 
http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\wms.mapSE
RVICE=WMSVERSION=1.1.1REQUEST=GetCapabilities
...is a valid WMS GetCapabilities request. It might result in a valid WMS
response (although I cannot test this as I obviously  do not have the same
localhost as you...)

However:  
http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\wms.mapmo
de=map
...is a non-WMS request, it uses the 'old' MapServer CGI mode, not the OGC
standardised WMS interface. To get a map the WMS way you'd request
something like:
http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\wms.mapm;
SERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=LAYERS=aLayerBBOX=1,2,3,4
SRS=EPSG:4326format=image/gif

2) next, you advertise your data to be in lat-lon on the WGS 84 (PROJECTION
init=epsg:4326), but you proclaim the EXTENT of the data to be in meters or
some other projected unit:
EXTENT  184056.505 4809728.25 767381.245 5478975.75
This obviously are not lat-lon degrees (which have a max extent of
-180,180,-90,90)... Now MS will be really confused! H, this client
wants lat-lon data that stretches over the whole of the universe... :-)

3) you then advertise the WMS to be able to deliver data in a non-projected
and a projected SRS:
 wms_srs EPSG:4326 EPSG:26915
Which is fine, but you do it again for the LAYER, which I think is
superfluous.

4) You do NOT tell the WMS what SRS the data originally is in. There is no
PROJECTION object in the LAYER, which in some case might lead to MapServer
trying to find out for itself, BUT NOT in the Postgis case you have. A
connection to PostGIS in itself needs to be told which projection to fetch
the data in (because PosGIS can reproject if necessary). One of the ways of
doing that is to make the DATA statement a bit more elaborate than
  the_geom from shp_state, instead use
 DATA   the_geom from shp_state using unique your_primary_key using
srid=26915

Hope this helps...

-- 
Barend Köbben
International Institute for Geo-Information
Sciences and Earth Observation (ITC)
PO Box 6
7500AA Enschede, The Netherlands
+31 (0)53 4874253

International Institute for Geo-Information Science and Earth Observation (ITC)
Chamber of Commerce: 410 27 560

E-mail disclaimer
The information in this e-mail, including any attachments, is intended for the 
addressee only. If you are not the intended recipient, you are hereby notified 
that any disclosure, copying, distribution or action in relation to the content 
of this information is strictly prohibited. If you have received this e-mail by 
mistake, please delete the message and any attachment and inform the sender by 
return e-mail. ITC accepts no liability for any error or omission in the 
message content or for damage of any kind that may arise as a result of e-mail 
transmission.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MAPSERVER-USERS] mapObject serialization in C# (variant)

2008-06-10 Thread Tamas Szekeres
Hi,

MapServer currently doesn`t support any other persitence
representation than the mapfiles. There have been some initial plans
related to an XML format in this list, but no one had any motivation
to implement that.
So I think the best what you can do at the moment is to use reflection
to access the properties along with some other members of the objects
and serialize the values manually.

Best regards,

Tamas


2008/6/9 BrainDrain [EMAIL PROTECTED]:

 Is there any 'standart' fast(!) way/method to serialize (xml/json/other
 markup) mapObj in C#? I need it for using server mapObj as JSON on rich
 client app running on browser. Look at my method (using reflection):

 public static ListDictionary PartialSerialize(object instance, Stack
 callerTypes, Type[] excludeTypes)
{
ListDictionary result = new ListDictionary();
object val;

callerTypes.Push(instance.GetType());
PropertyInfo[] pis = instance.GetType().GetProperties();
foreach (PropertyInfo pi in pis)
{
if (pi.PropertyType.IsSerializable 
 !pi.PropertyType.IsArray)
result[pi.Name] = pi.GetValue(instance, new object[0]);
else
{
//preventing useless nesting
if (!callerTypes.Contains(pi.PropertyType) 
 !((IList)excludeTypes).Contains(pi.PropertyType))
{
val = pi.GetValue(instance, new object[0]);
if (val != null)
result[pi.Name] = PartialSerialize(val,
 callerTypes, excludeTypes);
}
}
}
callerTypes.Pop();
return result;
}
 ...
 So I can convert mapObj on serever to hashtable automatically an then
 populate JSON object
 (still need to call explicitly getLayer, getClass etc., but this is not a
 problem):
 ...
 layers[i].Properties = Tools.PartialSerialize(layer, new Stack(), new
 Type[3] { typeof(mapObj), typeof(hashTableObj), typeof(colorObj)});
 ...
 classes[j].Properties = Tools.PartialSerialize(layerClass, new Stack(), new
 Type[4] { typeof(layerObj), typeof(labelObj), typeof(hashTableObj),
 typeof(colorObj)});
 ...
 styles[k].Properties = Tools.PartialSerialize(classStyle, new Stack(), new
 Type[2]{typeof(hashTableObj), typeof(colorObj)});
 ...
 mapStub.Properties = Tools.PartialSerialize(map, new Stack(), new Type[11] {
 typeof(labelObj), typeof(hashTableObj), typeof(fontSetObj),
 typeof(labelCacheObj), typeof(outputFormatObj[]), typeof(queryMapObj),
 typeof(referenceMapObj), typeof(scalebarObj), typeof(symbolSetObj),
 typeof(colorObj), typeof(legendObj)});
 ...
 JavaScriptSerializer class object allows to perform convertion to client
 More often I use script method in my web service that can do it behind the
 scenes.

 How do you do such kind of operation?
 --
 View this message in context: 
 http://www.nabble.com/mapObject-serialization-in-C--%28variant%29-tp17739919p17739919.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


Re: [MAPSERVER-USERS] runtime variable substitution

2008-06-10 Thread Yewondwossen Assefa

Hi There,

There are a couple of examples at the end of 
http://mapserver.gis.umn.edu/docs/reference/mapfile/variable_sub/


You should be able in your case to use a URL like 
id=value_of_the_id . Have you tried this and It did not work?


Hope it helps.

Y.A.

Hans Castorp wrote:

Hi to all,

Any of you have an example about how to do a parameter substitution???

What I want is to change the FILTER statement in one of my mapfile 
layers, but I don't know how to do it.


This is my layer's data and filter definition:

DATA the_geom FROM temp
FILTER id_session=%id%

What I want is to change the id valuedepending on some circunstances in 
my application.


Thanks in advance.




Hans Castorp



Enviado desde Correo Yahoo! 
http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52431/*http://es.docs.yahoo.com/mail/overview/index.html

La bandeja de entrada más inteligente.




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



--

Assefa Yewondwossen
Software Analyst

Email: [EMAIL PROTECTED]
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925


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


Re: [MAPSERVER-USERS] MapFile2XML conversion - WAS: mapObject serialization in C# (variant)

2008-06-10 Thread Bob Basques
All,
 
We've been pondering some sort of alternative to the Mapfiles for a few years 
now.  A preferable approach would be something that could be stored in a DB in 
some fashion for querying/assembly processes.  It seems on the surface like a 
DB schema could be developed to handle the MapFile storage aspects.
 
A first step would be in how to best approach moving into an XML way of life 
for the MapFiles.  Would it make any sense in the beginning to just build a 
MapFile2XML convertor (I would imagine this would be needed before anyone would 
sign up for XML) and once something like this is a state close to production, 
the innards of MapServer would then be made to parse the XML directly?  
 
Another approach might be to do something like MapFile2SQL first, and then the 
MapFile2XML.  This might save some time and seem like it would make 
standardization easier, since it would need to be inside of the DB fist.
 
Has anyone tried putting together any requirements list along these lines at 
all?  Is it going to be something where we just need to jump in and build 
something even if it might be a wrong approach to begin with?
 
This thread just got me thinking is all . . .you know how dangerous that can be 
. . . :c)
 
bobb
 


 Tamas Szekeres [EMAIL PROTECTED] wrote:
Hi,

MapServer currently doesn`t support any other persitence
representation than the mapfiles. There have been some initial plans
related to an XML format in this list, but no one had any motivation
to implement that.
So I think the best what you can do at the moment is to use reflection
to access the properties along with some other members of the objects
and serialize the values manually.

Best regards,

Tamas


2008/6/9 BrainDrain [EMAIL PROTECTED]:

 Is there any 'standart' fast(!) way/method to serialize (xml/json/other
 markup) mapObj in C#? I need it for using server mapObj as JSON on rich
 client app running on browser. Look at my method (using reflection):

 public static ListDictionary PartialSerialize(object instance, Stack
 callerTypes, Type[] excludeTypes)
{
ListDictionary result = new ListDictionary();
object val;

callerTypes.Push(instance.GetType());
PropertyInfo[] pis = instance.GetType().GetProperties();
foreach (PropertyInfo pi in pis)
{
if (pi.PropertyType.IsSerializable 
 !pi.PropertyType.IsArray)
result[pi.Name] = pi.GetValue(instance, new object[0]);
else
{
//preventing useless nesting
if (!callerTypes.Contains(pi.PropertyType) 
 !((IList)excludeTypes).Contains(pi.PropertyType))
{
val = pi.GetValue(instance, new object[0]);
if (val != null)
result[pi.Name] = PartialSerialize(val,
 callerTypes, excludeTypes);
}
}
}
callerTypes.Pop();
return result;
}
 ...
 So I can convert mapObj on serever to hashtable automatically an then
 populate JSON object
 (still need to call explicitly getLayer, getClass etc., but this is not a
 problem):
 ...
 layers[i].Properties = Tools.PartialSerialize(layer, new Stack(), new
 Type[3] { typeof(mapObj), typeof(hashTableObj), typeof(colorObj)});
 ...
 classes[j].Properties = Tools.PartialSerialize(layerClass, new Stack(), new
 Type[4] { typeof(layerObj), typeof(labelObj), typeof(hashTableObj),
 typeof(colorObj)});
 ...
 styles[k].Properties = Tools.PartialSerialize(classStyle, new Stack(), new
 Type[2]{typeof(hashTableObj), typeof(colorObj)});
 ...
 mapStub.Properties = Tools.PartialSerialize(map, new Stack(), new Type[11] {
 typeof(labelObj), typeof(hashTableObj), typeof(fontSetObj),
 typeof(labelCacheObj), typeof(outputFormatObj[]), typeof(queryMapObj),
 typeof(referenceMapObj), typeof(scalebarObj), typeof(symbolSetObj),
 typeof(colorObj), typeof(legendObj)});
 ...
 JavaScriptSerializer class object allows to perform convertion to client
 More often I use script method in my web service that can do it behind the
 scenes.

 How do you do such kind of operation?
 --
 View this message in context: 
 http://www.nabble.com/mapObject-serialization-in-C--%28variant%29-tp17739919p17739919.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
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users