[mapserver-users] addgeometrycolumn function not identified!!!

2009-05-20 Thread Mukul Gupta
Hi,
I am trying to convert my shape files to postgre files. After getting sql
file, postgre got struck by not recognising addgeometrycolumn function.In
one of my files--
SELECT AddGeometryColumn('','gisdb','the_geom','-1','MULTILINESTRING',2);
works while in other
SELECT AddGeometryColumn('','gisdb','the_geom','-1','MULTIPOLYGON',2);
doesnt work.
Also I m unable to find lat long from successfully generated file.
Please help me out urgently.

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


[mapserver-users] Finding Lat-Long from geometric data type of postgre

2009-05-20 Thread Mukul Gupta
Hi,
I want to display a tool tip for the polygons in my application for which I
need lat-long values of polygon. Please tell me how to retrieve the values
from geometry type field of postgre or If there is any other way of doing
this.

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


RE: [mapserver-users] Get the nearest layer with mapscript...

2009-05-20 Thread Pano Voudouris
Probably don’t understand what exactly you are trying to achieve here but it
is not as simple as map.getLayer(0) to get the topmost layer? And once you
have the layer object use one of the query function to select the record?
E.g.  myLayerObj.queryByPoint ?

 

Pano

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Paul james
Sent: 19 May 2009 21:46
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Get the nearest layer with mapscript...

 

Hello guys...
I have several layers (lines, points, poly) ...
I´m developing a measure tool... User can click on map and I have to select
that layer to calculate de Area with postgis...



I´m trying to do that WITHOUT using LAYER ACTIVE SYSTEM...



Is That possible using mapscript? How Can I find the nearest and toppest
layer ?

Thanks!

Paul

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


[mapserver-users] Limit of records

2009-05-20 Thread Iratxe Lejarreta
Hi,

I have problems with some layers and I'm thinking that the reason is the 
number of records.
For example, with a layer which has 63057 records, the result is the 
following: 
500 Internal Server Error
And Apache log error: 
Timeout waiting for output from CGI script /var/cgi-bin/mapserv

If exist a limit, which is the maximun number of records that mapserver can 
support?

And in this case, what is the solution?

Thanks in advance,

-- 
Iratxe Lejarreta
www.axios.es
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Limit of records

2009-05-20 Thread Rahkonen Jukka
Hi,
 
There is no limit for number of records in Mapserver.  Apache. that is used as 
http server in front of Mapserver does have timeout, which is 300 seconds by 
default but can be adjusted.  Generally speaking number of records does not 
tell much about how hard that layer is to handle, if anything.  It depends more 
on the vector data format, nature of the features (points vs. polygons with 
thousands of vertices), indexing etc.   However, I would say that normally 63 
thousand features is  not much and if Mapserver hits the timeout then the data 
are not suitable for Mapserver without some preprocessing.  So, please describe 
what kind of data you have.  Ogrinfo report about the layer would be a good 
addition.
 
-Jukka Rahkonen-




Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Iratxe Lejarreta
Lähetetty: 20. toukokuuta 2009 13:40
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Limit of records


Hi,





I have problems with some layers and I'm thinking that the reason is 
the number of records.
For example, with a layer which has 63057 records, the result is the 
following: 
500 Internal Server Error
And Apache log error: 
Timeout waiting for output from CGI script /var/cgi-bin/mapserv





If exist a limit, which is the maximun number of records that mapserver 
can support?

And in this case, what is the solution?





Thanks in advance,





-- 
Iratxe Lejarreta
www.axios.es 



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


Re: [mapserver-users] Limit of records

2009-05-20 Thread Peter Rose

Hi Iratxe,

I've found that the limit on my maps is 2000 records. 
I store the points in a MySQL database and use PHP/MapScript to create the
map so I don't know what sets this limit but 2000 points on a map seems fair
enought for the average map. 
Unless you have a very big map it would quickly get too cluttered and
difficult to read for the users.

Regards,
Peter Rose
-- 
View this message in context: 
http://n2.nabble.com/Limit-of-records-tp2945434p2945560.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] Limit of records

2009-05-20 Thread Rahkonen Jukka
Hi,

I made a quick test by commenting out my MAXSCALEDENOM and MAXFEATURES 
settings.  For me it takes now around 10 seconds to draw 1.1 million polygons 
from Oracle spatial through WMS. Timing comes from Mapserver log with layer set 
to DEBUG 5. Sure it does not make sense to draw 1.1 million polygons to 500x400 
pixels on screen but it does not need to be extraordinary slow either.  

-Jukka-


 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Peter Rose
 Lähetetty: 20. toukokuuta 2009 14:21
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: Re: [mapserver-users] Limit of records
 
 
 Hi Iratxe,
 
 I've found that the limit on my maps is 2000 records. 
 I store the points in a MySQL database and use PHP/MapScript 
 to create the map so I don't know what sets this limit but 
 2000 points on a map seems fair enought for the average map. 
 Unless you have a very big map it would quickly get too 
 cluttered and difficult to read for the users.
 
 Regards,
 Peter Rose
 --
 View this message in context: 
 http://n2.nabble.com/Limit-of-records-tp2945434p2945560.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] MapServer 5.4.0 Buffer Overflow Error

2009-05-20 Thread Juan Felipe Alvarez Saldarriaga
Thx Umberto, I'll try to reinstall GDAL then, thx :).

On Wed, May 20, 2009 at 12:39 AM, Umberto Nicoletti
umberto.nicole...@gmail.com wrote:
 This is a known issue with recent Ubuntu systems which is caused by a
 special compiler feature (called fortify) which enables a protection
 system against the most common memory management errors. Unfortunately
 as a result of this GDAL will break and dependent sw become unusable
 (mapserver, grass, qgis, etc).

 Luckily there is a workaround: remove the gdal installed by canonical
 and install the packages from ubuntu gis project instead:

 https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable

 You may have to recompile mapserver after this.
 Happy hacking,
 Umberto

 On Wed, May 20, 2009 at 5:18 AM, Juan Felipe Alvarez Saldarriaga
 jfalva...@vesifront.org wrote:
 Hey!.

 I'm trying to load a WMS layer, but I got always a buffer overflow
 error, thx for any advice! :)

 This is my mapserv config:

 r...@vesifront:/usr/lib/cgi-bin# ./mapserv -v
 MapServer version 5.4.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
 OUTPUT=SVG
  SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
 SUPPORTS=WMS
 _CLIENT INPUT=TIFF INPUT=EPPL7 INPUT=GDAL INPUT=SHAPEFILE

 My system is a Ubuntu Linux 9.04 and this is the WMS layer into the map file:

  LAYER
    NAME 'Mapa Base'
    TYPE RASTER
    CONNECTIONTYPE WMS
    CONNECTION http://wms.jpl.nasa.gov/browse.cgi?wms_server=wms.cgi;
    METADATA
      'wms_server_version' '1.1.1'
      'wms_format' 'image/jpeg'
      'wms_style' ''
      'wms_name' 'BMNG'
    END
    METADATA
       # 'wms_title' 'Mapa Base'
       'wms_title' 'BMNG'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
        init=epsg:4326
    END
  END

 And this is the error that I got when I try to test the map file with 
 shp2img:

 r...@vesifront:/usr/lib/cgi-bin# shp2img -all_debug 3 -m 
 /home/jfalvarez/projec
 ts/cms/branches/V1/docroot/map-files/9182340517c2d323061dc1cffea6e431.map -o 
 ou
 t.png
 [Tue May 19 22:14:03 2009].813526 msLoadMap(): 0.006s
 [Tue May 19 22:14:03 2009].816973 HTTP: Starting to prepare HTTP requests.
 [Tue May 19 22:14:03 2009].817552 HTTP request: id=0, 
 http://wms.jpl.nasa.gov/br
 owse.cgi?wms_server=wms.cgiLAYERS=BMNGREQUEST=GetMapSERVICE=WMSFORMAT=image/
 jpegSTYLES=HEIGHT=600VERSION=1.1.1SRS=EPSG:4326WIDTH=800BBOX=-94.076794657
 7629,-54.0575959933222,-1.92320534223706,15.0575959933222TRANSPARENT=TRUEEXCEP
 TIONS=application/vnd.ogc.se_inimage
 [Tue May 19 22:14:03 2009].819297 HTTP: Before download loop
 [Tue May 19 22:14:04 2009].175669 msHTTPWriteFct(id=0, 852 bytes)
 [Tue May 19 22:14:04 2009].279581 HTTP: After download loop
 [Tue May 19 22:14:04 2009].280033 msHTTPExecuteRequests() timing summary per 
 lay
 er (connect_time + time_to_first_packet + download_time = total_time in 
 seconds)

 [Tue May 19 22:14:04 2009].280572 Layer 0: 0.169 + 0.186 + 0.274 = 0.629s
 [Tue May 19 22:14:04 2009].281375 msDrawRasterLayerLow(BMNG): entering.
 *** buffer overflow detected ***: shp2img terminated
 === Backtrace: =
 /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb6a87da8]
 /lib/tls/i686/cmov/libc.so.6[0xb6a85eb0]
 /lib/tls/i686/cmov/libc.so.6(__strcpy_chk+0x44)[0xb6a85184]
 shp2img(msDrawRasterLayerLow+0x91d)[0x80c4e0d]
 shp2img(msDrawRasterLayer+0x7b)[0x807ffab]
 shp2img(msDrawLayer+0x35e)[0x8080f0e]
 shp2img(msDrawWMSLayerLow+0x598)[0x80d57d8]
 shp2img(msDrawMap+0x834)[0x8082794]
 shp2img(main+0x912)[0x8059722]
 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb69a0775]
 shp2img[0x8058d71]
 === Memory map: 
 08048000-0811 r-xp  fd:00 197813     /usr/local/bin/shp2img
 0811-08111000 r--p 000c7000 fd:00 197813     /usr/local/bin/shp2img
 08111000-08114000 rw-p 000c8000 fd:00 197813     /usr/local/bin/shp2img
 08114000-08222000 rw-p 08114000 00:00 0          [heap]
 b588c000-b5891000 r-xp  fd:00 98403      
 /lib/tls/i686/cmov/libnss_dns-2
 .9.so
 b5891000-b5892000 r--p 4000 fd:00 98403      
 /lib/tls/i686/cmov/libnss_dns-2
 .9.so
 b5892000-b5893000 rw-p 5000 fd:00 98403      
 /lib/tls/i686/cmov/libnss_dns-2
 .9.so
 b5893000-b589d000 r-xp  fd:00 98405      
 /lib/tls/i686/cmov/libnss_files
 -2.9.so
 b589d000-b589e000 r--p 9000 fd:00 98405      
 /lib/tls/i686/cmov/libnss_files
 -2.9.so
 b589e000-b589f000 rw-p a000 fd:00 98405      
 /lib/tls/i686/cmov/libnss_files
 -2.9.so
 b589f000-b58a3000 rw-p b589f000 00:00 0
 b58a3000-b58a6000 r-xp  fd:00 49415      /lib/libgpg-error.so.0.3.0
 b58a6000-b58a7000 rw-p 2000 fd:00 49415      /lib/libgpg-error.so.0.3.0
 b58a7000-b58ab000 r-xp  fd:00 199058     /usr/lib/libXdmcp.so.6.0.0
 b58ab000-b58ac000 rw-p 3000 fd:00 199058     /usr/lib/libXdmcp.so.6.0.0
 b58ac000-b58ae000 r-xp  fd:00 197736     /usr/lib/libXau.so.6.0.0
 b58ae000-b58af000 r--p 1000 fd:00 197736     /usr/lib/libXau.so.6.0.0
 b58af000-b58b rw-p 2000 fd:00 197736     

[mapserver-users] mapscript memory

2009-05-20 Thread Charlotte Declercq

Hello,

I have a problem releasing the memory of mapscript objects.
My php script :


echo memory_get_usage() . br;
$Directory=/applications/carmen/data/PACA3/Publication/;
$oMap = 
@ms_newMapObj($Directory./environnement_testsymbols_sauvegarde_racine.map); 


echo memory_get_usage() . br;
unset($oMap);
echo memory_get_usage() . br;

The results :
98688
176360
176600

So it seems that the $oMap object hasn't been released from memory.

Can anyone help on this?

Thanks,

--
Charlotte DECLERCQ

ALKANTE SAS
Ingénieur RD SIG
1, rue du Chêne Morand
35 510 Cesson-Sévigné
Bur: + 33 (0) 2 99 22 25 70
fax : + 33 (0) 2 99 32 12 76



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


[mapserver-users] tooltip information on point layers

2009-05-20 Thread meenu

dears ...can anybody help me to generate tooltip on features in mapserver
map...i need to generate tool tip information when the mouse is on the top
of this following  point layercan anybody help me...advance thanks

LAYER 
   NAME n_123  
   TYPE POINT 
   CONNECTIONTYPE OGR 
   CONNECTION n_123 .TAB 
   STATUS ON 
   LABELITEM PLO_900  
   CLASS 
  STYLE 
  COLOR 255 0 0 
  OUTLINECOLOR 0 0 0 
  SYMBOL 'ball' 
END 
LABEL 
COLOR 100 100 255 
FONT arial 
TYPE TRUETYPE 
SIZE 7 
POSITION LC 
WRAP   
END#LABEL 
  END# CLASS 
  END#LAYER

-
Meenu
-- 
View this message in context: 
http://n2.nabble.com/tooltip-information-on-point-layers-tp2945715p2945715.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] change mouse icon style on the specified layer

2009-05-20 Thread meenu

dears ...can anybody help me to change mouse pointer icon as handshape icon
when the mouse is on the top of the point layersis it possible?

LAYER 
   NAME n_123  
   TYPE POINT 
   CONNECTIONTYPE OGR 
   CONNECTION n_123 .TAB 
   STATUS ON 
   LABELITEM PLO_900  
   CLASS 
  STYLE 
  COLOR 255 0 0 
  OUTLINECOLOR 0 0 0 
  SYMBOL 'ball' 
END 
LABEL 
COLOR 100 100 255 
FONT arial 
TYPE TRUETYPE 
SIZE 7 
POSITION LC 
WRAP   
END#LABEL 
  END# CLASS 
  END#LAYER

-
Meenu
-- 
View this message in context: 
http://n2.nabble.com/change-mouse-icon-style-on-the-specified-layer-tp2945729p2945729.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] Limit of records

2009-05-20 Thread Iratxe Lejarreta
On Wednesday 20 May 2009 12:52:03 pm Rahkonen Jukka wrote:
 Hi,

 There is no limit for number of records in Mapserver.  Apache. that is used
 as http server in front of Mapserver does have timeout, which is 300
 seconds by default but can be adjusted.  Generally speaking number of
 records does not tell much about how hard that layer is to handle, if
 anything.  It depends more on the vector data format, nature of the
 features (points vs. polygons with thousands of vertices), indexing etc.  
 However, I would say that normally 63 thousand features is  not much and if
 Mapserver hits the timeout then the data are not suitable for Mapserver
 without some preprocessing.  So, please describe what kind of data you
 have.  Ogrinfo report about the layer would be a good addition.

 -Jukka Rahkonen-


 

   Lähettäjä: mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Iratxe Lejarreta
 Lähetetty: 20. toukokuuta 2009 13:40
   Vastaanottaja: mapserver-users@lists.osgeo.org
   Aihe: [mapserver-users] Limit of records


   Hi,





   I have problems with some layers and I'm thinking that the reason is the
 number of records. For example, with a layer which has 63057 records, the
 result is the following: 500 Internal Server Error
   And Apache log error:
   Timeout waiting for output from CGI script /var/cgi-bin/mapserv





   If exist a limit, which is the maximun number of records that mapserver
 can support?

   And in this case, what is the solution?





   Thanks in advance,





   --
   Iratxe Lejarreta
   www.axios.es

Ok, changing the Apache's timeout, Mapserver is running without problem!

Thanks,

-- 
Iratxe Lejarreta
www.axios.es
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapscript memory

2009-05-20 Thread Alan Boudreault
Hi Charlotte,

This is a known issue with PHP Mapscript. With the way the object are 
currently made, complex objects (that have references to other object, like 
mapObj) are not properly freed when we delete the php object. Note that the 
memory is well freed as soon as the php script ends.

Thanks,
Alan

On May 20, 2009 08:03:41 am Charlotte Declercq wrote:
 Hello,

 I have a problem releasing the memory of mapscript objects.
 My php script :


 echo memory_get_usage() . br;
 $Directory=/applications/carmen/data/PACA3/Publication/;
 $oMap =
 @ms_newMapObj($Directory./environnement_testsymbols_sauvegarde_racine.map
);

 echo memory_get_usage() . br;
 unset($oMap);
 echo memory_get_usage() . br;

 The results :
 98688
 176360
 176600

 So it seems that the $oMap object hasn't been released from memory.

 Can anyone help on this?

 Thanks,

-- 
Alan Boudreault
Mapgears
http://www.mapgears.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] change mouse icon style on the specified layer

2009-05-20 Thread Alan Boudreault
Hi meenu,

MapServer returns an image to your browser. At this point, there is no more 
layers. That's only an image. You cannot bind any browser mouse event to a 
specific country or area. You would need OpenLayers + a Vector layer to do 
that.

Thanks,
Alan

On May 20, 2009 08:07:16 am meenu wrote:
 dears ...can anybody help me to change mouse pointer icon as handshape icon
 when the mouse is on the top of the point layersis it possible?

 LAYER
NAME n_123 
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION n_123 .TAB
STATUS ON
LABELITEM PLO_900 
CLASS
   STYLE
   COLOR 255 0 0
   OUTLINECOLOR 0 0 0
   SYMBOL 'ball'
 END
 LABEL
 COLOR 100 100 255
 FONT arial
 TYPE TRUETYPE
 SIZE 7
 POSITION LC
 WRAP  
 END#LABEL
   END# CLASS
   END#LAYER

 -
 Meenu


-- 
Alan Boudreault
Mapgears
http://www.mapgears.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] change mouse icon style on the specified layer

2009-05-20 Thread Fawcett, David
If you only need to create your map as a static image (with no pan and
zoom), you could use MapServer to generate a html imagemap.  See the
documentation here:  http://mapserver.org/output/imagemaps.html

Most people these days are using openlayers http://www.openlayers.org or
another javascript library to do this.  A lot of people are using
OpenLayers to build their map interfaces, I recommend that you check it
out.  

David. 

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Alan
Boudreault
Sent: Wednesday, May 20, 2009 7:46 AM
To: mapserver-users@lists.osgeo.org
Cc: meenu
Subject: Re: [mapserver-users] change mouse icon style on the specified
layer


Hi meenu,

MapServer returns an image to your browser. At this point, there is no
more 
layers. That's only an image. You cannot bind any browser mouse event
to a 
specific country or area. You would need OpenLayers + a Vector layer to
do 
that.

Thanks,
Alan

On May 20, 2009 08:07:16 am meenu wrote:
 dears ...can anybody help me to change mouse pointer icon as handshape

 icon when the mouse is on the top of the point layersis it 
 possible?

 LAYER
NAME n_123 
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION n_123 .TAB
STATUS ON
LABELITEM PLO_900 
CLASS
   STYLE
   COLOR 255 0 0
   OUTLINECOLOR 0 0 0
   SYMBOL 'ball'
 END
 LABEL
 COLOR 100 100 255
 FONT arial
 TYPE TRUETYPE
 SIZE 7
 POSITION LC
 WRAP  
 END#LABEL
   END# CLASS
   END#LAYER

 -
 Meenu


-- 
Alan Boudreault
Mapgears
http://www.mapgears.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] Get the nearest layer with mapscript...

2009-05-20 Thread Fawcett, David
Paul, 
 
I would guess that this really is about the client-side map interface and not 
about MapServer.  Does your interface only allow them to click/select the 
topmost layer?  Do you pick which layer is selectable?  Do you let them pick 
which layer is selectable?  Is it random?  
 
Tells us more about the client-side app.
 
David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Paul james
Sent: Wednesday, May 20, 2009 7:55 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Get the nearest layer with mapscript...


Thanks Pano...
But It´s not that simple...
What I need is figure out what LAYER was clicked... 

Paul


On Wed, May 20, 2009 at 6:43 AM, Pano Voudouris 
pvoudou...@gaiocorp.com wrote:


Probably don't understand what exactly you are trying to 
achieve here but it is not as simple as map.getLayer(0) to get the topmost 
layer? And once you have the layer object use one of the query function to 
select the record? E.g.  myLayerObj.queryByPoint ?

 

Pano

 

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Paul james
Sent: 19 May 2009 21:46
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Get the nearest layer with 
mapscript...

 

Hello guys...
I have several layers (lines, points, poly) ...
I´m developing a measure tool... User can click on map and I 
have to select that layer to calculate de Area with postgis...



I´m trying to do that WITHOUT using LAYER ACTIVE SYSTEM...



Is That possible using mapscript? How Can I find the nearest 
and toppest layer ?

Thanks!

Paul


___
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] Get the nearest layer with mapscript...

2009-05-20 Thread Steve Lime
If you're doing point queries MapServer/MapScript can do this for you.
You do a
mapObj.queryByPoint with the MS_SINGLE mode and then the function will
identify
the closest feature (considering TOLERANCEs!) in the top-most ACTIVE
layer.

This site uses this to it's advantage...

  http://www.dnr.state.mn.us/maps/compass.html

A query drops through the layers until a match is hit.

Even with other geometry types based on what was described you can
probably do
it pretty easily. You'd use one of the other query methods and then once
the query
is done loop through your layer stack backwards (e.g. starting at the
top) and stop
when you find one with results.

Steve

 Paul james paulj...@gmail.com 05/20/09 7:56 AM 
Thanks Pano...
But It́s not that simple...
What I need is figure out what LAYER was clicked...

Paul

On Wed, May 20, 2009 at 6:43 AM, Pano Voudouris
pvoudou...@gaiocorp.comwrote:

  Probably don’t understand what exactly you are trying to achieve here
but
 it is not as simple as map.getLayer(0) to get the topmost layer? And
once
 you have the layer object use one of the query function to select the
 record? E.g.  myLayerObj.queryByPoint ?



 Pano



 *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
 mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Paul james
 *Sent:* 19 May 2009 21:46
 *To:* mapserver-users@lists.osgeo.org
 *Subject:* [mapserver-users] Get the nearest layer with mapscript...



 Hello guys...
 I have several layers (lines, points, poly) ...
 Ím developing a measure tool... User can click on map and I have to
 select that layer to calculate de Area with postgis...

  Ím trying to do that WITHOUT using LAYER ACTIVE SYSTEM...

  Is That possible using mapscript? How Can I find the nearest and
toppest
 layer ?

 Thanks!

 Paul

 ___
 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] Get the nearest layer with mapscript...

2009-05-20 Thread Paul james
Hi David...
In my system the user SELECT the active layer (dropdown), and so he can
query it selecting a a area or a point 

But, I´d like to take off that dropdown to select active layer... And when
user click on map to query, I figure out what layer was clicked and query
that...

Paul

On Wed, May 20, 2009 at 10:44 AM, Fawcett, David
david.fawc...@state.mn.uswrote:

  Paul,

 I would guess that this really is about the client-side map interface and
 not about MapServer.  Does your interface only allow them to click/select
 the topmost layer?  Do you pick which layer is selectable?  Do you let them
 pick which layer is selectable?  Is it random?

 Tells us more about the client-side app.

 David.

  -Original Message-
 *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
 mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Paul james
 *Sent:* Wednesday, May 20, 2009 7:55 AM
 *To:* mapserver-users@lists.osgeo.org
 *Subject:* Re: [mapserver-users] Get the nearest layer with mapscript...

 Thanks Pano...
 But It´s not that simple...
 What I need is figure out what LAYER was clicked...

 Paul

 On Wed, May 20, 2009 at 6:43 AM, Pano Voudouris 
 pvoudou...@gaiocorp.comwrote:

  Probably don’t understand what exactly you are trying to achieve here
 but it is not as simple as map.getLayer(0) to get the topmost layer? And
 once you have the layer object use one of the query function to select the
 record? E.g.  myLayerObj.queryByPoint ?



 Pano



 *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
 mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Paul james
 *Sent:* 19 May 2009 21:46
 *To:* mapserver-users@lists.osgeo.org
 *Subject:* [mapserver-users] Get the nearest layer with mapscript...



 Hello guys...
 I have several layers (lines, points, poly) ...
 I´m developing a measure tool... User can click on map and I have to
 select that layer to calculate de Area with postgis...

 I´m trying to do that WITHOUT using LAYER ACTIVE SYSTEM...

 Is That possible using mapscript? How Can I find the nearest and toppest
 layer ?

 Thanks!

 Paul

 ___
 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] Open3DGIS

2009-05-20 Thread Matej
Hi all,

I am investigating different options on using 3D with MapServer.. There was 
once an application called Open3DGIS (http://open3dgis.sourceforge.net/), which 
doesn't seem to  live anymore.

Are there any other tools / addons that are alive in this field?

Thanks!

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


Re: [mapserver-users] Open3DGIS

2009-05-20 Thread Glenn Waldron
Hi Matej,

Take a look at osgEarth (http://osgearth.org), a toolkit that renders
open-standards data (from WMS, MapServer, TileCache, etc.) in 3D using the
open source OpenSceneGraph library.


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com


2009/5/20 Matej ma...@matnet.net

  Hi all,

 I am investigating different options on using 3D with MapServer.. There was
 once an application called Open3DGIS http://open3dgis.sourceforge.net/ (
 http://open3dgis.sourceforge.net/), which doesn't seem to  live anymore.

 Are there any other tools / addons that are alive in this field?

 Thanks!

 Matej


 ___
 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] Get the nearest layer with mapscript...

2009-05-20 Thread Paul james
Hi Steve!
I didn't know that mapObj could call queryByPoint as well ... Thanks...
But, How can I get the feature selected after query ?

Using LayerObj I did that (using layer.getNumResults() )

if (_layer.queryByPoint(MapaObj, _point, 0, -2) == 0)
{
for (int i = 0; i  _layer.getNumResults(); i++)
{
resultCacheMemberObj _result = _layer.getResult(i);

return _result.shapeindex.ToString();
}
}

How can I do that using MapObj ?

thanks!


On Wed, May 20, 2009 at 10:51 AM, Steve Lime steve.l...@dnr.state.mn.uswrote:

 If you're doing point queries MapServer/MapScript can do this for you.
 You do a
 mapObj.queryByPoint with the MS_SINGLE mode and then the function will
 identify
 the closest feature (considering TOLERANCEs!) in the top-most ACTIVE
 layer.

 This site uses this to it's advantage...

  http://www.dnr.state.mn.us/maps/compass.html

 A query drops through the layers until a match is hit.

 Even with other geometry types based on what was described you can
 probably do
 it pretty easily. You'd use one of the other query methods and then once
 the query
 is done loop through your layer stack backwards (e.g. starting at the
 top) and stop
 when you find one with results.

 Steve

  Paul james paulj...@gmail.com 05/20/09 7:56 AM 
 Thanks Pano...
 But It́s not that simple...
 What I need is figure out what LAYER was clicked...

 Paul

 On Wed, May 20, 2009 at 6:43 AM, Pano Voudouris
 pvoudou...@gaiocorp.comwrote:

   Probably don’t understand what exactly you are trying to achieve here
 but
  it is not as simple as map.getLayer(0) to get the topmost layer? And
 once
  you have the layer object use one of the query function to select the
  record? E.g.  myLayerObj.queryByPoint ?
 
 
 
  Pano
 
 
 
  *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
  mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Paul james
  *Sent:* 19 May 2009 21:46
  *To:* mapserver-users@lists.osgeo.org
  *Subject:* [mapserver-users] Get the nearest layer with mapscript...
 
 
 
  Hello guys...
  I have several layers (lines, points, poly) ...
  Ím developing a measure tool... User can click on map and I have to
  select that layer to calculate de Area with postgis...
 
   Ím trying to do that WITHOUT using LAYER ACTIVE SYSTEM...
 
   Is That possible using mapscript? How Can I find the nearest and
 toppest
  layer ?
 
  Thanks!
 
  Paul
 
  ___
  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] Get the nearest layer with mapscript...

2009-05-20 Thread Steve Lime
You just need another loop...

for( ...each layer...) {
  layer = ... mapObj get layer ...

  ... now your getNumResults() loop ...
}

Steve

 Paul james paulj...@gmail.com 05/20/09 9:54 AM 
Hi Steve!
I didn't know that mapObj could call queryByPoint as well ... Thanks...
But, How can I get the feature selected after query ?

Using LayerObj I did that (using layer.getNumResults() )

if (_layer.queryByPoint(MapaObj, _point, 0, -2) == 0)
{
for (int i = 0; i  _layer.getNumResults(); i++)
{
resultCacheMemberObj _result = _layer.getResult(i);

return _result.shapeindex.ToString();
}
}

How can I do that using MapObj ?

thanks!


On Wed, May 20, 2009 at 10:51 AM, Steve Lime
steve.l...@dnr.state.mn.uswrote:

 If you're doing point queries MapServer/MapScript can do this for you.
 You do a
 mapObj.queryByPoint with the MS_SINGLE mode and then the function will
 identify
 the closest feature (considering TOLERANCEs!) in the top-most ACTIVE
 layer.

 This site uses this to it's advantage...

  http://www.dnr.state.mn.us/maps/compass.html

 A query drops through the layers until a match is hit.

 Even with other geometry types based on what was described you can
 probably do
 it pretty easily. You'd use one of the other query methods and then
once
 the query
 is done loop through your layer stack backwards (e.g. starting at the
 top) and stop
 when you find one with results.

 Steve

  Paul james paulj...@gmail.com 05/20/09 7:56 AM 
 Thanks Pano...
 But It́s not that simple...
 What I need is figure out what LAYER was clicked...

 Paul

 On Wed, May 20, 2009 at 6:43 AM, Pano Voudouris
 pvoudou...@gaiocorp.comwrote:

   Probably don’t understand what exactly you are trying to achieve
here
 but
  it is not as simple as map.getLayer(0) to get the topmost layer? And
 once
  you have the layer object use one of the query function to select
the
  record? E.g.  myLayerObj.queryByPoint ?
 
 
 
  Pano
 
 
 
  *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
  mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Paul james
  *Sent:* 19 May 2009 21:46
  *To:* mapserver-users@lists.osgeo.org
  *Subject:* [mapserver-users] Get the nearest layer with mapscript...
 
 
 
  Hello guys...
  I have several layers (lines, points, poly) ...
  Ím developing a measure tool... User can click on map and I have to
  select that layer to calculate de Area with postgis...
 
   Ím trying to do that WITHOUT using LAYER ACTIVE SYSTEM...
 
   Is That possible using mapscript? How Can I find the nearest and
 toppest
  layer ?
 
  Thanks!
 
  Paul
 
  ___
  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] Get the nearest layer with mapscript...

2009-05-20 Thread Dan Little
Would a drill down identify be appropriate for your application? Just query 
all of the layers?




From: Paul james paulj...@gmail.com
To: Fawcett, David david.fawc...@state.mn.us
Cc: mapserver-users@lists.osgeo.org
Sent: Wednesday, May 20, 2009 8:53:53 AM
Subject: Re: [mapserver-users] Get the nearest layer with mapscript...

Hi David...
In my system the user SELECT the active layer (dropdown), and so he can query 
it selecting a a area or a point 

But, I´d like to take off that dropdown to select active layer... And when user 
click on map to query, I figure out what layer was clicked and query that...

Paul


On Wed, May 20, 2009 at 10:44 AM, Fawcett, David david.fawc...@state.mn.us 
wrote:

Paul, 
 
I 
would guess that this really is about the client-side map interface and not 
about MapServer.  Does your interface only allow them to click/select the 
topmost layer?  Do you pick which layer is selectable?  Do you let 
them pick which layer is selectable?  Is it random?  
 
Tells 
us more about the client-side app.
 
David.
-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Paul  james

Sent: Wednesday, May 20, 2009 7:55 AM
To: mapserver-users@lists.osgeo.org

Subject: Re: [mapserver-users] Get  the nearest layer with mapscript...


Thanks Pano...
But  It´s not that simple...
What I need is figure out what LAYER was clicked... 

Paul


On Wed, May 20, 2009 at 6:43 AM, Pano Voudouris pvoudou...@gaiocorp.com wrote:

Probably don’t  understand what exactly you are trying to achieve here but it 
is not as  simple as map.getLayer(0) to get the topmost layer? And once you 
have the  layer object use one of the query function to select the record? E.g. 
  myLayerObj.queryByPoint ?
 
Pano
 
From:mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Paul james
Sent: 19 May 2009 21:46
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Get the nearest layer with mapscript...
 
Hello guys...
I have several layers (lines,  points, poly) ...
I´m developing a measure tool... User can click on map  and I have to select 
that layer to calculate de Area with  postgis...


I´m trying to do that WITHOUT using  LAYER ACTIVE SYSTEM...


Is That possible using mapscript? How  Can I find the nearest and toppest layer 
?

Thanks!

Paul
___
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] Get the nearest layer with mapscript...

2009-05-20 Thread Paul james
Thanks Steve...
That worked !

On Wed, May 20, 2009 at 1:34 PM, Steve Lime steve.l...@dnr.state.mn.uswrote:

 You just need another loop...

 for( ...each layer...) {
  layer = ... mapObj get layer ...

  ... now your getNumResults() loop ...
 }

 Steve

  Paul james paulj...@gmail.com 05/20/09 9:54 AM 
 Hi Steve!
 I didn't know that mapObj could call queryByPoint as well ... Thanks...
 But, How can I get the feature selected after query ?

 Using LayerObj I did that (using layer.getNumResults() )

 if (_layer.queryByPoint(MapaObj, _point, 0, -2) == 0)
{
for (int i = 0; i  _layer.getNumResults(); i++)
{
resultCacheMemberObj _result = _layer.getResult(i);

return _result.shapeindex.ToString();
}
}

 How can I do that using MapObj ?

 thanks!


 On Wed, May 20, 2009 at 10:51 AM, Steve Lime
 steve.l...@dnr.state.mn.uswrote:

  If you're doing point queries MapServer/MapScript can do this for you.
  You do a
  mapObj.queryByPoint with the MS_SINGLE mode and then the function will
  identify
  the closest feature (considering TOLERANCEs!) in the top-most ACTIVE
  layer.
 
  This site uses this to it's advantage...
 
   http://www.dnr.state.mn.us/maps/compass.html
 
  A query drops through the layers until a match is hit.
 
  Even with other geometry types based on what was described you can
  probably do
  it pretty easily. You'd use one of the other query methods and then
 once
  the query
  is done loop through your layer stack backwards (e.g. starting at the
  top) and stop
  when you find one with results.
 
  Steve
 
   Paul james paulj...@gmail.com 05/20/09 7:56 AM 
  Thanks Pano...
  But It́s not that simple...
  What I need is figure out what LAYER was clicked...
 
  Paul
 
  On Wed, May 20, 2009 at 6:43 AM, Pano Voudouris
  pvoudou...@gaiocorp.comwrote:
 
Probably don’t understand what exactly you are trying to achieve
 here
  but
   it is not as simple as map.getLayer(0) to get the topmost layer? And
  once
   you have the layer object use one of the query function to select
 the
   record? E.g.  myLayerObj.queryByPoint ?
  
  
  
   Pano
  
  
  
   *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
   mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Paul james
   *Sent:* 19 May 2009 21:46
   *To:* mapserver-users@lists.osgeo.org
   *Subject:* [mapserver-users] Get the nearest layer with mapscript...
  
  
  
   Hello guys...
   I have several layers (lines, points, poly) ...
   Ím developing a measure tool... User can click on map and I have to
   select that layer to calculate de Area with postgis...
  
Ím trying to do that WITHOUT using LAYER ACTIVE SYSTEM...
  
Is That possible using mapscript? How Can I find the nearest and
  toppest
   layer ?
  
   Thanks!
  
   Paul
  
   ___
   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] PERL MapScript

2009-05-20 Thread Christopher Condit
Hi Tom-
Very strange. I don't see an xml file but now I've tried this and I do
get an instance of an imageObj back:

my $map = new mapscript::mapObj('test.map') or die no map $!;
$map-saveMapContext('test.xml');
my $image = $map-draw();
print $image;

So I guess I'll proceed and see how things go. Thanks for your input.
-Chris

 -Original Message-
 From: Kralidis,Tom [Ontario] [mailto:tom.krali...@ec.gc.ca]
 Sent: Tuesday, May 19, 2009 4:58 PM
 To: Christopher Condit; mapserver-users@lists.osgeo.org
 Subject: RE: [mapserver-users] PERL MapScript
 
 
 I get the same error when running mapObj-get(name).  I don't see
any
 get() method in mapObj.  From my example, you should see a out2.xml
 file written to disk.
 
 ..Tom
 
 
 
 -Original Message-
 From: Christopher Condit [mailto:con...@sdsc.edu]
 Sent: Tue 19-May-09 19:45
 To: Kralidis,Tom [Ontario]; mapserver-users@lists.osgeo.org
 Subject: RE: [mapserver-users] PERL MapScript
 
 Hi Tom-
  What does your code look like?  The following works for me:
 #!/usr/bin/perl
 use mapscript;
 use strict;
 
 my $map = new mapscript::mapObj(test.map) or die no map $!;
 my $name = $map-get(name);
 print $name;
 
  #!/usr/bin/perl
 
  use strict;
  use warnings;
  use mapscript;
 
  my $map = new mapscript::mapObj('test.map');
  $map-saveMapContext('out2.xml');
 
 I also tried running your code. It doesn't generate an error but no
 test.xml file is created...
 
 Any thoughts?
 Thanks,
 -Chris
 
 

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


[mapserver-users] Precache

2009-05-20 Thread Chad Clabaugh
How can I precache tile images from shapefiles?

 

Thanks

 

Chad Clabaugh

Technical Support, Engineering

Office: 260.760.6398

Mobile: 260.466.8861

 

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


[mapserver-users] GRIB files - gdal_translate

2009-05-20 Thread Roberto Garcia,MSc

Hi people,

I used gdal_translate in the GRIB file I want to show with mapserver, 
but there still is something wrong. The following is a partial output 
from it:


Driver: GRIB/GRIdded Binary (.grb)
Files: data\raster\T126L28.grb
Size is *161, 98*
Coordinate System is:
.
Origin = (-150.000,-61.2460002)
Pixel Size = (0.938,-0.001836734693878)
Corner Coordinates:
Upper Left  (-150.000, -61.246) (150d 0'0.00W, 61d14'45.60S)
Lower Left  (-150.000, -61.426) (150d 0'0.00W, 61d25'33.60S)
Upper Right (   1.018, -61.246) (  1d 1'4.80E, 61d14'45.60S)
Lower Right (   1.018, -61.426) (  1d 1'4.80E, 61d25'33.60S)
Center  ( -74.491, -61.336) ( 74d29'27.60W, 61d20'9.60S)
Band 1 Block=*161x1* Type=Float64, ColorInterp=Undefined
 Description = 0[-] MSL (Mean sea level)
 Metadata:
   GRIB_UNIT=[Pa]
   GRIB_COMMENT=Pressure reduced to MSL [Pa]
   GRIB_ELEMENT=PRMSL
   GRIB_SHORT_NAME=0-MSL
   GRIB_REF_TIME=  1242453600 sec UTC
   GRIB_VALID_TIME=  1242453600 sec UTC
   GRIB_FORECAST_SECONDS=0 sec


As u can see the size according to the its header is 161x98, but all the 
bands are related as 161x1 block. Why does it happen? Another thing I 
noticed is that the dif between upper and lower latitude in the corner 
coordinates is very small (-61.246 to -61.426).


The issue is that, when mapserver renders this layer it only draws a 
straight line below South America, exactly where the whole image should 
start, as my CTL below shows.


dset ^T126L28.grb
title pac/sa/atlan sector: troposphere file
undef 1e+20
dtype grib
index ^T126L28.gmp
xdef 161 linear -150.15 0.937500
ydef 98 levels
-61.246 -60.311
-59.376 -58.441 -57.506 -56.571 -55.636 -54.701 -53.766 -52.831 -51.896 
-50.961
-50.026 -49.091 -48.156 -47.221 -46.286 -45.350 -44.415 -43.480 -42.545 
-41.610
-40.675 -39.740 -38.805 -37.870 -36.935 -36.000 -35.065 -34.130 -33.195 
-32.260
-31.325 -30.389 -29.454 -28.519 -27.584 -26.649 -25.714 -24.779 -23.844 
-22.909
-21.974 -21.039 -20.104 -19.169 -18.234 -17.299 -16.364 -15.429 -14.493 
-13.558
-12.623 -11.688 -10.753  -9.818  -8.883  -7.948  -7.013  -6.078  -5.143  
-4.208
-3.273  -2.338  -1.403  -0.468   0.468   1.403   2.338   3.273   
4.208   5.143
 6.078   7.013   7.948   8.883   9.818  10.753  11.688  12.623  13.558  
14.493
15.429  16.364  17.299  18.234  19.169  20.104  21.039  21.974  22.909  
23.844

24.779  25.714  26.649  27.584  28.519  29.454
zdef 7 levels
1000 925 850 700 500 300 200   === set Z 1 ou 2 ou 3 ... ou 7 (GRADS)
tdef 1 linear 6Z16may2009  6hr
vars 15
psnm  02,102,  0,  0 SEA LEVEL PRESSURE [hPa]
tsfc  0  187,  1,  0,  0 SURFACE TEMPERATURE [K]
prec  0   61,  1,  0,  0 TOTAL PRECIPITATION [Kg/m2/day]
cbnv  0   71,  3,  0,  0 CLOUD COVER [0-1]
role  0  114,  8,  0,  0 OUTGOING LONG WAVE AT TOP [W/m2]
mask  7  137,100 MASK [-/+]
uvel  7   33,100 ZONAL WIND (U) [m/s]
vvel  7   34,100 MERIDIONAL WIND (V) [m/s]
omeg  7   39,100 OMEGA [Pa/s]
fcor  7   35,100 STREAM FUNCTION [m2/s]
potv  7   36,100 VELOCITY POTENTIAL [m2/s]
zgeo  77,100 GEOPOTENTIAL HEIGHT [gpm]
temp  7   11,100 ABSOLUTE TEMPERATURE [K]
umrl  7   52,100 RELATIVE HUMIDITY [no Dim]
umes  7   51,100 SPECIFIC HUMIDITY [kg/kg]
endvars

Can someone help me to find out what is happening?

Tks a lot

Roberto Garcia


Frank Warmerdam wrote:

Roberto Garcia,MSc wrote:

Hi, tks for the answers.

According to my gdainfo output file attached, can anyone tell me what 
element could be a CLASSITEM?


Roberto,

In MapServer you always classify rasters based on the item [pixel] but
you do not need to explicitly state a classitem.

This is a relatively simple example of raster classification.

LAYER
  NAME grid1
  TYPE raster
  STATUS default
  DATA data/float.tif
  CLASS
NAME red
EXPRESSION ([pixel]  -3)
COLOR 255 0 0
  END
  CLASS
NAME green
EXPRESSION ([pixel] = -3 and [pixel]  3)
COLOR 0 255 0
  END
  CLASS
NAME blue
EXPRESSION ([pixel] = 3)
COLOR 0 0 255
  END
END

I can see my grib using Grads but what tool do I use to translate 
individual bands into GeoTIFF?


You can use gdal_translate to extract particular bands from a grib file
as a geotiff (or all the bands).  For instance, the following would
extract band 3 (total precipitation):

gdal_translate -b 3 T126L28.grb total_precip.tif

Converting the data on-the-fly to an image is the right way to work? 


Having MapServer access the grib file on the fly rather than depending
on pre-translated extracts will reduce data duplication and may help
avoid confusion about what is up to date.  However, it is possible that
there will be a performance penalty for extracting directly from GRIB.
If so, it may not be significant enough to matter to you.


What are the problems with Apache if I do not do so?


I don't see how either approach relates to Apache.  It is a
data management and possibly performance issue with 

Re: [mapserver-users] GRIB files - gdal_translate

2009-05-20 Thread Ivan

Hi there!

There is nothing wrong with your block X and Y size (161x1). It indicates that your data is not 
tiled/blocked, so it is most likely to be read row by row. If the image looks strange is not because 
of that. You have 98 rows in 0.02 degrees, so if it looks like a line, I wouldn't be suprised. Have 
you try to open it in another GDAL based client application, like QGIS for example?


Regards,

Ivan

Roberto Garcia,MSc wrote:

Hi people,

I used gdal_translate in the GRIB file I want to show with mapserver, 
but there still is something wrong. The following is a partial output 
from it:


Driver: GRIB/GRIdded Binary (.grb)
Files: data\raster\T126L28.grb
Size is *161, 98*
Coordinate System is:
.
Origin = (-150.000,-61.2460002)
Pixel Size = (0.938,-0.001836734693878)
Corner Coordinates:
Upper Left  (-150.000, -61.246) (150d 0'0.00W, 61d14'45.60S)
Lower Left  (-150.000, -61.426) (150d 0'0.00W, 61d25'33.60S)
Upper Right (   1.018, -61.246) (  1d 1'4.80E, 61d14'45.60S)
Lower Right (   1.018, -61.426) (  1d 1'4.80E, 61d25'33.60S)
Center  ( -74.491, -61.336) ( 74d29'27.60W, 61d20'9.60S)
Band 1 Block=*161x1* Type=Float64, ColorInterp=Undefined
  Description = 0[-] MSL (Mean sea level)
  Metadata:
GRIB_UNIT=[Pa]
GRIB_COMMENT=Pressure reduced to MSL [Pa]
GRIB_ELEMENT=PRMSL
GRIB_SHORT_NAME=0-MSL
GRIB_REF_TIME=  1242453600 sec UTC
GRIB_VALID_TIME=  1242453600 sec UTC
GRIB_FORECAST_SECONDS=0 sec


As u can see the size according to the its header is 161x98, but all the 
bands are related as 161x1 block. Why does it happen? Another thing I 
noticed is that the dif between upper and lower latitude in the corner 
coordinates is very small (-61.246 to -61.426).


The issue is that, when mapserver renders this layer it only draws a 
straight line below South America, exactly where the whole image should 
start, as my CTL below shows.


dset ^T126L28.grb
title pac/sa/atlan sector: troposphere file
undef 1e+20
dtype grib
index ^T126L28.gmp
xdef 161 linear -150.15 0.937500
ydef 98 levels
-61.246 -60.311
-59.376 -58.441 -57.506 -56.571 -55.636 -54.701 -53.766 -52.831 -51.896 
-50.961
-50.026 -49.091 -48.156 -47.221 -46.286 -45.350 -44.415 -43.480 -42.545 
-41.610
-40.675 -39.740 -38.805 -37.870 -36.935 -36.000 -35.065 -34.130 -33.195 
-32.260
-31.325 -30.389 -29.454 -28.519 -27.584 -26.649 -25.714 -24.779 -23.844 
-22.909
-21.974 -21.039 -20.104 -19.169 -18.234 -17.299 -16.364 -15.429 -14.493 
-13.558
-12.623 -11.688 -10.753  -9.818  -8.883  -7.948  -7.013  -6.078  -5.143  
-4.208
 -3.273  -2.338  -1.403  -0.468   0.468   1.403   2.338   3.273   
4.208   5.143
  6.078   7.013   7.948   8.883   9.818  10.753  11.688  12.623  13.558  
14.493
 15.429  16.364  17.299  18.234  19.169  20.104  21.039  21.974  22.909  
23.844

 24.779  25.714  26.649  27.584  28.519  29.454
zdef 7 levels
1000 925 850 700 500 300 200   === set Z 1 ou 2 ou 3 ... ou 7 (GRADS)
tdef 1 linear 6Z16may2009  6hr
vars 15
psnm  02,102,  0,  0 SEA LEVEL PRESSURE [hPa]
tsfc  0  187,  1,  0,  0 SURFACE TEMPERATURE [K]
prec  0   61,  1,  0,  0 TOTAL PRECIPITATION [Kg/m2/day]
cbnv  0   71,  3,  0,  0 CLOUD COVER [0-1]
role  0  114,  8,  0,  0 OUTGOING LONG WAVE AT TOP [W/m2]
mask  7  137,100 MASK [-/+]
uvel  7   33,100 ZONAL WIND (U) [m/s]
vvel  7   34,100 MERIDIONAL WIND (V) [m/s]
omeg  7   39,100 OMEGA [Pa/s]
fcor  7   35,100 STREAM FUNCTION [m2/s]
potv  7   36,100 VELOCITY POTENTIAL [m2/s]
zgeo  77,100 GEOPOTENTIAL HEIGHT [gpm]
temp  7   11,100 ABSOLUTE TEMPERATURE [K]
umrl  7   52,100 RELATIVE HUMIDITY [no Dim]
umes  7   51,100 SPECIFIC HUMIDITY [kg/kg]
endvars

Can someone help me to find out what is happening?

Tks a lot

Roberto Garcia


Frank Warmerdam wrote:

Roberto Garcia,MSc wrote:

Hi, tks for the answers.

According to my gdainfo output file attached, can anyone tell me what 
element could be a CLASSITEM?


Roberto,

In MapServer you always classify rasters based on the item [pixel] but
you do not need to explicitly state a classitem.

This is a relatively simple example of raster classification.

LAYER
  NAME grid1
  TYPE raster
  STATUS default
  DATA data/float.tif
  CLASS
NAME red
EXPRESSION ([pixel]  -3)
COLOR 255 0 0
  END
  CLASS
NAME green
EXPRESSION ([pixel] = -3 and [pixel]  3)
COLOR 0 255 0
  END
  CLASS
NAME blue
EXPRESSION ([pixel] = 3)
COLOR 0 0 255
  END
END

I can see my grib using Grads but what tool do I use to translate 
individual bands into GeoTIFF?


You can use gdal_translate to extract particular bands from a grib file
as a geotiff (or all the bands).  For instance, the following would
extract band 3 (total precipitation):

gdal_translate -b 3 T126L28.grb total_precip.tif

Converting the data on-the-fly to an image is the right way to work? 


Having MapServer access the grib file on the fly rather than 

Re: [mapserver-users] Finding Lat-Long from geometric data type of postgre

2009-05-20 Thread Simon Haddon


Hi, 

I use a combination of server code and Javascript. 

I convert the lat long values to a javascript array which is loaded into a
2 dimensional array. This data is then loaded with the map which is quick
if your polygons are not too complicated. 

I then have a mouse over ont he map which checks as the mouse moves to see
if is within the polygon. Since I am already creating lat/long values from
the mouse over I just need to do a simple point in polygon check and I am
there. 

The other way I have thought is to create a html map using the polygon
values that come back but I haven't done that. 

To display the tooltip I use js_graphics (http://www.walterzorn.com/)
library of tools which I find fantastic. 

Cheers, 

Simon 

On Wed, 20 May 2009 01:54:23 -0700, Mukul Gupta  wrote:  

Hi,
I want to display a tool tip for the polygons in my application for which
I need lat-long values of polygon. Please tell me how to retrieve the
values from geometry type field of postgre or If
there is any other way of
doing this.

Regards
Mukul  

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


Re: [mapserver-users] Precache

2009-05-20 Thread Roger André
Your request is somewhat lacking in detail, but assuming that your
goal is a simple one, here is one way to accomplish this.

1. Create a MapServer project that displays your shapefile in whatever
style you choose.
2. Setup a TileCache instance that points to your MapServer project.
3. Run the tilecache_seed.py script to pre-generate tiles.

Roger
--

On Wed, May 20, 2009 at 12:16 PM, Chad Clabaugh cclaba...@centwire.com wrote:
 How can I precache tile images from shapefiles?



 Thanks



 Chad Clabaugh

 Technical Support, Engineering

 Office: 260.760.6398

 Mobile: 260.466.8861



 ___
 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