Re: [mapserver-users] accessing different band values in the same layer

2012-06-14 Thread Smith, Michael ERDC-RDE-CRREL-NH
Helen,

It does not appear that you can. Based on the docs

Raster classifications always take place on only one raster band. It
defaults to the first band in the referenced file, but this can be altered
with the BANDS PROCESSING directive. In particular this means that
including even a single CLASS declaration in a raster layer will result in
the raster layer being rendered using the one band classification rules
instead of other rules that might have applied (such as 3 band RGB
rendering).

http://mapserver.org/input/raster.html



You could have multiple layers and do classification on each band by
changing the first value in the PROCESSING BANDS directive.

Mike




On 6/14/12  8:27 AM, Helen San Segundo Navazo hsansegu...@meteo.cat
wrote:

Hi,
I have a raster file with different bands inside it.
when I create my mapfile inside the layer tag I can define the bands I
want to access with  PROCESSING BANDS=4,2,1
When I select 1 band I can access to its data using the EXPRESSION tag:
 CLASS
 NAME 0 - 5
 EXPRESSION ([pixel] = 0 AND [pixel]  5)
 STYLE
 COLOR 80 0 0
 END
 END
But if I select more than one band, how can I do to acces to the
different band values inside the same EXPRESSION tag? is it possible?

The problem is that I have wind information in different bands, in one
band I have speed and in other band I have direction, and I have to draw
the wind symbol depending on both values.
Is possible to acces to the different pixel band values inside the same
EXPRESSION tag?
Thanks,
Helen
___
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] accessing different band values in the same layer

2012-06-14 Thread Helen San Segundo Navazo

ok, thanks Mike.
A solution could be to transform the raster in a shape file, and to put 
the different band values in different attributes of each element, and 
then use the attributes values for selecting symbol and angle.

Thanks,
Helen

El 14/06/12 15:03, Smith, Michael ERDC-RDE-CRREL-NH escribió:

Helen,

It does not appear that you can. Based on the docs

Raster classifications always take place on only one raster band. It
defaults to the first band in the referenced file, but this can be altered
with the BANDS PROCESSING directive. In particular this means that
including even a single CLASS declaration in a raster layer will result in
the raster layer being rendered using the one band classification rules
instead of other rules that might have applied (such as 3 band RGB
rendering).

http://mapserver.org/input/raster.html



You could have multiple layers and do classification on each band by
changing the first value in the PROCESSING BANDS directive.

Mike


On 6/14/12  8:27 AM, Helen San Segundo Navazohsansegu...@meteo.cat
wrote:


Hi,
I have a raster file with different bands inside it.
when I create my mapfile inside the layer tag I can define the bands I
want to access with  PROCESSING BANDS=4,2,1
When I select 1 band I can access to its data using the EXPRESSION tag:
 CLASS
 NAME 0 - 5
 EXPRESSION ([pixel]= 0 AND [pixel]  5)
 STYLE
 COLOR 80 0 0
 END
 END
But if I select more than one band, how can I do to acces to the
different band values inside the same EXPRESSION tag? is it possible?

The problem is that I have wind information in different bands, in one
band I have speed and in other band I have direction, and I have to draw
the wind symbol depending on both values.
Is possible to acces to the different pixel band values inside the same
EXPRESSION tag?
Thanks,
Helen
___
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] accessing different band values in the same layer

2012-06-14 Thread thomas bonfort
Helen,
have you had a look at
http://mapserver.org/trunk/input/vector/vector_field.html (to be
released in 6.2, but should be functional already)

--
thomas

On Thu, Jun 14, 2012 at 3:21 PM, Helen San Segundo Navazo
hsansegu...@meteo.cat wrote:
 ok, thanks Mike.
 A solution could be to transform the raster in a shape file, and to put the
 different band values in different attributes of each element, and then use
 the attributes values for selecting symbol and angle.
 Thanks,
 Helen

 El 14/06/12 15:03, Smith, Michael ERDC-RDE-CRREL-NH escribió:

 Helen,

 It does not appear that you can. Based on the docs

 Raster classifications always take place on only one raster band. It
 defaults to the first band in the referenced file, but this can be altered
 with the BANDS PROCESSING directive. In particular this means that
 including even a single CLASS declaration in a raster layer will result in
 the raster layer being rendered using the one band classification rules
 instead of other rules that might have applied (such as 3 band RGB
 rendering).

 http://mapserver.org/input/raster.html



 You could have multiple layers and do classification on each band by
 changing the first value in the PROCESSING BANDS directive.

 Mike


 On 6/14/12  8:27 AM, Helen San Segundo Navazohsansegu...@meteo.cat
 wrote:

 Hi,
 I have a raster file with different bands inside it.
 when I create my mapfile inside the layer tag I can define the bands I
 want to access with  PROCESSING BANDS=4,2,1
 When I select 1 band I can access to its data using the EXPRESSION tag:
     CLASS
         NAME 0 - 5
         EXPRESSION ([pixel]= 0 AND [pixel]  5)
         STYLE
         COLOR 80 0 0
         END
     END
 But if I select more than one band, how can I do to acces to the
 different band values inside the same EXPRESSION tag? is it possible?

 The problem is that I have wind information in different bands, in one
 band I have speed and in other band I have direction, and I have to draw
 the wind symbol depending on both values.
 Is possible to acces to the different pixel band values inside the same
 EXPRESSION tag?
 Thanks,
 Helen
 ___
 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] Projection

2012-06-14 Thread Thomas Hofmann
Hello,

currently I am working on a map displaying the distiribution of a name
(surname/forename/location name) in Germany. For that purpose
mapserver (v. 5.6.5) and php-mapscript is used.

The underlying geographic information is from a public domain
shapefile containing postcode (PLZ) regions of germany:
http://www.metaspatial.net/download/plz.tar.gz

Details on that data in german:
http://arnulf.us/PLZ

There the data is described as originally been in Gauß Krüger
3-Streifen, but the shapefile's data as beeing converted to EPSG:4326
(WGS84).

The map should be rendered so that the width and height of germany are
more or less like here:
http://de.wikipedia.org/wiki/Datei:Deutschland_politisch_2010.png

Without configured projections it looks like:
https://www.dropbox.com/s/n1uobhd12xhsf4u/1ee63112dc71c15f1247994883aebc42.png

So some projection is needed.

One question is, what projection would be appropriate, I suppose
something like Alber's equal area or Gauß-Krüger zone 3 could do
the trick. But before that I would be glad if an arbitrary projection
would work at all...

The map-file as generated via mapscript looks like (cut to the
relevant part, as far as I understand it):
MAP
  EXTENT 5.05686874304783 47.2 15.5931312569522 55.1
  IMAGECOLOR 255 255 255
  IMAGETYPE gif
  SIZE 1200 900
  STATUS ON
  CONFIG PROJ_LIB /usr/share/proj/
  NAME Germany

  PROJECTION
init=epsg:2166
  END

  LAYER
NAME 0
PROJECTION
  init=epsg:4326
END
STATUS DEFAULT
TYPE POLYGON
UNITS METERS
CLASS
  NAME PLZ
  STYLE
ANGLE 360
COLOR 99 99 99
OUTLINECOLOR 0 0 0
SYMBOL 0
WIDTH 1
  END
END
  END

END

With this map-file the PLZ layer is not displayed. If omitting the
PROJECTION-section within the LAYER it is displayed.
For reference: the whole zipped mapfile, containing the data:
https://www.dropbox.com/s/sd65gc7dch7swh3/projection.complete.map.zip

So:
- What to do, to get projections working?
- What kind of projection would be appropriate?

Hints are most welcome.

Kind regards,
Thomas Hofmann
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Map Not Available at This Scale Image

2012-06-14 Thread Donald Kerr
Hi list,
 
I have a number of layers that are on or off depending on the zoom level and
some of those layers do not have coverage in certain areas. The question is,
is there a way to display a map image saying something along the lines of,
Map not available at this level?
 
I think I have read somewhere that it can be done in a round about way but I
cannot find any information after having a good internet trawl.
 
Many thanks.
 
Regards,
 
Donald
 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Projection

2012-06-14 Thread Arnd Wippermann
Your map extent should something like this

EXTENT 3186000 521 4006000 6156000

PROJECTION
  init=epsg:2166
  #or init=epsg:31467
END
 
then your layer should show.

Instead of Gauss-Krüger i would take EPSG:25832 (UTM32).
It's the new official used projection for Germany .

The layer will look the same as GK3.

Arnd


In Deutschland hat die Arbeitsgemeinschaft der Vermessungsverwaltungen der
Länder der Bundesrepublik Deutschland (AdV) im Jahre 1991 die Einführung des
ETRS89 als einheitliches amtliches Lagebezugssystem für ganz Deutschland
beschlossen.
(Quelle:http://de.wikipedia.org/wiki/Europ%C3%A4isches_Terrestrisches_Refere
nzsystem_1989)


-Ursprüngliche Nachricht-
Von: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von Thomas
Hofmann
Gesendet: Donnerstag, 14. Juni 2012 16:39
An: mapserver-users@lists.osgeo.org
Betreff: [mapserver-users] Projection

Hello,

currently I am working on a map displaying the distiribution of a name
(surname/forename/location name) in Germany. For that purpose mapserver (v.
5.6.5) and php-mapscript is used.

The underlying geographic information is from a public domain shapefile
containing postcode (PLZ) regions of germany:
http://www.metaspatial.net/download/plz.tar.gz

Details on that data in german:
http://arnulf.us/PLZ

There the data is described as originally been in Gauß Krüger 3-Streifen,
but the shapefile's data as beeing converted to EPSG:4326 (WGS84).

The map should be rendered so that the width and height of germany are more
or less like here:
http://de.wikipedia.org/wiki/Datei:Deutschland_politisch_2010.png

Without configured projections it looks like:
https://www.dropbox.com/s/n1uobhd12xhsf4u/1ee63112dc71c15f1247994883aebc42.p
ng

So some projection is needed.

One question is, what projection would be appropriate, I suppose something
like Alber's equal area or Gauß-Krüger zone 3 could do the trick. But
before that I would be glad if an arbitrary projection would work at all...

The map-file as generated via mapscript looks like (cut to the relevant
part, as far as I understand it):
MAP
  EXTENT 5.05686874304783 47.2 15.5931312569522 55.1
  IMAGECOLOR 255 255 255
  IMAGETYPE gif
  SIZE 1200 900
  STATUS ON
  CONFIG PROJ_LIB /usr/share/proj/
  NAME Germany

  PROJECTION
init=epsg:2166
  END

  LAYER
NAME 0
PROJECTION
  init=epsg:4326
END
STATUS DEFAULT
TYPE POLYGON
UNITS METERS
CLASS
  NAME PLZ
  STYLE
ANGLE 360
COLOR 99 99 99
OUTLINECOLOR 0 0 0
SYMBOL 0
WIDTH 1
  END
END
  END

END

With this map-file the PLZ layer is not displayed. If omitting the
PROJECTION-section within the LAYER it is displayed.
For reference: the whole zipped mapfile, containing the data:
https://www.dropbox.com/s/sd65gc7dch7swh3/projection.complete.map.zip

So:
- What to do, to get projections working?
- What kind of projection would be appropriate?

Hints are most welcome.

Kind regards,
Thomas Hofmann
___
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] Map Not Available at This Scale Image

2012-06-14 Thread Donald Kerr
Steve,
 
I don't think that any of those options will work for me. I have fifteen
zoom levels and the map coverage is complete except for three. Those three
are a made up of an image returned after querying PostGIS so a blank image
is effectively created since there are no points, lines or polygons returned
from the PostGIS query at that zoom level i.e. to all intents and purposes,
a valid map is returned except that there's noting in it. It's these
particular zoom levels where I am trying to display the no coverage'
message. I had thought that it may be possible to create a permanent layer
that's always there under all the layers and is effectively overwritten by
any drawn layers above except where there's no data. I'm thinking now that
this may not be possible. 
 
Many thanks.
 
Regards,
 
Donald

-Original Message-
From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us] 
Sent: 14 June 2012 21:54
To: Donald Kerr; 'MAPSERVER USERS'
Subject: RE: [mapserver-users] Map Not Available at This Scale Image



Couple of options.

 

1)  You can create a layer that displays that text in the middle of the
map and have it turn on below a certain scale. If doing tiling w/meta-tiling
you'd want draw the text the same number of times as you have meta-tiles.
That would take some mucking about but it's doable.

2)  There's a little used parameter in the WEB section called
MINTEMPATE/MAXTEMPLATE. MapServer will redirect to the URL specified
depending on scale. It's been ages since I used it but in theory you could
reference an image with the necessary text by URL.

 

Steve

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Donald Kerr
Sent: Thursday, June 14, 2012 1:42 PM
To: 'MAPSERVER USERS'
Subject: [mapserver-users] Map Not Available at This Scale Image

 

Hi list,

 

I have a number of layers that are on or off depending on the zoom level and
some of those layers do not have coverage in certain areas. The question is,
is there a way to display a map image saying something along the lines of,
Map not available at this level?

 

I think I have read somewhere that it can be done in a round about way but I
cannot find any information after having a good internet trawl.

 

Many thanks.

 

Regards,

 

Donald

 

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


Re: [mapserver-users] Map Not Available at This Scale Image

2012-06-14 Thread Lime, Steve D (DNR)
Why not a layer with STATUS DEFAULT but a MAXSCALE value that kicks in when 
your other data runs out?

From: Donald Kerr [mailto:donald.k...@dkerr.co.uk]
Sent: Thursday, June 14, 2012 4:07 PM
To: Lime, Steve D (DNR); 'MAPSERVER USERS'
Subject: RE: [mapserver-users] Map Not Available at This Scale Image

Steve,

I don't think that any of those options will work for me. I have fifteen zoom 
levels and the map coverage is complete except for three. Those three are a 
made up of an image returned after querying PostGIS so a blank image is 
effectively created since there are no points, lines or polygons returned from 
the PostGIS query at that zoom level i.e. to all intents and purposes, a valid 
map is returned except that there's noting in it. It's these particular zoom 
levels where I am trying to display the no coverage' message. I had thought 
that it may be possible to create a permanent layer that's always there under 
all the layers and is effectively overwritten by any drawn layers above except 
where there's no data. I'm thinking now that this may not be possible.

Many thanks.

Regards,

Donald
-Original Message-
From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us]
Sent: 14 June 2012 21:54
To: Donald Kerr; 'MAPSERVER USERS'
Subject: RE: [mapserver-users] Map Not Available at This Scale Image
Couple of options.


1)  You can create a layer that displays that text in the middle of the map 
and have it turn on below a certain scale. If doing tiling w/meta-tiling you'd 
want draw the text the same number of times as you have meta-tiles. That would 
take some mucking about but it's doable.

2)  There's a little used parameter in the WEB section called 
MINTEMPATE/MAXTEMPLATE. MapServer will redirect to the URL specified depending 
on scale. It's been ages since I used it but in theory you could reference an 
image with the necessary text by URL.

Steve

From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Donald Kerr
Sent: Thursday, June 14, 2012 1:42 PM
To: 'MAPSERVER USERS'
Subject: [mapserver-users] Map Not Available at This Scale Image

Hi list,

I have a number of layers that are on or off depending on the zoom level and 
some of those layers do not have coverage in certain areas. The question is, is 
there a way to display a map image saying something along the lines of, Map 
not available at this level?

I think I have read somewhere that it can be done in a round about way but I 
cannot find any information after having a good internet trawl.

Many thanks.

Regards,

Donald

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


Re: [mapserver-users] Map Not Available at This Scale Image

2012-06-14 Thread Donald Kerr
Steve,
 
MAXSCALEDENOM? (MAXSCALE deprecated?) - Will look into the options in the
morning ... time for  ... it's 23:23!
 
Cheers.
 
Donald
 
 

-Original Message-
From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us] 
Sent: 14 June 2012 23:16
To: Donald Kerr; 'MAPSERVER USERS'
Subject: RE: [mapserver-users] Map Not Available at This Scale Image



Why not a layer with STATUS DEFAULT but a MAXSCALE value that kicks in when
your other data runs out?

 

From: Donald Kerr [mailto:donald.k...@dkerr.co.uk] 
Sent: Thursday, June 14, 2012 4:07 PM
To: Lime, Steve D (DNR); 'MAPSERVER USERS'
Subject: RE: [mapserver-users] Map Not Available at This Scale Image

 

Steve,

 

I don't think that any of those options will work for me. I have fifteen
zoom levels and the map coverage is complete except for three. Those three
are a made up of an image returned after querying PostGIS so a blank image
is effectively created since there are no points, lines or polygons returned
from the PostGIS query at that zoom level i.e. to all intents and purposes,
a valid map is returned except that there's noting in it. It's these
particular zoom levels where I am trying to display the no coverage'
message. I had thought that it may be possible to create a permanent layer
that's always there under all the layers and is effectively overwritten by
any drawn layers above except where there's no data. I'm thinking now that
this may not be possible. 

 

Many thanks.

 

Regards,

 

Donald

-Original Message-
From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us] 
Sent: 14 June 2012 21:54
To: Donald Kerr; 'MAPSERVER USERS'
Subject: RE: [mapserver-users] Map Not Available at This Scale Image

Couple of options.

 

1)  You can create a layer that displays that text in the middle of the
map and have it turn on below a certain scale. If doing tiling w/meta-tiling
you'd want draw the text the same number of times as you have meta-tiles.
That would take some mucking about but it's doable.

2)  There's a little used parameter in the WEB section called
MINTEMPATE/MAXTEMPLATE. MapServer will redirect to the URL specified
depending on scale. It's been ages since I used it but in theory you could
reference an image with the necessary text by URL.

 

Steve

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Donald Kerr
Sent: Thursday, June 14, 2012 1:42 PM
To: 'MAPSERVER USERS'
Subject: [mapserver-users] Map Not Available at This Scale Image

 

Hi list,

 

I have a number of layers that are on or off depending on the zoom level and
some of those layers do not have coverage in certain areas. The question is,
is there a way to display a map image saying something along the lines of,
Map not available at this level?

 

I think I have read somewhere that it can be done in a round about way but I
cannot find any information after having a good internet trawl.

 

Many thanks.

 

Regards,

 

Donald

 

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