[mapserver-users] couldn't overcome a problem about rectObj zoomRectangle

2009-03-10 Thread Ahmet Temiz
hello

I couldn't overcome a problem about rectObj  zoomRectangle in java-mapscript

here is the code and results concerning the problem:

#width :46.0 height: 48.0//dimensions of rubberband

rectObj imgrect= new rectObj(minx,maxy-h,minx+w,maxy, mapscript.MS_FALSE);  
#System.out.println(imgrect.toString()  +imgrect.toString());

# imgrect.toString()  { 'minx': 440 , 'miny': 123 , 'maxx': 486 , 'maxy': 171 }

map0.zoomRectangle(imgrect,map0.getWidth(),map0.getHeight(),map0.getExtent(),
null);

... java.lang.UnknownError: mapscript::mapObj::zoomRectangle(): General error
message. image rectangle maxy = miny



When I change the places of miny and maxy, it gives invalid rectangle error. 

I will appreciate if you tell me the possible reasons of this error

regards


--
Open WebMail Project (http://openwebmail.org)


-- 
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] PHP - configuring error with mapserver- 5.0.3

2009-03-10 Thread kapil manoj
hi all,

i am a new user , i am using mapserver 5.0.3 on fedora 9...  i am struggling
in installation  as well as configuration part of mapserver in my box. well,
come to the point  i am trying to configure php with mapserver , but
configuration error occured while configuring. I  have installed php-5.2.6
through *yum install* in my system.

The following is the configuration error

ug 458 or Apache bug 22030).
Compiling with fast MS_NINT
checking compiler warnings... basic
configure: checking whether we should enable debug features...
Enabling debug features: -g in CFLAGS.
*configure: checking for PHP/MapScript module options...*
*configure: error: Missing or invalid PHP source directory in
--with-php=DIR.*

From the error message it is clearly evident that i gave invalid source
directory, but the following are the php source directories found in my
system

/etc/php.d
/etc/php.ini
/etc/httpd/conf.d/php.conf
/etc/php.d/dbase.ini
/etc/php.d/error_log
/etc/php.d/gd.ini
/etc/php.d/json.ini
/etc/php.d/mapserver.ini
/etc/php.d/mysql.ini
/etc/php.d/mysqli.ini
/etc/php.d/pdo.ini
/etc/php.d/pdo_mysql.ini
/etc/php.d/pdo_pgsql.ini
/etc/php.d/pdo_sqlite.ini
/etc/php.d/pgsql.ini
/etc/php.d/zip.ini
*/usr/bin/php*
/usr/bin/php-cgi
*/usr/lib/php*
/usr/lib/httpd/modules/libphp5.so
/usr/lib/php/modules
/usr/lib/php/pear
/usr/lib/php/modules/dbase.so
/usr/lib/php/modules/gd.so
/usr/lib/php/modules/json.so
/usr/lib/php/modules/mysql.so
/usr/lib/php/modules/mysqli.so
/usr/lib/php/modules/pdo.so
/usr/lib/php/modules/pdo_mysql.so
/usr/lib/php/modules/pdo_pgsql.so
/usr/lib/php/modules/pdo_sqlite.so
/usr/lib/php/modules/pgsql.so
/usr/lib/php/modules/php_mapscript.so
/usr/lib/php/modules/phpcups.so
/usr/lib/php/modules/zip.so
*/usr/share/php*
/usr/share/doc/php-cli-5.2.6
/usr/share/doc/php-common-5.2.6
/usr/share/doc/php-mapserver-5.0.3
/usr/share/doc/php-cli-5.2.6/README
/usr/share/doc/php-cli-5.2.6/README.FastCGI
/usr/share/doc/php-common-5.2.6/CODING_STANDARDS
/usr/share/doc/php-common-5.2.6/CREDITS
/usr/share/doc/php-common-5.2.6/EXTENSIONS
/usr/share/doc/php-common-5.2.6/INSTALL
/usr/share/doc/php-common-5.2.6/LICENSE
/usr/share/doc/php-common-5.2.6/NEWS
/usr/share/doc/php-common-5.2.6/README.EXTENSIONS
/usr/share/doc/php-common-5.2.6/README.EXT_SKEL
/usr/share/doc/php-common-5.2.6/README.PARAMETER_PARSING_API
/usr/share/doc/php-common-5.2.6/README.PHP4-TO-PHP5-THIN-CHANGES
/usr/share/doc/php-common-5.2.6/README.SELF-CONTAINED-EXTENSIONS
/usr/share/doc/php-common-5.2.6/README.STREAMS
/usr/share/doc/php-common-5.2.6/README.SUBMITTING_PATCH
/usr/share/doc/php-common-5.2.6/README.TESTING
/usr/share/doc/php-common-5.2.6/README.TESTING2
/usr/share/doc/php-common-5.2.6/README.UNIX-BUILD-SYSTEM
/usr/share/doc/php-common-5.2.6/README.UPDATE_5_2
/usr/share/doc/php-common-5.2.6/README.WIN32-BUILD-SYSTEM
/usr/share/doc/php-common-5.2.6/README.input_filter
/usr/share/doc/php-common-5.2.6/TSRM_LICENSE
/usr/share/doc/php-common-5.2.6/ZEND_CHANGES
/usr/share/doc/php-common-5.2.6/ZEND_LICENSE
/usr/share/doc/php-common-5.2.6/gd_README
/usr/share/doc/php-common-5.2.6/regex_COPYRIGHT
*/var/lib/php*
/var/lib/php/session


I tested with all the source directories that i have in my system, but the
error still remains. i have installed php through YUM INSTALL way , that is
a precompiled binaries not an source package..  May be that could be a
reason to cause this error..  i am not sure

so what could be a problem   please somebody help me...

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


Re: [mapserver-users] PHP - configuring error with mapserver- 5.0.3

2009-03-10 Thread Guillaume Sueur
Hi

You probably need the  packages which will include the php headers
needed by mapserver compilation. Sorry, I don't know this package name
for Fedora.

Regards,

Guillaume

kapil manoj a écrit :
 hi all,
 
 i am a new user , i am using mapserver 5.0.3 on fedora 9...  i am
 struggling in installation  as well as configuration part of mapserver
 in my box. well, come to the point  i am trying to configure php with
 mapserver , but configuration error occured while configuring. I  have
 installed php-5.2.6 through *yum install* in my system.
 
 The following is the configuration error
 
 ug 458 or Apache bug 22030).
 Compiling with fast MS_NINT
 checking compiler warnings... basic
 configure: checking whether we should enable debug features...
 Enabling debug features: -g in CFLAGS.
 *configure: checking for PHP/MapScript module options...*
 *configure: error: Missing or invalid PHP source directory in
 --with-php=DIR.*
 
 From the error message it is clearly evident that i gave invalid source
 directory, but the following are the php source directories found in my
 system
 
 /etc/php.d
 /etc/php.ini
 /etc/httpd/conf.d/php.conf
 /etc/php.d/dbase.ini
 /etc/php.d/error_log
 /etc/php.d/gd.ini
 /etc/php.d/json.ini
 /etc/php.d/mapserver.ini
 /etc/php.d/mysql.ini
 /etc/php.d/mysqli.ini
 /etc/php.d/pdo.ini
 /etc/php.d/pdo_mysql.ini
 /etc/php.d/pdo_pgsql.ini
 /etc/php.d/pdo_sqlite.ini
 /etc/php.d/pgsql.ini
 /etc/php.d/zip.ini
 */usr/bin/php*
 /usr/bin/php-cgi
 */usr/lib/php*
 /usr/lib/httpd/modules/
 libphp5.so
 /usr/lib/php/modules
 /usr/lib/php/pear
 /usr/lib/php/modules/dbase.so
 /usr/lib/php/modules/gd.so
 /usr/lib/php/modules/json.so
 /usr/lib/php/modules/mysql.so
 /usr/lib/php/modules/mysqli.so
 /usr/lib/php/modules/pdo.so
 /usr/lib/php/modules/pdo_mysql.so
 /usr/lib/php/modules/pdo_pgsql.so
 /usr/lib/php/modules/pdo_sqlite.so
 /usr/lib/php/modules/pgsql.so
 /usr/lib/php/modules/php_mapscript.so
 /usr/lib/php/modules/phpcups.so
 /usr/lib/php/modules/zip.so
 */usr/share/php*
 /usr/share/doc/php-cli-5.2.6
 /usr/share/doc/php-common-5.2.6
 /usr/share/doc/php-mapserver-5.0.3
 /usr/share/doc/php-cli-5.2.6/README
 /usr/share/doc/php-cli-5.2.6/README.FastCGI
 /usr/share/doc/php-common-5.2.6/CODING_STANDARDS
 /usr/share/doc/php-common-5.2.6/CREDITS
 /usr/share/doc/php-common-5.2.6/EXTENSIONS
 /usr/share/doc/php-common-5.2.6/INSTALL
 /usr/share/doc/php-common-5.2.6/LICENSE
 /usr/share/doc/php-common-5.2.6/NEWS
 /usr/share/doc/php-common-5.2.6/README.EXTENSIONS
 /usr/share/doc/php-common-5.2.6/README.EXT_SKEL
 /usr/share/doc/php-common-5.2.6/README.PARAMETER_PARSING_API
 /usr/share/doc/php-common-5.2.6/README.PHP4-TO-PHP5-THIN-CHANGES
 /usr/share/doc/php-common-5.2.6/README.SELF-CONTAINED-EXTENSIONS
 /usr/share/doc/php-common-5.2.6/README.STREAMS
 /usr/share/doc/php-common-5.2.6/README.SUBMITTING_PATCH
 /usr/share/doc/php-common-5.2.6/README.TESTING
 /usr/share/doc/php-common-5.2.6/README.TESTING2
 /usr/share/doc/php-common-5.2.6/README.UNIX-BUILD-SYSTEM
 /usr/share/doc/php-common-5.2.6/README.UPDATE_5_2
 /usr/share/doc/php-common-5.2.6/README.WIN32-BUILD-SYSTEM
 /usr/share/doc/php-common-5.2.6/README.input_filter
 /usr/share/doc/php-common-5.2.6/TSRM_LICENSE
 /usr/share/doc/php-common-5.2.6/ZEND_CHANGES
 /usr/share/doc/php-common-5.2.6/ZEND_LICENSE
 /usr/share/doc/php-common-5.2.6/gd_README
 /usr/share/doc/php-common-5.2.6/regex_COPYRIGHT
 */var/lib/php*
 /var/lib/php/session
 
 
 I tested with all the source directories that i have in my system, but
 the error still remains. i have installed php through YUM INSTALL way ,
 that is a precompiled binaries not an source package..  May be that
 could be a reason to cause this error..  i am not sure
 
 so what could be a problem   please somebody help me...
 
 regards
 zizu
 
 
 
 
 ___
 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] [Expresion] Problem with expresion

2009-03-10 Thread David Martinez Morata
Hello

I define in my map file one layer like:

LAYER
NAME POP Neuf Telecom
TYPE POINT
DATA ldnc_w84_05keu_sites_heberge.shp
METADATA
wms_title POP Neuf Telecom
wms_srsEPSG:4326
wms_feature_info_mime_typetext/html
wms_include_itemsall
END
STATUS ON
MAXSCALE 100
#TRANSPARENCY 100
PROJECTION
init=epsg:4326
END
CLASSITEM LEGENDE
CLASS
NAME POP Neuf Telecom
EXPRESSION (NetCenter OR POP LDCom)

STYLE
SYMBOL CIRCLE
SIZE 10
OUTLINECOLOR 255 255 255
COLOR 0 197 255
END
END
END

But I don't find my Points!
I have a string  value in my CLASSITEM LEGENDE

And the values I try to see are:

NetCCenter and POP LDCom
Can anyone help me?
-- 
Martinez Morata David
Thinking GIS
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] [Expresion] Problem with expresion

2009-03-10 Thread Pietro Giannini

Hi David,
the EXPRESSION should be :
   EXPRESSION ([LEGENDE] = NetCenter OR [LEGENDE] = POP 
LDCom)


ciao ...pg



David Martinez Morata ha scritto:

Hello

I define in my map file one layer like:

LAYER
NAME POP Neuf Telecom
TYPE POINT
DATA ldnc_w84_05keu_sites_heberge.shp
METADATA
wms_title POP Neuf Telecom
wms_srsEPSG:4326
wms_feature_info_mime_typetext/html
wms_include_itemsall
END
STATUS ON
MAXSCALE 100
#TRANSPARENCY 100
PROJECTION
init=epsg:4326
END
CLASSITEM LEGENDE
CLASS
NAME POP Neuf Telecom
EXPRESSION (NetCenter OR POP LDCom)
   
STYLE

SYMBOL CIRCLE
SIZE 10
OUTLINECOLOR 255 255 255
COLOR 0 197 255
END
END
END

But I don't find my Points!
I have a string  value in my CLASSITEM LEGENDE

And the values I try to see are:

NetCCenter and POP LDCom
Can anyone help me?
--
Martinez Morata David
Thinking GIS


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



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

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


RE: [mapserver-users] Encoding issues

2009-03-10 Thread Murty Maganti
Hi

 

As per the code documentation in the method msGetEncodedString (as shown 
below), the characters are assumed to be UTF-8 by default.

 

char *msGetEncodedString(const char *string, const char *encoding)

{

---

  if (len == 0 || (encoding  strcasecmp(encoding, UTF-8)==0))

  return strdup(string);/* Nothing to do: string already in UTF-8 */

 

Where as in the ‘values’ property of shapeObj.cs in C#, it is using 
System.Runtime.InteropServices.Marshal.PtrToStringAnsi  (to marshal characters 
from c to c#). Shoudn’t it be using 
System.Runtime.InteropServices.Marshal.PtrToStringUni method since as the 
charcters are by default held in UTF-8 encoding?

 

Thanks

Murty

 

From: Tamas Szekeres [mailto:szeker...@gmail.com] 
Sent: Wednesday, March 04, 2009 5:25 PM
To: Murty Maganti
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Encoding issues

 

Hi,

I don't know much about the hindi character sets.
I guess you could extent that byte array to string copy function with arbitrary 
character sizes, like for double bytes something like:

for (int i = 0; i  bytes.Length; i=i+2)
s.Append(Convert.ToChar(bytes[i] + 256*bytes[i+1]));

Best regards,

Tamas




2009/3/4 Murty Maganti mmaga...@oriongis.com

Hi Tamas 

 

This is still not working for some of the Asian languages. 

 

I suspect the issue could be in this line of your sample code below

s.Append(Convert.ToChar(bytes[i])); 

 

Here, one single byte is used  to convert to a character. But my understanding 
is that UTF-8 can consume from 1 to 4 bytes to represent one character code 
point. It worked fine for Arabic may be because all Arabic characters can be 
represented using a single byte. 

 

When I tried the same code below with Hindi, an Indian language, some of the 
characters are shown junk (but not all characters). I guess those characters 
which occupy more than a byte turned out to be junk.

 

I am also trying the opposite of the sample code below i.e. read a field value 
from map server (shapeObj.values), which is in Hindi, and show on a web page, 
again it turns out to be junk. I tried to look at the byte values of the string 
in VS by using 

 

Byte[] bites = Encoding.Unicode.GetBytes(shapeObj.values[0])

 

I notice that they are actually code point of UTF-8 but interpreted as UTF-16 
and may be the reason I see junk characters on web page. But I don’t know how 
to extract those UTF-8 byte values from UTF-16.

 

I am just giving sample code here to explain

 

byte[] utf16 = Encoding.Unicode.GetBytes(कीचनर); //The text 
is in Hindi, an Indian language

byte[] utf8 = Encoding.UTF8.GetBytes(कीचनर);

 

shapeObj shape = layer.getFeature(result.shapeindex, 
result.tileindex);

string value = shape.values[1]; //This contains the same text 
(in Hindi) as above in the shape file.

 

byte[] bytes = Encoding.Unicode.GetBytes(value); //There are 
byte values of characters decoded from UTF-16. .Net internally stores all 
strings in UTF-16 

 

Now if I examine the values of ‘utf8’ and ‘bytes’ arrays

 

utf8 – 224,164,149,224,165,128,224,164,154,224,164,168,224,164,176

bytes – 
224,0,164,0,34,32,224,0,165,0,172,32,224,0,164,0,97,1,224,0,164,0,168,0,224,0,164,0,176,0

utf16 – 21,9,64,9,26,9,40,9,48,9

 

The first byte value is same as UTF-8. Second byte value is 0 as UTF-16 takes 
atleast 2 bytes for a character. This gives me impression that the byte values 
are in UTF-8 and are not converted to UTF-16 to by .Net.

 

Appreciate if you see any solution for this and let me know. 

 

Thanks

Murty

From: Tamas Szekeres [mailto:szeker...@gmail.com] 
Sent: Friday, February 06, 2009 6:59 PM


To: Murty Maganti
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Encoding issues

 

You might have to make explicit conversion maually something like:

string value = لققافعععىىةةونه; //I actually get this (in arabic) 
through user input
byte[] bytes = Encoding.Convert(Encoding.Unicode, 
Encoding.GetEncoding(1256), Encoding.Unicode.GetBytes(value));
StringBuilder s = new StringBuilder();
for (int i = 0; i  bytes.Length; i++)
s.Append(Convert.ToChar(bytes[i]));
shpObj.text = s.ToString();

Best regards,

Tamas



2009/2/6 Murty Maganti mmaga...@oriongis.com

HI 

 

I am doing a simple thing. I have a map file and trying to show some static 
text in Arabic on map. You can try this with any map file as it is nothing to 
do with layers from map.

 

At run time (like on a button click), please add this

 

layerObj lyr = new layerObj(mapObj);

lyr.name = TextAcetate;

lyr.status = mapscript.MS_ON;

lyr.type = MS_LAYER_TYPE.MS_LAYER_ANNOTATION;

lyr.labelcache = mapscript.MS_TRUE;

 

double locationX = 50;

double locationY = 50;


[mapserver-users] Using a mapserv wrapper script to handle libraries

2009-03-10 Thread Rui Gomes
Hi...

I have a problem with the libraries to use mapserver in a real server.
And i find this in the web:


 - upload mapserv executable and all the shared libraries somewhere.
 - upload proj.4 support files (like epsg init file) somewhere
 - create a mapserv wrapper script in the cgi-bin directory which sets
environment variables pointing to various things and then executes
the real mapserv binary.  Environment variables would include:
  LD_LIBRARY_PATH: needs to point to directory with all the .so files.
  PROJ_LIB: needs to point to directory with the proj support files.

 You should not need to alter the Apache configuration.  The key is getting
 the required files uploaded, and the wrapper script pointing to them.


Is this real possible?
Where i can find a list of all the lib  needed?

Thanks

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


[mapserver-users] Drawing a simple filled polygon with PHP/mapscript

2009-03-10 Thread indieaz

Been doing a lot of tinkering, have been plotting points on maps with variety
of shapes from database sources etc.  However, I'm now against what I
believe should be an extremely simple problem.

I have a set of coordinates (max lat/long and min lat/long) that make up a
rectangle I need to plot onto my map.  I'm pulling my hair out...I get a
.png image out, but it's empty.  Here's an example of the code I'm trying to
use:

$map = ms_newMapObj();
$layer = ms_newLayerObj($map);
$polygon= ms_newShapeObj(MS_SHAPE_POLYGON);
$polyLine = ms_newLineObj();
$polyLine-addXY(60,60);
$polyLine-addXY(75,60);
$polyLine-addXY(75,75);
$polyLine-addXY(60,75);
$polyLine-addXY(60,60);
$polygon-add($polyLine);

$Class = ms_newClassObj($layer);
$Class-set( name,MyClass);
// Create a style object defining how to draw features
$lineStyle = ms_newStyleObj($Class);
$lineStyle-color-setRGB(255,255,0);


and my .map file:

MAP

  STATUS ON
  SIZE 600 400
  IMAGECOLOR 255 255 255
  IMAGETYPE PNG
  extent -180 -90 180 90
  PROJECTION
init=epsg:4326
  END

END
-- 
View this message in context: 
http://n2.nabble.com/Drawing-a-simple-filled-polygon-with-PHP-mapscript-tp2459355p2459355.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] display road data properly

2009-03-10 Thread new2ms4w

Hi All,

I'm using road data from the US census bureau website to display the maps
and keep the moving objects on them. It basically shows up as follows.

http://n2.nabble.com/file/n2459780/badroad1.jpg 


What should I do to display the road data in a professional way like this:

http://n2.nabble.com/file/n2459780/agg_test2.png 


Can someone give me some advice. I want the road data to be shown more
realistically like in google maps/yahoo maps.

Thank you for your time.
-pn


P.S. I found the second image in an old post here.
http://n2.nabble.com/Google-ish-cartography.-td1994879.html
-- 
View this message in context: 
http://n2.nabble.com/display-road-data-properly-tp2459780p2459780.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] display road data properly

2009-03-10 Thread Bob Basques

pn,

I'm the poster of the image you found.  It uses a fairly complex mapfile 
that I put together last year..


There is a copy of the mapfile that produced that output included in 
this PDF:


http://download.osgeo.org/mapserver/docs/mapserver-users-manual.pdf

The Mapfile wasn't built against the Census dataset however, so you'll 
need to map the correct Census attributes to each of the Mapfile 
layers.  The Mapfile is documented fairly well, but could use some 
additional commenting.


I would be interested in a version that uses the Census datasets if/when 
you get something working.


Also not, that the Mapfile above was set up for a metro area, not a 
state or national level of zoom, so the longer range scales are not 
included in it.  There are also some tricks at the end of the file for 
generating the Legends.


Have fun.

bobb




new2ms4w wrote:

Hi All,

I'm using road data from the US census bureau website to display the maps
and keep the moving objects on them. It basically shows up as follows.

http://n2.nabble.com/file/n2459780/badroad1.jpg 



What should I do to display the road data in a professional way like this:

http://n2.nabble.com/file/n2459780/agg_test2.png 



Can someone give me some advice. I want the road data to be shown more
realistically like in google maps/yahoo maps.

Thank you for your time.
-pn


P.S. I found the second image in an old post here.
http://n2.nabble.com/Google-ish-cartography.-td1994879.html
  

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