[Geoserver-users] BBOX to heigth and width

Hi list,

I want to know how I know height and width corresponding to my BBOX for no distortion of the image.

I not sure I’m clear sorry.

Cheers

Jim

Can you explain what you want to d exactly?

Assuming you want to be able to guess native resolution for a coverage
I don't think there is a way to do that via WMS calls. This might be
possible via REST or WCS but I would have to check.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Founder - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

On Thu, Sep 10, 2009 at 5:22 PM, Jimmy Aumard <jimmy.aumard@anonymised.com> wrote:

Hi list,

I want to know how I know height and width corresponding to my BBOX for no
distortion of the image.

I not sure I'm clear sorry.

Cheers

Jim

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Thu, Sep 10, 2009 at 11:22 AM, Jimmy Aumard <jimmy.aumard@anonymised.com> wrote:

Hi list,

I want to know how I know height and width corresponding to my BBOX for no
distortion of the image.

calculate the aspect ratio of the boundingbox
              r=(map_width/map_height)
then chose a width (or height) say screen_width -> calculate height
              screen_height = screen_width/r

All will then be undistorted - the only wrinkle is that map_* are
doubles and screen_* are ints so there will be some rounding.

Ian

Hi,

Here is what I want to do:

I have one point with lon/lat in WGS84, I want to calculate a BBOX which contains the point and i want to make a request to have an image but I don’t know which width and heigth i have to put in the request

I calculate my BBOX with: lon-0.015,lat-0.020,lon+0.015,lat+0.020

I have to make : r= 0.030/0.040=0.75

And screen_heigth=640

screen_width=640/0.75=853

It’s good?

Thanks for awnser.

Jim

2009/9/10 Ian Turton <ijturton@anonymised.com>

On Thu, Sep 10, 2009 at 11:22 AM, Jimmy Aumard <jimmy.aumard@anonymised.com> wrote:

Hi list,

I want to know how I know height and width corresponding to my BBOX for no
distortion of the image.

calculate the aspect ratio of the boundingbox
r=(map_width/map_height)
then chose a width (or height) say screen_width → calculate height
screen_height = screen_width/r

All will then be undistorted - the only wrinkle is that map_* are
doubles and screen_* are ints so there will be some rounding.

Ian

On Fri, Sep 11, 2009 at 4:39 AM, Jimmy Aumard <jimmy.aumard@anonymised.com> wrote:

Hi,

Here is what I want to do:

I have one point with lon/lat in WGS84, I want to calculate a BBOX which
contains the point and i want to make a request to have an image but I don't
know which width and heigth i have to put in the request

I calculate my BBOX with: lon-0.015,lat-0.020,lon+0.015,lat+0.020

I have to make : r= 0.030/0.040=0.75

And screen_heigth=640

screen_width=640/0.75=853

It's good?

The maths looks right to me - only you can be sure if the map you get
back is distorted or not?

If you are using OpenLayers they have a center and zoom level method
that does the calculation for you I think.

Ian
--
Ian Turton

Sent from State College, PA, United States