Re: [mapserver-users] Changing Point style on-the-fly

2008-07-18 Thread George A. Dubin
On Thu, 17 Jul 2008 15:47:12 +0300, Paul Spencer [EMAIL PROTECTED]  
wrote:


If you are using MapServer 5.0 or the brand new 5.2 then you can  
probably use attribute binding, which allows you to specify an attribute  
in your data as the source for various parameters in the map file.  For  
instance, if you have a field in your database called point_size that  
has a size value then you can do this:


SIZE [point_size]

You can also bind to COLOR and most other attributes inside STYLE and  
LABEL.  I just went to look for documentation on attribute binding and I  
can't seem to find anything beyond the original rfc  
(http://mapserver.gis.umn.edu/development/rfc/ms-rfc-19) so if you are  
running into trouble, don't hesitate to ask the developers :)


Cheers

Paul


On 17-Jul-08, at 7:52 AM, George A. Dubin wrote:

Hi all! I'm firing up a mapserver for our company these days. Mapserver  
successfully connects to Postgres, and draws points from my database.  
But I need to change some parameters, such as colour and size of points  
on-the-fly, depending on the duration of their existence. Is there a  
way to make Mapserver to pick size and colour of points from Postgres,  
too?

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



__

Paul Spencer
Chief Technology Officer
DM Solutions Group Inc
http://www.dmsolutions.ca/



That really works!!! Thanks a lot!
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WFS_ENCODING problems

2008-07-18 Thread Gabriel Messner
I´ve solved the problem; I post de solution for future searchings:
1. I keep de Postgis Database encoding to UTF-8
2. I changed the client_encoding in the postgresql.conf to client encoding =
iso-8859-1
3. Then I changed the Layer Metadata in the mapfile to 'Layer_Encoding'
'Latin1'.

Now the special characters 'ñ', 'á', etc are shown properly.

2008/7/9 Guillaume Sueur [EMAIL PROTECTED]:

 it's not.
 default client_encoding is ASCII


 Gabriel Messner a écrit :

 Thanks, but default client_encoding in PostgreSQL is the database encoding
 (here, UTF-8)

 2008/7/9 Guillaume Sueur [EMAIL PROTECTED] mailto:
 [EMAIL PROTECTED]:


just an idea, but maybe check your client_encoding parameter in
postgresql.conf
I may be wrong, but I think that mapserver id acting as a client for
the db, and may have the results returned into the client_encoding
character set.

Guillaume

Gabriel Messner a écrit :

Hi all,

I´ve set up a WFS server with mapserver. Data is stored in
Postgis database. Encoding settings are the followings:


-Spatial Data Base encoding is UTF-8
-For each layer in the mapfile encofing is also UTF-8 indicated
with 'layer_encoding' 'UTF-8'

The server retuns successfully geometries and attributes but the
the characters 'ñ',á,é,í,ó,ú are missing (spanish).

I´ve tried to solve this problem using 'wfs_encofing' 'UTF-8'
into the Web object Metadata but when doing so and trying to add
a wfs layer with UDig, an alert is displayed saying 'wrong
connection parameters'. I´ve also tried with 'ows_endoding' and
'gml_encoding'  at Web object Metadata but I fail as well.

I´d hughly appreciated if anyone can help me.

Thanks in advance.

Gabriel Messner



  

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
mailto: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] cannot reach postgis database

2008-07-18 Thread orkun
hello

I cannot reach postgis database.  
Using apache , what should I do about
connection parameters. 

How can I make connection succesful ?

Here is the map file fragment I tried : 

LAYER  #layer hey postgis 
CONNECTIONTYPE postgis
NAME hey

CONNECTION user=orkun password=22 dbname=bzk2 host=localhost


regards

-- 
Ahmet Temiz
Jeo. Müh.
Afet İşleri Gen. Md.lüğü
Deprem Ar. D.

Ahmet Temiz
Geo. Eng.
General Dir. of 
Disaster Affairs



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: [mapserver-users] cannot reach postgis database

2008-07-18 Thread Rahkonen Jukka
Hi,

Perhaps addind port to PostGIS connection settings?

-Jukka Rahkonen-




-Alkuperäinen viesti-
Lähettäjä: [EMAIL PROTECTED] puolesta: orkun
Lähetetty: pe 18.7.2008 13:15
Vastaanottaja: mapserver
Aihe: [mapserver-users] cannot reach postgis database
 
hello

I cannot reach postgis database.  
Using apache , what should I do about
connection parameters. 

How can I make connection succesful ?

Here is the map file fragment I tried : 

LAYER  #layer hey postgis 
CONNECTIONTYPE postgis
NAME hey

CONNECTION user=orkun password=22 dbname=bzk2 host=localhost


regards

-- 
Ahmet Temiz
Jeo. Müh.
Afet Isleri Gen. Md.lügü
Deprem Ar. D.

Ahmet Temiz
Geo. Eng.
General Dir. of 
Disaster Affairs



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
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] v5.0.0 - CLASSITEM has double quote in field value

2008-07-18 Thread Alexandre Dube

Hi Mike,

 I'm not sure about that, but try eq instead of =

 EXPRESSION ('[TRAFFIC_TYPE]' eq 'Lane Closure' OR ...

Best Regards,
Alexandre

Mike Saunt wrote:

Hi All

I've got a MapFile that used to work fine in v4.10 but now fails in v5.0

Basically the CLASSITEM field has double quote in field value and this 
is then returning an error - msEvalExpression: Expression parser 
error. Failed to parse expression


The CLASS EXPRESSION looks like this
CLASSITEM 'TRAFFIC_TYPE'   
CLASS
EXPRESSION ('[TRAFFIC_TYPE]' = 'Lane Closure' OR 
'[TRAFFIC_TYPE]' = 'Multi-Way Signals' OR '[TRAFFIC_TYPE]' = 'Road 
Closure' OR '[TRAFFIC_TYPE]' = 'Stop/Go Boards' OR '[TRAFFIC_TYPE]' = 
'Two-Way Signals')

STYLE # Severe (RED)
SYMBOL 'triangle'
SIZE 9
COLOR 255 0 0
OUTLINECOLOR 0 0 0
END
END

I've tried double quote vs. single quotes in the map file but to no avail

Anyone any thoughts?

Kind regards
Mike


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



--
Alexandre Dubé
Mapgears
www.mapgears.com

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


Re: [mapserver-users] v5.0.0 - CLASSITEM has double quote in field value

2008-07-18 Thread Alexandre Dube
I've been told by developers that there seems to be a bug when using   
in the expression parser...


You should use a regular expression instead like the following :

EXPRESSION /^Lane Closure$|^Multi-Way Signals$|^Road Closure$|^Stop\/Go 
Boards$|^Two-Way Signals$/


See at : http://mapserver.gis.umn.edu/docs/howto/msexpressions

Mike Saunt wrote:

thanks Alexandre but unfortunately it didn't work

Do you know if there is a way of forcing MapServer to read out the 
literal string i.e. sort of like escaping it?  in .NET you can say 
@stringvariable and it will ignore quotes inside etc?


Cheers
Mike

2008/7/18 Alexandre Dube [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:

Hi Mike,

 I'm not sure about that, but try eq instead of =

 EXPRESSION ('[TRAFFIC_TYPE]' eq 'Lane Closure' OR ...

Best Regards,
Alexandre

Mike Saunt wrote:

Hi All

I've got a MapFile that used to work fine in v4.10 but now
fails in v5.0

Basically the CLASSITEM field has double quote in field value
and this is then returning an error - msEvalExpression:
Expression parser error. Failed to parse expression

The CLASS EXPRESSION looks like this
   CLASSITEM 'TRAFFIC_TYPE'  CLASS
   EXPRESSION ('[TRAFFIC_TYPE]' = 'Lane Closure' OR
'[TRAFFIC_TYPE]' = 'Multi-Way Signals' OR '[TRAFFIC_TYPE]' =
'Road Closure' OR '[TRAFFIC_TYPE]' = 'Stop/Go Boards' OR
'[TRAFFIC_TYPE]' = 'Two-Way Signals')
   STYLE # Severe (RED)
   SYMBOL 'triangle'
   SIZE 9
   COLOR 255 0 0
   OUTLINECOLOR 0 0 0
   END
   END

I've tried double quote vs. single quotes in the map file but
to no avail

Anyone any thoughts?

Kind regards
Mike


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




-- 
Alexandre Dubé

Mapgears
www.mapgears.com http://www.mapgears.com




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



--
Alexandre Dubé
Mapgears
www.mapgears.com

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


Re: [mapserver-users] Compiling Issues: Ubuntu 8.04

2008-07-18 Thread Matthew Pettis
Hi Guillaume, Milo,

Thanks for the replies... please see below

MIlo:
---
Ah!

I faced this one on debian yesterday! Thanks to great help on the irc
channel I can help ou with a solution, aint life great?

You say proj_api.h is in that directory, but how about libproj.a/libproj.so?

Did you run the ./configure, make , make install for proj?

If you did

You may need to run:


ldconfig /usr/include
---

proj_api.h is in /usr/include/ while libproj.a/libproj.so are in
/usr/lib... i didn't build the libproj.* libraries myself, but
downloaded them via synaptic -- do i need to do a manual build?

Guillaume:
---
On Fri, Jul 18, 2008 at 2:05 AM, Guillaume Sueur
[EMAIL PROTECTED] wrote:
 did you add your lib path to /etc/ld.so.conf and run ldconfig after proj
 install ?

 Guillaume

 Matthew Pettis a écrit :

 Hi,

 I am compiling MapServer from source because I want to include
 fastcgi... anyway, I've fixed most of the compile issues, but I can't
 get past the following:

 
 configure: checking whether we should include PROJ.4 support...
 configure: error: Could not find proj_api.h or libproj.a/libproj.so
 in /usr/include/.
 

 However, I verified that /usr/include/proj_api.h does exist, so I'm a
 bit confused... any suggestions?

 Thanks,
 Matt



---

answer: no, because like I wrote to Milo, I did a synaptic install of
the proj library, not a manual build... can i still edit it after
doing a synaptic install?  my ld.so.conf file looks like this
currently:

---
include /etc/ld.so.conf.d/*.conf
---

is this what it should look like?

Thanks,
Matt


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


Re: [mapserver-users] v5.0.0 - CLASSITEM has double quote in field value

2008-07-18 Thread Mike Saunt
Alexandre

Excellent - that works!

FYI - This is why I believe that Open Source can easily prevail even when
people put down the 'many eyes see more bugs' notion.  In another life I
worked with / as a partner for a proprietary company (now you can buy
franking machines from the same parent company wink wink nudge nudge) and
you'd never get this response so quickly and also having 'had it from the
horses mouth a.k.a. Developers' that there is an issue and this is the best
way around it.

Thanks so much Alexandre

Kind regards
Mike





2008/7/18 Alexandre Dube [EMAIL PROTECTED]:

 I've been told by developers that there seems to be a bug when using   in
 the expression parser...

 You should use a regular expression instead like the following :

 EXPRESSION /^Lane Closure$|^Multi-Way Signals$|^Road Closure$|^Stop\/Go
 Boards$|^Two-Way Signals$/

 See at : http://mapserver.gis.umn.edu/docs/howto/msexpressions

 Mike Saunt wrote:

 thanks Alexandre but unfortunately it didn't work

 Do you know if there is a way of forcing MapServer to read out the literal
 string i.e. sort of like escaping it?  in .NET you can say @stringvariable
 and it will ignore quotes inside etc?

 Cheers
 Mike

 2008/7/18 Alexandre Dube [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 :


Hi Mike,

 I'm not sure about that, but try eq instead of =

 EXPRESSION ('[TRAFFIC_TYPE]' eq 'Lane Closure' OR ...

Best Regards,
Alexandre

Mike Saunt wrote:

Hi All

I've got a MapFile that used to work fine in v4.10 but now
fails in v5.0

Basically the CLASSITEM field has double quote in field value
and this is then returning an error - msEvalExpression:
Expression parser error. Failed to parse expression

The CLASS EXPRESSION looks like this
   CLASSITEM 'TRAFFIC_TYPE'  CLASS
   EXPRESSION ('[TRAFFIC_TYPE]' = 'Lane Closure' OR
'[TRAFFIC_TYPE]' = 'Multi-Way Signals' OR '[TRAFFIC_TYPE]' =
'Road Closure' OR '[TRAFFIC_TYPE]' = 'Stop/Go Boards' OR
'[TRAFFIC_TYPE]' = 'Two-Way Signals')
   STYLE # Severe (RED)
   SYMBOL 'triangle'
   SIZE 9
   COLOR 255 0 0
   OUTLINECOLOR 0 0 0
   END
   END

I've tried double quote vs. single quotes in the map file but
to no avail

Anyone any thoughts?

Kind regards
Mike

  

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



--Alexandre Dubé
Mapgears
www.mapgears.com http://www.mapgears.com


 

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




 --
 Alexandre Dubé
 Mapgears
 www.mapgears.com


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


Re: [mapserver-users] Compiling Issues: Ubuntu 8.04

2008-07-18 Thread Guillaume Sueur

try to add
/usr/lib to your /etc/ld.so.conf
and then
/sbin/ldconfig

if you don't find needed files (proj_api.h etc, but you seem to have 
them on your disk), always try to install the devel package correspondig 
to your lib.


Guillaume

Matthew Pettis a écrit :

Hi Guillaume, Milo,

Thanks for the replies... please see below

MIlo:
---
Ah!

I faced this one on debian yesterday! Thanks to great help on the irc
channel I can help ou with a solution, aint life great?

You say proj_api.h is in that directory, but how about libproj.a/libproj.so?

Did you run the ./configure, make , make install for proj?

If you did

You may need to run:


ldconfig /usr/include
---

proj_api.h is in /usr/include/ while libproj.a/libproj.so are in
/usr/lib... i didn't build the libproj.* libraries myself, but
downloaded them via synaptic -- do i need to do a manual build?

Guillaume:
---
On Fri, Jul 18, 2008 at 2:05 AM, Guillaume Sueur
[EMAIL PROTECTED] wrote:

did you add your lib path to /etc/ld.so.conf and run ldconfig after proj
install ?

Guillaume

Matthew Pettis a écrit :

Hi,

I am compiling MapServer from source because I want to include
fastcgi... anyway, I've fixed most of the compile issues, but I can't
get past the following:


configure: checking whether we should include PROJ.4 support...
configure: error: Could not find proj_api.h or libproj.a/libproj.so
in /usr/include/.


However, I verified that /usr/include/proj_api.h does exist, so I'm a
bit confused... any suggestions?

Thanks,
Matt




---

answer: no, because like I wrote to Milo, I did a synaptic install of
the proj library, not a manual build... can i still edit it after
doing a synaptic install?  my ld.so.conf file looks like this
currently:

---
include /etc/ld.so.conf.d/*.conf
---

is this what it should look like?

Thanks,
Matt



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


Re: [mapserver-users] Compiling Issues: Ubuntu 8.04 -- libgd and gdFontCacheSetup

2008-07-18 Thread Daniel Morissette
As I wrote in a previous message, is it possible that you configured 
using --with-gd=/usr/lib? You should use --with-gd=/usr only and the 
configure script should take care of looking in the right subdirectory 
for each file.


Daniel

Matthew Pettis wrote:

Hi,

More and different compiling issues from the one I've already
posted... My configure script errors as shown below (truncated because
I believe the most important part is included):
--
configure: checking where libiconv is installed...
checking for iconv_open in -lc... yes
checking for libiconv_open in -liconv... yes
using libiconv from -L -liconv
libiconv found. Enabling internationalization (-DUSE_ICONV)
configure: checking for GD 2.0.16 or higher...
checking for gdFontCacheSetup in -lgd... no
configure: checking whether GD needs libiconv...
checking for gdFontCacheSetup in -lgd... no
configure: error: Could not find gd.h or libgd.a/libgd.so in /usr/lib.
 Make sure GD 2.0.16 or higher is compiled before calling configure.
You may also get this error if you didn't specify the appropriate
location for one of GD's dependencies (freetype, libpng, libjpeg or
libiconv).
--

Now, I have libgd version 2.0.35, so this should work... I have gd.h
and libgd.a/libgd.so (the latter are in /usr/lib/).  I think it is
choking because of the gdFontCacheSetup.  Any idea on how to fix this?

Thanks,
Matt




--
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Compiling Issues: Ubuntu 8.04

2008-07-18 Thread Matthew Pettis
Thanks Daniel, Guillaume,

Daniel: you are correct in that I configured with
--with-proj=/usr/include, and also tried --with-proj=/usr/lib.  I
will try tonight with your suggestion.

Thanks!

Matt

On Fri, Jul 18, 2008 at 8:23 AM, Daniel Morissette
[EMAIL PROTECTED] wrote:
 Is it possible that you configured using --with-proj=/usr/include? You
 should use --with-proj=/usr only and the configure script should take care
 of looking in the right subdirectory for each file.

 Daniel


 Matthew Pettis wrote:

 Hi,

 I am compiling MapServer from source because I want to include
 fastcgi... anyway, I've fixed most of the compile issues, but I can't
 get past the following:

 
 configure: checking whether we should include PROJ.4 support...
 configure: error: Could not find proj_api.h or libproj.a/libproj.so
 in /usr/include/.
 

 However, I verified that /usr/include/proj_api.h does exist, so I'm a
 bit confused... any suggestions?

 Thanks,
 Matt



 --
 Daniel Morissette
 http://www.mapgears.com/




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


Re: [mapserver-users] Ruby MapScript on Mac OS X?

2008-07-18 Thread William Kyngesburye

Here's a way to add ruby to my MapServer framework build.

Get the matching 5.0 Mapserver source (5.2 release coming soon).

Also get the GD 2.0.35 source, since some internal operations use GD.   
Copy these GD headers into the Mapserver source:


entities.h
gd_io.h
gd.h
gdcache.h
gdfontg.h
gdfontl.h
gdfontmb.h
gdfonts.h
gdfontt.h
gdfx.h

Then copy this file to the Mapserver source:



mapscriptvars
Description: Binary data




Now, in a Terminal window, cd to the ruby mapscript source folder and  
(as the readme says):


ruby extconf.rb
make

You will probably get an error about a missing architecture, but at  
least on Leopard it is ignored and I got a ruby mapscript bundle.


If this works, I can include the mapscripvars and instructions in my  
upcoming 5.2 binaries.


On Jul 18, 2008, at 7:56 AM, Tom Huras wrote:


William:
I'm on OS X 10.4.11 with my own Ruby installation to a more recent  
version (1.8.5) than shipped with OS X.


I am using your MapServer framework because it appeared to be a  
cleaner way of getting it going.


A couple of years ago, I attempted the full build from MapServer  
source with all its prerequisite software and got bogged down on  
some compiler issue with one of the prerequisites.  I left it for a  
while and then discovered your site where you had done the heavy  
lifting to do the build.  Thanks for that!


/tom

William Kyngesburye wrote:


I haven't given any thought to ruby yet, but I can look into it.   
Which OSX version?  I believe Leopard has Ruby, but not Tiger.  I  
would prefer to start with the system Ruby.  A possibility that I  
haven't worked out fully yet is to use my MapServer framework +  
MapServer source to build just the Ruby MapScript.



-
William Kyngesburye kyngchaos*at*kyngchaos*dot*com
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly  
what the universe is for and why it is here, it will instantly  
disappear and be replaced by something even more bizarrely  
inexplicable.  There is another theory which states that this has  
already happened.


-Hitchhiker's Guide to the Galaxy 2nd season intro


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


Re: [mapserver-users] Compiling Issues: Ubuntu 8.04 -- libgd and gdFontCacheSetup

2008-07-18 Thread Matthew Pettis
Replied to your previous one -- I will try again tonight with your
suggestion and update the list with the results  -- Thanks again!

Matt

On Fri, Jul 18, 2008 at 8:54 AM, Daniel Morissette
[EMAIL PROTECTED] wrote:
 As I wrote in a previous message, is it possible that you configured using
 --with-gd=/usr/lib? You should use --with-gd=/usr only and the configure
 script should take care of looking in the right subdirectory for each file.

 Daniel

 Matthew Pettis wrote:

 Hi,

 More and different compiling issues from the one I've already
 posted... My configure script errors as shown below (truncated because
 I believe the most important part is included):

 --
 configure: checking where libiconv is installed...
 checking for iconv_open in -lc... yes
 checking for libiconv_open in -liconv... yes
using libiconv from -L -liconv
libiconv found. Enabling internationalization (-DUSE_ICONV)
 configure: checking for GD 2.0.16 or higher...
 checking for gdFontCacheSetup in -lgd... no
 configure: checking whether GD needs libiconv...
 checking for gdFontCacheSetup in -lgd... no
 configure: error: Could not find gd.h or libgd.a/libgd.so in /usr/lib.
  Make sure GD 2.0.16 or higher is compiled before calling configure.
 You may also get this error if you didn't specify the appropriate
 location for one of GD's dependencies (freetype, libpng, libjpeg or
 libiconv).

 --

 Now, I have libgd version 2.0.35, so this should work... I have gd.h
 and libgd.a/libgd.so (the latter are in /usr/lib/).  I think it is
 choking because of the gdFontCacheSetup.  Any idea on how to fix this?

 Thanks,
 Matt



 --
 Daniel Morissette
 http://www.mapgears.com/




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


Re: [mapserver-users] ECW Problems

2008-07-18 Thread Jeff McKenna

On 18-Jul-08, at 9:21 AM, Derek Bain wrote:


Hi
I cannot get ecw files to work in Mapserver. I have updated my map  
file (see below).


Is there any configuration that I have to do to enable this or is  
ecw by default. I am using ms4w beta 5..2.


My client is WorldWind and I am using the Import to WMS Url Layer  
option. It would appear that MapServer fails when processing the map  
file. Are there any options to set to enable a debug console window  
when processing the map file.


I have checked that my ecw file is georeferenced and it is.

Thanks
Derek


   LAYER
   NAME TestECWLayer
   TYPE RASTER
   STATUS ON
   DUMP TRUE
   DATA C:/Progra~1/ms4w/Apps/All_Data/data/testfile.ecw
   PROJECTION
   init=epsg:4326
   END


   METADATA
   wms_titleTestECWLayer
   wms_abstractTestECWLayer abstract goes  
here 

   wms_srs EPSG:4326
   wms_nameTestECWLayer
   wms_formatimage/png image/jpeg
   wms_extent-88.9803405 30.2175328   
-88.9755868 30.2216604
   wms_onlineresourcehttp://localhost:8082/cgi-bin/mapserv.exe?map=C:/Progra 
~1/ms4w/apps/All_Data/ECW_Test.map

   END

   CLASS
   NAME TestECWLayer
   COLOR 255 0 0
   END
   END


Hello,

I have made some notes for you below to assist you with your ECW issue:

1) MS4W (and its underlying GDAL library) comes ready to use ECW data
   by default.  To verify this, execute /ms4w/setenv.bat at the
   commandline, and then execute gdalinfo --formats to
   see if ECW is supported, such as:

gdalinfo --formats

Supported Formats:
  VRT (rw+): Virtual Raster
  GTiff (rw+): GeoTIFF
  ...
  ECW (rw): ERMapper Compressed Wavelets
  ...
  ADRG (rw+): ARC Digitized Raster Graphics



2) Now that you have established that your local build has ECW support,
   now use the gdalinfo command on your data to get some basic info
   on your ecw file, such as:

gdalinfo image1.ecw

Driver: ECW/ERMapper Compressed Wavelets
Files: image1.ecw
   image1.ecw.aux.xml
Size is 7966, 8274
Coordinate System is:
PROJCS[LCC E008,
GEOGCS[NAD83,
DATUM[North_American_Datum_1983,
SPHEROID[GRS 1980,6378137,298.2572221010002,
AUTHORITY[EPSG,7019]],
AUTHORITY[EPSG,6269]],
PRIMEM[Greenwich,0],
UNIT[degree,0.0174532925199433],
AUTHORITY[EPSG,4269]],
PROJECTION[Lambert_Conformal_Conic_2SP],
PARAMETER[standard_parallel_1,49],
PARAMETER[standard_parallel_2,77],
PARAMETER[latitude_of_origin,49],
PARAMETER[central_meridian,-95],
PARAMETER[false_easting,0],
PARAMETER[false_northing,0],
UNIT[metre,1,
AUTHORITY[EPSG,9001]]]
Origin = (2878735.2620010,995462.9749998)
Pixel Size = (30.000,-30.000)
Metadata:
  AREA_OR_POINT=Area
Corner Coordinates:
Upper Left  ( 2878735.262,  995462.975) ( 52d35'49.00W, 48d59'18.47N)
Lower Left  ( 2878735.262,  747242.975) ( 54d36'32.41W, 47d13'6.98N)
Upper Right ( 3117715.262,  995462.975) ( 50d 6'40.01W, 47d37'48.85N)
Lower Right ( 3117715.262,  747242.975) ( 52d 9'36.52W, 45d55'23.39N)
Center  ( 2998225.262,  871352.975) ( 52d22'14.82W, 47d27'4.74N)
Band 1 Block=7966x1 Type=Byte, ColorInterp=Red
  Overviews: arbitrary
Band 2 Block=7966x1 Type=Byte, ColorInterp=Green
  Overviews: arbitrary
Band 3 Block=7966x1 Type=Byte, ColorInterp=Blue
  Overviews: arbitrary

3) Next step is to create a small test mapfile with only one layer,  
for that
   ecw file.  For the EXTENT parameter you can use the lower left and  
upper right

   coordinates listed in your gdalinfo response, such as:

   #
   # Start of map file
   #
   #
   NAME ecw-test
   STATUS ON
   SIZE 600 400
   EXTENT 2878735.262 747242.975 3117715.262 995462.975
   UNITS METERS
   SHAPEPATH ../data

   #
   # Start of layer definitions
   #

   LAYER
 NAME ecw-image
 TYPE RASTER
 STATUS DEFAULT
 DATA image1.ecw
   END # Layer

   END # Map File

4) You can test your tiny mapfile with MapServer's shp2img utility  
that is part of
   MS4W.  (make sure you execute /ms4w/setenv.bat beforehand).   
shp2img will
   create a map image file or return a MapServer error at the  
commandline.
   You can use this MapServer error to track down the problem in your  
mapfile.
   Here is an example shp2img command to show you how to see  
debugging information

   with shp2img:

   shp2img -m ecw.map -o test.png -map_debug 3

  

[mapserver-users] Layer Vector Hatching MS5.2

2008-07-18 Thread Nolte, Tim
Just upgraded to MapServer 5.2.0 yesterday. One problem that cropped up
is that I now no longer get any type of cross hatching of layers. I had
the following setup in MS5.0:

symbols.sym:

SYMBOL
NAME double-hatch 
TYPE vector 
POINTS
0 0 
1 0 
1 1 
END 
END


default.map:

  LAYER
GROUP Coverage
NAME Sprint EVDO Coverage
TYPE POLYGON
STATUS OFF
DATA contours/Sprint_EVDO_region
METADATA
  static_legend 1
END
# --
# Class: Sprint EVDO Coverage
# --
CLASS
  NAME Sprint EVDO Coverage
  STYLE
SYMBOL double-hatch
COLOR 240 204 0
  ANGLE 45
  END
END
  END


What has changed in layer CLASS-STYLE that has broken my layer style?

- Tim


Timothy J Nolte - [EMAIL PROTECTED]
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:616-706-2438
Fax:616-554-6484
Web: www.ipcswirelessinc.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Layer Vector Hatching MS5.2

2008-07-18 Thread Jeff McKenna

On 18-Jul-08, at 2:31 PM, Nolte, Tim wrote:

Just upgraded to MapServer 5.2.0 yesterday. One problem that cropped  
up
is that I now no longer get any type of cross hatching of layers. I  
had

the following setup in MS5.0:

symbols.sym:

SYMBOL
NAME double-hatch
TYPE vector
POINTS
0 0
1 0
1 1
END
END


default.map:

 LAYER
   GROUP Coverage
   NAME Sprint EVDO Coverage
   TYPE POLYGON
   STATUS OFF
   DATA contours/Sprint_EVDO_region
   METADATA
 static_legend 1
   END
   # --
   # Class: Sprint EVDO Coverage
   # --
   CLASS
 NAME Sprint EVDO Coverage
 STYLE
   SYMBOL double-hatch
   COLOR 240 204 0
  ANGLE 45
 END
   END
 END


What has changed in layer CLASS-STYLE that has broken my layer style?



I think you're missing a SIZE parameter (the distance between the  
hatched lines) in your STYLE object.


---
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] Dynamic Reference Map

2008-07-18 Thread Emerson, Gabe
Hello everyone. My apologies if this has been solved already, but I've
read through the previous posts on this topic and haven't found a
solution that works for me. 

 

I'm trying to replace the default reference map image and extent on the
fly, using Javascript in my template file. Basically, I want to check if
the map is zooming out past a certain scale and/or leaving the area
covered by the default reference map, and display a reference map of the
entire state (the default is the local metro area). 

 

I'm using the 5.2.0 version of mapserv that comes with ms4w 2.2.7
(although ms4w's default index page claims it's still 2.2.6 with mapserv
5.0). From what I've read in the docs and mailing list archives, I
should be able to do what I want in one of two ways:

 

-Include in the url:map_reference_image='/images/mnref.gif'

 

-Or alternatively: map_reference=IMAGE+'/images/mnref.gif'

 

The first method gives me this error:

loadReferenceMap(): Unknown identifier. Parsing error near
(/images/mnref.gif):(line 1)

 

And the second method gives me this:

loadReferenceMap(): Unknown identifier. Parsing error near (IMAGE):(line
1)

 

I've tried these with every combination of quotes, escaped quotes, no
quotes, etc, without luck. What I CAN do is turn the reference map on
and off with map_reference=STATUS+off in the url, but that seems to be
the only reference object parameter that I can change. 

 

According to what I've read I'm pretty sure this is possible, there was
even a code update to make the first method work in an earlier version.
Hopefully I'm just missing something obvious and someone can  point out
my newb mistake. 

 

Thanks!

 

 

 

Gabe Emerson

Research Department

Welsh Companies

4350 Baker Road, Suite 400

Minnetonka, MN 55343-8695

 

952-897-7700, ext. 1306

[EMAIL PROTECTED]

 

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


Re: [mapserver-users] Compiling Issues: Ubuntu 8.04 -- libgd and gdFontCacheSetup

2008-07-18 Thread Matthew Pettis
Hi All,

This still fails... below is my configuration parameter setup and the
output of configure are below... any suggestions?

thanks,
matt

=== configure parameters ===
./configure --with-ogr=/usr \
--with-gdal=/usr \
--with-httpd=/usr/sbin/apache2 \
--with-wfsclient \
--with-wmsclient \
--enable-debug \
--with-curl=/usr \
--with-proj=/usr \
--with-threads \
--with-tiff \
--with-libiconv=/usr/local/lib \
--with-jpeg \
--with-freetype=/usr/lib/xorg/modules/fonts/ \
--with-threads \
--with-wcs \
--with-xml2-config=/usr/bin/xml2-config \
--with-gd=/usr \
--with-php=/usr
===

=== output of configure script ===
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking for flex... no
checking for lex... no
checking for yywrap in -lfl... no
checking for yywrap in -ll... no
checking for bison... no
checking for byacc... no
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for exp in -lm... yes
checking for __gxx_personality_v0 in -lstdc++... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for strdup... yes
checking for strlcat... no
checking for vsnprintf... yes
MapServer Version from mapserver.h: '5.0.3'
configure: checking where FreeType 2.x is installed...
using libfreetype from -L/usr/lib/xorg/modules/fonts/ -lfreetype
configure: checking where Zlib is installed...
checking for zlibVersion in -lz... yes
using libz from system libs (-DUSE_ZLIB).
configure: checking where PNG is installed...
checking for png_init_io in -lpng... yes
using libpng from system libs.
configure: checking whether we should include JPEG support...
checking for jpeg_read_header in -ljpeg... yes
using libjpeg from system libs.
configure: checking where libXpm is installed...
checking for XpmFreeXpmImage in -lXpm... yes
using libXpm from system libs.
configure: checking where libiconv is installed...
checking for iconv_open in -lc... yes
checking for libiconv_open in -liconv... yes
using libiconv from -L -liconv
libiconv found. Enabling internationalization (-DUSE_ICONV)
configure: checking for GD 2.0.16 or higher...
checking for gdFontCacheSetup in -lgd... no
configure: checking whether GD needs libiconv...
checking for gdFontCacheSetup in -lgd... no
configure: error: Could not find gd.h or libgd.a/libgd.so in /usr.
Make sure GD 2.0.16 or higher is compiled before calling configure.
You may also get this error if you didn't specify the appropriate
location for one of GD's dependencies (freetype, libpng, libjpeg or
libiconv).
=

On Fri, Jul 18, 2008 at 9:04 AM, Matthew Pettis
[EMAIL PROTECTED] wrote:
 Replied to your previous one -- I will try again tonight with your
 suggestion and update the list with the results  -- Thanks again!

 Matt

 On Fri, Jul 18, 2008 at 8:54 AM, Daniel Morissette
 [EMAIL PROTECTED] wrote:
 As I wrote in a previous message, is it possible that you configured using
 --with-gd=/usr/lib? You should use --with-gd=/usr only and the configure
 script should take care of looking in the right subdirectory for each file.

 Daniel

 Matthew Pettis wrote:

 Hi,

 More and different compiling issues from the one I've already
 posted... My configure script errors as shown below (truncated because
 I believe the most important part is included):

 --
 configure: checking where libiconv is installed...
 checking for iconv_open in -lc... yes
 checking for libiconv_open in -liconv... yes
using libiconv from -L -liconv
libiconv found. Enabling internationalization (-DUSE_ICONV)
 configure: checking for GD 2.0.16 or higher...
 checking for gdFontCacheSetup in -lgd... no
 configure: checking whether GD needs libiconv...
 checking for gdFontCacheSetup in -lgd... no
 configure: error: Could not find gd.h or libgd.a/libgd.so in /usr/lib.
  Make sure GD 2.0.16 or higher is compiled before calling configure.
 You may also get this error if you didn't specify 

[MAPSERVER-USERS] GIS: Display Data from MySQL in Cartoweb

2008-07-18 Thread manjacat

Dear All,

I have a problem with my GIS project at the moment.

My *.shp database stores lotnumber which is a character ranged from 1
to 58000 (give or take a few hundred..)

my SQL table links this lotnumber to a projectID, for example 1 to
10060, 2 to 10103 etc.

What I want to do is when a user queries a polygon in my map (I am using
Cartoweb3), I want the user to see the data from the *.shp database as well
as the data from the SQL database.

In other words, I want to join this two tables and display them in Cartoweb
when the user queries them.

something like this:

lotnumber   |landuse |projectID
--
1|housing area  |10060

* lotnumber and landuse column is from *.shp, whilst projectID is from
MySQL.

Any suggestion? any help or lead is greatly appreciated. Thank you in
advance.
-- 
View this message in context: 
http://www.nabble.com/GIS%3A-Display-Data-from-MySQL-in-Cartoweb-tp18540317p18540317.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] Compiling Issues: Ubuntu 8.04 -- libgd and gdFontCacheSetup

2008-07-18 Thread thomas bonfort
hi,
have you installed the libgd development packages ?

# apt-get install libgd-dev

thomas

On Sat, Jul 19, 2008 at 1:26 AM, Matthew Pettis
[EMAIL PROTECTED] wrote:
 Hi All,

 This still fails... below is my configuration parameter setup and the
 output of configure are below... any suggestions?

 thanks,
 matt

 === configure parameters ===
 ./configure --with-ogr=/usr \
--with-gdal=/usr \
--with-httpd=/usr/sbin/apache2 \
--with-wfsclient \
--with-wmsclient \
--enable-debug \
--with-curl=/usr \
--with-proj=/usr \
--with-threads \
--with-tiff \
--with-libiconv=/usr/local/lib \
--with-jpeg \
--with-freetype=/usr/lib/xorg/modules/fonts/ \
--with-threads \
--with-wcs \
--with-xml2-config=/usr/bin/xml2-config \
--with-gd=/usr \
--with-php=/usr
 ===

 === output of configure script ===
 checking for gcc... gcc
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ANSI C... none needed
 checking for g++... g++
 checking whether we are using the GNU C++ compiler... yes
 checking whether g++ accepts -g... yes
 checking for ranlib... ranlib
 checking for flex... no
 checking for lex... no
 checking for yywrap in -lfl... no
 checking for yywrap in -ll... no
 checking for bison... no
 checking for byacc... no
 checking if compiler supports -R... no
 checking if compiler supports -Wl,-rpath,... yes
 checking for exp in -lm... yes
 checking for __gxx_personality_v0 in -lstdc++... yes
 checking how to run the C preprocessor... gcc -E
 checking for egrep... grep -E
 checking for ANSI C header files... yes
 checking for strcasecmp... yes
 checking for strncasecmp... yes
 checking for strdup... yes
 checking for strlcat... no
 checking for vsnprintf... yes
 MapServer Version from mapserver.h: '5.0.3'
 configure: checking where FreeType 2.x is installed...
using libfreetype from -L/usr/lib/xorg/modules/fonts/ -lfreetype
 configure: checking where Zlib is installed...
 checking for zlibVersion in -lz... yes
using libz from system libs (-DUSE_ZLIB).
 configure: checking where PNG is installed...
 checking for png_init_io in -lpng... yes
using libpng from system libs.
 configure: checking whether we should include JPEG support...
 checking for jpeg_read_header in -ljpeg... yes
using libjpeg from system libs.
 configure: checking where libXpm is installed...
 checking for XpmFreeXpmImage in -lXpm... yes
using libXpm from system libs.
 configure: checking where libiconv is installed...
 checking for iconv_open in -lc... yes
 checking for libiconv_open in -liconv... yes
using libiconv from -L -liconv
libiconv found. Enabling internationalization (-DUSE_ICONV)
 configure: checking for GD 2.0.16 or higher...
 checking for gdFontCacheSetup in -lgd... no
 configure: checking whether GD needs libiconv...
 checking for gdFontCacheSetup in -lgd... no
 configure: error: Could not find gd.h or libgd.a/libgd.so in /usr.
 Make sure GD 2.0.16 or higher is compiled before calling configure.
 You may also get this error if you didn't specify the appropriate
 location for one of GD's dependencies (freetype, libpng, libjpeg or
 libiconv).
 =

 On Fri, Jul 18, 2008 at 9:04 AM, Matthew Pettis
 [EMAIL PROTECTED] wrote:
 Replied to your previous one -- I will try again tonight with your
 suggestion and update the list with the results  -- Thanks again!

 Matt

 On Fri, Jul 18, 2008 at 8:54 AM, Daniel Morissette
 [EMAIL PROTECTED] wrote:
 As I wrote in a previous message, is it possible that you configured using
 --with-gd=/usr/lib? You should use --with-gd=/usr only and the configure
 script should take care of looking in the right subdirectory for each file.

 Daniel

 Matthew Pettis wrote:

 Hi,

 More and different compiling issues from the one I've already
 posted... My configure script errors as shown below (truncated because
 I believe the most important part is included):

 --
 configure: checking where libiconv is installed...
 checking for iconv_open in -lc... yes
 checking for libiconv_open in -liconv... yes
using libiconv from -L -liconv
libiconv found. Enabling internationalization (-DUSE_ICONV)
 configure: checking for GD 2.0.16 or higher...
 checking for gdFontCacheSetup in -lgd... no
 configure: checking whether GD needs libiconv...