Re: [mapserver-users] Color palette for road-like layers

2009-01-06 Thread Adrian Popa

Yes Bob, I like the roads. :)
Can you show me how you are able to draw contours around your roads?

Thanks


Bob Basques wrote:

Adrian,

Would the lines used for this map work for you?

https://gis.ci.stpaul.mn.us/gis/gismo_public/html/

Looks like the original Mapfile link is broken though, I'll need to 
fix that in the morning.


bobb






--
Adrian Popa

Network Engineer
Romtelecom S.A.
Divizia Centrul National de Operare Retea
Departament Transport IP  Metro
Compartiment IP Core


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


Re: [mapserver-users] Color palette for road-like layers

2009-01-06 Thread Paul Spencer

Adrian,

that is a fairly simple trick, you need to draw roads twice to do it.   
You can do that with two separate layers or two STYLE objects within a  
class depending on what effect you want to achieve.


In both cases, you just draw the road 2 pixels wider in your 'outline'  
color (called a casement).  For instance, assuming you are using two  
STYLE objects:


LAYER
  NAME Major Roads
  TYPE LINE
  DATA myroads
  CLASS
NAME Major Roads
STYLE #Casement style
SIZE 9
COLOR 192 192 192
SYMBOL circle
END
STYLE #Center style
SIZE 7
COLOR 255 255 255
SYMBOL circle
END
  END
END

You would use two separate layers to draw the casement and center  
style if you had several layers and/or classes of roads that you  
wanted to 'merge' the casements - in your google screenshoot, you  
should notice that the grey casement on Hollywood St merges with the  
casement on W 8th St and there is no grey line between the two center  
colors, this would be how to achieve a similar effect in MapServer.


Cheers

Paul

On 6-Jan-09, at 3:51 AM, Adrian Popa wrote:


Yes Bob, I like the roads. :)
Can you show me how you are able to draw contours around your roads?

Thanks


Bob Basques wrote:


Adrian,

Would the lines used for this map work for you?

https://gis.ci.stpaul.mn.us/gis/gismo_public/html/

Looks like the original Mapfile link is broken though, I'll need to  
fix that in the morning.


bobb






--
Adrian Popa

Network Engineer
Romtelecom S.A.
Divizia Centrul National de Operare Retea
Departament Transport IP  Metro
Compartiment IP Core

___
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://research.dmsolutions.ca/

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


Re: [mapserver-users] Showing pop up for a line

2009-01-06 Thread Dan Little
In my experience it's easier to do a buffer on the line features first 
(something nominal) which turns it into a polygon.  In this way, the operators 
you want to use work consistently.


- Original Message 
 From: Subha Ramakrishnan su...@gslab.com
 To: Steve Lime steve.l...@dnr.state.mn.us
 Cc: mapserver-users@lists.osgeo.org
 Sent: Tuesday, January 6, 2009 12:04:13 AM
 Subject: [mapserver-users] Showing pop up for a line
 
 Hi,
 
 I am using Mapserver 5.0.2 with Openlayers.
 I've a line layer (from mapserver) shown on my base map(google physical).
 Now, when i click on a line, i want to show a pop using openlayers.
 I am able to do this for a polygon layer. I send the lat,lon of the point 
 that 
 is clicked and use the postgis query
 ST_Contains(topology,geomFromText('POINT(77.87117958068927  
 13.491965860913544)',-1)) to find the polygon (and fetch the polygon 
 specific 
 data to show on pop up) and attach the Openlayers popup to the point clicked.
 
 I am not able to do this for a line layer as the postgis query doesn't return 
 anything.
 I tried this query also, 
 ST_Contains(topology,geomFromText('POINT(77.87117958068927  
 13.491965860913544)',-1)) AND 
 distance(topology,geomFromText('POINT(77.87117958068927 
 13.491965860913544)',-1)) = 1 but it doesn't work.
 
 Does any one know how to check if a point is a part of a line or if there is 
 any 
 other way to show the pop up?
 
 Thanks a lot for the help.
 
 Regards,
 Subha
 ___
 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] Showing pop up for a line

2009-01-06 Thread Subha Ramakrishnan

Hi,

Thanks a lot for the reply.

If i use  
ST_Contains(topology,st_expand(geomFromText('POINT(77.87117958068927 
13.491965860913544)',-1), 10), can it be the case that more than one 
record will match the condition? And this will not work for me, as I 
need to have exactly one record to show the pop up.


The constraint I'm facing in using Openlayers to draw the line layer is 
that the layer is too huge consisting of more than 20,000 features and 
the browser hangs because of too much memory being used in drawing the 
layer. Hence I am using mapserver for drawing the line layer.


I did try other options here. The operator ~ [A ~ B (A completely 
contains B)] gives me more than one line(record) that matches the 
condition. But this cannot be the case to show the pop up. I did try to 
club it with other operators like  and = but none of these seem to 
work.


Thanks again.

Regards,
Subha



Dan Little wrote:

In my experience it's easier to do a buffer on the line features first 
(something nominal) which turns it into a polygon.  In this way, the operators 
you want to use work consistently.


- Original Message 
  

From: Subha Ramakrishnan su...@gslab.com
To: Steve Lime steve.l...@dnr.state.mn.us
Cc: mapserver-users@lists.osgeo.org
Sent: Tuesday, January 6, 2009 12:04:13 AM
Subject: [mapserver-users] Showing pop up for a line

Hi,

I am using Mapserver 5.0.2 with Openlayers.
I've a line layer (from mapserver) shown on my base map(google physical).
Now, when i click on a line, i want to show a pop using openlayers.
I am able to do this for a polygon layer. I send the lat,lon of the point that 
is clicked and use the postgis query
ST_Contains(topology,geomFromText('POINT(77.87117958068927  
13.491965860913544)',-1)) to find the polygon (and fetch the polygon specific 
data to show on pop up) and attach the Openlayers popup to the point clicked.


I am not able to do this for a line layer as the postgis query doesn't return 
anything.
I tried this query also, 
ST_Contains(topology,geomFromText('POINT(77.87117958068927  
13.491965860913544)',-1)) AND 
distance(topology,geomFromText('POINT(77.87117958068927 
13.491965860913544)',-1)) = 1 but it doesn't work.


Does any one know how to check if a point is a part of a line or if there is any 
other way to show the pop up?


Thanks a lot for the help.

Regards,
Subha
___
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] Color palette for road-like layers

2009-01-06 Thread Jeff McKenna




I have an additional question: can elements such as roads be drawn in 
such a way that they look like google maps (see second attachment) - 
meaning not just a single color, but apparently color + boundries?




This is documented in the Intro to MapServer doc: 
http://mapserver.org/introduction.html


-jeff


--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/


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


[mapserver-users] FORMATOPTION PALETTE_FORCE=TRUE problem

2009-01-06 Thread paalkr

Hi!

I have tried to use the FORMATOPTION PALETTE_FORCE=TRUE with no luck. I've
goth this error message all the time:

[Tue Jan  6 15:26:05 2009].409786 msDrawMap(): Layer 3 (N500Hoydelag),
0.161s
[Tue Jan  6 15:26:05 2009].409998 msDrawMap(): Drawing Label Cache, 0.000s
[Tue Jan  6 15:26:05 2009].410010 msDrawMap() total time: 0.170s
[Tue Jan  6 15:26:05 2009].416062 Invalid number of colors in palette:
Unable to access file. libpng error ()
[Tue Jan  6 15:26:05 2009].416108 ms_png_write_image_init(): General error
message. error writing png header (via longjmp)
[Tue Jan  6 15:26:05 2009].416115 msSaveImageRGBAPalette(): General error
message. error in png header writing
[Tue Jan  6 15:26:05 2009].416122 msSaveImage() total time: 0.006s
[Tue Jan  6 15:26:05 2009].416170 mapserv request processing time (msLoadMap
not incl.): 0.177s

My ouputformat is defined like this:

   OUTPUTFORMAT
  NAME png8bit
  DRIVER AGG/PNG
  MIMETYPE image/png
  EXTENSION png
  FORMATOPTION PALETTE_FORCE=TRUE
  FORMATOPTION PALETTE=/opt/maps/kartdata2/mapfiles/palette.txt
  FORMATOPTION INTERLACE=OFF
   END

The palette.txt file is attached
http://n2.nabble.com/file/n2117781/palette.txt palette.txt 

Does anyone know whats wrong?
BTW: This is MapServer 5.2.1 on RedHat.

Regards,
Pål Kristensen
-- 
View this message in context: 
http://n2.nabble.com/FORMATOPTION-%22PALETTE_FORCE%3DTRUE%22-problem-tp2117781p2117781.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


Re: [mapserver-users] FORMATOPTION PALETTE_FORCE=TRUE problem

2009-01-06 Thread thomas bonfort
are you calling this with a transparent=true ??
in that cas, your palette file should be a list of quadruplets
(r,g,b,a) (and it would be better to have an outputformat with
imagemode rgba, and use that one instead of passing transparent=true)

thomas

On Tue, Jan 6, 2009 at 15:56, paalkr pal.kristen...@statkart.no wrote:

 Hi!

 I have tried to use the FORMATOPTION PALETTE_FORCE=TRUE with no luck. I've
 goth this error message all the time:

 [Tue Jan  6 15:26:05 2009].409786 msDrawMap(): Layer 3 (N500Hoydelag),
 0.161s
 [Tue Jan  6 15:26:05 2009].409998 msDrawMap(): Drawing Label Cache, 0.000s
 [Tue Jan  6 15:26:05 2009].410010 msDrawMap() total time: 0.170s
 [Tue Jan  6 15:26:05 2009].416062 Invalid number of colors in palette:
 Unable to access file. libpng error ()
 [Tue Jan  6 15:26:05 2009].416108 ms_png_write_image_init(): General error
 message. error writing png header (via longjmp)
 [Tue Jan  6 15:26:05 2009].416115 msSaveImageRGBAPalette(): General error
 message. error in png header writing
 [Tue Jan  6 15:26:05 2009].416122 msSaveImage() total time: 0.006s
 [Tue Jan  6 15:26:05 2009].416170 mapserv request processing time (msLoadMap
 not incl.): 0.177s

 My ouputformat is defined like this:

   OUTPUTFORMAT
  NAME png8bit
  DRIVER AGG/PNG
  MIMETYPE image/png
  EXTENSION png
  FORMATOPTION PALETTE_FORCE=TRUE
  FORMATOPTION PALETTE=/opt/maps/kartdata2/mapfiles/palette.txt
  FORMATOPTION INTERLACE=OFF
   END

 The palette.txt file is attached
 http://n2.nabble.com/file/n2117781/palette.txt palette.txt

 Does anyone know whats wrong?
 BTW: This is MapServer 5.2.1 on RedHat.

 Regards,
 Pål Kristensen
 --
 View this message in context: 
 http://n2.nabble.com/FORMATOPTION-%22PALETTE_FORCE%3DTRUE%22-problem-tp2117781p2117781.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] Showing pop up for a line

2009-01-06 Thread Steve Lime
Why not use straight MapServer queries? Set a reasonable tolerance and that 
should
work ok too.

Steve

 On 1/6/2009 at 12:04 AM, in message 4962f45d.3010...@gslab.com, Subha
Ramakrishnan su...@gslab.com wrote:
 Hi,
 
 I am using Mapserver 5.0.2 with Openlayers.
 I've a line layer (from mapserver) shown on my base map(google physical).
 Now, when i click on a line, i want to show a pop using openlayers.
 I am able to do this for a polygon layer. I send the lat,lon of the 
 point that is clicked and use the postgis query
 ST_Contains(topology,geomFromText('POINT(77.87117958068927  
 13.491965860913544)',-1)) to find the polygon (and fetch the polygon 
 specific data to show on pop up) and attach the Openlayers popup to the 
 point clicked.
 
 I am not able to do this for a line layer as the postgis query doesn't 
 return anything.
 I tried this query also, 
 ST_Contains(topology,geomFromText('POINT(77.87117958068927  
 13.491965860913544)',-1)) AND 
 distance(topology,geomFromText('POINT(77.87117958068927 
 13.491965860913544)',-1)) = 1 but it doesn't work.
 
 Does any one know how to check if a point is a part of a line or if 
 there is any other way to show the pop up?
 
 Thanks a lot for the help.
 
 Regards,
 Subha
 ___
 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] Showing pop up for a line

2009-01-06 Thread Dan Little
You may also want to use mapserver to render the lines as a raster layer 
instead of vector.



- Original Message 
 From: Steve Lime steve.l...@dnr.state.mn.us
 To: Subha Ramakrishnan su...@gslab.com
 Cc: mapserver-users@lists.osgeo.org
 Sent: Tuesday, January 6, 2009 9:31:18 AM
 Subject: Re: [mapserver-users] Showing pop up for a line
 
 Why not use straight MapServer queries? Set a reasonable tolerance and that 
 should
 work ok too.
 
 Steve
 
  On 1/6/2009 at 12:04 AM, in message 4962f45d.3010...@gslab.com, Subha
 Ramakrishnan wrote:
  Hi,
  
  I am using Mapserver 5.0.2 with Openlayers.
  I've a line layer (from mapserver) shown on my base map(google physical).
  Now, when i click on a line, i want to show a pop using openlayers.
  I am able to do this for a polygon layer. I send the lat,lon of the 
  point that is clicked and use the postgis query
  ST_Contains(topology,geomFromText('POINT(77.87117958068927  
  13.491965860913544)',-1)) to find the polygon (and fetch the polygon 
  specific data to show on pop up) and attach the Openlayers popup to the 
  point clicked.
  
  I am not able to do this for a line layer as the postgis query doesn't 
  return anything.
  I tried this query also, 
  ST_Contains(topology,geomFromText('POINT(77.87117958068927  
  13.491965860913544)',-1)) AND 
  distance(topology,geomFromText('POINT(77.87117958068927 
  13.491965860913544)',-1)) = 1 but it doesn't work.
  
  Does any one know how to check if a point is a part of a line or if 
  there is any other way to show the pop up?
  
  Thanks a lot for the help.
  
  Regards,
  Subha
  ___
  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


[mapserver-users] error with GRID

2009-01-06 Thread simone.frigerio

Hi!
I have a problem with Esri GRID raster in my mapfile. If I 
have a DEM, for example, in the object layer what is the 
correct path that I have to use? GRID esri has a folder 
DEM and a folder INFO. The error is referred to the path 
of this layer, but I don't understand the real solution.

Thanks.

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


Re: [mapserver-users] Confirmation of status of UTF8 support, and where transcoding to Latin-1 may be happening.

2009-01-06 Thread Russell McOrmond


  I hope people don't mind me posting as I learn things, hoping that it 
will spark some ideas from other people.


On Sun, 4 Jan 2009, Russell McOrmond wrote:


Howard Butler wrote on November 24, 2008 @ 05:17 PM:


pictures looked right.  The problem might be as simple as the function 
msConvertWideStringToUTF8 being broken.  Here's where MapServer tries to 
convert it: 
http://trac.osgeo.org/mapserver/browser/trunk/mapserver/mapsde.c#L750



The more I look at this, the more confused I get.


  I'm now back at the customer (Xmas break), and confirmed that I'm not 
even making use of this code.  The relevant strings are SE_STRING_TYPE and 
not SE_NSTRING_TYPE.  I have also confirmed ( msDebug() statements) that 
the characters coming out of SE_stream_get_string() are Latin-1 encoded, 
and not UTF-8 encoded.


  Our database person confirmed that the data is encoded as UTF-8 in the 
database.  This suggests to me that it is SDE itself or the libsde.so 
client library that is doing the transcoding to Latin-1


  I'm curious if anyone knows if libsde.so has an equivalent to Oracle's 
NLS_LANG environment variable?


  It seems the decision to use STRING rather than NSTRING came down to the 
label functions.  I haven't looked at those functions yet to determine if 
they need Latin-1, and thus this is why things are working with STRING 
(Which comes in as Latin-1) rather than NSTRING (Which the code suggests 
should be transcoded to UTF-8).



  Another issue, this time with iconv.  I know this is not a mapserver 
issue, but it is possible that someone has seen something similar.


  We created some tables with strings in NSTRING.  I then got the error 
msConvertWideStringToUTF8(): General error message. Encoding not 
supported by libiconv(UTF-16)


  I'm a bit stuck as any call to iconv_open() returns -1, no matter what I 
put for the from and to.   The manual for iconv_open says that if it 
returns -1 that it sets errno, but it doesn't change the value.


errno = 1;
cd = iconv_open(ISO-8859-1, UTF-8);
msDebug(errno= %d cd=%d\n,errno,cd);

errno= 1 cd=-1

errno = 5;
cd = iconv_open(UTF-8, UTF-16);
msDebug(errno= %d cd=%d\n,errno,cd);

errno= 5 cd=-1


errno = 123;
cd = iconv_open(, UTF-16);
msDebug(errno= %d cd=%d\n,errno,cd);

errno= 123 cd=-1


I've tried loading the gnu iconv first,

export LD_PRELOAD=/server/ndevl18/apache-2.2.9/lib/preloadable_libiconv.so

ldd then shows that library first, but no difference.

  When I use the command line 'iconv' utility, it can convert from UTF-8 
to ISO-8859-1 with no problem.


  Has anyone seen a problem like this?

OS: Red Hat Enterprise Linux ES release 4 (Nahant Update 4)
ICONV: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.12.tar.gz

familiarity at this point) figure out what is going.  It is a patch to 
msEncodeHTMLEntities to encode these characters.  As entities they will work 
as the browser won't care what encoding it thinks the page should be in.


 I added the patch here: http://trac.osgeo.org/mapserver/ticket/2842


  Turns out that while this solves my getFeatureInfo problem, it 
introduces more problems.  The various .map files have strings in them 
that are UTF-8 encoded.  In this situatuation we have words like 
générale coming out as gAtilde;copy;nAtilde;copy;rale when we do a 
request=getcapabilities


  Seems things are never as simple as you first think.

--
 Russell McOrmond, Internet Consultant: http://www.flora.ca/
 Please help us tell the Canadian Parliament to protect our property
 rights as owners of Information Technology. Sign the petition!
 http://digital-copyright.ca/petition/ict/ http://KillBillC61.ca

 The government, lobbied by legacy copyright holders and hardware
  manufacturers, can pry control over my camcorder, computer,
  home theatre, or portable media player from my cold dead hands!___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] error with GRID

2009-01-06 Thread Jeff McKenna

simone.frigerio wrote:

Hi!
I have a problem with Esri GRID raster in my mapfile. If I have a DEM, 
for example, in the object layer what is the correct path that I have to 
use? GRID esri has a folder DEM and a folder INFO. The error is 
referred to the path of this layer, but I don't understand the real 
solution.

Thanks.



I believe there should be a file named hdr.adf in your DEM folder. 
You can then try the command gdalinfo hdr.adf on that file to see if 
GDAL can access that grid file.  If successful then I would use that 
file in your DATA parameter in your mapfile layer.  (I believe you can 
also use the DEM folder for both also, but I cannot verify right at this 
second)


-jeff



--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/


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


[mapserver-users] queryByRect throws an error

2009-01-06 Thread Murty Maganti
mapObj.queryByRect(...)  (using C# map script) is throwing following
exception when there is an embedded scale bar on map.

 

Exception message: msShapefileOpen(): Unable to access file. No (NULL)
filename provided.;msBuildPath: Unable to access file

 

Removing the scale bar from map file works fine. 

 

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


Re: [mapserver-users] FORMATOPTION PALETTE_FORCE=TRUE problem

2009-01-06 Thread paalkr

Hi Thomas,

thanks for the quick answer! Applying ,255 at the end of every record in
the palette.txt file worked, but when I made the WMS GetMap request I got an
image in return where all the areas that should have been transparent where
black (transparent=true). When using transparent=false I got an image in
return where the nodata areas were filled with the bgcolor parameter
value, which is of course the right response.

The original palette.txt file with only r,g,b values caused the mentioned
error message with both transparent=true and transparent=false, but I
suspected it to work in the latter case.

Adding imagemode rgba didn't do any difference in any way. What exactly
should the effect of adding this to the outputformat be? 


Regards,
Pål Kristensen


thomas bonfort wrote:
 
 are you calling this with a transparent=true ??
 in that cas, your palette file should be a list of quadruplets
 (r,g,b,a) (and it would be better to have an outputformat with
 imagemode rgba, and use that one instead of passing transparent=true)
 
 thomas
 
 On Tue, Jan 6, 2009 at 15:56, paalkr pal.kristen...@statkart.no wrote:

 Hi!

 I have tried to use the FORMATOPTION PALETTE_FORCE=TRUE with no luck.
 I've
 goth this error message all the time:

 [Tue Jan  6 15:26:05 2009].409786 msDrawMap(): Layer 3 (N500Hoydelag),
 0.161s
 [Tue Jan  6 15:26:05 2009].409998 msDrawMap(): Drawing Label Cache,
 0.000s
 [Tue Jan  6 15:26:05 2009].410010 msDrawMap() total time: 0.170s
 [Tue Jan  6 15:26:05 2009].416062 Invalid number of colors in palette:
 Unable to access file. libpng error ()
 [Tue Jan  6 15:26:05 2009].416108 ms_png_write_image_init(): General
 error
 message. error writing png header (via longjmp)
 [Tue Jan  6 15:26:05 2009].416115 msSaveImageRGBAPalette(): General error
 message. error in png header writing
 [Tue Jan  6 15:26:05 2009].416122 msSaveImage() total time: 0.006s
 [Tue Jan  6 15:26:05 2009].416170 mapserv request processing time
 (msLoadMap
 not incl.): 0.177s

 My ouputformat is defined like this:

   OUTPUTFORMAT
  NAME png8bit
  DRIVER AGG/PNG
  MIMETYPE image/png
  EXTENSION png
  FORMATOPTION PALETTE_FORCE=TRUE
  FORMATOPTION PALETTE=/opt/maps/kartdata2/mapfiles/palette.txt
  FORMATOPTION INTERLACE=OFF
   END

 The palette.txt file is attached
 http://n2.nabble.com/file/n2117781/palette.txt palette.txt

 Does anyone know whats wrong?
 BTW: This is MapServer 5.2.1 on RedHat.

 Regards,
 Pål Kristensen
 --
 View this message in context:
 http://n2.nabble.com/FORMATOPTION-%22PALETTE_FORCE%3DTRUE%22-problem-tp2117781p2117781.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
 
 

-- 
View this message in context: 
http://n2.nabble.com/FORMATOPTION-%22PALETTE_FORCE%3DTRUE%22-problem-tp2117781p2118972.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


Re: [mapserver-users] queryByRect throws an error

2009-01-06 Thread Tamas Szekeres
Hi,

Could you provide a code/mapfile sample to reconstruct the issue? I've never
experienced such a problem, I've used this function many times though.

Best regards,

Tamas



2009/1/6 Murty Maganti mmaga...@oriongis.com

  mapObj.queryByRect(…)  (using C# map script) is throwing following
 exception when there is an embedded scale bar on map.



 Exception message: msShapefileOpen(): Unable to access file. No (NULL)
 filename provided.;msBuildPath: Unable to access file



 Removing the scale bar from map file works fine.



 ___
 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] queryByRect throws an error

2009-01-06 Thread Murty Maganti
Hi Tamas

 

Thanks for reply.

 

These are extracts from my code to replicate the issue

 

//Create map object

mapObj map = new mapObj(MyMap.map);

 

//draw map

map.draw() ; 

 

//Make sure some template name is defined. Otherwise, query will not be
successful.

for (int i = 0; i  map.numlayers; i++)

{

if (string.IsNullOrEmpty(m_map.getLayer(i).template))

{

m_map.getLayer(i).template = abc;

}

}

 

//Perform the query now

map.queryByRect(map.extents);

 

 

I think after a call to map.draw(), a new layer '__embed__scalebar' is
added to layers collection. Setting template name to it is performing
the query on scalebar layer as well. 

 

I think the scalebar layer is not satisfying these two conditions in
msQueryByRect method of mapquery.c and hence getting used for query

 

if(!msIsLayerQueryable(lp)) continue;

if(lp-status == MS_OFF) continue;

 

 

Please let me know if you need more info or you need any test
application.

 

 

Thanks

Murty

 

From: Tamas Szekeres [mailto:szeker...@gmail.com] 
Sent: Tuesday, January 06, 2009 3:33 PM
To: Murty Maganti
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] queryByRect throws an error

 

Hi,

Could you provide a code/mapfile sample to reconstruct the issue? I've
never experienced such a problem, I've used this function many times
though.

Best regards,

Tamas




2009/1/6 Murty Maganti mmaga...@oriongis.com

mapObj.queryByRect(...)  (using C# map script) is throwing following
exception when there is an embedded scale bar on map.

 

Exception message: msShapefileOpen(): Unable to access file. No (NULL)
filename provided.;msBuildPath: Unable to access file

 

Removing the scale bar from map file works fine. 

 


___
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] Color palette for road-like layers

2009-01-06 Thread Adrian Popa

Thank you all for your help,

I had the feeling this is how it's done, but I was hoping for a simpler 
approach.


Anyway, now I must only find some decent colors for my layers :)
Cheers,
Adrian

Paul Spencer wrote:

Adrian,

that is a fairly simple trick, you need to draw roads twice to do it.  
You can do that with two separate layers or two STYLE objects within a 
class depending on what effect you want to achieve.


In both cases, you just draw the road 2 pixels wider in your 'outline' 
color (called a casement).  For instance, assuming you are using two 
STYLE objects:


LAYER
  NAME Major Roads
  TYPE LINE
  DATA myroads
  CLASS
NAME Major Roads
STYLE #Casement style
SIZE 9
COLOR 192 192 192
SYMBOL circle
END
STYLE #Center style
SIZE 7
COLOR 255 255 255
SYMBOL circle
END
  END
END

You would use two separate layers to draw the casement and center 
style if you had several layers and/or classes of roads that you 
wanted to 'merge' the casements - in your google screenshoot, you 
should notice that the grey casement on Hollywood St merges with the 
casement on W 8th St and there is no grey line between the two center 
colors, this would be how to achieve a similar effect in MapServer.


Cheers

Paul

On 6-Jan-09, at 3:51 AM, Adrian Popa wrote:


Yes Bob, I like the roads. :)
Can you show me how you are able to draw contours around your roads?

Thanks


Bob Basques wrote:


Adrian,

Would the lines used for this map work for you?

https://gis.ci.stpaul.mn.us/gis/gismo_public/html/

Looks like the original Mapfile link is broken though, I'll need to 
fix that in the morning.


bobb






--
Adrian Popa

Network Engineer
Romtelecom S.A.
Divizia Centrul National de Operare Retea
Departament Transport IP  Metro
Compartiment IP Core

___
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://research.dmsolutions.ca/





--
Adrian Popa

Network Engineer
Romtelecom S.A.
Divizia Centrul National de Operare Retea
Departament Transport IP  Metro
Compartiment IP Core


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