No reprojection done
Apeksha Bhambhani
beproject06 at YAHOO.COM
Wed Jan 18 07:24:44 PST 2006
hii,
It seems that you have a lot of knowledge about projections in the mapfile . Could you please help us out . We have a few basic doubts. Here's what we are doing ....
We are working on the LAMP platform. We are creating an interactive web application . Users will be provided with a map , on which they can make their own additions and deletions.For example , when a certain user wants to landmark a certain city .
Could u help us out with a few of r doubts .
Firstly as the input to the Mapserver will be shapefiles , we will be creating our layers , (Eg. Point , Polygon , etc,) with the help of OpenEV.When the shapfiles are created in OpenEV (for e.g the points layer ) the points are saved on the basis of their line and column value This input will be given to the Mapfile of the Mapserver , which willl in turn give a complete image comprising of all the layers. This map can then be displayed using Php/Mapscript.
When the user enters a certain point , the point details need to be added to MySql.
We wanted to proceed step by step. Now , as we first need a base map ( on which the user will make his/her changes ) , which will be a raster image ( .png or .tif ). We have created a map file for this( the raster image as a raster layer) as follows:
MAP
NAME first
EXTENT 0 0 40 40
SIZE 600 600
IMAGECOLOR 200 255 255
SHAPEPATH "/var/www/html/data1"
WEB
IMAGEPATH "/var/www/html/tmp/"
IMAGEURL "/tmp/"
END
LAYER
NAME "base"
TYPE raster
DATA "/var/www/html/india.tif"
STATUS ON
END
END
This is not getting plotted , what could be the problem ?
Also , what exactly is the use of extent , because no matter what extent we give for another mapfile to plot a simple rectangle , the size of the rectangle remains the same .
Is projection mandatory in the mapfile ? And how can it be used .
When the shapfiles are created in OpenEV (for e.g the points layer ) the points are saved on the basis of their line and column value . Does this require the use of projection.How can these points be saved in their latitude/longitude values.
We are unable to understand the use of Projection ...Plz can u help us .
Awating your reply ,
Apeksha
Ed McNierney <ed at TOPOZONE.COM> wrote:
Luiz & Bengt -
I would expect that if Bengt is working with maps of Scandinavian countries, the difference between Plat Carree and Mercator should be noticeable (Mercator will "stretch" things north/south by quite a bit compared to a "geographic" or Plat Carree projection).
Bengt, are you sure you have a good PROJ installation and that MapServer is compiled with PROJ support (run mapserv -v and look for "SUPPORTS=PROJ")?
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
ed at topozone.com
(978) 251-4242
---------------------------------
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Luiz Vaz
Sent: Tuesday, January 17, 2006 12:46 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] No reprojection done
Well,
it seems that there no perceptual changes each other:
# World Mercator
<54004> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m no_defs <>
# World Plate Carree
<54001> +ellps=WGS84 +datum=WGS84 +units=m no_defs <>
# World Equidistant Cylindrical
<54002> +ellps=WGS84 +datum=WGS84 +units=m no_defs <>
# WGS 84
<4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs no_defs <>
Best Regards,
Luiz Vaz
2006/1/15, Nilsson Bengt <bengt.nilsson at aerotechtelub.se>: Hi,
I've set up a WMS server with an initial singe layer to test reprojection. However , I can't get the projection to work. Whatever output projection i try I get the same geographical (4326) back. For example, when I make a WMS request with SRS=EPSG:54004 (Mercator) and bounding box in that projection I get an 4326-map back. I do not get any errors. Here is my map-file:
MAP
NAME WMS-test
STATUS ON
SHAPEPATH "shp"
IMAGECOLOR 255 255 255
FONTSET ../etc/fontset.txt
DEBUG ON
WEB
LOG "/tmp/mapserv.log"
IMAGEPATH "/srv/www/htdocs/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
"wms_title" "Test"
"wms_onlineresource" "http://hhhhhhhhh/mapserv/wt?service=WMS "
"wms_srs" "epsg:9823 epsg:4326 epsg:54004"
END
END
PROJECTION
"init=epsg:54004"
END
LAYER
NAME k92_strandlinje
DEBUG ON
METADATA
"wms_title" "k92_strandlinje"
"wms_srs" "EPSG:4326"
END
TYPE POLYGON
STATUS ON
CONNECTIONTYPE postgis
CONNECTION "user=postgres password=xxx dbname=xxx host=localhost"
DATA 'the_geom from k92_strandlin_polygon'
PROJECTION
"init=epsg:4326"
END
CLASS
NAME "strandlin-pgx"
COLOR 255 251 237
OUTLINECOLOR 100 100 100
END
END
END
/Regards Bengt
---------------------------------
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060118/936dad55/attachment.htm>
More information about the MapServer-users
mailing list