Re: [mapserver-users] queryByAttributes on PostGIS-Layer

2008-05-28 Thread schroeter

Found the problem (thanks to Nicol ;-)
Code:
@$myQuery = $layer->queryByAttributes('nr_','7', MS_SINGLE);

must be changed to:
@$myQuery = $layer->queryByAttributes('nr_','nr_=7', MS_SINGLE);

Is this a bug?

Sven


- Original Message - 
From: <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, May 28, 2008 12:48 PM
Subject: [mapserver-users] queryByAttributes on PostGIS-Layer



Hallo list,

My test-system: Mapserver 5.02 on WinXP and postgreSQL 8.2
I try to make some querys via php-mapscript for a postgis-layer:
queryByPoint,queryByShape and queryByRect is no problem.
queryByAttributes always return "no result" (field 'nr_' is an integer)
If I use a shapefile for the same data (biogasanlagen.shp) 
queryByAttributes works fine.


mapfile:
...
LAYER
 NAME "biogasanlagen"
 TYPE point
 STATUS on
 CONNECTIONTYPE postgis
 CONNECTION "user=postgres password=xyz dbname=mydb host=localhost 
port=5432"

 DATA "the_geom from biogasanlagen using unique gid"
 #DATA biogasanlagen.shp
 TEMPLATE void
   CLASS
Name "biogasanlagen"
OUTLINECOLOR 128 70 0
   COLOR 230 70 0
   SYMBOL 'circle'
 SIZE 12
END  # CLASS
 TRANSPARENCY 88
 TOLERANCE 8
END
...

php-Code:

...
$layer = $map->getLayerByName("biogasanlagen");
@$myQuery = $layer->queryByAttributes('nr_','7', MS_SINGLE);
...

any idea?

Thanks Sven

___
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] CGI variable substitution

2008-05-28 Thread Paul Spencer
Not sure if this is related, but I am surprised that your example  
works because you have not escaped the = in your pfilter.  I would  
have expected that pfilter would have been cut off just before  
client_id and you would have a new variable called client_id=70))


Paul

On 28-May-08, at 9:51 PM, Stephen Davies wrote:

I have been using variable substitution for ages without any  
problems at all

but now need to make a change to add a new variable.

I just cannot make it work.
Presumably, I am doing something stupid but I cannot see what.
Can anybody please help.

My URL looks like this:
http://www.agua.com.au/benparts/map.html?map=/tmp/11_70.map&client=70&mapext=140.5261724+-36.7067416+140.5485957+-36.6984975
&mre=-1296538.11+-4230140.65+62672.87+-2872042.86&pfilter=pid+in+ 
(select+probe.id+from+probe+where+logger_id+in+(select+id+from+logger 
+where+client_id=70))


(plus a deal more filter definitions).

My map file looks like this:

   LAYER
 CONNECTIONTYPE postgis
 NAME "probe"
 DATA "geom from atp using unique id using SRID=4283"
 CONNECTION "user=scldad dbname=benparts"
 PROCESSING  "CLOSE_CONNECTION=DEFER"
 STATUS ON
 TYPE POINT
 FILTER  (%pfilter%)
 PROJECTION
   "init=epsg:4283"
 END
 MAXSCALE 500
 LABELITEM "temp"
 CLASS
   NAME   "Air Temp (Right Click to select)"
   STYLE
 COLOR255 255 0
 SYMBOL 'circle'
 SIZE 7
   END
   LABEL
 MINDISTANCE 15
 POSITION CR
 SIZE SMALL
 BACKGROUNDCOLOR  0 0 0
 COLOR  255 255 0
 FORCE TRUE
   END
 END
   END

This works as I expect.

I now want to add a new filter by adding:

&ffilter=blah_blah to the URL

and a new layer with the same syntax as above (but with the new  
filter) to the

map file.

Despite trying a number of variations on the theme, my PostgreSQL  
log still
shows a generated command that included %ffilter% instead of the  
substitution

value.

TIA,
Stephen Davies
--
= 
= 
==
This email is for the person(s) identified above, and is  
confidential to

the sender and the person(s).  No one else is authorised to use or
disseminate this email or its contents.

Stephen Davies ConsultingVoice: 08-8177  
1595
Adelaide, South Australia. Fax: 08-8177  
0133
Computing & Network solutions.   Mobile:0403  
0405 83

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



__

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

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


Re: [mapserver-users] CGI variable substitution

2008-05-28 Thread Stephen Davies
Nope. pfilter works fine and the = goes through without issue.

Stephen

On Thursday 29 May 2008 11:44:04 Paul Spencer wrote:
> Not sure if this is related, but I am surprised that your example
> works because you have not escaped the = in your pfilter.  I would
> have expected that pfilter would have been cut off just before
> client_id and you would have a new variable called client_id=70))
>
> Paul
>
> On 28-May-08, at 9:51 PM, Stephen Davies wrote:
> > I have been using variable substitution for ages without any
> > problems at all
> > but now need to make a change to add a new variable.
> >
> > I just cannot make it work.
> > Presumably, I am doing something stupid but I cannot see what.
> > Can anybody please help.
> >
> > My URL looks like this:
> > http://www.agua.com.au/benparts/map.html?map=/tmp/11_70.map&client=70&map
> >ext=140.5261724+-36.7067416+140.5485957+-36.6984975
> > &mre=-1296538.11+-4230140.65+62672.87+-2872042.86&pfilter=pid+in+
> > (select+probe.id+from+probe+where+logger_id+in+(select+id+from+logger
> > +where+client_id=70))
> >
> > (plus a deal more filter definitions).
> >
> > My map file looks like this:
> >
> >LAYER
> >  CONNECTIONTYPE postgis
> >  NAME "probe"
> >  DATA "geom from atp using unique id using SRID=4283"
> >  CONNECTION "user=scldad dbname=benparts"
> >  PROCESSING  "CLOSE_CONNECTION=DEFER"
> >  STATUS ON
> >  TYPE POINT
> >  FILTER  (%pfilter%)
> >  PROJECTION
> >"init=epsg:4283"
> >  END
> >  MAXSCALE 500
> >  LABELITEM "temp"
> >  CLASS
> >NAME   "Air Temp (Right Click to select)"
> >STYLE
> >  COLOR255 255 0
> >  SYMBOL 'circle'
> >  SIZE 7
> >END
> >LABEL
> >  MINDISTANCE 15
> >  POSITION CR
> >  SIZE SMALL
> >  BACKGROUNDCOLOR  0 0 0
> >  COLOR  255 255 0
> >  FORCE TRUE
> >END
> >  END
> >END
> >
> > This works as I expect.
> >
> > I now want to add a new filter by adding:
> >
> > &ffilter=blah_blah to the URL
> >
> > and a new layer with the same syntax as above (but with the new
> > filter) to the
> > map file.
> >
> > Despite trying a number of variations on the theme, my PostgreSQL
> > log still
> > shows a generated command that included %ffilter% instead of the
> > substitution
> > value.
> >
> > TIA,
> > Stephen Davies
> > --
> > =
> > =
> > ==
> > This email is for the person(s) identified above, and is
> > confidential to
> > the sender and the person(s).  No one else is authorised to use or
> > disseminate this email or its contents.
> >
> > Stephen Davies ConsultingVoice: 08-8177
> > 1595
> > Adelaide, South Australia. Fax: 08-8177
> > 0133
> > Computing & Network solutions.   Mobile:0403
> > 0405 83
> > ___
> > 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/



-- 

This email is for the person(s) identified above, and is confidential to
the sender and the person(s).  No one else is authorised to use or
disseminate this email or its contents.

Stephen Davies ConsultingVoice: 08-8177 1595
Adelaide, South Australia. Fax: 08-8177 0133
Computing & Network solutions.   Mobile:0403 0405 83
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] CGI variable substitution

2008-05-28 Thread Stephen Davies
I have been using variable substitution for ages without any problems at all 
but now need to make a change to add a new variable.

I just cannot make it work.
Presumably, I am doing something stupid but I cannot see what.
Can anybody please help.

My URL looks like this:
http://www.agua.com.au/benparts/map.html?map=/tmp/11_70.map&client=70&mapext=140.5261724+-36.7067416+140.5485957+-36.6984975
&mre=-1296538.11+-4230140.65+62672.87+-2872042.86&pfilter=pid+in+(select+probe.id+from+probe+where+logger_id+in+(select+id+from+logger+where+client_id=70))

(plus a deal more filter definitions).

My map file looks like this:

LAYER
  CONNECTIONTYPE postgis
  NAME "probe"
  DATA "geom from atp using unique id using SRID=4283"
  CONNECTION "user=scldad dbname=benparts"
  PROCESSING  "CLOSE_CONNECTION=DEFER"
  STATUS ON
  TYPE POINT
  FILTER  (%pfilter%)
  PROJECTION
"init=epsg:4283"
  END
  MAXSCALE 500
  LABELITEM "temp"
  CLASS
NAME   "Air Temp (Right Click to select)"
STYLE
  COLOR255 255 0
  SYMBOL 'circle'
  SIZE 7
END
LABEL
  MINDISTANCE 15
  POSITION CR
  SIZE SMALL
  BACKGROUNDCOLOR  0 0 0
  COLOR  255 255 0
  FORCE TRUE
END
  END
END

This works as I expect.

I now want to add a new filter by adding:

&ffilter=blah_blah to the URL

and a new layer with the same syntax as above (but with the new filter) to the 
map file.

Despite trying a number of variations on the theme, my PostgreSQL log still 
shows a generated command that included %ffilter% instead of the substitution 
value.

TIA,
Stephen Davies
-- 

This email is for the person(s) identified above, and is confidential to
the sender and the person(s).  No one else is authorised to use or
disseminate this email or its contents.

Stephen Davies ConsultingVoice: 08-8177 1595
Adelaide, South Australia. Fax: 08-8177 0133
Computing & Network solutions.   Mobile:0403 0405 83
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] bgd_i.lib?

2008-05-28 Thread Rob McCulley
Hi All,

 

I'm trying to compile MapServer 5.0.2 on windows XP using MSVC 7.1 and
the MapServer buildkit.  The buildkit includes the source for GD-2.0.35,
which is the latest stable release of GD.  I followed the instructions
to build GD from the readme, and successfully built GD, but it doesn't
build a bgd_i.lib file. There is a bgd_a.lib and a bgd.lib file though.
I've tried pointing the MapServer nmake.opt file at both of those files,
but it always fails to build due to unresolved external symbols, all
related to GD.

 

Where do I get the bgd_i.lib file from?

 

Thanks,

Rob McCulley

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


RE: [mapserver-users] How use the LABELANGLEITEM

2008-05-28 Thread Fawcett, David
Francisco, 

Bitmap labels cannot be rotated.  To achieve rotation, you will have to use 
TrueType labels.

David.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francisco
Sent: Wednesday, May 28, 2008 1:34 PM
To: [EMAIL PROTECTED]
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] How use the LABELANGLEITEM


Hi Dean, this is my Layer definition
I put the ANGLE FOLLOW, but without change in label map, then put ANGLE AUTO 
but Neither I had aftermath desired

This  is my layer definition for a road layer  What´s wrong?

**

*
*
LAYER
NAME "Calles"
GROUP "Mapa"
STATUS on
CONNECTIONTYPE POSTGIS
CONNECTION "dbname=salud user=salud password=salud host=localhost" DATA 
"the_geom from calles" TYPE LINE TOLERANCE 3 CLASSITEM "name" LABELITEM "name" 
LABELMAXSCALE 1250 CLASS EXPRESSION /./ LABEL ANGLE AUTO SHADOWCOLOR 218 218 
218 SHADOWSIZE 2 2 TYPE BITMAP SIZE GIANT POSITION CC PARTIALS FALSE BUFFER 2 
END CLASS NAME "Calles" TEMPLATE "query.phtml" STYLE OUTLINECOLOR 0 0 0 MINSIZE 
1 MAXSIZE 100 END END END

Francisco Salas

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Francisco" <[EMAIL PROTECTED]>
Cc: 
Sent: Wednesday, May 28, 2008 12:08 PM
Subject: RE: [mapserver-users] How use the LABELANGLEITEM


> Hi Francisco,
>
> To have road labels follow the angle of the road you do not need to 
> use
> labelangleitem. In the label object simply use ANGLE FOLLOW and labels 
> will follow the angle of the road features.
>
> Dean Gadoury
> subpixelmedia.com
>
>>  Original Message 
>> Subject: [mapserver-users] How use the LABELANGLEITEM
>> From: "Francisco" <[EMAIL PROTECTED]>
>> Date: Wed, May 28, 2008 8:11 am
>> To: 
>>
>> Hi, i need to visualize the road label that follow the line angle 
>> It's possible best regards Francisco Salas
>>
>> ___
>> Este mensaje esta libre de virus.
>> Revisado por Kaspersky Antivirus
>> Engine version:  4.0.1.14
>> Engine date:  2002/06/25
>> Definition count:  712871
>> Definition date:  2008/05/24
>> MDAV version: 2.2.9
>>
>> Dpto de Sistemas Informáticos
>> Oficina Central Grupo Empresarial GEOCUBA
>>
>>
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org 
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


___
Este mensaje esta libre de virus. 
Revisado por Kaspersky Antivirus
Engine version:  4.0.1.14
Engine date:  2002/06/25
Definition count:  712871
Definition date:  2008/05/24
MDAV version: 2.2.9

Dpto de Sistemas Informáticos
Oficina Central Grupo Empresarial GEOCUBA


___
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] Why isn't this SLD working?

2008-05-28 Thread Gregor Mosheh

Yewondwossen Assefa wrote:

 Could it be related to the imagepath and/or imageurl not set properly


Agh! Yeah; that was it. They keep deleting their temp directory.
Thanks for pointing it out, Yew!


--
Gregor Mosheh / Greg Allensworth, BS, A+
System Administrator
HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
 only if you can restore." - AMANDA
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [MAPSERVER-USERS] Displaying population density with Mapserver

2008-05-28 Thread Fawcett, David
Faldor, 

When you have point coordinates stored in a text file, there really is
no way to encode/attach the projection definition.  Even if you could,
it doesn't sound like you really know what spatial reference system
(SRS) or projection that it is in.  The key to projecting to another SRS
or translating ground units to another measure (from degrees to meters)
is knowing what the current SRS of the data is.  

Since your data is worldwide and it is unprojected (lat/lon), a good
first guess would be to assume that it is unprojected with using the
WGS84.  

Try defining your layer projection by including this block in your layer
definition.

PROJECTION
   "init=epsg:4326"
END

David.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Pierre-Benoit Besse
Sent: Wednesday, May 28, 2008 4:11 AM
To: Fawcett, David
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [MAPSERVER-USERS] Displaying population density with
Mapserver


Well, I confess, I'm new to GIS applications and I do not know a lot
about projections.
I understand I have to tell MapServer what is the projection of each
layer I use in the mapfile, but using ogrinfo on my shapefiles tells me
that :

Layer name: pop_density
Geometry: Point
Feature Count: 249937
Extent: (-180.00, -56.00) - (179.75, 83.50)
Layer SRS WKT:
(unknown)
latitude: Real (24.15)
longitude: Real (24.15)
densite: Real (24.15)

I generated this shapefile from a CSV file with 3 columns : latitude,
longitude, density_value.
Did I have to define a projection then ? How do I do that ?

Best regards,

Faldor


2008/5/27 Fawcett, David <[EMAIL PROTECTED]>:

Have you defined an output projection for your map and input projections
for each of your layers?  It is likely that MapServer needs to know what
the input projection/SRS is before it can translate to different units.

David.
-Original Message-
From: Pierre-Benoit Besse [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 27, 2008 11:26 AM
To: Fawcett, David
Cc: Ritesh Ambastha; mapserver-users@lists.osgeo.org
Subject: Re: [MAPSERVER-USERS] Displaying population density with
Mapserver


Ha, well, I prefer that :) I would need a lot of layer definitions to
obtain something ok...

But I just tried the "ground units" stuff, I tried with a 50 kilometers
wide square and it drew squares the size of ASIA !! oO
I had to define a 1 feet wide square to obtain something more or less
ok...
Does anybody know why ?

Aside from that It seems to work, thank you !

I will try the scalesymbol stuff tomorrow.

Regards



2008/5/27 Fawcett, David <[EMAIL PROTECTED]>:

Before you create lots of different layers to simulate symbol scaling,
you may want to try something else.  It has been a long time since I
have played with scaled symbols, but give it a try.

You should be able to scale the symbols by setting a SYMBOLSCALE in the
LAYER object.  This is the scale at which you want the symbol to appear
at the SIZE stated in the map file.

You may want to modify STYLE MAXSIZE if you think that you will want
your symbols to be larger than 50 pixels.

Another completely different approach that just came to my mind would be
to use ground units (e.g. meters) to set the size of your symbol.  To do
this, set LAYER SIZEUNITS to meters.  Calculate the size of a symbol in
meters on the ground that will touch adjacent symbols, or give you the
desired amount of space between the symbols.  That way, the symbols
should scale consistently.

David.


-Original Message-
From: [EMAIL PROTECTED]

[mailto:[EMAIL PROTECTED] On Behalf Of Ritesh
Ambastha
Sent: Tuesday, May 27, 2008 10:16 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [MAPSERVER-USERS] Displaying population density with
Mapserver



Dear Faldor,

Robert is absolutely right. You will have to make different LAYERS for
the same POINT layer. But, define MAX/MINSCALE for each Layer. Change
STYLE -> SIZE values in each of the layer. You are done !!

Cheers !
Ambastha


Faldor wrote:
>
> Yes, but I need them to adapt for different extents.
>
> For example, When I zoom out enough to see the world, I need them 1
> pixel wide (it's ugly otherwise), but when I zoom in I will need then
> 2 or 5 or even 30 pixels wide to cover all space.
>
> 2008/5/27 Ritesh Ambastha <[EMAIL PROTECTED]>:
>
>>
>> Dear Faldor,
>>
>> What I need is to have the points grow to cover all space
>> available when I zoom in.
>>
>> Do you mean that the size of points should grow? It can be done
>> easily by setting proper SIZE in the STYLE tag.
>>
>>
>> Regards,
>> Ambastha
>>
>>
>>
>> Faldor wrote:
>> >
>> > Hi,
>> >
>> > Sorry for my first empty message.
>> >
>> > My problem is, I need to display population density with Mapserver.

>> > The data comes from GPWv3 and has a resolution of 15'. I converted
>> > it to a POINT Shapefile using ogr2ogr.
>> >
>> > At first when I display it on a world map it shows nicely. But when

>> > I
>> zoom
>> > in it begins to show separated points for e

Re: [mapserver-users] Why isn't this SLD working?

2008-05-28 Thread Yewondwossen Assefa

Gregor,

 Could it be related to the imagepath and/or imageurl not set properly 
(please see thread at 
http://lists.osgeo.org/pipermail/mapserver-users/2008-April/055299.html 
and bug http://trac.osgeo.org/mapserver/ticket/2573)


Best Regards,

Gregor Mosheh wrote:

Hey hey. Any thoughts on this?

As far as I can tell, the SLD is proper and the URL is proper for using 
that SLD. I have verified that from "within" the server I can wget the 
gm.xml file, so I know it's in fact accessible. So why isn't the SLD 
being applied?


http://www.cambodiaatlas.com/cgi-bin/mapserv?map=/var/www/mango-v1.0.0/Track/track.map&service=WMS&version=1.1.1&request=GetMap&transparent=true&styles=&format=image/png&srs=EPSG:32648&width=500&height=500&bbox=102.06899309916874,10.13684987316996,107.89237806590529,14.907098809695391&SLD=http://www.cambodiaatlas.com/track/gm.xml&layers=dn_pol_clip 



http://www.cambodiaatlas.com/track/gm.xml




--

Assefa Yewondwossen
Software Analyst

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

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


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


[mapserver-users] Why isn't this SLD working?

2008-05-28 Thread Gregor Mosheh

Hey hey. Any thoughts on this?

As far as I can tell, the SLD is proper and the URL is proper for using 
that SLD. I have verified that from "within" the server I can wget the 
gm.xml file, so I know it's in fact accessible. So why isn't the SLD 
being applied?


http://www.cambodiaatlas.com/cgi-bin/mapserv?map=/var/www/mango-v1.0.0/Track/track.map&service=WMS&version=1.1.1&request=GetMap&transparent=true&styles=&format=image/png&srs=EPSG:32648&width=500&height=500&bbox=102.06899309916874,10.13684987316996,107.89237806590529,14.907098809695391&SLD=http://www.cambodiaatlas.com/track/gm.xml&layers=dn_pol_clip

http://www.cambodiaatlas.com/track/gm.xml

--
Gregor Mosheh / Greg Allensworth, BS, A+
System Administrator
HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
 only if you can restore." - AMANDA
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] How use the LABELANGLEITEM

2008-05-28 Thread Francisco

Hi Dean, this is my Layer definition
I put the ANGLE FOLLOW, but without change in label map, then put ANGLE AUTO 
but Neither I had aftermath desired


This  is my layer definition for a road layer  What´s wrong?

**

*
*
LAYER
NAME "Calles"
GROUP "Mapa"
STATUS on
CONNECTIONTYPE POSTGIS
CONNECTION "dbname=salud user=salud password=salud host=localhost"
DATA "the_geom from calles"
TYPE LINE
TOLERANCE 3
CLASSITEM "name"
LABELITEM "name"
LABELMAXSCALE 1250
CLASS
EXPRESSION /./
LABEL
ANGLE AUTO
SHADOWCOLOR 218 218 218
SHADOWSIZE 2 2
TYPE BITMAP
SIZE GIANT
POSITION CC
PARTIALS FALSE
BUFFER 2
END
CLASS
NAME "Calles"
TEMPLATE "query.phtml"
STYLE
OUTLINECOLOR 0 0 0
MINSIZE 1
MAXSIZE 100
END
END
END

Francisco Salas

- Original Message - 
From: <[EMAIL PROTECTED]>

To: "Francisco" <[EMAIL PROTECTED]>
Cc: 
Sent: Wednesday, May 28, 2008 12:08 PM
Subject: RE: [mapserver-users] How use the LABELANGLEITEM



Hi Francisco,

To have road labels follow the angle of the road you do not need to use 
labelangleitem. In the label object simply use ANGLE FOLLOW and labels 
will follow the angle of the road features.


Dean Gadoury
subpixelmedia.com


 Original Message 
Subject: [mapserver-users] How use the LABELANGLEITEM
From: "Francisco" <[EMAIL PROTECTED]>
Date: Wed, May 28, 2008 8:11 am
To: 

Hi, i need to visualize the road label that follow the line angle
It's possible
best regards Francisco Salas

___
Este mensaje esta libre de virus.
Revisado por Kaspersky Antivirus
Engine version:  4.0.1.14
Engine date:  2002/06/25
Definition count:  712871
Definition date:  2008/05/24
MDAV version: 2.2.9

Dpto de Sistemas Informáticos
Oficina Central Grupo Empresarial GEOCUBA


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





___
Este mensaje esta libre de virus. 
Revisado por Kaspersky Antivirus

Engine version:  4.0.1.14
Engine date:  2002/06/25
Definition count:  712871
Definition date:  2008/05/24
MDAV version: 2.2.9

Dpto de Sistemas Informáticos
Oficina Central Grupo Empresarial GEOCUBA


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


RE: [mapserver-users] How use the LABELANGLEITEM

2008-05-28 Thread Wim Blanken
Hi Francisco,

Which version of mapserver are you using?
I use Mapserver 5 and beneath is the definition of my road labelling.

  LAYER  #Wegen
NAME Wegenlabels
DATA 'algemeen/wegen_land'
STATUS ON
TYPE line
MAXSCALE 1
CLASS
LABEL
 MINFEATURESIZE 200
 SIZE 7
 TYPE TRUETYPE
 ANTIALIAS true
 FONT vera
 ANGLE FOLLOW
 POSITION AUTO
 OFFSET 0 0
 OUTLINECOLOR 255 255 255 
 COLOR 0 0 0 #255 255 255
 BUFFER 5
END #label
END #CLASS
LABELITEM "STRAATNAAM"
  END  # LAYER


Best Regards,

Wim Blanken
The Netherlands



-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Francisco
Verzonden: Wednesday, May 28, 2008 5:12 PM
Aan: mapserver-users@lists.osgeo.org
Onderwerp: [mapserver-users] How use the LABELANGLEITEM

Hi, i need to visualize the road label that follow the line angle
It's possible 
best regards Francisco Salas 

___
Este mensaje esta libre de virus. 
Revisado por Kaspersky Antivirus
Engine version:  4.0.1.14
Engine date:  2002/06/25
Definition count:  712871
Definition date:  2008/05/24
MDAV version: 2.2.9

Dpto de Sistemas Informáticos
Oficina Central Grupo Empresarial GEOCUBA


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



-- 
No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.24.1/1470 - Release Date: 28-5-2008
7:20

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


Re: [mapserver-users] International characters in text paramater

2008-05-28 Thread Frode Wiseth Jørgensen
Hi Espen

Try this:

TEXT "Lysløype"



FrodeWJ




2008/5/28 Espen Isaksen <[EMAIL PROTECTED]>:

> Hi!
>
> Tried to find a answer to this but was unable to. I am trying to use
> Norwegian characters in the text parameter in the class object. I set
> "Text (Lysløype)" in the map file but this does not work. How can I do
> this correctly? Example follows:
>
>
> LAYER   # Lysloype
>NAME Lysloype
>TYPE line
>STATUS default
>DATA bygg/lysloype
>MAXSCALE 2
>TRANSPARENCY 80
>LABELMAXSCALE 2000
>CLASS
>STYLE
>COLOR 255 255 0 # Gul farge.
>SYMBOL "point_line"
>SIZE 4
>END
>
>STYLE
>COLOR 255 255 0 # Gul farge.
>SYMBOL "normal_line"
>SIZE 1
>END
>
>TEXT (Lysløpe)
>
>LABEL
>SIZE 7
>COLOR 255 255 255
>OUTLINECOLOR 100 100 100
>ANGLE follow
>POSITION cc
>TYPE truetype
>FONT Verdana_bold
>MINDISTANCE 100
>PARTIALS false
>END
>END
>END
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
Frode Wiseth Jørgensen
+47 99 03 41 42
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] How use the LABELANGLEITEM

2008-05-28 Thread deangadoury
Hi Francisco,

To have road labels follow the angle of the road you do not need to use 
labelangleitem. In the label object simply use ANGLE FOLLOW and labels will 
follow the angle of the road features.

Dean Gadoury
subpixelmedia.com

>  Original Message 
> Subject: [mapserver-users] How use the LABELANGLEITEM
> From: "Francisco" <[EMAIL PROTECTED]>
> Date: Wed, May 28, 2008 8:11 am
> To: 
> 
> Hi, i need to visualize the road label that follow the line angle
> It's possible 
> best regards Francisco Salas 
> 
> ___
> Este mensaje esta libre de virus. 
> Revisado por Kaspersky Antivirus
> Engine version:  4.0.1.14
> Engine date:  2002/06/25
> Definition count:  712871
> Definition date:  2008/05/24
> MDAV version: 2.2.9
> 
> Dpto de Sistemas Informáticos
> Oficina Central Grupo Empresarial GEOCUBA
> 
> 
> ___
> 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] How use the LABELANGLEITEM

2008-05-28 Thread Francisco

Hi, i need to visualize the road label that follow the line angle
It's possible 
best regards Francisco Salas 


___
Este mensaje esta libre de virus. 
Revisado por Kaspersky Antivirus

Engine version:  4.0.1.14
Engine date:  2002/06/25
Definition count:  712871
Definition date:  2008/05/24
MDAV version: 2.2.9

Dpto de Sistemas Informáticos
Oficina Central Grupo Empresarial GEOCUBA


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


Re: [mapserver-users] Replacing EMPTY parameter by CGI

2008-05-28 Thread Steve Lime
Probably not.

>>> "Paul Ramsey" <[EMAIL PROTECTED]> 05/27/08 5:08 PM >>>
Any reason not to patch 5.0?

P

On Tue, May 27, 2008 at 3:05 PM, Steve Lime <[EMAIL PROTECTED]> wrote:
> That's what's going on. If you file a quick bug I'll make sure that gets 
> fixed in 5.2 which should be out relatively soon. BTW The
> fix is to change line 164 in maplexer.l from:
>
> empty...
>
> to:
>
> empty...
>
> Steve
>
 On 5/27/2008 at 5:48 AM, in message
> <[EMAIL PROTECTED]>, "Wim Blanken"
> <[EMAIL PROTECTED]> wrote:
>> Hello List!,
>>
>> I'm having a problem with mapserver 5. In my former application using 4.x I
>> was able to change the EMPTY Path in my application using the:
>>
>> &map_web_empty=path
>>
>> variable through CGI.
>>
>> I have changed this to the new method: &map_web=EMPTY+path
>>
>> Mapserver gives me an error: loadWeb(): Unknown identifier. Parsing error
>> near (EMPTY):(line 1)
>>
>> I can change the HEADER template etc. using the same method
>> (map_web=HEADER+path) but the empty parameter cannot be changed.
>>
>> Is it no longer possible to change the empty template through CGI with
>> mapserver 5?
>>
>> Regards,
>>
>> Wim Blanken
>> The Netherlands
>>
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>

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


[mapserver-users] International characters in text paramater

2008-05-28 Thread Espen Isaksen
Hi!

Tried to find a answer to this but was unable to. I am trying to use
Norwegian characters in the text parameter in the class object. I set
"Text (Lysløype)" in the map file but this does not work. How can I do
this correctly? Example follows:


LAYER   # Lysloype
NAME Lysloype
TYPE line
STATUS default
DATA bygg/lysloype
MAXSCALE 2
TRANSPARENCY 80
LABELMAXSCALE 2000
CLASS
STYLE
COLOR 255 255 0 # Gul farge.
SYMBOL "point_line"
SIZE 4
END

STYLE
COLOR 255 255 0 # Gul farge.
SYMBOL "normal_line"
SIZE 1
END

TEXT (Lysløpe)

LABEL
SIZE 7
COLOR 255 255 255
OUTLINECOLOR 100 100 100
ANGLE follow
POSITION cc
TYPE truetype
FONT Verdana_bold
MINDISTANCE 100
PARTIALS false
END 
END
END
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] geotiff raster optimization

2008-05-28 Thread Javier Infante
Hi List!

First of all, i would like to tell I'm a newbie with these issues, and
hardy understand everysingle concept involving geo-references and
projections and stuff like that. I have been using mapserver for about a
month, but right now i'm stuck with some optimization issues i am about
to explain.

I'm building a map based in images i generate from scratch. Let's say i
have one picture per country. Those pictures are based in a huge png
file 1x14660 pixels. So lets say i have my own projection system.

I have isolated every single country in the world in its own image file,
and i have managed to get the xmin, xmax ymin ymax coords for every
country.

The size of each country depends on a few concepts which would be long
to explain... but every country will have a different size. Alltought
mapserver manages that correctly. Here's an example of a file * in my
png images directory:

TR.png:  PNG image data, 1200 x 400, 8-bit colormap, non-interlaced
TT.png:  PNG image data, 1400 x 1400, 8-bit colormap, non-interlaced
TW.png:  PNG image data, 1200 x 1000, 8-bit colormap, non-interlaced
TZ.png:  PNG image data, 800 x 800, 8-bit colormap, non-interlaced
UA.png:  PNG image data, 1000 x 600, 8-bit colormap, non-interlaced
UG.png:  PNG image data, 400 x 400, 8-bit colormap, non-interlaced
US.png:  PNG image data, 5800 x 3800, 8-bit colormap, non-interlaced
UY.png:  PNG image data, 400 x 400, 8-bit colormap, non-interlaced
UZ.png:  PNG image data, 2400 x 1400, 8-bit colormap, non-interlaced
(so you got the idea right?)
The total size of the pngs is 50 MB (but expected to be much bigger).

So for every image of each country i do this procedure:

[*] pngquant, so i downsample my PHP-GD generated 24 RGB PNGs to 8
colormaps with a real acceptable quality.
(i have had some trouble with the color i used as a background (and
later defined as OFFSITE), because pngquant changed it. pure white
(#FFF) seems to work fine later).
I think this step is useless, because later, i make mapserver generate
the image as a jpeg... or it isn't??

[*] gdal_translate -of GTIFF -co TILED=YES -a_ullr xmin ymax ymin xmax
my.png new.tiff
which from what i have understood, uncompress all the image data (nice
to mapserver) and also puts those extend variables inside the image
file.
 
[*] gdaladdo -r nearest file.tiff 2 4 8 16 32 64 128 1000
which i think puts "thumbnails" of the huge picture, inside it. So
mapserver access to less amount of data when the zoom is not far enough.


Then, with all my tiff files, i run the following command:
gdaltindex world.shp *tiff

which generates world.shx world.shp and world.dbf.

The size of all the generated tiffs is around 500MB (which is not much
for mapserver right?)


my .map file looks like this:

MAP
NAME "World"
SIZE 750 550
IMAGECOLOR 83 83 83
IMAGETYPE png24
EXTENT -1 -7330 1 7330
OUTPUTFORMAT
NAME png24
DRIVER "GD/PNG24"
MIMETYPE "image/png"
IMAGEMODE RGB
EXTENSION "png"
END
LAYER
STATUS DEFAULT
TYPE RASTER
NAME "MUNDO"
TILEINDEX "world.shp"
OFFSITE 255 255 255
END
END

As a frontend I use openlayers, so I actually think the imagetype and
output format get overwritten by the openlayers software, which adds to
every request to the cgi the imagetype=png variable, so I'm pretty sure
the images that are generated by mapserver, are jpegs (smaller size than
png and png24, and really acceptable quality).


The main problem of the system is performance. It takes about 40 secs to
generate the first level of zoom in the openlayers front-end (and about
the same time, every time you zoom in).

If it's usefull, i have compiled a 5.0.2 version of mapserver with this
configure options:
./configure --with-gdal  --with-fastcgi --with-png12 --with-gd

I have develped a cache system (PHP based), which simply acts as a proxy
for mapserver. I guess i could use tilecache or geowebcache... but the
idea of the system, is to be running permanently: every country will be
regenerated with a new picture every few minutes (so i guess a cache
system woudln't do the trick...).

So thanks for reading this far, and i would really appreciate if someone
could give me some light.

thank you for reading this far ;)

-- 
Javier Infante <[EMAIL PROTECTED]>
Irontec

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


[mapserver-users] queryByAttributes on PostGIS-Layer

2008-05-28 Thread schroeter

Hallo list,

My test-system: Mapserver 5.02 on WinXP and postgreSQL 8.2
I try to make some querys via php-mapscript for a postgis-layer:
queryByPoint,queryByShape and queryByRect is no problem.
queryByAttributes always return "no result" (field 'nr_' is an integer)
If I use a shapefile for the same data (biogasanlagen.shp) queryByAttributes 
works fine.


mapfile:
...
LAYER
 NAME "biogasanlagen"
 TYPE point
 STATUS on
 CONNECTIONTYPE postgis
 CONNECTION "user=postgres password=xyz dbname=mydb host=localhost 
port=5432"

 DATA "the_geom from biogasanlagen using unique gid"
 #DATA biogasanlagen.shp
 TEMPLATE void
   CLASS
Name "biogasanlagen"
OUTLINECOLOR 128 70 0
   COLOR 230 70 0
   SYMBOL 'circle'
 SIZE 12
END  # CLASS
 TRANSPARENCY 88
 TOLERANCE 8
END
...

php-Code:

...
$layer = $map->getLayerByName("biogasanlagen");
@$myQuery = $layer->queryByAttributes('nr_','7', MS_SINGLE);
...

any idea?

Thanks Sven 



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


Re: [MAPSERVER-USERS] Displaying population density with Mapserver

2008-05-28 Thread Pierre-Benoit Besse
Well, I confess, I'm new to GIS applications and I do not know a lot about
projections.
I understand I have to tell MapServer what is the projection of each layer I
use in the mapfile, but using ogrinfo on my shapefiles tells me that :

Layer name: pop_density
Geometry: Point
Feature Count: 249937
Extent: (-180.00, -56.00) - (179.75, 83.50)
*Layer SRS WKT:
(unknown)*
latitude: Real (24.15)
longitude: Real (24.15)
densite: Real (24.15)

I generated this shapefile from a CSV file with 3 columns : latitude,
longitude, density_value.
Did I have to define a projection then ? How do I do that ?

Best regards,

Faldor

2008/5/27 Fawcett, David <[EMAIL PROTECTED]>:

>  Have you defined an output projection for your map and input projections
> for each of your layers?  It is likely that MapServer needs to know what the
> input projection/SRS is before it can translate to different units.
>
> David.
>
>  -Original Message-
> *From:* Pierre-Benoit Besse [mailto:[EMAIL PROTECTED]
> *Sent:* Tuesday, May 27, 2008 11:26 AM
> *To:* Fawcett, David
> *Cc:* Ritesh Ambastha; mapserver-users@lists.osgeo.org
> *Subject:* Re: [MAPSERVER-USERS] Displaying population density with
> Mapserver
>
> Ha, well, I prefer that :) I would need a lot of layer definitions to
> obtain something ok...
>
> But I just tried the "ground units" stuff, I tried with a 50 kilometers
> wide square and it drew squares the size of ASIA !! oO
> I had to define a 1 feet wide square to obtain something more or less ok...
> Does anybody know why ?
>
> Aside from that It seems to work, thank you !
>
> I will try the scalesymbol stuff tomorrow.
>
> Regards
>
>
> 2008/5/27 Fawcett, David <[EMAIL PROTECTED]>:
>
>> Before you create lots of different layers to simulate symbol scaling,
>> you may want to try something else.  It has been a long time since I
>> have played with scaled symbols, but give it a try.
>>
>> You should be able to scale the symbols by setting a SYMBOLSCALE in the
>> LAYER object.  This is the scale at which you want the symbol to appear
>> at the SIZE stated in the map file.
>>
>> You may want to modify STYLE MAXSIZE if you think that you will want
>> your symbols to be larger than 50 pixels.
>>
>> Another completely different approach that just came to my mind would be
>> to use ground units (e.g. meters) to set the size of your symbol.  To do
>> this, set LAYER SIZEUNITS to meters.  Calculate the size of a symbol in
>> meters on the ground that will touch adjacent symbols, or give you the
>> desired amount of space between the symbols.  That way, the symbols
>> should scale consistently.
>>
>> David.
>>
>> -Original Message-
>> From: [EMAIL PROTECTED]
>>  [mailto:[EMAIL PROTECTED] On Behalf Of Ritesh
>> Ambastha
>> Sent: Tuesday, May 27, 2008 10:16 AM
>> To: mapserver-users@lists.osgeo.org
>> Subject: Re: [MAPSERVER-USERS] Displaying population density with
>> Mapserver
>>
>>
>>
>> Dear Faldor,
>>
>> Robert is absolutely right. You will have to make different LAYERS for
>> the same POINT layer. But, define MAX/MINSCALE for each Layer. Change
>> STYLE -> SIZE values in each of the layer. You are done !!
>>
>> Cheers !
>> Ambastha
>>
>>
>> Faldor wrote:
>> >
>> > Yes, but I need them to adapt for different extents.
>> >
>> > For example, When I zoom out enough to see the world, I need them 1
>> > pixel wide (it's ugly otherwise), but when I zoom in I will need then
>> > 2 or 5 or even 30 pixels wide to cover all space.
>> >
>> > 2008/5/27 Ritesh Ambastha <[EMAIL PROTECTED]>:
>> >
>> >>
>> >> Dear Faldor,
>> >>
>> >> What I need is to have the points grow to cover all space
>> >> available when I zoom in.
>> >>
>> >> Do you mean that the size of points should grow? It can be done
>> >> easily by setting proper SIZE in the STYLE tag.
>> >>
>> >>
>> >> Regards,
>> >> Ambastha
>> >>
>> >>
>> >>
>> >> Faldor wrote:
>> >> >
>> >> > Hi,
>> >> >
>> >> > Sorry for my first empty message.
>> >> >
>> >> > My problem is, I need to display population density with Mapserver.
>>
>> >> > The data comes from GPWv3 and has a resolution of 15'. I converted
>> >> > it to a POINT Shapefile using ogr2ogr.
>> >> >
>> >> > At first when I display it on a world map it shows nicely. But when
>>
>> >> > I
>> >> zoom
>> >> > in it begins to show separated points for each value in the
>> >> > shapefile. What I need is to have the points grow to cover all
>> >> > space available
>> >> when
>> >> I
>> >> > zoom in.
>> >> >
>> >> > Is there any mean to do it with Mapserver ? I did not find it in
>> >> > the mapfile reference.
>> >> >
>> >> > I don't know if I explained it well (I'm not english speaking). If
>> >> > you
>> >> do
>> >> > not understand something, please ask.
>> >> >
>> >> > Cordialy,
>> >> >
>> >> > Faldor
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/Displaying-population-density-with-Mapserver-tp
>> >> 17492210p17492387.html
>> >> Sent from the Mapserver - User maili