Re: [mapserver-users] Re: Mapserver WMS seem not to read +towgs84 parameters

2009-03-04 Thread Rahkonen Jukka
Thanks Frank,

Adding  +towgs84=0,0,0 made it.  Was it something that I should have been 
known?  Does more fresh epsg file contain towgs84 parameters for epsg:3067 and 
other comparable projections?

-Jukka-
 

> -Alkuperäinen viesti-
> Lähettäjä: Frank Warmerdam [mailto:warmer...@pobox.com] 
> Lähetetty: 3. maaliskuuta 2009 21:44
> Vastaanottaja: Rahkonen Jukka
> Kopio: mapserver-users@lists.osgeo.org
> Aihe: Re: [mapserver-users] Re: Mapserver WMS seem not to 
> read +towgs84 parameters
> 
> Rahkonen Jukka wrote:
> > I forget to mention that I am using epsg:3067 in my WMS 
> requests while 
> > image data is in epsg:2393 so Mapserver for sure is reprojecting.
> 
> Jukka,
> 
> I believe the problem is that EPSG:3067 expands as:
> 
>+proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs
> 
> with no +towgs84 value.  From PROJ 4.6.0 on datum shifts are 
> only applied if we know datum information for the source and 
> destination coordinate system.
> 
> If you want ETRS89 treated as equivelent to WGS84 you might 
> want to add a +towgs84=0,0,0 in the EPSG 3067 entry in the 
> epsg file too.
> 
> Best regards,
> -- 
> ---+--
> --
> ---+--
> 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] JAVA Mapscript LayerObj issues

2009-03-04 Thread julien

Hi,

I am using the latest mapscript version 5.4.0beta2 for JAVA to build 
on-demand mapfiles through a website.
My goal here is to put a symbol and an associated text on a specific 
location on the maps.


I was successful with a static mapfile and the shp2img command with the 
following code :


LAYER
 NAME Test
 TYPE POINT
 STATUS DEFAULT
 FEATURE
   POINTS
 10 10
   END
 TEXT "Blablabla"
 END
 CLASS
   STYLE
   SYMBOL "kreis"
SIZE 50
COLOR 0 0 0
   END
 LABEL
   TYPE BITMAP
   SIZE MEDIUM
   COLOR 0 0 0
   POSITION UC
 END
 END
END

However, when I tried to translated this mapfile into JAVA, I did not 
found any function or any object for the feature part (in red):

FEATURE
   POINTS
 10 10
   END
 TEXT "Blablabla"
END
The remaining code can be coded with layerObj, classObj, styleObj and 
LabelObj. But there is no featureObj.


Did I missed something or this is not possible to do it with JAVA?

Thanks in advance

Trolet Julien

PS : If someone knows another way to put a symbol and an associated text 
on a specific (and dynamic) location on a map, he is welcome to let me 
know. ;)
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] JAVA Mapscript LayerObj issues

2009-03-04 Thread Venkat Rao Tammineni
HI,

 

  According to knowledge there is no feature class or object. You have to
use  PointObj to get points

 

Like  

 

PointObj point = new pointObj(retuns some x, y  dosomething herer);

 

Point.x=10;   or  setX()

Point.y=10;  oe setY();

 

 

 

Something like this ... Think in this way.

 

I hope this helps you .

 

 

Thanks

Venkat.

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of julien
Sent: Wednesday, March 04, 2009 4:56 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] JAVA Mapscript LayerObj issues

 

Hi, 

I am using the latest mapscript version 5.4.0beta2 for JAVA to build
on-demand mapfiles through a website.
My goal here is to put a symbol and an associated text on a specific
location on the maps.

I was successful with a static mapfile and the shp2img command with the
following code :

LAYER
  NAME Test
  TYPE POINT
  STATUS DEFAULT
  FEATURE
POINTS
  10 10
END
  TEXT "Blablabla"
  END
  CLASS
STYLE
SYMBOL "kreis"
 SIZE 50
 COLOR 0 0 0
END
  LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 0
POSITION UC
  END
  END
END

However, when I tried to translated this mapfile into JAVA, I did not found
any function or any object for the feature part (in red):
FEATURE
POINTS
  10 10
END
  TEXT "Blablabla"
END
The remaining code can be coded with layerObj, classObj, styleObj and
LabelObj. But there is no featureObj.

Did I missed something or this is not possible to do it with JAVA?

Thanks in advance

Trolet Julien

PS : If someone knows another way to put a symbol and an associated text on
a specific (and dynamic) location on a map, he is welcome to let me know. ;)

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


Re: [mapserver-users] JAVA Mapscript LayerObj issues

2009-03-04 Thread Tamas Szekeres
Hi,

There should be a layerObj.addFeature(
shapeObjshape
)

to accomplish this task.

Best regards,

Tamas




2009/3/4 julien 

>  Hi,
>
> I am using the latest mapscript version 5.4.0beta2 for JAVA to build
> on-demand mapfiles through a website.
> My goal here is to put a symbol and an associated text on a specific
> location on the maps.
>
> I was successful with a static mapfile and the shp2img command with the
> following code :
>
> LAYER
>   NAME Test
>   TYPE POINT
>   STATUS DEFAULT
>   FEATURE
> POINTS
>   10 10
> END
>   TEXT "Blablabla"
>   END
>   CLASS
> STYLE
> SYMBOL "kreis"
>  SIZE 50
>  COLOR 0 0 0
> END
>   LABEL
> TYPE BITMAP
> SIZE MEDIUM
> COLOR 0 0 0
> POSITION UC
>   END
>   END
> END
>
> However, when I tried to translated this mapfile into JAVA, I did not found
> any function or any object for the feature part (in red):
> FEATURE
> POINTS
>   10 10
> END
>   TEXT "Blablabla"
> END
> The remaining code can be coded with layerObj, classObj, styleObj and
> LabelObj. But there is no featureObj.
>
> Did I missed something or this is not possible to do it with JAVA?
>
> Thanks in advance
>
> Trolet Julien
>
> PS : If someone knows another way to put a symbol and an associated text on
> a specific (and dynamic) location on a map, he is welcome to let me know. ;)
>
> ___
> 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] Print the X,Y co-ordinate in GMAP

2009-03-04 Thread rohan phatak
hello friends,
I am using mapserver application gmap. But in gmap there is no facility to
see the latitude ,longitude .So any one has idea how see those values??
Thanks in Advance : )
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Re: Mapserver WMS seem not to read +towgs84 parameters

2009-03-04 Thread Frank Warmerdam

Rahkonen Jukka wrote:

Thanks Frank,

Adding  +towgs84=0,0,0 made it.  Was it something that I should have been
known?  


Jukka,

It does get mentioned in a variety of contexts but it is not surprising
that you wouldn't realize it.


Does more fresh epsg file contain towgs84 parameters for epsg:3067
and other comparable projections?


No.

There are lots and lots of EPSG coordinate systems for which GDAL and PROJ
do *not* know what to use for a datum shift and so effectively datum shifting
is not supported for them without manual intervention of some kind.  In
some cases there is no datum shift mechanism recorded in the original EPSG
database, while in others there are multiple ways of doing the datum shift
and there is no way of identifying the most appropriate way for any
particular requirement.

Best regards,
--
---+--
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] Image Quality - Image Preprocessing

2009-03-04 Thread Travis Kirstine
We are running mapserver connected to a tilecache delivering high
resolution orthophoto to a google maps.  The problem I am having is
that we preprocess all our imagery using reduced resolutions at higher
scales and full resolution at lower scales.  In the past we have used
gdal_merge with - ps 10 10  to merge tile into larger overalls and
downsampling  the resolution but we have found that the image quality
was not adequate.  I have been experimenting with gdalwarp using the
different resampling methods with varied results.  Is there any
consensus on which resampling method provided with gdal provide the
optimal results (from a viewing perspective) when downsampling imagery
data?

-- 
Travis K.

Toronto, Canada

"She knows there's no success like failure
And that failure's no success at all."
-Bob Dylan-

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


Re: [mapserver-users] Map server build kit

2009-03-04 Thread Jeff McKenna

Jeff McKenna wrote:


Where can I download latest build kit for map server? Also, will I be 
able to use nmake of VS 2008 to compile it?


http://www.gatewaygeomatics.com/dl/buildkit/



The Visual Studio 2008 buildkit is now available: 
http://www.gatewaygeomatics.com/dl/buildkit/ (please see the README.txt 
in that download directory).


-jeff


--
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


Re: [mapserver-users] Oracle database problem

2009-03-04 Thread Jim Klassen
I am probably missing something here, but your connection string looks 
incomplete to me. I have only seen the following forms:

user/passw...@tns_name
user/passw...@database_host:port/global_database_service_name

(note the global service name needs to match exactly what the TNS listener on 
the database host, in particular this is usually not equal to the SID.)

Now my confusion is to get the ORA-00942: table or view does not exist error, 
you must have connected to a database, right? So the next question is did you 
connect to the right database and as the right user?

>>> Paul Ramsey  03/03/09 5:52 PM >>>
You say the query runs OK from SQL/Plus, but are you logging into
SQL/Plus as the "sde" user?

On Wed, Feb 25, 2009 at 12:33 PM, Balázs Bámer  wrote:
> Hi All,
>
> I have a MapServer 5.2.1 compiled with
> ./configure --with-oci
> --with-oraclespatial=/usr/local/instantclient_11_1 --with-proj
> --with-threads --with-gdal --with-ogr --with-jpeg --with-png=/usr/lib
> --with-php=/usr/include/php5
> on Ubuntu 8.10
>
> I tried to maka a layer with
>
> LAYER
>  NAME lejto
>  METADATA
>"DESCRIPTION" "lejto"
>"wms_title" "lejto"
>"ows_include_items" "all"
>  END
>  PROJECTION
>"init=epsg:23700"
>  END
>  TYPE POLYGON
>  STATUS ON
>  CONNECTIONTYPE oraclespatial
>  CONNECTION "sde/asd...@10.0.8.51:1521"
>  DATA "geom from LEJTO_2008_070814 using SRID 23700"
>  CLASS
>NAME "lejto"
>STYLE
>  OUTLINECOLOR 127 127 127
>END
>  END
>  DUMP TRUE
>  TEMPLATE "template.html"
> END # layer
>
> GetCapabilities query works. If I try to draw the map with (you can try):
> http://att-it.homelinux.net:22080/cgi-bin/sokfolt?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=lejto&STYLES=&SRS=epsg:23700&BBOX=42,4,95,37&WIDTH=938&HEIGHT=591&FORMAT=image/png
>
>
> the response is msDrawMap(): Image handling error. Failed to draw
> layer named 'lejto'.
> msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error:
> ORA-00942: table or view does not exist
>  . Query statement: SELECT rownum, geom FROM LEJTO_2008_070814 WHERE
> SDO_FILTER( geom, MDSYS.SDO_GEOMETRY(2003, 23700,
> NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(42,4,95,37)
> ),'querytype=window') = 'TRUE' . Check your data statement.
>
> while in sqlplus the query quite similar to the above (just modified
> to write row count instead of the 2 columns)
>
> SELECT count(1) FROM LEJTO_2008_070814 WHERE SDO_FILTER( geom,
> MDSYS.SDO_GEOMETRY(2003, 23700,
> NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(42,4,95,37)
> ),'querytype=window') = 'TRUE'
>
> runs.
>
> SRID information and table user_sdo_geom_metadata is actualized:
>
> Insert into USER_SDO_GEOM_METADATA
> (TABLE_NAME,COLUMN_NAME,DIMINFO,SRID) values
> ('lejto_2008_070814','GEOM',MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',437534.24988,935741,5E-8),MDSYS.SDO_DIM_ELEMENT('Y',47058.0469,355027,5E-8)),23700);
> drop index IDX_LEJTO_2008_070814_GEOM;
> UPDATE lejto_2008_070814 c SET c.geom.SDO_SRID=23700;
> CREATE INDEX idx_lejto_2008_070814_GEOM ON lejto_2008_070814 (GEOM)
> INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS ('layer_gtype=POLYGON');
>
> What can be the problem?
>
> Thank you in advance.
> Best regards: Balázs Bámer
>
> What can be the problem?
> ___
> 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


Re: [mapserver-users] Is using ECW format allowed or not?

2009-03-04 Thread John Mitchell
If instead of using compressed ECW images as input for MapServer WMS you had
GeoWebCache in front of MapServer which means that the WMS input is cached
tiled png's instead of ECW images from MapServer.Then I think that you get
around the ECW SDK license agreement, Correct???

Thanks,

John

On Mon, Oct 20, 2008 at 12:15 PM, Gregor Mosheh  wrote:

> 1. Can we use our compressed ECW images as input for MapServer WMS?
>> 2. Can we use ECW as an output format for MapServer WCS?
>>
>
> The license agreement says that the ECW SDK cannot be used "on a server"
> then goes on to define that as a computer connected to the Internet which
> provides images. I'd say that clearly rules out MapServer consuming ECW.
> Very unfortunate, but in my opinion very clear.
>
> In my tests, I have found that JPEG2000 and ECW are really too slow for
> production use anyway. Maybe that's some "sour grapes" consolation? :)
>
>  --
> Gregor Mosheh / Greg AllensworthBS, A+, Network+, Security+, Server+
> System Administrator, Lead Programmer
> HostGIS 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
>



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


Re: [mapserver-users] Oracle database problem

2009-03-04 Thread Balázs Bámer
Hi Jim,

> user/passw...@tns_name
> user/passw...@database_host:port/global_database_service_name

I figured out the following as a solution:

CONNECTIONTYPE oraclespatial
  CONNECTION 
"user/password@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=
IPaddress)(PORT= port)))(CONNECT_DATA=(SID=sid)))"

> have connected to a database, right? So the next question is did you connect 
> to the right > database and as the right user?

This was the problem, wrong database.

best regards: Balázs Bámer
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] WMS and map script

2009-03-04 Thread Murty Maganti
Hi

 

I am getting junk extent values after calling layerObj.getExtent() on a
WMS layer.

 

This is the WMS server url

http://www2.demis.nl/wms/wms.asp

 

I have used a layer called Countries from that server and this is the
capability xml for that layer



 
Countries

 
Countries

 




 

This is the entry in map file

  LAYER

CONNECTION "http://www2.demis.nl/wms/wms.asp?wms=SAMPLE&";

CONNECTIONTYPE WMS

METADATA

  "wms_srs""EPSG:4326"

  "wms_name"  "Countries"

  "wms_format""image/png"

  "wms_server_version"   "1.1.0"

END

NAME "Countries"

PROJECTION

  "init=epsg:4326"

END

STATUS ON

TYPE RASTER

UNITS DD

  END

 

I get extents values (minx, miny, maxx and maxy) as
-4.8366978272229995E-26 (which is not same as above in the capabilities
xml)

 

Appreciate any help.

 

Thanks

Murty

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


Re: [mapserver-users] Is using ECW format allowed or not?

2009-03-04 Thread Gregor at HostGIS

John Mitchell wrote:
If instead of using compressed ECW images as input for MapServer WMS you 
had GeoWebCache in front of MapServer which means that the WMS input is 
cached tiled png's instead of ECW images from MapServer.

Then I think that you get around the ECW SDK license agreement, Correct???


If one wanted to be technical about the ECW consumer being "on the 
Internet" then it would have to be connected, well, not to the Internet. 
A cross-over cable and a private IP should fill that requirement nicely.


But don't take my word for it; you'd probably want to consult with them 
or a lawyer on it. Reading the license is one thing, trying to 
circumvent it in good faith is a lawyer's job. ;)


--
Gregor Mosheh / Greg AllensworthBS, A+, Network+, Security+, Server+
System Administrator, Lead Programmer
HostGIS 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] Encoding issues

2009-03-04 Thread Murty Maganti
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 

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;

 

lyr.transform = (int)mapscript.MS_FALSE;

 

classObj layerClass = new classObj(lyr);

 

//All label properties

layerClass.label.size = 15;

layerClass.label.type = MS_FONT_TYPE.MS_TRUETYPE;

…

…

layerClass.label.encoding = "CP1256";

 

 

shapeObj shpObj = new 
shapeObj((int)MS_SHAPE_TYPE.MS_SHAPE_POINT);

lineObj lnObj = new lineObj();

 

pointObj pt = new pointObj(locationX, locationY, 0, 0);

lnObj.add(pt);

 

shpObj.add(lnObj);

 

shpObj.text = "لققافعععىىةةونه"; //I actually get this (in 
arabic) through user input

 

lyr.addFeature(shpObj);

 

mapObj.draw(); //Onto a picture box or save as file

 

(In the map file, my output format is set to GD/PNG)

 

Please let me know if you need more information.

 

Thanks

Murty

 

 

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Tamas Szekeres
Sent: Friday, February 06, 2009 4:12 PM


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

 

Please send me your example so that I could examine what's going on.

Best regards,

Tamas



2009/2/6 Murty Maganti 

Hi

 

I tried wi

RE: [mapserver-users] WMS and map script

2009-03-04 Thread Kralidis,Tom [Ontario]
> 
> I am getting junk extent values after calling 
> layerObj.getExtent() on a WMS layer.
> 
>  
> 
> This is the WMS server url
> 
> http://www2.demis.nl/wms/wms.asp
> 
>  
> 
> I have used a layer called Countries from that server and 
> this is the capability xml for that layer
> 
>  queryable="1" opaque="0">
> 
>   
>   Countries
> 
>   
>   Countries
> 
>   
>maxx="180" maxy="83.6333923339844"/>
> 
> 
> 
>  
> 
> This is the entry in map file
> 
>   LAYER
> 
> CONNECTION "http://www2.demis.nl/wms/wms.asp?wms=SAMPLE&";
> 
> CONNECTIONTYPE WMS
> 
> METADATA
> 
>   "wms_srs""EPSG:4326"
> 
>   "wms_name"  "Countries"
> 
>   "wms_format""image/png"
> 
>   "wms_server_version"   "1.1.0"
> 
> END
> 
> NAME "Countries"
> 
> PROJECTION
> 
>   "init=epsg:4326"
> 
> END
> 
> STATUS ON
> 
> TYPE RASTER
> 
> UNITS DD
> 
>   END
> 
>  
> 
> I get extents values (minx, miny, maxx and maxy) as 
> -4.8366978272229995E-26 (which is not same as above in the 
> capabilities xml)
> 
>  
> 
> Appreciate any help.
> 

MapServer won't do a GetCapabiilties to get the extent for remote WMS
layers.  If you set LAYER.EXTENT accordingly, layer.getExtent() will
work accordingly.

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


RE: [mapserver-users] WMS and map script

2009-03-04 Thread Murty Maganti
That won't help me. 
I add the wms layer dynamically to map using C# mapscript (and then save
the map object to map file).

I can get the extents from capabilities but layer.extent is readonly and
can't be set.

Thanks
Murty


-Original Message-
From: Kralidis,Tom [Ontario] [mailto:tom.krali...@ec.gc.ca] 
Sent: Wednesday, March 04, 2009 2:02 PM
To: Murty Maganti; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] WMS and map script

> 
> I am getting junk extent values after calling 
> layerObj.getExtent() on a WMS layer.
> 
>  
> 
> This is the WMS server url
> 
> http://www2.demis.nl/wms/wms.asp
> 
>  
> 
> I have used a layer called Countries from that server and 
> this is the capability xml for that layer
> 
>  queryable="1" opaque="0">
> 
>   
>   Countries
> 
>   
>   Countries
> 
>   
>maxx="180" maxy="83.6333923339844"/>
> 
> 
> 
>  
> 
> This is the entry in map file
> 
>   LAYER
> 
> CONNECTION "http://www2.demis.nl/wms/wms.asp?wms=SAMPLE&";
> 
> CONNECTIONTYPE WMS
> 
> METADATA
> 
>   "wms_srs""EPSG:4326"
> 
>   "wms_name"  "Countries"
> 
>   "wms_format""image/png"
> 
>   "wms_server_version"   "1.1.0"
> 
> END
> 
> NAME "Countries"
> 
> PROJECTION
> 
>   "init=epsg:4326"
> 
> END
> 
> STATUS ON
> 
> TYPE RASTER
> 
> UNITS DD
> 
>   END
> 
>  
> 
> I get extents values (minx, miny, maxx and maxy) as 
> -4.8366978272229995E-26 (which is not same as above in the 
> capabilities xml)
> 
>  
> 
> Appreciate any help.
> 

MapServer won't do a GetCapabiilties to get the extent for remote WMS
layers.  If you set LAYER.EXTENT accordingly, layer.getExtent() will
work accordingly.

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


[mapserver-users] Trying to pass parameters to a map file

2009-03-04 Thread Robert Hicks
Hello all,
I am trying to pass a parameter to a GetMap  call, that way I can 'on the
fly' determine the CONNECTION and WMS_LAYER attributes. So for instance, I
am going to generate a list of several available online services and
depending on which is selected, the GetMap request will also have additional
information such as the CONNECTION string and the LAYER name, that way I can
use the same map file for multiple layers. Is this possible to do? I know
you can do something similar with the FILTER option in the map file.

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


RE: [mapserver-users] WMS and map script

2009-03-04 Thread Murty Maganti
Tom,

Also, I don't see EXTENT attribute at layer level, from below reference
http://www.mapserver.org/mapfile/layer.html

There is layerObj.setExtent() but the extents are not saved to map file.


Thanks
Murty
-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Murty
Maganti
Sent: Wednesday, March 04, 2009 2:13 PM
To: Kralidis,Tom [Ontario]; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] WMS and map script

That won't help me. 
I add the wms layer dynamically to map using C# mapscript (and then save
the map object to map file).

I can get the extents from capabilities but layer.extent is readonly and
can't be set.

Thanks
Murty


-Original Message-
From: Kralidis,Tom [Ontario] [mailto:tom.krali...@ec.gc.ca] 
Sent: Wednesday, March 04, 2009 2:02 PM
To: Murty Maganti; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] WMS and map script

> 
> I am getting junk extent values after calling 
> layerObj.getExtent() on a WMS layer.
> 
>  
> 
> This is the WMS server url
> 
> http://www2.demis.nl/wms/wms.asp
> 
>  
> 
> I have used a layer called Countries from that server and 
> this is the capability xml for that layer
> 
>  queryable="1" opaque="0">
> 
>   
>   Countries
> 
>   
>   Countries
> 
>   
>maxx="180" maxy="83.6333923339844"/>
> 
> 
> 
>  
> 
> This is the entry in map file
> 
>   LAYER
> 
> CONNECTION "http://www2.demis.nl/wms/wms.asp?wms=SAMPLE&";
> 
> CONNECTIONTYPE WMS
> 
> METADATA
> 
>   "wms_srs""EPSG:4326"
> 
>   "wms_name"  "Countries"
> 
>   "wms_format""image/png"
> 
>   "wms_server_version"   "1.1.0"
> 
> END
> 
> NAME "Countries"
> 
> PROJECTION
> 
>   "init=epsg:4326"
> 
> END
> 
> STATUS ON
> 
> TYPE RASTER
> 
> UNITS DD
> 
>   END
> 
>  
> 
> I get extents values (minx, miny, maxx and maxy) as 
> -4.8366978272229995E-26 (which is not same as above in the 
> capabilities xml)
> 
>  
> 
> Appreciate any help.
> 

MapServer won't do a GetCapabiilties to get the extent for remote WMS
layers.  If you set LAYER.EXTENT accordingly, layer.getExtent() will
work accordingly.

..Tom
___
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] WMS question

2009-03-04 Thread Murty Maganti
Hi

 

When I specify WEB.IMAGEPATH to "." and use a WMS layer, I am able to
render the layer on map i.e. map server is able to save the temporary
files. I want to know which folder it is getting resolved to either
relative to map file path or any other path. I need to verify if the
temp files are cleaned up or any files are left in the folder. I can
find them in map file folder or any parent or child folders.

 

Thanks

Murty

 

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


RE: [mapserver-users] WMS and map script

2009-03-04 Thread Kralidis,Tom [Ontario]

FYI there's a ticket now opened on this item at 
http://trac.osgeo.org/mapserver/ticket/2914


-Original Message-
From: Murty Maganti [mailto:mmaga...@oriongis.com]
Sent: Wed 04-Mar-09 14:55
To: Kralidis,Tom [Ontario]; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] WMS and map script
 
Tom,

Also, I don't see EXTENT attribute at layer level, from below reference
http://www.mapserver.org/mapfile/layer.html

There is layerObj.setExtent() but the extents are not saved to map file.


Thanks
Murty
-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Murty
Maganti
Sent: Wednesday, March 04, 2009 2:13 PM
To: Kralidis,Tom [Ontario]; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] WMS and map script

That won't help me. 
I add the wms layer dynamically to map using C# mapscript (and then save
the map object to map file).

I can get the extents from capabilities but layer.extent is readonly and
can't be set.

Thanks
Murty


-Original Message-
From: Kralidis,Tom [Ontario] [mailto:tom.krali...@ec.gc.ca] 
Sent: Wednesday, March 04, 2009 2:02 PM
To: Murty Maganti; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] WMS and map script

> 
> I am getting junk extent values after calling 
> layerObj.getExtent() on a WMS layer.
> 
>  
> 
> This is the WMS server url
> 
> http://www2.demis.nl/wms/wms.asp
> 
>  
> 
> I have used a layer called Countries from that server and 
> this is the capability xml for that layer
> 
>  queryable="1" opaque="0">
> 
>   
>   Countries
> 
>   
>   Countries
> 
>   
>maxx="180" maxy="83.6333923339844"/>
> 
> 
> 
>  
> 
> This is the entry in map file
> 
>   LAYER
> 
> CONNECTION "http://www2.demis.nl/wms/wms.asp?wms=SAMPLE&";
> 
> CONNECTIONTYPE WMS
> 
> METADATA
> 
>   "wms_srs""EPSG:4326"
> 
>   "wms_name"  "Countries"
> 
>   "wms_format""image/png"
> 
>   "wms_server_version"   "1.1.0"
> 
> END
> 
> NAME "Countries"
> 
> PROJECTION
> 
>   "init=epsg:4326"
> 
> END
> 
> STATUS ON
> 
> TYPE RASTER
> 
> UNITS DD
> 
>   END
> 
>  
> 
> I get extents values (minx, miny, maxx and maxy) as 
> -4.8366978272229995E-26 (which is not same as above in the 
> capabilities xml)
> 
>  
> 
> Appreciate any help.
> 

MapServer won't do a GetCapabiilties to get the extent for remote WMS
layers.  If you set LAYER.EXTENT accordingly, layer.getExtent() will
work accordingly.

..Tom
___
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] Encoding issues

2009-03-04 Thread Tamas Szekeres
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 

>  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 
>
> 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;
>
>
>
> lyr.transform = (int)mapscript.MS_FALSE;
>
>
>
> classObj layerClass = new classObj(lyr);
>
>
>
> //All label properties
>
> layerClass.label.size = 15;
>
> layerClass.label.type = MS_FONT_TYPE.MS_TRUETYPE;
>
> …
>
> …
>
> layerClass.label.encoding = "CP1256";
>
>
>
>
>
> shapeObj shpObj = new shapeObj((int)MS_SHAPE_TYPE
> .MS_SHAPE_POINT);
>
> lineObj lnObj = new lineObj();
>
>
>
> pointObj pt = new pointObj(locationX, locationY, 0, 0);
>
> lnObj.add(pt);
>
>
>
> shpObj.add(lnObj);
>
>
>
> shpObj.text = "لققافعععىىةةونه"; //I actually get this (in
> arabic) through user input
>
>
>
> lyr.addFe

[mapserver-users] 500 Internal Server Error

2009-03-04 Thread Rui Gomes
Greetings...

I developed a websig in mapserver using ubuntu and a virtual host in Ubuntu OS.
Now i try to build it in a real server.

I expect recived the follow error Message:

msLoadMap(): Unable to access file. (/testing_error/hello.map)


But all i recived was:

500 Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator,
webmas...@testing_error.hostserver.net and inform them of the time the
error occurred, and anything you might have done that may have caused
the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.


What is wrong. Something is missing?


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


Re: [mapserver-users] 500 Internal Server Error

2009-03-04 Thread Gregor at HostGIS

Rui Gomes wrote:

I expect recived the follow error Message:
msLoadMap(): Unable to access file. (/testing_error/hello.map)


I would expect that from the command line. From a webserver, I would 
expect a 500 response and to find that above message in the error_log


--
Gregor Mosheh / Greg AllensworthBS, A+, Network+, Security+, Server+
System Administrator, Lead Programmer
HostGIS 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] 500 Internal Server Error

2009-03-04 Thread Steve Lime
What's in the server log? Sometimes you'll see this if the right libraries 
can't be loaded
by the mapserver cgi binary.

Steve

>>> Rui Gomes  03/04/09 5:11 PM >>>
Greetings...

I developed a websig in mapserver using ubuntu and a virtual host in Ubuntu OS.
Now i try to build it in a real server.

I expect recived the follow error Message:

msLoadMap(): Unable to access file. (/testing_error/hello.map)


But all i recived was:

500 Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator,
webmas...@testing_error.hostserver.net and inform them of the time the
error occurred, and anything you might have done that may have caused
the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.


What is wrong. Something is missing?


-- 
  Rui Gomes
___
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] 500 Internal Server Error

2009-03-04 Thread Rui Gomes
The server log only have this:

[Wed Mar 04 17:30:54 2009] [error] [client 89.181.105.88] File does
not exist: /home2/ruigomes/public_html/404.shtml
[Wed Mar 04 17:30:54 2009] [error] [client 89.181.105.88] File does
not exist: /home2/ruigomes/public_html/favicon.ico

And a few more question: what libraries i need to put in the server?
Where i can find some documentation about the libraries mapserver
need?


2009/3/4 Steve Lime :
> What's in the server log? Sometimes you'll see this if the right libraries 
> can't be loaded
> by the mapserver cgi binary.
>
> Steve
>
 Rui Gomes  03/04/09 5:11 PM >>>
> Greetings...
>
> I developed a websig in mapserver using ubuntu and a virtual host in Ubuntu 
> OS.
> Now i try to build it in a real server.
>
> I expect recived the follow error Message:
>
> msLoadMap(): Unable to access file. (/testing_error/hello.map)
>
>
> But all i recived was:
>
> 500 Internal Server Error
>
> The server encountered an internal error or misconfiguration and was
> unable to complete your request.
>
> Please contact the server administrator,
> webmas...@testing_error.hostserver.net and inform them of the time the
> error occurred, and anything you might have done that may have caused
> the error.
>
> More information about this error may be available in the server error log.
>
> Additionally, a 404 Not Found error was encountered while trying to
> use an ErrorDocument to handle the request.
>
>
> What is wrong. Something is missing?
>
>
> --
>                                      Rui Gomes
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



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


Re: [mapserver-users] 500 Internal Server Error

2009-03-04 Thread Gregor at HostGIS

And a few more question: what libraries i need to put in the server?
Where i can find some documentation about the libraries mapserver
need?


A technique I find handy for debugging mapserver problems, a bit more 
useful than "Internal server error", is to go into the Unix shell and 
use shp2img. Are you able to get into a shell?


I'd use something similar to one of these:
  shp2img -o test.png -m mapfile.map
  shp2img -o test.png -m mapfile.map -d 999
  shp2img -o test.png -m mapfile.map -l lakes,streets

When that fails, it'll give you more information as to what went wrong. 
For example, it will give hints as to shapefiles being transferred in 
ASCII mode, or the TEMPDIR not being writable.


--
Gregor Mosheh / Greg AllensworthBS, A+, Network+, Security+, Server+
System Administrator, Lead Programmer
HostGIS 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


[mapserver-users] $_SESSION variable substitution

2009-03-04 Thread Greg Luker

Hi mapserver-users,

I would like to use a $_SESSION variable in a mapfile FILTER 
statement. I have tried variations of:


(in calling HTML template):



(in mapfile):

FILTER "WHERE site_last_survey_who = '%myvar%'"

but I can't get it to work - in this case the browser displays the 
WEB ERROR "errors.html" webpage and mapserver puts the following 
error in mapserver.log:


msDrawMap(): Image handling error. Failed to draw layer named 'pts'.
msOGRFileNextShape(): OGR error. Syntax error, 2 extra tokens

Is it possible to do what I want? (BTW CGI mapserver v5.2)

Thanks,
Greg.




Greg Luker
GIS Lab Manager, Southern Cross University
Lismore, AUSTRALIA.
glu...@scu.edu.au
phone 61 2 66203026



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


Re: [mapserver-users] $_SESSION variable substitution

2009-03-04 Thread Stephen Woodbridge

The short answer is no.

The longer answer is $_SESSION is a php variable and it only exist while 
php is executing. When you call mapserver cgi, it is not running in the 
php environment. and if you use it in a template, there is not for 
mapserver to tell the webserver that it needs to run php processor over 
the results of the out of mapserver, ie. the processed template.


If you really need to do this you might be able convert the info you 
need into cookie or change you mapserver request to include the info you 
need on its url than then use url substitution.


Or you might develop you application in php/mapscript where it will run 
in the php environment.


It might help more to explain why you think you need to do this, and 
people might be able to offer other ways to do something similar.


-Steve W

Greg Luker wrote:

Hi mapserver-users,

I would like to use a $_SESSION variable in a mapfile FILTER statement. 
I have tried variations of:


(in calling HTML template):



(in mapfile):

FILTER "WHERE site_last_survey_who = '%myvar%'"

but I can't get it to work - in this case the browser displays the WEB 
ERROR "errors.html" webpage and mapserver puts the following error in 
mapserver.log:


msDrawMap(): Image handling error. Failed to draw layer named 'pts'.
msOGRFileNextShape(): OGR error. Syntax error, 2 extra tokens

Is it possible to do what I want? (BTW CGI mapserver v5.2)

Thanks,
Greg.




Greg Luker
GIS Lab Manager, Southern Cross University
Lismore, AUSTRALIA.
glu...@scu.edu.au
phone 61 2 66203026



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

2009-03-04 Thread Greg Luker

Hi Steve,

Thanks very much for your answer.

At 01:17 PM 5/03/2009, Steve W wrote:

It might help more to explain why you think you need to do this, and 
people might be able to offer other ways to do something similar.


The application I'm building involves access to culturally sensitive 
information, that only logged in users should have access to - so url 
substitution is not an option.
I am not a php programmer, so php/mapscript is not an (easy) option. 
(nor are any other mapscript flavours)
The user account management part is already written (by someone else) 
in php, so I have access to $_SESSION, and cookies if that is a 
viable alternative.
I'm absolutely open to any suggestions to achieve my goal of 
username/password restricted access to a mapserver map showing 
culturally sensitive points derived from a MySQL database.


Thanks,
Greg.


Greg Luker
GIS Lab Manager, Southern Cross University
Lismore, AUSTRALIA.
glu...@scu.edu.au
phone 61 2 66203026



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


[mapserver-users] mapscript + openlayers

2009-03-04 Thread Binay Raja. Shrestha
Dear sir,

I am using mapserver and C#mapscript. Can I use openlayers javascript
with c#mapscript.

If it is possible can u provide me any tutorials or links useful for
development.

 

Thank you.

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


RE: [mapserver-users] mapscript + openlayers

2009-03-04 Thread Venkat Rao Tammineni
Hi,

 

Please refer  url  http://openlayers.org/dev/examples/

 

Thanks

Venkat.

 

 

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Binay Raja.
Shrestha
Sent: Thursday, March 05, 2009 9:47 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] mapscript + openlayers

 

Dear sir,

I am using mapserver and C#mapscript. Can I use openlayers javascript with
c#mapscript.

If it is possible can u provide me any tutorials or links useful for
development.

 

Thank you.

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


Re: [mapserver-users] mapscript + openlayers

2009-03-04 Thread Christopher Schmidt
On Thu, Mar 05, 2009 at 10:01:33AM +0545, Binay Raja. Shrestha wrote:
> Dear sir,
> 
> I am using mapserver and C#mapscript. Can I use openlayers javascript
> with c#mapscript.
> 
> If it is possible can u provide me any tutorials or links useful for
> development.

Binay,

Generally speaking, OpenLayers talks to a URL to fetch 'tiles': images
with data. This data can be provided by anything, so, for example, you
can use PHP mapscript to accept image parameters and deliver this data.

However, generally speaking, there isn't need to use MapScript for this
type of application. Instead, you can use the MapServer CGI directly to
serve requests, via WMS or some other mechanism.

Whether you can use OpenLayers with your particular usage of MapScript
depends entirely on how you're using it. Are you building an application
in C# and want to use MapScript? Do you want to integrate OpenLayers in
something that requests a dynamic image generated? Something else? All
these possibilities have different sorts of answers. For a more detailed
response than "Yes, but I don't know if you can", you'd need to share
more details.

Best Regards,
-- 
Christopher Schmidt
MetaCarta
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapscript + openlayers

2009-03-04 Thread Christopher Schmidt
On Thu, Mar 05, 2009 at 09:54:38AM +0530, Venkat Rao Tammineni wrote:
> Hi,
> 
> Please refer  url  http://openlayers.org/dev/examples/

Note that none of these examples in any way take advantage of MapScript,
but almost all of them do take advantage of MapServer, and could be
easily integrated into an ASP solution of some sort.

-- Chris

>  
> 
> Thanks
> 
> Venkat.
> 
>  
> 
>  
> 
>  
> 
> From: mapserver-users-boun...@lists.osgeo.org
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Binay Raja.
> Shrestha
> Sent: Thursday, March 05, 2009 9:47 AM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] mapscript + openlayers
> 
>  
> 
> Dear sir,
> 
> I am using mapserver and C#mapscript. Can I use openlayers javascript with
> c#mapscript.
> 
> If it is possible can u provide me any tutorials or links useful for
> development.
> 
>  
> 
> Thank you.
> 

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


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


Re: [mapserver-users] Image Quality - Image Preprocessing

2009-03-04 Thread Roger André
Hi Travis,

>From a purely subjective standpoint, I feel that the bilinear
resampling method works the best with aerial photo data.  You can test
this using gdalwarp:

gdalwarp -ts   -r   

But before you resample all your data, you might try adding the
following processing directive to your imagery layer:

PROCESSING "RESAMPLE=BILINEAR"

You might find that this improves things enough.

Roger
--

On Wed, Mar 4, 2009 at 6:54 AM, Travis Kirstine
 wrote:
> We are running mapserver connected to a tilecache delivering high
> resolution orthophoto to a google maps.  The problem I am having is
> that we preprocess all our imagery using reduced resolutions at higher
> scales and full resolution at lower scales.  In the past we have used
> gdal_merge with - ps 10 10  to merge tile into larger overalls and
> downsampling  the resolution but we have found that the image quality
> was not adequate.  I have been experimenting with gdalwarp using the
> different resampling methods with varied results.  Is there any
> consensus on which resampling method provided with gdal provide the
> optimal results (from a viewing perspective) when downsampling imagery
> data?
>
> --
> Travis K.
>
> Toronto, Canada
> 
> "She knows there's no success like failure
> And that failure's no success at all."
> -Bob Dylan-
> 
> ___
> 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] 'errno: 2' on projection

2009-03-04 Thread kapilmanoj

Hello wendall,

  I too facing the same problem. have you got solution for this problem?
could you please help me out?

Thanks,
kapilmanoj

Wendell Turner wrote:
> 
> On Mon, May 19, 2008 at 03:32:16PM -0700, Wendell Turner wrote:
>> I'm trying to use the 'projection' tag in a map file, but it
>> is not working, and would like help.
>> 
>> I'm using Fedora 7, and there is a mapserver 4.10 in a yum
>> repository, which pulls in proj as a dependency.  However,
>> when using the 'projection' tag, it gets
>>   msProcessProjection(): Projection library error. no system list, errno:
>> 2
>> (which seems to mean 'file not found')
> 
> As it turns out, other projections work.
> 
> I'm just trying to get the v4 tutorial working, which is
> where the problem occurs.  Any example that contains
> PROJECTION
>   "init=epsg:4326"
> END
> 
> gets the error msg.  However, the file
> /usr/local/share/proj/epsg contains an entry for 4326.
> 
> Q: why doe the example in the tutorial not work?
> Q: how can it be fixed?
> 
> Thanks,
> 
> Wendell
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/%27errno%3A-2%27-on-projection-tp1970528p2427848.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