how to set bbox in WMS request

Description

I got this to test WMS:
"http://localhost:8080/geoserver/wms?request=GetMap&layers=bc_roads&bbox=489153,5433000,
529000,5460816&width=400&height=200&srs=EPSG:27354&styles=normal&Format=image/png".
But how can I set(calculate) my bbox coordinates if I want to
show the specific area (I know the LAT/LON of that area)?

Thanks

Environment

None

Activity

Show:
codehaus
April 10, 2015, 4:47 PM

CodeHaus Comment From: cholmes - Time: Sun, 22 Feb 2004 22:31:56 -0600
---------------------
<p>EXTERNAL MESSAGE:

SUBJECT: Re: <span class="error">&#91;Geoserver-devel&#93;</span> <span class="error">&#91;jira&#93;</span> Created: (<a href="https://jira.codehaus.org/browse/GEOS-99" title="how to set bbox in WMS request" class="issue-link" data-issue-key="GEOS-99"><del>GEOS-99</del></a>) how to set bbox in

WMS request

I'm not sure I understand. You can put in a different bbox to show a

different area. If you're layer is stored in lat long coordinates then

you just enter those as the bbox. Unfortunately goeserver does not yet do

different projections. If you have a new layer set up then you can use

the WFS portion with a getFeature request to return all the features as

XML, and doing so will also give you a boundedBy at the top, so those

coordinates can be a good sample of the coordinates you should use for

your bbox WMS request.</p>

<p>Chris</p>

<p>&#8211;</p>

codehaus
April 10, 2015, 4:47 PM

CodeHaus Comment From: mikechn - Time: Wed, 25 Feb 2004 14:00:36 -0600
---------------------
<p>Thank you for your comment.But I am still confused.

Lets take this as example:

"http://localhost:8080/geoserver/wms?request=GetMap&amp;layers=bc_roads&amp;bbox=489153,5433000,

529000,5460816&amp;width=400&amp;height=200&amp;srs=EPSG:27354&amp;styles=normal&amp;Format=image/png". </p>

<p>I have checked the data of bc_roads(using shp2pgsql to get the insert

command to POSTGIS),they are in lat/long;So you mean the bbox here:

"489153,5433000,529000,5460816" is also in lat/long,then how

do you interpret them:489153 means:48.9153 degrees?5433000 means ...?

these can't be the lat/long in BC.</p>

<p>Thanks!</p>

<p>PS:the insert commands:

create table rail(gid int4 , ID int4, COUNTY varchar, AIANHHCE varchar, FIPSCODE varchar, TRUST varchar, NAME varchar);

select AddGeometryColumn('testdb','rail','the_geom','-1','MULTIPOLYGON',2);

begin;

Insert into rail values('0','1','53019','0760','14240','0','Colville',GeometryFromText('MULTIPOLYGON(((-118.2395 48.135186 ,-118.2413 48.135386 ,-118.2426 48.135486 ,...... )))',-1) );end;</p>

codehaus
April 10, 2015, 4:47 PM

CodeHaus Comment From: cholmes - Time: Fri, 5 Mar 2004 23:08:53 -0600
---------------------
<p>Sorry I didn't respond, I wasn't watching this issue so I didn't see your response. No, the bc_roads isn't <em>really</em> in lat/lon, it's just sample data, I'm not sure what coord sys it is, but 489153 does not mean 48.9153.</p>

<p>For you data I think you just need to do a bbox like -118.25,48.135,-118.23,28.136 - basically just around the numbers that you have. If you do a getFeatures?typename=rail then that gml response will have a bbox at the top. These numbers can then be translated into a kvp bbox - minx,miny,maxx,maxy.</p>

codehaus
April 10, 2015, 4:47 PM

CodeHaus Comment From: groldan - Time: Sat, 13 Mar 2004 19:53:42 -0600
---------------------
<p>should this task still be open?

I think Chris has responded it and as it was just a user question may be we should close the issue</p>

codehaus
April 10, 2015, 4:47 PM

CodeHaus Comment From: cholmes - Time: Sun, 14 Mar 2004 00:27:18 -0600
---------------------
<p>Yeah, let's close this. Mike, if you have further questions then email them to geoserver-devel@lists.sf.net</p>

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

None

Affects versions

None

Components

Priority

Medium
Configure