Re: [mapserver-users] create attributes for dynamic polygon layer

2009-01-28 Thread Pietro Giannini
I was engaged in a similar question.
It is not possible, you must to try a different method.
Read this thread:
http://lists.osgeo.org/pipermail/mapserver-users/2009-January/059537.html

ciao  .pg

-- 
Pietro Giannini
Bytewise srl - Area GIS
41°50'38.58N 12°29'13.39E



On Mar, Gennaio 27, 2009 16:37, Mathias Tobler wrote:
 html
 body
 font size=3I sent this (probably wrongly) to the mapserver-dev list a
 couple about a week ago and have not heard back from anyone. So I am
 trying my luck here.brbr
 I am using PHP MapScript to create a polygon layer based on data stored
 in a MySQL database. The layer will show 1x1 degree grid cells and each
 cell should be colored according to the number of point records it
 contains. The summary is don in SQL and the query returns the coordinates
 of the lower left corner of each cell as well as a column 'Count' with
 the number of recrods in each cell. The geometry part work fine but I
 would like to add an attribute so I can assign different collors to the
 polygons. While $oNewShape-gt;set(quot;textquot;,$label); works great
 for labeling polygons I wonder if there was a similar methods that will
 work with the EXPRESSION statement so that I can define different classes
 for the layer. Using MySQL is given by our application and I won't be
 able to switch to PostGIS. Any suggestions are wellcome. brbr
 Mathiasbrbr
 br
 # Create a layer to hold density polygonsbr
 $oLayerPoly = ms_newLayerObj($oMap);br
 $oLayerPoly-gt;set( quot;namequot;, quot;ColDensityquot;);br
 $oLayerPoly-gt;set( quot;typequot;, MS_LAYER_POLYGON);br
 $oLayerPoly-gt;set( quot;statusquot;, MS_DEFAULT);brbr
 foreach($summary_rows as $row)br
 {br
 $oNewLine = ms_newLineObj();br
 $oNewLine-gt;addXY($row['minLong'],$row['minLat']);br
 $oNewLine-gt;addXY($row['minLong']+1,$row['minLat']);br
 $oNewLine-gt;addXY($row['minLong']+1,$row['minLat']+1);br
 $oNewLine-gt;addXY($row['minLong'],$row['minLat']+1);br
 $oNewLine-gt;addXY($row['minLong'],$row['minLat']);br
 x-tabnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/x-tabx-tab
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;n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nbsp;nbsp;nbsp;/x-tabbr
 $oLayerPoly-gt;AddFeature($oNewShape);br
 x-tabnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/x-tabx-tab
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/x-tabbr
 } /font/body
 /html

 ___
 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] Problem with CLASS display

2009-01-28 Thread RODIER BATISSE, ALEXANDRE
Hi everyone,

 

I have a problem with CLASS object to display diferent value depending to the 
minscale.

 

I would to display a classitem field until 1:200.000 scale.

 

For it I set (first case):

 

CLASSITEM OBSERVACI

LABELITEM OBSERVACI

 

CLASS

  minscaledenom 20

  NAME PORN aprobado definitivamente

  EXPRESSION PORN aprobado definitivamente

  COLOR 125 210 84

  OUTLINECOLOR 110 110 110

END #Class  

 

CLASS

  minscaledenom 20

  NAME PORN sometido a información pública

  EXPRESSION PORN sometido a información pública

  COLOR 125 210 150

  OUTLINECOLOR 110 110 110

END #Class   

 

CLASS

  minscaledenom 20

  NAME PORN aprobado inicialmente

  EXPRESSION PORN aprobado inicialmente

  COLOR 125 210 84

  OUTLINECOLOR 110 110 110

END #Class

 

And I would to display another classitem with scale less than 1:200.000

 

For it I set (second case):

 

CLASSITEM Zonas

  LABELITEM Zonas

  CLASS

maxscaledenom 20

NAME Zona de conservación prioritaria

EXPRESSION Zona de conservación prioritaria

COLOR 2 220 0

OUTLINECOLOR 110 110 110

  END  # Class

  CLASS

maxscaledenom 20

NAME Zona de conservación compatible

EXPRESSION Zona de conservación compatible

COLOR 166 255 165

OUTLINECOLOR 110 110 110

  END  # Class

 

...

 

Problems arise with I set the scale upper than 1:200.000 (first case). 
Mapserver doesn't display map. I can see map image when I down above 1:20 
scale (second case).

 

If I set first case with an unique class, it works fine, and I can display good 
image.

 

Someone kowns where is the problem.

 

Thanks.

 

-

Alexandre Rodier

Asistencia Técnica del SIGA

 

Servicio de Información e Integración Ambiental
Dirección General de Patrimonio Natural y Biodiversidad
Consejería de Agricultura y Agua.
c/ Arquitecto Emilio Piñero, 1 Entresuelo C

30.007 Murcia

Tel. 968246272

Correo-e: alexandre.rod...@carm.es mailto:alexandre.rod...@carm.es 

http://www.carm.es/medioambiente http://www.carm.es/medioambiente 

-

 

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


Re: [mapserver-users] Number of users are connected

2009-01-28 Thread Tamas Szekeres
Venkat,

This question is out of the scope of MapSever, and I'm afraid we can less
likely provide a meaningful answer to it.
You should probably post this question to the npgsql project mailing list if
exits.

Best regards,

Tamas




2009/1/28 Venkat Rao Tammineni vtammin...@roulacglobal.com

  Sir,

   I am using C# npgsql.dll I am getting this errorTimeout while
 getting a connection from pool  sometimes. but not  every time.



 Here is my code to connect database



 My connection string in web config

  add key=ConnectionString value=Server=localhost;port=5432;User
 Id=postgres;password=mytest;Database=GIS;/



 And here is my code to connect database.

 public  NpgsqlConnection PgSqlDataConnection()

  {

 if (pgSqlConnection != null)

 {

 if (pgSqlConnection.State == ConnectionState.Open)

 {

 pgSqlConnection.Close();

 pgSqlConnection.Dispose();

 }

 }

 pgConnectionString = ConfigurationSettings.AppSettings[
 ConnectionString].ToString();

 pgSqlConnection = new NpgsqlConnection(pgConnectionString);



 pgSqlConnection.Open();



 return pgSqlConnection;

   }





 I don't know where I am doing wrong ?Please guide me .

 I am waiting for your great response.



 Thanks,

 Venkat





 *From:* Tamas Szekeres [mailto:szeker...@gmail.com]
 *Sent:* Tuesday, January 27, 2009 8:12 PM
 *To:* Venkat Rao Tammineni
 *Cc:* mapserver-users
 *Subject:* Re: [mapserver-users] Number of users are connected



 Hi,

 IIS on Windows XP is limited to 10 concurrent users, however you shouldn't
 find such problems with a Windows Server OS.

 Best regards,

 Tamas


  2009/1/27 Venkat Rao Tammineni vtammin...@roulacglobal.com

 Dear All,





   I have developed web application using  C# asp.net and
 postgresql/postgis. I have deployed in IIS .if my 10 people connected my
 url.  I am getting error called More  number users are connected .I don't
  know, how to solve the problem. And sometimes I am getting error called  
 connection pooled.



 I am waiting for your great response,



 Advanced Thanks



 Regards

 Venkat.


 ___
 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] data handling capacity of map server

2009-01-28 Thread Christy Nieman

Hi,

As far as I know, there is no particular limiting data size that 
MapServer can work with.  A lot will depend on how you optimize the data 
(see http://mapserver.org/optimization/index.html ).  I am currently 
working on a map that has more than 60GB of vector data (shapefiles) and 
64GB of raster data (geotiffs).  There are other methods not discussed 
in the optimization document that can also be explored (e.g. using 
shp2tile/tile4ms, to create tiled shapefiles so that only the required 
features are considered for a given map extent) but I would suggest 
trying out the described methods to see if they suffice.  In my 
experience, one of the best ways to speed up the drawing of vector 
layers is to limit the use of filters and class expressions on large 
data files.


Regards,

Christy
--
Christy Nieman
GIS Technician
DM Solutions Group, Inc.
Email: cnie...@dmsolutions.ca
Web: http://dmsolutions.ca
Web: http://research.dmsolutions.ca

cemre yilmaz wrote:
Hi everybody I search about the data handling capacity and also the 
performance of umn mapserver in the mailing list but I can't find an 
exact answer to my question. I want to execute a database nearly 5 GB 
and only the vector data (shapefiles) and may be one raster map will 
be in my database. What do you think about the data handling 
performance of the 5 GB data and also the maximum data capacity of the 
mapserver?   
 
Coul you please give me information or information link 
about the question.
 
Thanks..
 
Cemre YILMAZ



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

--
Christy Nieman
GIS Technician
DM Solutions Group, Inc.
Email: cnie...@dmsolutions.ca
Web: http://dmsolutions.ca
Web: http://research.dmsolutions.ca
Phone: 613-565-5056 x12
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] OracleSpatial driver - VARCHAR2(4000)

2009-01-28 Thread Josh Hevenor
Good morning list,
Regarding http://trac.osgeo.org/mapserver/ticket/2260
I've come across this ticket and believe it might explain a problem I've
been having. I'm upgrading an application from mapserver 4/oracle 9 to
use mapserver 5 oracle 10. Things have gone relatively smoothly, but my
more advanced query functions have started returning oracle errors
stating that fields have been truncated. I've contacted the emails
listed on the ticket and Umberto has said that not much is going on.

Can anyone update me on the status of this bug, or if there is a
patch/workaround in place?  I'd be happy to support an update to this in
whatever way I can.

Thanks, 

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


[mapserver-users] Raster ESRI GRID path error

2009-01-28 Thread simone.frigerio

Hi,
I inserted a raster GRID in my mapfile but in map appears 
this kind of error:


Message : Mapserver error: Error in msDrawRaster() : 
/asci_co2 using full path /asci_co2


Probably I did an error in the path, but I don't know what 
is it really!
 GRID is inside DATA folder (SHAPEPATH) and it is 
represented by a folder asci_co2 and a folder info. 
The layer parameters are:


  LAYER
NAME asci_co2
TYPE RASTER
DATA /asci_co2
TEMPLATE ttt
TRANSPARENCY 100
METADATA
  force_imagetype jpeg
END
  END

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


Re: [mapserver-users] Raster ESRI GRID path error

2009-01-28 Thread Frank Warmerdam

simone.frigerio wrote:

Hi,
I inserted a raster GRID in my mapfile but in map appears this kind of 
error:


Message : Mapserver error: Error in msDrawRaster() : /asci_co2 using 
full path /asci_co2


Probably I did an error in the path, but I don't know what is it really!
 GRID is inside DATA folder (SHAPEPATH) and it is represented by a 
folder asci_co2 and a folder info. The layer parameters are:


  LAYER
NAME asci_co2
TYPE RASTER
DATA /asci_co2
TEMPLATE ttt
TRANSPARENCY 100
METADATA
  force_imagetype jpeg
END
  END


Simo,

If you include a slash at the beginning of the filename it is assumed
to be an absolute path from root.  I think you just want to use:

  DATA asci_co2

Good luck,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

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


[mapserver-users] GMLtoWKT

2009-01-28 Thread Nelson Soto
Is anyone aware of how to convert coordinates from a WFS's GML to WKT
acceptable coordinates? This is driving me crazy.

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


Re: [mapserver-users] mapserver-tilecache DRIVER AGG/PNG

2009-01-28 Thread thomas bonfort
hi,
you could try specifically adding the agg outputformat to your wms url:
url=http://192.168.51.166/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/mapFile/mapas/iv_region_wms_d02.mapformat=aggpng24

cheers,
thomas


On Fri, Jan 23, 2009 at 14:17, Valeria Muñoz valemu...@gmail.com wrote:
 hi!

   I have problems with tilecache and mapserver, i soft the lines of my map
 with :
 mapfile.
 IMAGETYPE png
 OUTPUTFORMAT
NAME png
DRIVER AGG/PNG
MIMETYPE image/png
IMAGEMODE RGB
EXTENSION png
FORMATOPTION TRANSPARENT=OFF
FORMATOPTION INTERLACE=ON
 END
 I used the same code in my WMS.map:

 OUTPUTFORMAT
NAME png
DRIVER AGG/PNG
MIMETYPE image/png
IMAGEMODE RGB
  EXTENSION png
FORMATOPTION TRANSPARENT=OFF
FORMATOPTION INTERLACE=ON
 END

 tilecache conf

 [ivregion_d02]
 type=WMS
 url=http://192.168.51.166/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/mapFile/mapas/iv_region_wms_d02.map
 extension=png
 srs=EPSG:4326
 layers=ivwmsd02
 maxExtent=-94.759286 -56.941688 -47.36 -16.539095

 The problem is that the tiles who created tilecache are not with clean and
 smooth lines.

 I attach images.




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

2009-01-28 Thread Dan Little
Depends on your environment... but if you can use javascript you could use 
OpenLayers... (this is off the top of my head... so excuse me if I screw 
something up...)

var gmlString = ... some GML!!! ...;
var wkt = new OpenLayers.Format.WKT();
var wfs = new OpenLayers.Format.GML();
var features = wfs.read(gmlString);
for(var i = 0; i  features.length; i++) {
var wktString = wkt.write(features[i]);

}






From: Nelson Soto ns...@plotplans.com
To: mapserver-users@lists.osgeo.org
Sent: Wednesday, January 28, 2009 1:56:59 PM
Subject: [mapserver-users] GMLtoWKT


Is anyone aware of how to convert coordinates from a WFS’s
GML to WKT acceptable coordinates? This is driving me crazy.


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


[mapserver-users] problems compiling latest version on linux

2009-01-28 Thread P.Romero
Im having new problems compiling both the latest versions of GDAL and also
mapserver.

I didn't experience these problems with the previous versions (about a month
ago?).

 

Running ./configure -with-gdal for mapserver is causing the makefile to
request a lot of new libraries, which I've had to manually install using
yum, but now Im stuck with a dependency for -lpq which I have no idea
where to get.

 

Compiling gdal was also more complicated than the last time (about 1-2
months ago).

This time, I was forced to manually edit the GDALopts file and remove
certain formats (netcdf, fits, and some others) in order to avoid build
errors (this is new, as I didn't have this problem a month ago on a similar
system).

 

Questions:

1)   why is the new version of mapserver configuring the makefile with
so many new dependencies for the with-gdal opcion???

2)   How can I resolve all of these gdal dependencies in the
fastestmost efficient way possible???

3)   Currently, I am ONLY using mapserver for generating png images from
a shapefile using a mapfile and mapscript. What would be a minimal build
configuration that would allow me to do this, without having to install so
many additional libraries???

 

Please help,

Thanks,

P.Romero

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


[mapserver-users] Create a button for Query

2009-01-28 Thread boesiii

My current html template has a drop down list for map modes, browse, single
layer query and multi-layer query.  I would like to have a single button for
querying.  Will I have to use javascript or is there a simpler way?
-- 
View this message in context: 
http://n2.nabble.com/Create-a-button-for-Query-tp2236684p2236684.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] problem with scientific notation in WFS field output

2009-01-28 Thread mapgeek

Background: I have an integer field in a map layer where every record
contains exactly 8 digits. The WFS output for this field is getting
converted into scientific notation, but the number is missing 2 significant
digits at the end (ones and tens). A number like 20010822 is getting
converted into 2.00108e+007, which is the equivalent of 20010800. 

Problem: When I do greater-than or less-than WFS filters on that field, I
lose the ability to query the last two digits. It treats 20010822 as if it
were 20010800. 

Desired Solution: I need to be able to apply greater-than and less-than
filters on that integer field and get the correct results. I do NOT
particularly care if the field values are correctly displayed in the WFS
output, as long as the results are filtered. That said, I suspect that
solving the display will fix the filtering. 

More Background: 
-- I need to do WFS filter encoding with a date. Date filtering is
unsupported, so I am trying to work around it by representing the date as a
sortable integer. 
-- I am connecting to an SDE view. I have changed the date field in the view
to be an integer field in the 8 digit format of MMDD. 
-- Any number you construct in this format should be less than records in
the future and greater than records in the past. I want to use these
integers as the literal in PropertyIsLessThan or PropertyIsGreaterThan
filters to create before and after queries.
-- Aside from the problems described above, it going well so far. By losing
the last 2 digits, however, I can only get as detailed as months, and lose
resolution of days. Other than that, the plan seems to work. 
-- I have historical features dating back hundreds of years, so a 4 digit
year is required. 


My environment is MS4W 2.2.6 (can upgrade if needed). I am connecting to an
SDE 9.2 spatial view running on Oracle. 

thanks, David

-- 
View this message in context: 
http://n2.nabble.com/problem-with-scientific-notation-in-WFS-field-output-tp2236793p2236793.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


AW: [mapserver-users] problem with scientific notation in WFS field output

2009-01-28 Thread Eichner, Andreas - SID-NLKM
Hi,

a quick and dirty solution might be altering the field type to be a
character string since the format you are using allows comparision
operators to work as expected, for example 19990112 is literally less
than 20010822. Also, exporting as character strings would fix your
display format. I don't know if MS can dynamically cast the value in
case arithmetic operations are involved. So this solution might or might
not work for you.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users