[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #USL-983688]: ArithmeticException: / by zero



> Hi
> 
> A further question. I would like to display the data in Spherical Mercator
> (EPSG:900913).
> 
> proj.4: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0
> +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs
> 
> Is that different from the ucar.unidata.geoloc.projection.Mercator ?
> Or I should use *

These two projections are from two difference sources, one is from John 
Snyder's and 
the other is from USGS projection package.

> ucar.unidata.geoloc.projection.proj4.TransverseMercatorProjection?*
> *But seems it is another thing too. *
> *
> *
> *Actually, the conversion calc is simple:*
> *def forwardMercator(lon, lat): x = lon * 20037508.34 / 180.0; y =
> math.log(math.tan((90.0 + lat) * math.pi / 360.0)) / (math.pi / 180.0) y = y
> * 20037508.34 / 180.0 return (x, y) def inverseMercator(x, y): lon = (x /
> 20037508.34) * 180.0; lat = (y / 20037508.34) * 180.0; lat = 180.0/math.pi *
> (2.0 * math.atan(math.exp(lat * math.pi / 180.0)) - math.pi / 2.0); return
> (lon, lat)*
> *
> *
> *I tried to write a Java Plugin with a Projection class but seems IDV
> doesn't read the class.*
> *
> *
> *Any simple way to make it work ?*

The easy way is to use the projection manager to create a new one, but there is 
no inverseMercator available.
> *
> *
> *Thanks a lot*
> 
> Eric
> 
> On Fri, Aug 5, 2011 at 3:40 PM, Eric Fong <address@hidden> wrote:
> 
> > Hi
> >
> > Same thing happened. I attached the test2.isl for you and
> > I just run "runIDV test2.isl -Dbundle=base2.xidv -Dout=out"
> >
> > I am trying to use IDV to output Mercator projection images to overlay in
> > OpenLayers from server.
> > That is why I setup a Mercator projection in the xidv file.
> > And try to change center west, south, east, north in isl to output tiles of
> > Mercator images for OpenLayers.
> >
> > My IDV version: 3.0b1 32bit Linux
> > Java3D: 1.3 (in order to make the whole rendering work)
> > OS: RHEL 5.4
> >
> > Thanks.
> >
> > Eric
> >
> >
> > address@hidden> wrote:
> >
> >> > Hi
> >> >
> >> > They are attached.
> >> > If i set the offscreen to fasle. It will be OK but I can no longer set
> >> the
> >> > width and height by the bundle tag.
> >> >
> >> > Eric
> >> >
> >> >
> >>
> >> Eric,
> >>    I think the original bundle did not define its region very well,
> >> replace with the attached bundles, the isl should work as expected.
> >>
> >>
> >> Yuan
> >>
> >> Ticket Details
> >> ===================
> >> Ticket ID: USL-983688
> >> Department: Support IDV
> >> Priority: Normal
> >> Status: Closed
> >
> >
> >
> >
> > --
> > Best Regards,
> > Eric Fong
> >
> 
> 
> 
> --
> Best Regards,
> Eric Fong
> 
> 


Ticket Details
===================
Ticket ID: USL-983688
Department: Support IDV
Priority: Normal
Status: Open