[mapserver-users] Projection takes less time than no projection ?

2012-12-04 Thread Clément MONIER
Hi All,

I'm using MapServer to generate tiles to overlay on a GoogleMaps base layer.
My data files are WGS84 shapefiles.

So my current mapfile was looking like :

MAP
...
PROJECTION init=epsg:3785 END
...
LAYER
...
PROJECTION init=epsg:4326 END
...
END
...
END

I was wondering about improving response time by disabling on-the-fly 
projection.
So I did pre-project my shp into spherical Mercator first.
And my new mapfile now looks like :

MAP
...
PROJECTIONproj=merca=6378137b=6378137lat_ts=0.0
lon_0=0.0x_0=0.0y_0=0k=1.0units=mnadgrids=@null 
   no_defs END
...
LAYER
...
END
...
END

I do get the same  tiles.
But when asking a single tile using both mapfile, I noticed that the response 
time was higher (about +10%) when the second mapfile was used !

Do you have any idea about what's going on ?

Thanks   Regards

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


Re: [mapserver-users] Projection takes less time than no projection ?

2012-12-04 Thread Clément MONIER
Yes, you're right ! thanks a lot !
My projection (epsg dat) def file had some errors.
I made some corrections on my proj espg dat files and it works fine with
PROJECTION init=epsg:3785 END
Everywhere

Response times now make sense : +10% when projection's enabled (on a specific 
test tile)

De : TC Haddad [mailto:tchad...@gmail.com]
Envoyé : mardi 4 décembre 2012 17:29
À : Clément MONIER
Objet : Re: [mapserver-users] Projection takes less time than no projection ?

Strange. Maybe you should check your proj EPSG code list and search for 3785 to 
see if it is listed there (maybe it is missing for some reason?). Or if it is 
in there, compare it to the defs below to look for any mistakes

Tanya
On Tue, Dec 4, 2012 at 7:57 AM, Clément MONIER 
clement.mon...@v-trafic.commailto:clement.mon...@v-trafic.com wrote:
I did try but it didn't give me the same map view (though requested with 
TILE=X+Y+Z)
I don't know why, but (only in the new mapfile version) if I don't put a MAP 
projection block like this

PROJECTION
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
nadgrids=@null
no_defs
END

Instead of
PROJECTION init=epsg:3785 END
I don't get the same map's view

De : TC Haddad [mailto:tchad...@gmail.commailto:tchad...@gmail.com]
Envoyé : mardi 4 décembre 2012 16:51
À : Clément MONIER
Objet : Re: [mapserver-users] Projection takes less time than no projection ?

did you try this option for comparison?
MAP
...
PROJECTION init=epsg:3785 END
...
LAYER
...
PROJECTION init=epsg:3785 END
...
END
...
END

On Tue, Dec 4, 2012 at 7:23 AM, Clément MONIER 
clement.mon...@v-trafic.commailto:clement.mon...@v-trafic.com wrote:
MAP
...
PROJECTION init=epsg:3785 END
...
LAYER
...
PROJECTION init=epsg:4326 END
...
END
...
END


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


[mapserver-users] [WMS] Styles not working with mode=tile

2011-12-16 Thread Clément MONIER
Hi,

I'm applying styles to my list of layers inside a WMS request, using the 
classgroup/class/group system in the mapfile.

It works fine when no tile mode is used (bbox instead) :
If I launch this request
http://mapserver/cgi-bin/mapserv.exe?map=mymapfile.mapSERVICE=WMSREQUEST=GetMapVERSION=1.3.0LAYERS=layer1STYLES=style2FORMAT=image/pngBGCOLOR=0xFFTRANSPARENT=TRUECRS=EPSG:4326bbox=-35,10,52,15WIDTH=600HEIGHT=600
style2 is applied to layer1

But it doesn't work if the request uses tile mode :
http://mapserver/cgi-bin/mapserv.exe?map=mymapfile.mapSERVICE=WMSREQUEST=GetMapVERSION=1.3.0LAYERS=layer1STYLES=style2FORMAT=image/pngBGCOLOR=0xFFTRANSPARENT=TRUECRS=EPSG:4326tile=0+0+0tilemode=gmapmode=tileWIDTH=600HEIGHT=600
style2 is not applied (default style is applied)

Is there a way to apply styles in tile mode ?

Thanks  Regards

Clément

ps : config
MS4W
MapServer v5.6
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Mapserver 64bits for windows

2011-08-08 Thread Clément MONIER
Hi,

I'm looking for binaries of MapServer 64bits built for windows.
As I couldn't find any, I'm trying to compile a 64bits version of MapServer on 
windows.

Do you know any documentation related to this subject ?

Thanks  Regards

Clement

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


[mapserver-users] relative path for .map file inside a WMS url

2011-04-20 Thread Clément MONIER
Hi,

I have a CGI MapServer 5.6.0beta5 instance running on Windows.
But I'm not (and won't never be) able to know for sure the folder's path where 
its files are deployed.
I know that MapServer is running fine though, delivering maps as needed.

But I'm not able to make some WMS web request because I can't provide an 
absolute path for the map= parameter :
I don't know in which folder my .map files reside.

http://myserver/cgi-bin/mapserv.exe?map=?*?/mymapfile.map;...

Is there a way to use relative path ? or to use a kind of environment variable 
MS_INSTALL_PATH inside the map= parameter?
I can only act on the server's configuration and MS deployment

Thanks for your help

Clément

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


[mapserver-users] showing line direction (without font)

2011-03-24 Thread Clément MONIER
Hi,

Is it possible to display a layer of lines with direction's marks using 
MapServer ?
With no font trick (i.e a char symbol like '',...)

See picture attached showing a nice sample

Thanks  Regards

Clement
attachment: arrow_nice_sample.png___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] showing line direction (without font)

2011-03-17 Thread Clément MONIER
Hi,

Is it possible to display a layer of lines with direction's marks using 
MapServer ?
With no font trick (i.e a char symbol like '',...)

See picture attached showing a nice sample

Thanks  Regards

Clement
attachment: arrow_nice_sample.jpg___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] opacity

2010-11-16 Thread Clément MONIER
Hi,

Is it possible to set layer's opacity dynamically ? with runtime substitution ?
is there a way to set opacity for all layers of a mapfile ?

Thank you for your help

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


RE: [mapserver-users] opacity

2010-11-16 Thread Clément MONIER
It works really nice.
Thanks a lot Olivier !

De : Olivier Bedel [mailto:o.be...@alkante.com]
Envoyé : mardi 16 novembre 2010 19:18
À : Clément MONIER
Cc : mapserver-users@lists.osgeo.org
Objet : Re: [mapserver-users] opacity

Hi Clément,

To change layers opacity in cgi call, something like that should work :
http://yourServer/cgi-bin/mapserv?map=yourMapfilemap.layer[yourLayerName1]=OPACITY%20yourOpacityValue1map.layer[yourLayerName2]=OPACITY%20yourOpacityValue2

I don't know if it is possible at the map level...

Regards,
Olivier.

Le 16/11/2010 18:54, Clément MONIER a écrit :
Hi,

Is it possible to set layer's opacity dynamically ? with runtime substitution ?
is there a way to set opacity for all layers of a mapfile ?

Thank you for your help

Clem





___

mapserver-users mailing list

mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/mapserver-users






--

Olivier BEDEL



ALKANTE SAS

Ingénieur RD SIG

1, rue du Chêne Morand

35 510 Cesson-Sévigné

Bur: + 33 (0) 2 99 22 25 70

fax : + 33 (0) 2 99 32 12 76
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Transparent background

2010-10-05 Thread Clément MONIER
Thanks for your help, Thomas !

-Message d'origine-
De : thomas bonfort [mailto:thomas.bonf...@gmail.com] 
Envoyé : mardi 5 octobre 2010 18:29
À : Clément MONIER
Cc : mapserver-users@lists.osgeo.org
Objet : Re: [mapserver-users] Transparent background

try setting your imagemodes to RGB instead of RGBA.

--
thomas

On Tue, Oct 5, 2010 at 18:23, Clément MONIER
clement.mon...@v-trafic.com wrote:
 Hi,



 I’m trying to get a PNG without a transparent background.



 Every “transparent” entry is turned to “off” inside my mapfile (attached)



 http://localhost/cgi-bin/mapserv.exe?MAP=/ms4w/apps/gmap/htdocs/test_background.mapSERVICE=WMSREQUEST=GetMapVERSION=1.3.0STYLES=FORMAT=PNG8CRS=EPSG:4326BBOX=45,8,50,15WIDTH=320HEIGHT=320LAYERS=testBGCOLOR=0xFFTRANSPARENT=False

 but I’m still getting a map with a transparent background !!



 Thanks for your help



 Kind regards



 Clément



 Ps : running MS4W (MS v.6.3)

 ___
 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] Tile mode multiple layers

2010-08-25 Thread Clément MONIER

Hi,

I'm facing a (probable widely encountered) problem using MapServer with 
tile-mode option.
It seems like multiple layers aren't allowed ??

http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer1
 = ok
http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer2
 = ok

http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer1,layer2
 = ko !

Why ?

Thanks  Regards

Clément

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


RE: [mapserver-users] Tile mode multiple layers

2010-08-25 Thread Clément MONIER
Thanks a lot !

I have another bothering issue :

PNG outputs of my MS CGI requests now don’t look nicely rendered any more (i.e 
no smoothly antialiased AGG display)
http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer1
 
layer2http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer1%20layer2
as it was with similar WMS requests targeting the same mapfile though

Where should I specify the desired output format ?

Thank you for your help

De : mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] De la part de Wim Vanbelle
Envoyé : mercredi 25 août 2010 13:50
À : mapserver-users@lists.osgeo.org
Objet : Re: [mapserver-users] Tile mode  multiple layers

Hi Clément,

Your request is wrong ;).

Try using a space instead. Take a look here :

http://mapserver.org/output/tile_mode.html

Good luck.
On 25 August 2010 13:47, Clément MONIER 
clement.mon...@v-trafic.commailto:clement.mon...@v-trafic.com wrote:

Hi,

I’m facing a (probable widely encountered) problem using MapServer with 
tile-mode option.
It seems like multiple layers aren’t allowed ??

http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer1
 = ok
http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer2
 = ok

http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer1,layer2
 = ko !

Why ?

Thanks  Regards

Clément


___
mapserver-users mailing list
mapserver-users@lists.osgeo.orgmailto: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] Tile mode multiple layers

2010-08-25 Thread Clément MONIER
I’ve already correctly specified my output format inside the mapfile.

Anyway, these 2 requests doesn’t give the same rendering :
(tile mode)
http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer1
(wms)
http://localhost/cgi-bin/mapserv.exe?map=mymapfile.mapSERVICE=WMSREQUEST=GetMapVERSION=1.3.0LAYERS=layer1STYLES=FORMAT=image/pngBGCOLOR=0xFFTRANSPARENT=TRUECRS=EPSG:4326BBOX=y1,x1,y2,x2WIDTH=256HEIGHT=256
But maybe I didn’t understand the appropriate use of tile mode.

Should I expect these 2 requests to give the same png output by the way ?

Thanks

De : mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] De la part de Wim Vanbelle
Envoyé : mercredi 25 août 2010 14:52
À : mapserver-users@lists.osgeo.org
Objet : Re: [mapserver-users] Tile mode  multiple layers

Hi Clément,

Under your MAP you can specify an OUTPUTFORMAT tag.

See http://mapserver.org/mapfile/outputformat.html for details. There's also 
some additional information about the format options at the bottom.

Use AGG for best quality results.

On 25 August 2010 14:37, Clément MONIER 
clement.mon...@v-trafic.commailto:clement.mon...@v-trafic.com wrote:
Thanks a lot !

I have another bothering issue :

PNG outputs of my MS CGI requests now don’t look nicely rendered any more (i.e 
no smoothly antialiased AGG display)
http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer1
 
layer2http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer1%20layer2
as it was with similar WMS requests targeting the same mapfile though

Where should I specify the desired output format ?

Thank you for your help

De : 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 
[mailto:mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org]
 De la part de Wim Vanbelle
Envoyé : mercredi 25 août 2010 13:50
À : mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Objet : Re: [mapserver-users] Tile mode  multiple layers

Hi Clément,


Your request is wrong ;).

Try using a space instead. Take a look here :

http://mapserver.org/output/tile_mode.html

Good luck.
On 25 August 2010 13:47, Clément MONIER 
clement.mon...@v-trafic.commailto:clement.mon...@v-trafic.com wrote:

Hi,

I’m facing a (probable widely encountered) problem using MapServer with 
tile-mode option.
It seems like multiple layers aren’t allowed ??

http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer1
 = ok
http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer2
 = ok

http://localhost/cgi-bin/mapserv.exe?mode=tiletilemode=gmaptile=X+Y+Smap=mymapfile.mapLAYERS=layer1,layer2
 = ko !

Why ?

Thanks  Regards

Clément


___
mapserver-users mailing list
mapserver-users@lists.osgeo.orgmailto: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] shp/dbf file's name

2010-08-20 Thread Clément MONIER
Hi,

I would like to know if it's possible to draw geometries from a shp file
according to attributes from a dbf
but with 2 files named differently.

For instance :

LAYER
  NAME layer1
  DATA shapefile1.shp
  CLASS
EXPRESSION ([col1]=1)
STYLE
END
  END
END

Where col1 is a field inside a file storing attributes (dbf/csv/txt/...) but 
not named shapefile1.dbf

I already tried to use the JOIN option but I think it's inappropriate for my 
purpose
since You cannot use joins to affect the look of a map 
(http://mapserver.org/mapfile/join.html)

Thanks for your help !

Clément

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


RE: [mapserver-users] shp/dbf file's name

2010-08-20 Thread Clément MONIER
 How would MapServer know which row in your external dbf file matches which 
 row (aka feature) in your ShapeFile? 
 What if the external dbf file doesn't have the same number of rows as the 
 number of features in your ShapeFile?

not really a problem as I'm able to generate dbf files with records in exactly 
same number and order as inside shp.


 The dbf format is pretty primitive. Your best bet is to actually add to your 
 ShapeFile the data that is now in your external file.  It will also likely 
 be faster.

That's precisely what I can't do any more,
since I'd like to join various kinds of time-related attributes on very static 
geometries.

-Message d'origine-
De : P Kishor [mailto:punk.k...@gmail.com] 
Envoyé : vendredi 20 août 2010 15:42
À : Clément MONIER
Cc : mapserver-users@lists.osgeo.org
Objet : Re: [mapserver-users] shp/dbf file's name

On Fri, Aug 20, 2010 at 8:22 AM, Clément MONIER
clement.mon...@v-trafic.com wrote:
 Hi,



 I would like to know if it's possible to draw geometries from a shp file

 according to attributes from a dbf

 but with 2 files named differently.



 For instance :



 LAYER

   NAME layer1

   DATA shapefile1.shp

   CLASS

     EXPRESSION ([col1]=1)

     STYLE

     END

   END

 END



 Where col1 is a field inside a file storing attributes (dbf/csv/txt/.) but
 not named shapefile1.dbf



How would MapServer know which row in your external dbf file matches
which row (aka feature) in your ShapeFile? What if the external dbf
file doesn't have the same number of rows as the number of features in
your ShapeFile?

The dbf format is pretty primitive. Your best bet is to actually add
to your ShapeFile the data that is now in your external file. It will
also likely be faster.




 I already tried to use the JOIN option but I think it's inappropriate for my
 purpose

 since You cannot use joins to affect the look of a map
 (http://mapserver.org/mapfile/join.html)



 Thanks for your help !



 Clément



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





-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: refactoring STYLEs ?

2010-08-20 Thread Clément MONIER
It works great !
Thanks a lot

De : Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us]
Envoyé : vendredi 20 août 2010 17:25
À : Clément MONIER; 'mapserver-users@lists.osgeo.org'
Objet : RE: refactoring STYLEs ?

There's a draft RFC floating around to support this but it hasn't gotten much 
love... You can use INCLUDEs to do something similar:

Main mapfile:

LAYER
  NAME layer1
  CLASS
INCLUDE 'style1.map'
  END
END

LAYER
  NAME layer2
  CLASS
INCLUDE 'style1.map'
  END
END

style1.map:

STYLE
  COLOR 0 0 0
  WIDTH 1
END

Ideally you'd be able to extend a base style which is what the RFC proposes. 
You can also do that with the INCLUDEs if you store just the style properties 
but not the block, eg.:

CLASS
  STYLE
INCLUDE 'style1.map'
COLOR 255 0 0 # override color
  END
END

and style1.map contains:

COLOR 0 0 0
WIDTH 1

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Clément MONIER
Sent: Friday, August 20, 2010 6:49 AM
To: 'mapserver-users@lists.osgeo.org'
Subject: [mapserver-users] refactoring STYLEs ?

Hi,

Is it possible to add a style definition (inside a mapfile or elsewhere ) so 
that it wouldn't be necessary to repeat it for each layer ?

For instance :

2 layers with the same display style

LAYER
  NAME layer1
  CLASS
STYLE
COLOR 0 0 0
WIDTH 1
END
  END
END

LAYER
  NAME layer2
  CLASS
STYLE
COLOR 0 0 0
WIDTH 1
END
  END
END

==

STYLE 'style1'
STYLE
COLOR 0 0 0
WIDTH 1
END
END

LAYER
  NAME layer1
  CLASS
STYLE
'Style 1'
END
  END
END

LAYER
  NAME layer2
  CLASS
STYLE
'Style 1'
END
  END
END

Thanks  Regards

Clement

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


RE: [mapserver-users] MapServer, OpenStreetMap, OpenLayers + Reprojection from Latlong to Mercator: a real nightmare

2010-03-18 Thread Clément MONIER
Hi Mulone,

We're using the 2 same projection systems to build the service you might see at 
www.v-trafic.com

It's working but with no use of OpenLayers to perform the overlay and no 
PostGIS database (shapefile instead with WGS84 long/lat coordinates, epsg:4326).

So if your problem comes from either OpenLayers or PostGIS, the following 
description won't help you anyway.

The layers are requested with a WMS-formatted url with CRS=EPSG:3785 and BBOX 
in meters.

Here is the content of epsg nad file (Proj4 lib) :
# WGS 84
4326 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  
# Web Spherical Mercator
3785 +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137 
+towgs84=0,0,0,0,0,0,0 +units=m no_defs


Mapfile content :
(Header MAP section)
...
PROJECTION
   init=epsg:3785
END
...
(Layer section)
...
PROJECTION
   init=epsg:4326
END
...

I'm quite sure all these basic things won't probably help you but it's worth 
trying.

Regards

Clement

-Message d'origine-
De : mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] De la part de Mulone
Envoyé : mercredi 17 mars 2010 22:40
À : mapserver-users@lists.osgeo.org
Objet : [mapserver-users] MapServer, OpenStreetMap, OpenLayers + Reprojection 
from Latlong to Mercator: a real nightmare


(apologies for cross-posting)

Hi everybody,

I'm trying to render openstreetmap data on a WMS on MapServer and I posted
something already about this. Now it's time to summarise everything and make
some sense of this.

The system used to work with epsg:4326 (LATLONG from now on) but in our
project we need a GoogleMaps like projection and we chose
epsg:900913/epsg:3785 (MERC from now on).
This is our problem.
We need the image on the right but we're getting the one on the left, a
flattened map: 
http://img7.imageshack.us/img7/8279/imagelw.png

After a lot of work and unsucceful tests I post here the outcome, hoping
that it will be helpful to the community - and to us :-)

These are the steps I followed from the very start:

1) download osm xml file from Cloudmade (e.g. Italy.osm.bz2)
2) Run 900913.sql on my PostGIS (optional, it shouldn't matter).
3) import that file into PostGIS with command (latlong option selected):

./osm2pgsql -U userid -W -H host -d maps -p myprefix -S default.style -c -l
italy.osm.bz2

4) At this point everything seems ok. The geometry columns have latlong as
SRID and the tables contain geometries.
It's possible to visualise this dataset with uDig or other tools and
reproject it.

5) Now we want to render this stuff on MapServer. So we add the espg configs
from
 http://spatialreference.org/ref/epsg/3785/ to our mapserver espg file:

900913 +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
3785 +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs 

6) define this minimal mapfile with one layer: 
http://virtualpaste.com/82467

7) run several tests with different projections and annotate the outcome.

Have a look at the report: 
http://docs.google.com/View?id=dftx6j46_166d6r38pcs

Does anybody have any idea about how we could tackle this issue?
I don't know if the problem is arising from MapServer or OpenLayers, so
maybe you can help me design a better test to narrow the problem down.

I presume a lot of people are doing something similar to us, so others might
come across this issue.

Cheers,
Mulone

-
Mulone
PhD student
-- 
View this message in context: 
http://n2.nabble.com/MapServer-OpenStreetMap-OpenLayers-Reprojection-from-Latlong-to-Mercator-a-real-nightmare-tp4753197p4753197.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] Templating problem

2009-10-13 Thread Clément MONIER
Hi,

Classic problem : 
I want to get features coordinates 
in pixels inside my MS map picture (db = shapefiles)
to build an html map tag.

I've followed this webpage http://mapserver.org/output/imagemaps.html
And succeeded in getting pixels-coordinates and attributes with templates.

But it seems to me that everything is set inside the mapfile,
And nothing can be configured inside the requesting parameters !? 
(like my GetMap request does for map size, bbox, layers, ...)

This request is though working, but I'm getting errors when I try to add 
parameters to it :
http://myserver/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap/htdocs/test_imap.mapqlayer=mylayermode=nquerysearchmap=true

Another issue is that my filtering option is not active any more : despite the 
EXPRESSION() filter inside the LAYER, all features of the shapefile are output 
into pixel-coordinates through the templating process.

Is it possible to turn a getMap request into a template-output without 
disabling parameters  filtering options ?

Thanks for your help

Clement 
MS Templating newbie



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


[mapserver-users] Templating problem

2009-10-12 Thread Clément MONIER

Hi,

Classic problem : 
I want to get features coordinates 
in pixels inside my MS map picture (db = shapefiles)
to build an html map tag.

I've followed this webpage http://mapserver.org/output/imagemaps.html
And succeeded in getting pixels-coordinates and attributes with templates.

But it seems to me that everything is set inside the mapfile,
And nothing can be configured inside the requesting parameters !? 
(like my GetMap request does for map size, bbox, layers, ...)

This request is though working, but I'm getting errors when I try to add 
parameters to it :
http://myserver/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap/htdocs/test_imap.mapqlayer=mylayermode=nquerysearchmap=true

Another issue is that my filtering option is not active any more : despite the 
EXPRESSION() filter inside the LAYER, all features of the shapefile are output 
into pixel-coordinates through the templating process.

Is it possible to turn a getMap request into a template-output without 
disabling parameters  filtering options ?

Thanks for your help

Clement 
MS Templating newbie



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


RE: [mapserver-users] TR: Blank map

2009-04-14 Thread Clément MONIER
Thanks for your answer Jukka.
I did always use VERSION=1.3.0 in my WMS request and encountered no problem 
with it until now.

But I've read this and I got scared :
http://mapserver.org/development/rfc/ms-rfc-30.html#coordinate-systems-and-axis-orientation

Though I've tried to enter bbox parameter with lat/lon or lon/lat formats, it 
didn't change anything.

Update : I got a correct map using shp2img. 

Any help or lead would be appreciated

Thanks a lot

-Message d'origine-
De : mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] De la part de Rahkonen Jukka
Envoyé : mardi 14 avril 2009 11:35
À : Clément MONIER; mapserver-users@lists.osgeo.org
Objet : Re: [mapserver-users] TR: Blank map

Hi,

Any possibility that it could have something to do with WMS version 1.3 that 
flipped the coordinate axis order?  Did you also previously use WMS 1.3?

-Jukka Rahkonen-

 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta 
 Clément MONIER
 Lähetetty: 14. huhtikuuta 2009 11:26
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] TR: Blank map
 
 This issue (see below) is still active with MS 5.4 rc1.
 Can anyone help me ?
 
 Thanks
 
 Clement
 
 
 -Message d'origine-
 De : mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] De la part 
 de Clément MONIER Envoyé : mardi 7 avril 2009 10:55 À : 
 mapserver-users@lists.osgeo.org Objet : [mapserver-users] Blank map
 
 Hi,
 
 MapServer returns blank images since I upgraded to MS4W 2.3.1 
 + mapserver_ms4w-5.4.0-beta4.
 Though I've followed the upgrade tips and changed my mapfiles :
 http://lists.osgeo.org/pipermail/mapserver-users/2009-March/06
 0600.html
 
 You'll find as attachment a very simple test case (.map + shapefiles).
 
 Here's the request that should (and used to) return a map :
 http://localhost/cgi-bin/mapserv.exe?MAP=C:\ms4w\apps\gmap\htd
 ocs\test.mapSERVICE=WMSREQUEST=GetMapVERSION=1.3.0LAYERS=l
 ayer1STYLES=FORMAT=aggaBGCOLOR=0xFFTRANSPARENT=TrueSR
 S=EPSG:4326BBOX=2.48,48.82,2.50,48.84WIDTH=512HEIGHT=512
 
 I suspect a projection issue because the following request 
 (with a world-wide bbox) does display some features (look for 
 a small green point on the left side) :
 http://localhost/cgi-bin/mapserv.exe?MAP=C:\ms4w\apps\gmap\htd
 ocs\test.mapSERVICE=WMSREQUEST=GetMapVERSION=1.3.0LAYERS=l
 ayer1STYLES=FORMAT=aggaBGCOLOR=0xFFTRANSPARENT=TrueSR
 S=EPSG:4326BBOX=-90,0,90,180WIDTH=512HEIGHT=512
 
 Has anything changed inside the Proj4 library ?
 
 Thanks for your help
 
 Clément 
 
___
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] TR: Blank map

2009-04-14 Thread Clément MONIER
Thanks for answering.

I've already tried your second option (lon/lat order switch) but it didn't 
change anything (blank map)

The second request leads to :
WMS server error. Unsupported SRS namespace (only EPSG and AUTO currently 
supported).


Clement 


-Message d'origine-
De : Yewondwossen Assefa [mailto:yass...@dmsolutions.ca] 
Envoyé : mardi 14 avril 2009 15:20
À : Clément MONIER
Cc : mapserver-users@lists.osgeo.org
Objet : Re: [mapserver-users] TR: Blank map

Hi There,

  You should be able to get the result entering something like:
LAYERS=layer1STYLES=FORMAT=aggaBGCOLOR=0xFFTRANSPARENT=TrueCRS=CRS:84BBOX=2.48,48.82,2.50,48.84WIDTH=512HEIGHT=512

  or

 
VERSION=1.3.0LAYERS=layer1STYLES=FORMAT=aggaBGCOLOR=0xFFTRANSPARENT=TrueCRS=EPSG:4326BBOX=48.8,2.48,48.84,2.50WIDTH=512HEIGHT=512


I have also opened a bug on the fact that using SRS instead of CRS 
should throw an exception (http://trac.osgeo.org/mapserver/ticket/2979). 
I will correct that for the 5.4.1. release.

Let me know.

Best Regards,


Clément MONIER wrote:
 Thanks for your answer Jukka.
 I did always use VERSION=1.3.0 in my WMS request and encountered no problem 
 with it until now.
 
 But I've read this and I got scared :
 http://mapserver.org/development/rfc/ms-rfc-30.html#coordinate-systems-and-axis-orientation
 
 Though I've tried to enter bbox parameter with lat/lon or lon/lat formats, it 
 didn't change anything.
 
 Update : I got a correct map using shp2img.   
 
 Any help or lead would be appreciated
 
 Thanks a lot
 
 -Message d'origine-
 De : mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] De la part de Rahkonen Jukka
 Envoyé : mardi 14 avril 2009 11:35
 À : Clément MONIER; mapserver-users@lists.osgeo.org
 Objet : Re: [mapserver-users] TR: Blank map
 
 Hi,
 
 Any possibility that it could have something to do with WMS version 1.3 that 
 flipped the coordinate axis order?  Did you also previously use WMS 1.3?
 
 -Jukka Rahkonen-
 
 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta 
 Clément MONIER
 Lähetetty: 14. huhtikuuta 2009 11:26
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] TR: Blank map

 This issue (see below) is still active with MS 5.4 rc1.
 Can anyone help me ?

 Thanks

 Clement


 -Message d'origine-
 De : mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] De la part 
 de Clément MONIER Envoyé : mardi 7 avril 2009 10:55 À : 
 mapserver-users@lists.osgeo.org Objet : [mapserver-users] Blank map

 Hi,

 MapServer returns blank images since I upgraded to MS4W 2.3.1 
 + mapserver_ms4w-5.4.0-beta4.
 Though I've followed the upgrade tips and changed my mapfiles :
 http://lists.osgeo.org/pipermail/mapserver-users/2009-March/06
 0600.html

 You'll find as attachment a very simple test case (.map + shapefiles).

 Here's the request that should (and used to) return a map :
 http://localhost/cgi-bin/mapserv.exe?MAP=C:\ms4w\apps\gmap\htd
 ocs\test.mapSERVICE=WMSREQUEST=GetMapVERSION=1.3.0LAYERS=l
 ayer1STYLES=FORMAT=aggaBGCOLOR=0xFFTRANSPARENT=TrueSR
 S=EPSG:4326BBOX=2.48,48.82,2.50,48.84WIDTH=512HEIGHT=512

 I suspect a projection issue because the following request 
 (with a world-wide bbox) does display some features (look for 
 a small green point on the left side) :
 http://localhost/cgi-bin/mapserv.exe?MAP=C:\ms4w\apps\gmap\htd
 ocs\test.mapSERVICE=WMSREQUEST=GetMapVERSION=1.3.0LAYERS=l
 ayer1STYLES=FORMAT=aggaBGCOLOR=0xFFTRANSPARENT=TrueSR
 S=EPSG:4326BBOX=-90,0,90,180WIDTH=512HEIGHT=512

 Has anything changed inside the Proj4 library ?

 Thanks for your help

 Clément 

 ___
 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
 


-- 

Assefa Yewondwossen
Software Analyst

Email: ass...@dmsolutions.ca
http://www.dmsolutions.ca/

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

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