Re: [mapserver-users] Using mapserver with EPSG:900913

2008-08-21 Thread Subha Ramakrishnan

Hi,
Could you also check the map file and tell me if i am making a mistake 
there?

This is the map file i am using.
MAP
NAME MAP_POINTS
SIZE 725 800
IMAGETYPE PNG
EXTENT 6679169.44667 -7.081154550627918 11131949.0 
4865942.278825832

WEB
METADATA
  wms_srs EPSG:4326 EPSG:900913
END
END
PROJECTION
init=epsg:900913
END
LAYER
CONNECTIONTYPE postgis
NAME indiastates
CONNECTION user=postgres dbname=test host=localhost
TYPE POINT
STATUS DEFAULT
#DATA topology from states
DATA topology from india_states using unique id using SRID -1
CLASS
  COLOR 255 0 0
END
END
END

Is it possible for you to share your map file if you have any?

Regards,
Subha

Rafael Almeida Fernandez Soto wrote:

Subha..

You need to insert a EPSG:900913 description code in PROJ4 config 
files and a row in spatial_ref_sys table in postgis DB. By default 
PROJ4 has not a 900013 projection reference.


Try it!

Best regards

Rafael Soto

2008/8/20 Subha Ramakrishnan [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

Hi :
We are building a map based web portal using openlayers ,UMN
mapserver[5.0.2] and postgis DB.We use google as the base map
through openlayers.We need to overlay our custom layers from the
db on top of this base map, for that we are using Mapserver (is
run on a FC7 linux machine). It is observed that by default
openlayers converts google projection [900913] to EPSG:4326 when
the base map is fetched.

Now when we try to overlay an image that the mapserver generates,
there is a mismatch on the base map, though mapserver uses
epsg::4326. After searching over the internet theere seems to be
only one solution which is displaying the base map itself in
epsg:900913 and emit the mapserver image also in the same
projection. The problem is we are not able to generate an image
through mapserver in epsg::900913.

We have taken following measures untill now :

1 For using epsg:900913 projection in mapserver, we have added
following entry in the /usr/local/share/proj/epsg file.[proj
version 4.6]
 900913 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
+x_0=0.0 +y_0=0 +k=1.0 +units=m [EMAIL PROTECTED] +no_defs   2
We have added following entry in the in the spatial_ref_sys table
in postgis DB.
900913 ,'EPSG',900913,'GEOGCS[WGS 84, DATUM[World Geodetic
System 1984, SPHEROID[WGS 84, 6378137.0,
298.257223563,AUTHORITY[EPSG,7030]],
AUTHORITY[EPSG,6326]],PRIMEM[Greenwich, 0.0,
AUTHORITY[EPSG,8901]], UNIT[degree,0.017453292519943295],
AXIS[Longitude, EAST], AXIS[Latitude,
NORTH],AUTHORITY[EPSG,4326]],
PROJECTION[Mercator_1SP],PARAMETER[semi_minor, 6378137.0],
PARAMETER[latitude_of_origin,0.0], PARAMETER[central_meridian,
0.0], PARAMETER[scale_factor,1.0], PARAMETER[false_easting,
0.0], PARAMETER[false_northing, 0.0],UNIT[m, 1.0], AXIS[x,
EAST], AXIS[y, NORTH],AUTHORITY[EPSG,900913]] |','+proj=merc
+a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0
+k=1.0 +units=m [EMAIL PROTECTED] +no_defs');  The mapfile is as
follows: (With this, We get a blank image without any exception.)
MAP
NAME MAP_POINTS
SIZE 725 800
IMAGETYPE PNG
EXTENT 6679169.44667 -7.081154550627918 11131949.0
4865942.278825832
WEB
METADATA
   wms_srs EPSG:4326 EPSG:900913
END
END
PROJECTION
init=epsg:900913
END
LAYER
CONNECTIONTYPE postgis
NAME indiastates
CONNECTION user=postgres dbname=test host=localhost
TYPE POINT
STATUS DEFAULT
#DATA topology from states
DATA topology from india_states using unique id using SRID -1
CLASS
   COLOR 255 0 0
END
END
END

The client (openlayer) code is as follows :
options = {
projection: new OpenLayers.Projection(EPSG:900913),
displayProjection: new OpenLayers.Projection(EPSG:4326),
units: m,
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
 20037508, 20037508.34)
};
 map = new OpenLayers.Map('map', options);
 var gphy = new OpenLayers.Layer.Google(Google
Physical,{type: G_PHYSICAL_MAP,'sphericalMercator': true});  
  map.addLayers(gphy);

var lonLat = new OpenLayers.LonLat(82, 23) ;
   
lonLat.transform(map.displayProjection,map.getProjectionObject());

   map.setCenter(lonLat,5);
 var wms ;
   wms = new OpenLayers.Layer.WMS( layername,
  http://localhost/cgi-bin/mapserv?;,
  { map: 'demo.map',
projection:EPSG:900913,
transparent: 'true', layers: 'indiastates',
format: 'image/png'},{singleTile: 'true'} );
   map.addLayer(twms1);

Can anyone help us in any way?
Also,
We have tried overlaying layer 

Re: [mapserver-users] Using mapserver with EPSG:900913

2008-08-21 Thread ritesh ambastha
I am not sure this will help or not

I found two epsg files in my /usr/local/share/proj directory:

epsg
EPSG (in caps)

I modify the values in both the files for my use. You can also try the same

Regards,
Ritesh Ambastha

/usr/local/share/proj/epsg

On Thu, Aug 21, 2008 at 5:41 PM, Subha Ramakrishnan [EMAIL PROTECTED] wrote:

 Hi,
 Could you also check the map file and tell me if i am making a mistake
 there?
 This is the map file i am using.

 MAP
 NAME MAP_POINTS
 SIZE 725 800
 IMAGETYPE PNG
 EXTENT 6679169.44667 -7.081154550627918 11131949.0
 4865942.278825832
 WEB
 METADATA
  wms_srs EPSG:4326 EPSG:900913
 END
 END
 PROJECTION
 init=epsg:900913
 END
 LAYER
 CONNECTIONTYPE postgis
 NAME indiastates
 CONNECTION user=postgres dbname=test host=localhost
 TYPE POINT
 STATUS DEFAULT
 #DATA topology from states
 DATA topology from india_states using unique id using SRID -1
 CLASS
  COLOR 255 0 0
 END
 END
 END

 Is it possible for you to share your map file if you have any?

 Regards,
 Subha

 Rafael Almeida Fernandez Soto wrote:

 Subha..

 You need to insert a EPSG:900913 description code in PROJ4 config files
 and a row in spatial_ref_sys table in postgis DB. By default PROJ4 has not a
 900013 projection reference.

 Try it!

 Best regards

 Rafael Soto

 2008/8/20 Subha Ramakrishnan [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]


Hi :
We are building a map based web portal using openlayers ,UMN
mapserver[5.0.2] and postgis DB.We use google as the base map
through openlayers.We need to overlay our custom layers from the
db on top of this base map, for that we are using Mapserver (is
run on a FC7 linux machine). It is observed that by default
openlayers converts google projection [900913] to EPSG:4326 when
the base map is fetched.

Now when we try to overlay an image that the mapserver generates,
there is a mismatch on the base map, though mapserver uses
epsg::4326. After searching over the internet theere seems to be
only one solution which is displaying the base map itself in
epsg:900913 and emit the mapserver image also in the same
projection. The problem is we are not able to generate an image
through mapserver in epsg::900913.

We have taken following measures untill now :

1 For using epsg:900913 projection in mapserver, we have added
following entry in the /usr/local/share/proj/epsg file.[proj
version 4.6]
 900913 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
+x_0=0.0 +y_0=0 +k=1.0 +units=m [EMAIL PROTECTED] +no_defs   2
We have added following entry in the in the spatial_ref_sys table
in postgis DB.
900913 ,'EPSG',900913,'GEOGCS[WGS 84, DATUM[World Geodetic
System 1984, SPHEROID[WGS 84, 6378137.0,
298.257223563,AUTHORITY[EPSG,7030]],
AUTHORITY[EPSG,6326]],PRIMEM[Greenwich, 0.0,
AUTHORITY[EPSG,8901]], UNIT[degree,0.017453292519943295],
AXIS[Longitude, EAST], AXIS[Latitude,
NORTH],AUTHORITY[EPSG,4326]],
PROJECTION[Mercator_1SP],PARAMETER[semi_minor, 6378137.0],
PARAMETER[latitude_of_origin,0.0], PARAMETER[central_meridian,
0.0], PARAMETER[scale_factor,1.0], PARAMETER[false_easting,
0.0], PARAMETER[false_northing, 0.0],UNIT[m, 1.0], AXIS[x,
EAST], AXIS[y, NORTH],AUTHORITY[EPSG,900913]] |','+proj=merc
+a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0
+k=1.0 +units=m [EMAIL PROTECTED] +no_defs');  The mapfile is as
follows: (With this, We get a blank image without any exception.)
MAP
NAME MAP_POINTS
SIZE 725 800
IMAGETYPE PNG
EXTENT 6679169.44667 -7.081154550627918 11131949.0
4865942.278825832
WEB
METADATA
   wms_srs EPSG:4326 EPSG:900913
END
END
PROJECTION
init=epsg:900913
END
LAYER
CONNECTIONTYPE postgis
NAME indiastates
CONNECTION user=postgres dbname=test host=localhost
TYPE POINT
STATUS DEFAULT
#DATA topology from states
DATA topology from india_states using unique id using SRID -1
CLASS
   COLOR 255 0 0
END
END
END

The client (openlayer) code is as follows :
options = {
projection: new OpenLayers.Projection(EPSG:900913),
displayProjection: new OpenLayers.Projection(EPSG:4326),
units: m,
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
 20037508, 20037508.34)
};
 map = new OpenLayers.Map('map', options);
 var gphy = new OpenLayers.Layer.Google(Google
Physical,{type: G_PHYSICAL_MAP,'sphericalMercator': true});
  map.addLayers(gphy);
var lonLat = new OpenLayers.LonLat(82, 23) ;

  lonLat.transform(map.displayProjection,map.getProjectionObject());
   map.setCenter(lonLat,5);
 var wms ;
   wms = new OpenLayers.Layer.WMS( layername,
  

RE: [MAPSERVER-USERS] epsg code for 'UTM 43 North'

2008-08-21 Thread Fawcett, David
If your data is using WGS84 as the ellipsoid/datum, the code would be
32643.  

Here is a snipped from the data file used by proj4.

# WGS 84 / UTM zone 43N
32643 +proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m +no_defs
no_defs 

David.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ritesh
Ambastha
Sent: Tuesday, August 19, 2008 11:58 AM
To: mapserver-users@lists.osgeo.org
Subject: [MAPSERVER-USERS] epsg code for 'UTM 43 North'



How can I calculate exact EPSG code for the date projected in 'UTM 43
North' ? 

I just got few clues from this link :
http://spatialreference.org/ref/epsg/?search=UTMsrtext=Search

Thanks,
Ritesh Ambastha
-- 
View this message in context:
http://www.nabble.com/epsg-code-for-%27UTM-43-North%27-tp19054466p190544
66.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Maximum number of layers?

2008-08-21 Thread Emerson, Gabe
Hello all,

 

I'm running into an error when I try to use more than 64 layers in my
map. I know the older versions of Mapserver could handle at least 100
layers, and I've read posts from people who currently use up to several
hundred (I'm using v5.2.0) so I'm not sure what's going on. 

 

The error I get is:

 

GCI Error

The specified CGI application misbehaved by not returning a complete set
of HTTP headers. 

 

I have a couple hundred layers that I'd like to show. I can live with a
limit of 200-300 if necessary, but 64 seems rather on the low side. The
majority are points with pixmap symbols, but I also have some aerials,
road vectors, and polygon vectors. I've tried this with different
subsets of layers, so it doesn't seem to be any one layer or set of
layers in particular causing the problem.  64 seems to be the maximum I
can have enabled no matter what type they are.

 

I initially thought this could be a problem with the rendering of the
pixmaps, but I've tried changing a few symbols to vectors with the same
result. I also considered that the legend was becoming too large, but
when I have 64 layers on, adding one more causes the same error even if
it's a layer with no legend entry. 

 

I am using POST to pass the layers from plain old HTML, GET acts the
same way. As far as I can tell there's no hard limit for the size/length
of text passed this way, and I'm not getting any size-exceeded errors. 

 

Does anyone have any suggestions on this? 

 

Thanks,

 

-Gabe Emerson

 

 

 

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


Re: [mapserver-users] Maximum number of layers?

2008-08-21 Thread Daniel Morissette
There is no static limit on the number of layers in a map with MapServer 
5.2. It must be something in one of your layers that causes MapServer to 
fail. Have a look at your Apache's error_log file, it may contain hints 
about the problem... you could also try enabling debug/logging and see 
if that triggers any useful info (see 
http://mapserver.gis.umn.edu/development/rfc/ms-rfc-28/)


Daniel

Emerson, Gabe wrote:

Hello all,

 

I’m running into an error when I try to use more than 64 layers in my 
map. I know the older versions of Mapserver could handle at least 100 
layers, and I’ve read posts from people who currently use up to several 
hundred (I’m using v5.2.0) so I’m not sure what’s going on.


 


The error I get is:

 


GCI Error

The specified CGI application misbehaved by not returning a complete set 
of HTTP headers.


 

I have a couple hundred layers that I’d like to show. I can live with a 
limit of 200-300 if necessary, but 64 seems rather on the low side. The 
majority are points with pixmap symbols, but I also have some aerials, 
road vectors, and polygon vectors. I’ve tried this with different 
subsets of layers, so it doesn’t seem to be any one layer or set of 
layers in particular causing the problem.  64 seems to be the maximum I 
can have enabled no matter what type they are.


 

I initially thought this could be a problem with the rendering of the 
pixmaps, but I’ve tried changing a few symbols to vectors with the same 
result. I also considered that the legend was becoming too large, but 
when I have 64 layers on, adding one more causes the same error even if 
it’s a layer with no legend entry.


 

I am using POST to pass the layers from plain old HTML, GET acts the 
same way. As far as I can tell there’s no hard limit for the size/length 
of text passed this way, and I’m not getting any size-exceeded errors.


 


Does anyone have any suggestions on this?

 


Thanks,

 


-Gabe Emerson

 

 

 





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



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


[mapserver-users] problem with postgis an mapserver

2008-08-21 Thread fsalas
Why? When i work with postgree 8.1 and postgis my projects mapserver is ok ,
but whhe i change to postgree 8.3 and postgis 1.3.3 I can't see my maps only 
a blank image
bets regards
salas 


___
Dpto de Sistemas Informáticos
Oficina Central Grupo Empresarial GEOCUBA
Este mensaje esta libre de virus. 
Revisado por Kaspersky Antivirus
--
Engine version:  4.0.1.14
Engine date:  2002/06/25
Definition count:  995840
Definition date:  2008/08/21
MDAV version: 2.2.9

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


[mapserver-users] error with maplab and mapserver

2008-08-21 Thread fsalas
hi, why in my maplab projects appears this error?


Warning: [MapServer Error]: msCalculateScale(): Invalid image width or height. 
in C:\ms4w\apps\maplab-2.2\htdocs\common\wrapper\map_session.php on line 468

Warning: [MapServer Error]: msDrawMap(): Unable to initialize image. in 
C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php on line 469

Warning: [MapServer Error]: msPrepareImage(): Image dimensions not specified. 
in C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php on line 469

Warning: [MapServer Error]: msCalculateScale(): Invalid image width or height. 
in C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php on line 469

Fatal error: Call to a member function saveWebImage() on a non-object in 
C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php on line 474


 Salas


___
Dpto de Sistemas Informáticos
Oficina Central Grupo Empresarial GEOCUBA
Este mensaje esta libre de virus. 
Revisado por Kaspersky Antivirus
--
Engine version:  4.0.1.14
Engine date:  2002/06/25
Definition count:  995840
Definition date:  2008/08/21
MDAV version: 2.2.9

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


Re: [mapserver-users] date format?

2008-08-21 Thread Sacha Black
Hi David,

a belated thank you for this tip - I didn't think of trying to do it
in the select statement. For the record here is the syntax I used:

SELECT DATE_FORMAT(My_DATE_FieldName,'%W %M %D, %Y') ... etc.

produces a nice date like:

Monday September 20th, 2004

thanks again,

Sacha

On Wed, Jul 30, 2008 at 1:13 PM, Fawcett, David
[EMAIL PROTECTED] wrote:

 Have you tried using a date format function in your SQL statement?
 http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#func
 tion_date-format

 David.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Sacha
 Black
 Sent: Wednesday, July 30, 2008 3:07 PM
 To: mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] date format?


 I've got point data in a MySQL database that I am displaying in my map.
 I'd like to label the points with a date, but the date format stored in
 the database looks like this:

 2008-06-17 00:00:00

 and we would like to put a label on the map in some kind of more user
 friendly format (and omitting the time portion which we do not need)
 is this kind of re-formatting for labels possible in Mapserver? Prefer
 not to create a new field in the DB as there are thousands of records...

 any ideas?

 sacha


 Fri May 9 09:53:29 EDT 2008

 Hi list,

 using a shapefile with a Date column, is it possible to change the date
 format (string) that Mapserver will use in the WFS GetFeature output?

 Now it outputs:

 ms:Discovery_date19690101/ms:Discovery_date

 whereas we would want 1969-01-01

 Best regards,
 Bart
 ___
 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] MapServer history

2008-08-21 Thread Kralidis,Tom [Burlington]

Interesting thread going on at
http://lists.osgeo.org/pipermail/discuss/2008-August/004120.html

I think it would be valuable to have this for MapServer.  There would be
initial effort, but it could be easily maintained over time (2-3 times
per year/as needed).

I'd be interested in helping out, or even coordinating, but this would
depend on compilation and input from many in the MapServer community
(users, developers, etc.).

Any interest?

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


[mapserver-users] 5.2 problem - MySQL

2008-08-21 Thread Greg Luker

Hi MapServer Users,

I have just migrated from MapServer 4.10 to MapServer 5.2.
I display points from a MySQL database (using OGRVRT select 
statement). A query (on the same database) that used to work fine 
with MapServer 4.10 now does not return anything from the database - 
no error message either. I click on a point  and the header template 
is returned and displayed but nothing else, not even the footer 
template. (no changes to .map file or MySQL - mapserver.log says 
normal execution)


Anyone have any ideas?

Thanks,
Greg.


Greg Luker
GIS Lab Manager, Southern Cross University
Lismore, AUSTRALIA.
[EMAIL PROTECTED]
phone 61 2 66203026



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