<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2900.3492" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=241085912-25022009>Hi, </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=241085912-25022009></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=241085912-25022009>There is no need to guess this, nor would it be very 
useful.&nbsp; Instead, insert DEBUG 5 into your layer definitions, collect log 
and see from the timing values how it goes.&nbsp; Make a pre-reproprojected 
layer from your data with ogr2ogr program, do some timings and compare the 
results.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=241085912-25022009></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=241085912-25022009>-Jukka-</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=241085912-25022009></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=241085912-25022009></SPAN></FONT>&nbsp;</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> Adrian Popa 
[mailto:adrian_gh.popa@romtelecom.ro] <BR><B>Lähetetty:</B> 25. helmikuuta 2009 
14:53<BR><B>Vastaanottaja:</B> Rahkonen Jukka<BR><B>Kopio:</B> 
mapserver-users@lists.osgeo.org<BR><B>Aihe:</B> Re: [mapserver-users] Changing 
the "EXTENT" for a layer<BR></FONT><BR></DIV>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV></DIV>Yup, it worked like a charm!<BR><BR>Thank you for your help. One 
  more question - how cpu intensive is reprojection using mapserver? I mean, if 
  I have 300 users requesting the page, will I kill the CPU because it needs to 
  reproject a layer, or are the calculations straight-forward and add little 
  extra load on the server? <BR>Can I reproject the layer "offline" and load it 
  without projection in mapserver? If I can, which tool would I use 
  (proj4?)?<BR><BR>Thanks again,<BR>Adrian<BR><BR>Rahkonen Jukka wrote: 
  <BLOCKQUOTE cite=mid:CC197224AC75CE4DB23F739B16891B86F7328F@tikka.haapa.mmm.fi 
  type="cite">
    <META content="MSHTML 6.00.2900.3492" name=GENERATOR>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009><FONT face=Arial 
    color=#0000ff size=2>Hi,</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009></SPAN>&nbsp;</DIV>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009><FONT face=Arial 
    color=#0000ff size=2>Mapserver works without any knowledge about projection 
    with one dataset if only the extents suit the data coordinates.&nbsp;That's 
    the case with your ESRI layer. But&nbsp;</FONT></SPAN><SPAN 
    class=178371808-25022009><FONT face=Arial color=#0000ff size=2>you have two 
    datasets which obviously are using different projections.&nbsp; To show them 
    together either (or both) of them needs to be reprojected.&nbsp; And that is 
    possible only if you know and tell Mapserver the projections&nbsp;for both 
    datasets.</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009></SPAN>&nbsp;</DIV>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009><FONT face=Arial 
    color=#0000ff size=2>What needs to be done is</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009><FONT face=Arial 
    color=#0000ff size=2>1) Set at the MAP level the projection that you want 
    Mapserver to use for output&nbsp;as well as&nbsp;map extents using values 
    and units of&nbsp;the output projection.</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009><FONT face=Arial 
    color=#0000ff 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>&nbsp;</DIV>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009><FONT face=Arial 
    color=#0000ff size=2>To make is as simple as possible for the 
    beginning&nbsp;I suggest to use&nbsp;projection epsg:4326 and a bit wider 
    extents than you have now at MAP level.&nbsp; Thats because those extents 
    are already working for you, and ESRI dataset most propably is in WGS84 
    projection.&nbsp; 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>&nbsp;</DIV>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009><FONT face=Arial 
    color=#0000ff size=2>Then there will be just the Mapinfo layer left.&nbsp; 
    Defined by the the ogrinfo line <FONT face=Arial color=#0000ff 
    size=2>PARAMETER["central_meridian",27] and coordinates it looks like it 
    might be in</FONT>&nbsp;UTM 35N projection (epsg:32635).&nbsp; Have a try 
    with that first.</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009></SPAN>&nbsp;</DIV>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009><FONT face=Arial 
    color=#0000ff size=2>-Jukka Rahkonen-</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=178371808-25022009></SPAN>&nbsp;</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="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,255) 2px solid; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp; 
      DATUM["WGS_1984",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      SPHEROID["WGS_1984",6378137.0,298.257223563]],<BR>&nbsp;&nbsp;&nbsp; 
      PRIMEM["Greenwich",0.0],<BR>&nbsp;&nbsp;&nbsp; 
      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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp; 
      GEOGCS["unnamed",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      DATUM["WGS_1984",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      SPHEROID["WGS 
      84",6378137,298.257223563],<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      TOWGS84[0,0,0,-0,-0,-0,0]],<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      PRIMEM["Greenwich",0],<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      UNIT["degree",0.0174532925199433]],<BR>&nbsp;&nbsp;&nbsp; 
      PROJECTION["Transverse_Mercator"],<BR>&nbsp;&nbsp;&nbsp; 
      PARAMETER["latitude_of_origin",0],<BR>&nbsp;&nbsp;&nbsp; 
      PARAMETER["central_meridian",27],<BR>&nbsp;&nbsp;&nbsp; 
      PARAMETER["scale_factor",0.9996],<BR>&nbsp;&nbsp;&nbsp; 
      PARAMETER["false_easting",500000],<BR>&nbsp;&nbsp;&nbsp; 
      PARAMETER["false_northing",0],<BR>&nbsp;&nbsp;&nbsp; 
      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></BLOCKQUOTE></BODY></HTML>