<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello Gertjan,<br>
    <br>
    In most off the times the code will work right. But in 1 out of 10
    the code gives me the exception back.<br>
    It looks like an issue with initialisation. Because when it's work
    it stays working and when the exception occurs then I need to close
    my application. <br>
    I'm using rev 2194 from
    <a class="moz-txt-link-freetext" href="http://svn.osgeo.org/metacrs/proj4j/trunk/src">http://svn.osgeo.org/metacrs/proj4j/trunk/src</a> which is build with
    ant to proj4j-0.1.0.jar<br>
    <br>
    Thanks for looking.<br>
    <br>
    Regards,<br>
    Peter Peterse<br>
    <br>
    <div class="moz-cite-prefix">Op 17-10-2012 13:40, Gertjan Idema
      schreef:<br>
    </div>
    <blockquote cite="mid:1350474021.2216.201.camel@laptop-ubuntu"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="GENERATOR" content="GtkHTML/4.1.92">
      Hello Peter,<br>
      <br>
      I just entered your code and it runs fine in my environment.<br>
      Are you sure you're always using the same proj4j version?<br>
      Are you sure you have no typing errors in +towgs (no capitals for
      example)?<br>
      <br>
      Gertjan Idema<br>
      <br>
      <br>
      On Wed, 2012-10-17 at 12:10 +0200, P. Peterse (HDB) wrote:
      <blockquote type="CITE">
        <pre>Hello list,

We are using org.osgeo.proj4j in our project and facing sometimes an
issue while transforming an coordinate from lat/long format to EPSG:28992.
Most times the conversion will work ok, but sometimes there comes an
exception:
towgs84 parameter is not supported
The input coordinate is:
LatLon[lat=52.11882666666666, lon=5.04316]

The used code is as follows:
===============
        CRSFactory csFactory = new CRSFactory();
        final String EPSG28992_PARAM = "+proj=sterea
+lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079
+x_0=155000 +y_0=463000 +ellps=bessel
+towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725
+units=m +no_defs";
        CoordinateReferenceSystem epsg28992 =
csFactory.createFromParameters("EPSG:28992", EPSG28992_PARAM);
       
        final String WGS84_PARAM = "+title=long/lat:WGS84 +proj=longlat
+ellps=WGS84 +datum=WGS84 +units=degrees";
        CoordinateReferenceSystem epsg4326 =
csFactory.createFromParameters("WGS84",WGS84_PARAM);
       
        CoordinateTransformFactory ctFactory = new
CoordinateTransformFactory();
        CoordinateTransform trans = ctFactory.createTransform(epsg4326,
epsg28992);
        ProjCoordinate inCoord = new ProjCoordinate();
        ProjCoordinate outCoord = new ProjCoordinate();
        inCoord.y = pos.getLat();
        inCoord.x = pos.getLon();
        //convert from lat/lon to RD.
        trans.transform(inCoord, outCoord);
        final double[] point = new double[2];
        point[0]=outCoord.x;
        point[1]=outCoord.y;
       
        return point;
===============

Does anyone have a clue what's going wrong over here?

Thanks for your patience.

Regards,
Peter Peterse
_______________________________________________
Proj4j mailing list
<a moz-do-not-send="true" href="mailto:Proj4j@lists.osgeo.org">Proj4j@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/proj4j">http://lists.osgeo.org/mailman/listinfo/proj4j</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Proj4j mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Proj4j@lists.osgeo.org">Proj4j@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/proj4j">http://lists.osgeo.org/mailman/listinfo/proj4j</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>