<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19328"></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=796101421-04112012>use of proj4js to transform coordinates from EPSG:4326 
to EPSG:3004</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><A 
href="http://gis.ibbeck.de/ginfo/apps/OLExamples/OL212/PointTrack_Boaga_Projection.asp">http://gis.ibbeck.de/ginfo/apps/OLExamples/OL212/PointTrack_Boaga_Projection.asp</A></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 
face=Arial></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=796101421-04112012><FONT color=#0000ff 
size=2 face=Arial>the map projection is EPSG:3004, the coordinates in the 
kml-file are in projection EPSG:4326.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796101421-04112012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=796101421-04112012><FONT color=#0000ff 
size=2 face=Arial>The proj4js projection string </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796101421-04112012></SPAN><SPAN 
class=796101421-04112012><CODE class="wrappedText focusRow" 
role=listitem>Proj4js.defs["EPSG:3004"] = "+proj=tmerc +lat_0=0 +lon_0=15 
+k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl</CODE><CODE 
class="wrappedText focusRow" role=listitem> +units=m 
+no_defs";</CODE></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=796101421-04112012><CODE 
class="wrappedText focusRow" role=listitem><FONT color=#0000ff size=2 
face=Arial>comes from </FONT></CODE><CODE class="wrappedText focusRow" 
role=listitem><A 
href="http://spatialreference.org/ref/epsg/3004/proj4js/">http://spatialreference.org/ref/epsg/3004/proj4js/</A></CODE></DIV>
<DIV></SPAN><FONT color=#0000ff size=2 face=Arial></FONT> </DIV>
<DIV><SPAN class=796101421-04112012></SPAN><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>G<SPAN class=796101421-04112012>ood 
luck</SPAN></FONT></FONT></FONT></DIV>
<DIV><SPAN class=796101421-04112012></SPAN><SPAN 
class=796101421-04112012></SPAN><FONT face=Arial><FONT color=#0000ff><FONT 
size=2>A<SPAN class=796101421-04112012>rnd</SPAN></FONT></FONT></FONT><BR></DIV>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> Riggi Valerio [mailto:vash.84@virgilio.it] 
<BR><B>Gesendet:</B> Samstag, 3. November 2012 12:56<BR><B>An:</B> 
arnd.wippermann@web.de<BR><B>Cc:</B> 
openlayers-users@lists.osgeo.org<BR><B>Betreff:</B> Re: AW: [OpenLayers-Users] 
How To: Positionate WGS84 tracks intoGauss-Boaga Map<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=moz-cite-prefix><BR>
<BLOCKQUOTE cite=mid:16EBD195B07B4DB18AD553344A45CDFC@pcawh2 type="cite">
  <DIV dir=ltr align=left><SPAN class=734235521-02112012><FONT color=#0000ff 
  size=2 face=Arial>By the way: How did you manage to show a tif in your 
  browser?</FONT></SPAN></DIV></BLOCKQUOTE><FONT size=2><FONT face=Arial>I manage 
<FONT size=2>to show the tiff </FONT>only on <FONT size=2>Internet Explorer 
(using </FONT></FONT></FONT><FONT size=2><FONT face=Arial><FONT 
size=2>OpenLayers.Layer.Image)</FONT></FONT></FONT>, but it is not a problem 
because it is for a univerity exam.. <BR>
<BLOCKQUOTE cite=mid:16EBD195B07B4DB18AD553344A45CDFC@pcawh2 type="cite">
  <DIV dir=ltr align=left><SPAN class=734235521-02112012><FONT color=#0000ff 
  size=2 face=Arial>then you have to add the proj4js javascript library to your 
  application.</FONT></SPAN></DIV></BLOCKQUOTE>Can you show me an 
example?<BR><BR><B>This is the Current Track Layer</B>:<BR>new 
OpenLayers.Layer.PointTrack("Tracks", 
{<BR>                
projection: 
geographic,<BR>                
strategies: [new 
OpenLayers.Strategy.Fixed()],<BR>                
protocol: new 
OpenLayers.Protocol.HTTP({<BR>                    
url: 
"track.kml",<BR>                    
format: new 
OpenLayers.Format.KML({<BR>                        
extractTracks: 
true,<BR>                        
extractStyles: 
true<BR>                    
})<BR>                
}),<BR>                
dataFrom: 
OpenLayers.Layer.PointTrack.TARGET_NODE,<BR>                
styleFrom: 
OpenLayers.Layer.PointTrack.TARGET_NODE,<BR>                
eventListeners: 
{<BR>                    
"beforefeaturesadded": function(e) 
{<BR>                        
// group the tracks by fid and create one track 
for<BR>                        
// every 
fid<BR>                        
var fid, points = [], 
feature;<BR>                        
for (var i=0, len=e.features.length; i<len; i++) 
{<BR>                            
feature = 
e.features[i];<BR>                            
if ((fid && feature.fid !== fid) || i === len-1) 
{<BR>                                
this.addNodes(points, {silent: 
true});<BR>                                
points = 
[];<BR>                            
} else 
{<BR>                                
points.push(feature);<BR>                            
}<BR>                            
fid = 
feature.fid;<BR>                        
}<BR>                        
return 
false;<BR>                    
}<BR>                
}<BR>            
})<BR><BR>Many Thank's<BR>Valerio<BR><BR><BR>Il 02/11/2012 22:59, Arnd 
Wippermann ha scritto:<BR></DIV>
<BLOCKQUOTE cite=mid:16EBD195B07B4DB18AD553344A45CDFC@pcawh2 type="cite">
  <META name=GENERATOR content="MSHTML 8.00.6001.19328">
  <DIV dir=ltr align=left><SPAN class=734235521-02112012><FONT color=#0000ff 
  size=2 face=Arial>if you want reproject feature coordinates from EPSG:4326 
  (WGS84) to other projection than EPSG:900913 
  (SphericalMercator),</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=734235521-02112012></SPAN> </DIV>
  <DIV dir=ltr align=left><SPAN class=734235521-02112012><FONT color=#0000ff 
  size=2 face=Arial>then you have to add the proj4js javascript library to your 
  application.</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=734235521-02112012></SPAN> </DIV>
  <DIV dir=ltr align=left><SPAN class=734235521-02112012><FONT color=#0000ff 
  size=2 face=Arial>By the way: How did you manage to show a tif in your 
  browser?</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=734235521-02112012></SPAN> </DIV>
  <DIV dir=ltr align=left><SPAN class=734235521-02112012><FONT color=#0000ff 
  size=2 face=Arial>Arnd</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=734235521-02112012></SPAN> </DIV>
  <DIV dir=ltr align=left><SPAN class=734235521-02112012></SPAN> </DIV><BR>
  <DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>Von:</B> <A class=moz-txt-link-abbreviated 
  href="mailto:openlayers-users-bounces@lists.osgeo.org">openlayers-users-bounces@lists.osgeo.org</A> 
  [<A class=moz-txt-link-freetext 
  href="mailto:openlayers-users-bounces@lists.osgeo.org">mailto:openlayers-users-bounces@lists.osgeo.org</A>] 
  <B>Im Auftrag von </B>Riggi Valerio<BR><B>Gesendet:</B> Freitag, 2. November 
  2012 21:56<BR><B>An:</B> <A class=moz-txt-link-abbreviated 
  href="mailto:openlayers-users@lists.osgeo.org">openlayers-users@lists.osgeo.org</A><BR><B>Betreff:</B> 
  [OpenLayers-Users] How To: Positionate WGS84 tracks intoGauss-Boaga 
  Map<BR></FONT><BR></DIV>Hi, I'm tring to track some gps data into a 
  Gauss-Boaga map, but I don't manage to put the track on the right place, how 
  can I do?<BR><BR><B>This is the Track layer</B>:<BR>new 
  OpenLayers.Layer.PointTrack("Tracks", 
  {<BR>                
  projection: 
  geographic,<BR>                
  strategies: [new 
  OpenLayers.Strategy.Fixed()],<BR>                
  protocol: new 
  OpenLayers.Protocol.HTTP({<BR>                    
  url: 
  "track.kml",<BR>                    
  format: new 
  OpenLayers.Format.KML({<BR>                        
  extractTracks: 
  true,<BR>                        
  extractStyles: 
  true<BR>                    
  })<BR>                
  }),<BR>                
  dataFrom: 
  OpenLayers.Layer.PointTrack.TARGET_NODE,<BR>                
  styleFrom: 
  OpenLayers.Layer.PointTrack.TARGET_NODE,<BR>                
  eventListeners: 
  {<BR>                    
  "beforefeaturesadded": function(e) 
  {<BR>                        
  // group the tracks by fid and create one track 
  for<BR>                        
  // every 
  fid<BR>                        
  var fid, points = [], 
  feature;<BR>                        
  for (var i=0, len=e.features.length; i<len; i++) 
  {<BR>                            
  feature = 
  e.features[i];<BR>                            
  if ((fid && feature.fid !== fid) || i === len-1) 
  {<BR>                                
  this.addNodes(points, {silent: 
  true});<BR>                                
  points = 
  [];<BR>                            
  } else 
  {<BR>                                
  points.push(feature);<BR>                            
  }<BR>                            
  fid = 
  feature.fid;<BR>                        
  }<BR>                        
  return 
  false;<BR>                    
  }<BR>                
  }<BR>            
  })<BR><BR><B>And this is the Gauss-Boaga</B><B> 
  Projection</B>:<BR>    var options = {<BR>    
  isBaseLayer: true,<BR>    maxResolution: 
  '0.84686783985005',<BR>    strategies: [new 
  OpenLayers.Strategy.Fixed()],<BR>    displayInLayerSwitcher: 
  true,<BR>    size: new OpenLayers.Size(8745, 
  6696),<BR>    numZoomLevels: 20<BR>    
  };<BR><BR>    var gauss = new 
  OpenLayers.Layer.Image(<BR>                
  'Gauss-Boaga',<BR>                
  'CTR588140.tif',<BR>                
  new OpenLayers.Bounds(2556348.9846319141797721, 4227924.4383069388568401, 
  2563754.8438914027065039,4233595.0653625745326281),       
  <?php //left,bottom,right,top 
  ?><BR>                
  new OpenLayers.Size(8745, 
  6696),<BR>                
  options<BR>            
  );<BR></BLOCKQUOTE><BR></BODY></HTML>