<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
Thank you for your reply. I managed to find out the MapInfo layer is
using WGS 84 / UTM zone 35N (like you predicted). <br>
I will try to adjust my mapfile for these projections.  I guess I need
to reproject *every* layer.<br>
<br>
Thanks again for your help. I'll contant all to let you know how it
worked out.<br>
<br>
Cheers,<br>
Adrian<br>
<br>
Rahkonen Jukka wrote:
<blockquote
 cite="mid:CC197224AC75CE4DB23F739B16891B86F7328F@tikka.haapa.mmm.fi"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.2900.3492" name="GENERATOR">
  <div dir="ltr" align="left"><span class="178371808-25022009"><font
 color="#0000ff" face="Arial" size="2">Hi,</font></span></div>
  <div dir="ltr" align="left"><span class="178371808-25022009"></span> </div>
  <div dir="ltr" align="left"><span class="178371808-25022009"><font
 color="#0000ff" face="Arial" size="2">Mapserver works without any
knowledge about projection with one dataset if only the extents suit
the data coordinates. That's the case with your ESRI layer. But </font></span><span
 class="178371808-25022009"><font color="#0000ff" face="Arial" size="2">you
have two datasets which obviously are using different projections.  To
show them together either (or both) of them needs to be reprojected. 
And that is possible only if you know and tell Mapserver the
projections for both datasets.</font></span></div>
  <div dir="ltr" align="left"><span class="178371808-25022009"></span> </div>
  <div dir="ltr" align="left"><span class="178371808-25022009"><font
 color="#0000ff" face="Arial" size="2">What needs to be done is</font></span></div>
  <div dir="ltr" align="left"><span class="178371808-25022009"><font
 color="#0000ff" face="Arial" size="2">1) Set at the MAP level the
projection that you want Mapserver to use for output as well as map
extents using values and units of the output projection.</font></span></div>
  <div dir="ltr" align="left"><span class="178371808-25022009"><font
 color="#0000ff" face="Arial" size="2">2) Set at the LAYER level the
projections for both of the datasets.</font></span></div>
  <div dir="ltr" align="left"><span class="178371808-25022009"></span> </div>
  <div dir="ltr" align="left"><span class="178371808-25022009"><font
 color="#0000ff" face="Arial" size="2">To make is as simple as possible
for the beginning I suggest to use projection epsg:4326 and a bit wider
extents than you have now at MAP level.  Thats because those extents
are already working for you, and ESRI dataset most propably is in WGS84
projection.  Thus you should use projection epsg:4326 also for your
ESRI layer.</font></span></div>
  <div dir="ltr" align="left"><span class="178371808-25022009"></span> </div>
  <div dir="ltr" align="left"><span class="178371808-25022009"><font
 color="#0000ff" face="Arial" size="2">Then there will be just the
Mapinfo layer left.  Defined by the the ogrinfo line <font
 color="#0000ff" face="Arial" size="2">PARAMETER["central_meridian",27]
and coordinates it looks like it might be in</font> UTM 35N projection
(epsg:32635).  Have a try with that first.</font></span></div>
  <div dir="ltr" align="left"><span class="178371808-25022009"></span> </div>
  <div dir="ltr" align="left"><span class="178371808-25022009"><font
 color="#0000ff" face="Arial" size="2">-Jukka Rahkonen-</font></span></div>
  <div dir="ltr" align="left"><span class="178371808-25022009"></span> </div>
  <div dir="ltr" align="left">
  <hr tabindex="-1"></div>
  <div dir="ltr" align="left"><font face="Tahoma" size="2"><b>L�hett�j�:</b>
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>] <b>Puolesta </b>Adrian
Popa<br>
  <b>L�hetetty:</b> 25. helmikuuta 2009 9:25<br>
  <b>Vastaanottaja:</b> <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
  <b>Aihe:</b> [mapserver-users] Changing the "EXTENT" for a layer<br>
  </font><br>
  </div>
  <blockquote
 style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
Hello all!<br>
    <br>
I'm trying to display some layers (ESRI Shapefile and MapInfo) in the
same map. The ESRI shapefiles work just fine, and I've used them for a
long time. The new MapInfo layer however has very different "Extent"
values for its coordinates and does not overlap with the original
layers (they should overlap, because they cover the same area).<br>
    <br>
Here is some output from ogrinfo:<br>
    <br>
1. A layer that displays ok and for which the coordinates are
longitude/latitude:<br>
    <br>
[adrianp@server data]$ ogrinfo Limits.shp -so -al<br>
Had to open data source read-only.<br>
INFO: Open of `Limits.shp'<br>
      using driver `ESRI Shapefile' successful.<br>
    <br>
Layer name: Limits<br>
Geometry: Line String<br>
Feature Count: 8718<br>
    <b>Extent: (20.261522, 43.618437) - (29.704897, 48.264780)</b><br>
Layer SRS WKT:<br>
GEOGCS["GCS_WGS_1984",<br>
    DATUM["WGS_1984",<br>
        SPHEROID["WGS_1984",6378137.0,298.257223563]],<br>
    PRIMEM["Greenwich",0.0],<br>
    UNIT["Degree",0.0174532925199433]]<br>
OBJECTID_1: Integer (9.0)<br>
TIP: Integer (4.0)<br>
Shape_Leng: Real (19.11)<br>
    <br>
2. A layer which displays if I set the Extent parameter in the MAP file
to the values returned by ogrinfo:<br>
    <br>
[adrianp@server data]$ ogrinfo coverage.TAB -so -al<br>
Had to open data source read-only.<br>
INFO: Open of `coverage.TAB'<br>
      using driver `MapInfo File' successful.<br>
    <br>
Layer name: coverage<br>
Geometry: Unknown (any)<br>
Feature Count: 1<br>
    <b>Extent: (550.002594, 4830850.004496) - (707800.001127,
5318099.996174)</b><br>
Layer SRS WKT:<br>
PROJCS["unnamed",<br>
    GEOGCS["unnamed",<br>
        DATUM["WGS_1984",<br>
            SPHEROID["WGS 84",6378137,298.257223563],<br>
            TOWGS84[0,0,0,-0,-0,-0,0]],<br>
        PRIMEM["Greenwich",0],<br>
        UNIT["degree",0.0174532925199433]],<br>
    PROJECTION["Transverse_Mercator"],<br>
    PARAMETER["latitude_of_origin",0],<br>
    PARAMETER["central_meridian",27],<br>
    PARAMETER["scale_factor",0.9996],<br>
    PARAMETER["false_easting",500000],<br>
    PARAMETER["false_northing",0],<br>
    UNIT["Meter",1.0]]<br>
LEGEND: String (50.0)<br>
THRESHOLD: Real (0.0)<br>
COLOR: String (20.0)<br>
Prediction_name: String (50.0)<br>
    <br>
    <br>
I don't know how the second layer was generated (perhaps the values in
extent are not longitude/latitude values), but I would like to display
both layers in the same coordinate system.<br>
If I consider the second set of values is longitude/latitude, they make
no sense (unless the surface of Earth is the same as the surface of
Jupiter!).<br>
    <br>
My question is: can mapserver do the translation of coordinates (by
adding/substracting a fixed value), or do I need to do this with
another system?<br>
If the solution is external to mapserver, what's my next step (some
manuals please!)?<br>
    <br>
I haven't worked with projections; could this be the cause?<br>
    <br>
Any help is appreciated, thanks!<br>
Adrian<br>
    <br>
  </blockquote>
</blockquote>
<br>
</body>
</html>