[Geoserver-users] Restrict bbox size of wfs request?

(please keep questions on the public mailing list, you will get a better answer)

Unfortunately I cant think of a good way to do this with wfs... perhaps something that WPS (web processing service) could achieve. Someone else on the list might have a better idea.

-Justin

Jay Parsons wrote:

Hello Justin,

Thanks for the reply. I don't think I explained my issue thoroughly.

I am not trying to restrict to these specific bounds
<gml:coordinates>-110.0,52.0 -108.0,54.0</gml:coordinates>
but rather restrict to requests that are <= a 2x2 degree square.

-Jay
----- Original Message ----

From: Justin Deoliveira <jdeolive@anonymised.com>
To: Jay Parsons <jay_austin_tx@anonymised.com>
Cc: geoserver-users@lists.sourceforge.net
Sent: Wednesday, April 2, 2008 10:28:28 AM
Subject: Re: [Geoserver-users] Restrict bbox size of wfs request?

Hi Jay,

Its possible to attach a "definition filter" to a feature type. Which basically means use this filter for any request, no matter what. So it sounds like that might be what you need.

Unfortunately it is not something that is settable from the user interface. But if you find teh info.xml fiel for your feature type (/featureTypes/cities/info.xml). And add something like:

           the_geom
              -110.0,52.0 -108.0,54.0
       
Try that out, let us know if it works for you.

-Justin

Jay Parsons wrote:

All,

Because of a very dense dataset I would like to restrict the spatial size of a

WFS query.

Let say I only want to allow a request with a 2 degree bbox or smaller and

ignore larger requests.

So allow:

http://…TypeName=cities&Request=GetFeature&Service=WFS&BBOX=-110.0,52.0,-108.0,54.0

but ignore:

http://…TypeName=cities&Request=GetFeature&Service=WFS&BBOX=-126.0,36.0,-108.0,54.0

Is there a way to configuration this type of functionality?

-Jay

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

!DSPAM:4007,47f3ca11187382143011171!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

Hi Jay,

as far as I know, there's no such a thing in the WFS spec, nor GeoServer has a
WFS extension to handle that.

Think of a WFS as a database where you can only do very simple queried (no
joins, no aggregate functions, etc), only a simple filter predicate and
simple sorting. Still if you ask for too much you'll get too much an answer :
(

Some guys from the gvSig team are working on this kind of things using a WPS.
I'm not sure of the internals nor when it will be available, but the oddities
you're facing sound similar to what they're trying to achieve, like adding
pagination support, server side geometry simplification, spatial extent
adaptive filtering, etc. (that last one seems like what you're looking for,
like in "if query extent is in this range, use this filter, and so on" )

In the end, it would be nice if such an experiment ends up in a WFS spec
change proposal. But right now I guess there's nothing like that that I know
of, though it would certainly be an interesting thing to build.

Regards,
Gabriel

On Wednesday 02 April 2008 08:38:56 pm Justin Deoliveira wrote:

(please keep questions on the public mailing list, you will get a better
answer)

Unfortunately I cant think of a good way to do this with wfs... perhaps
something that WPS (web processing service) could achieve. Someone else
on the list might have a better idea.

-Justin

Jay Parsons wrote:
> Hello Justin,
>
> Thanks for the reply. I don't think I explained my issue thoroughly.
>
> I am not trying to restrict to these specific bounds
> <gml:coordinates>-110.0,52.0 -108.0,54.0</gml:coordinates>
> but rather restrict to requests that are <= a 2x2 degree square.
>
>
> -Jay
> ----- Original Message ----
>
>> From: Justin Deoliveira <jdeolive@anonymised.com>
>> To: Jay Parsons <jay_austin_tx@anonymised.com>
>> Cc: geoserver-users@lists.sourceforge.net
>> Sent: Wednesday, April 2, 2008 10:28:28 AM
>> Subject: Re: [Geoserver-users] Restrict bbox size of wfs request?
>>
>> Hi Jay,
>>
>> Its possible to attach a "definition filter" to a feature type. Which
>> basically means use this filter for any request, no matter what. So it
>> sounds like that might be what you need.
>>
>> Unfortunately it is not something that is settable from the user
>> interface. But if you find teh info.xml fiel for your feature type
>> (/featureTypes/cities/info.xml). And add something like:
>>
>>
>>
>>
>> the_geom
>>
>> -110.0,52.0 -108.0,54.0
>>
>>
>>
>>
>>
>> Try that out, let us know if it works for you.
>>
>> -Justin
>>
>> Jay Parsons wrote:
>>> All,
>>>
>>> Because of a very dense dataset I would like to restrict the spatial
>>> size of a
>>
>> WFS query.
>>
>>> Let say I only want to allow a request with a 2 degree bbox or smaller
>>> and
>>
>> ignore larger requests.
>>
>>> So allow:
>>
>> http://…TypeName=cities&Request=GetFeature&Service=WFS&BBOX=-110.0,5
>>2.0,-108.0,54.0
>>
>>> but ignore:
>>
>> http://…TypeName=cities&Request=GetFeature&Service=WFS&BBOX=-126.0,3
>>6.0,-108.0,54.0
>>
>>> Is there a way to configuration this type of functionality?
>>>
>>> -Jay
>>>
>>>
>>>
>>>
>>> -----------------------------------------------------------------------
>>>-- Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/market
>>>place _______________________________________________
>>> Geoserver-users mailing list
>>> Geoserver-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>> --
>> Justin Deoliveira
>> The Open Planning Project
>> jdeolive@anonymised.com