[TinyOWS-dev] Some thoughts and question

Olivier Courtin olivier.courtin at oslandia.com
Wed Feb 23 06:47:54 EST 2011


On Feb 20, 2011, at 9:20 PM, Nicklas Avén wrote:

Hi Nicklas,


Sorry for the lag,


> My layer was quite big, about 400 mb as shape-file
> with 1.6 million polygons. When I made a getcapabilities request the
> server started to calculate the extent of the whole layer which takes
> some time. I then tried to use the geobbox option in the config-file  
> for
> the layer, but with no success.

You're right wfs_display_bbox only works for GetFeature request,
not for GetCapabilities ones.
As i'm not sure that remove it from GetCapabilities is something  
really wanted...

I think that we could imagine an another way to improve it, with Fast- 
CGI:
  1) Compute it on init
  2) On each transaction update the value if needed

But if we do that, we could loss the extent synchronisation if the  
datas are
updated by an another tools (for instance a QGIS directly linked to  
PostGIS)

Any others inputs/ideas on this ?


> First, if I understand the source-code
> right it is not east, west, north south as the wiki says, but minx,
> miny, maxx, maxy (west, south, east, north). I played quite a lot by
> changing the order and so but I couldn't make it not calculating the
> extent.

Not sure to understand this point,

The relation between geobbox and bbox is given by
ows_bbox_set_from_geobbox function.

Do you mean that the geobbox in GetCapabilities is false with your use  
case ?


>> From the source-code I think the intention is that if there is a  
>> valid
> geobbox, it should be used instead of calculating the extent, right?

Nope, geobbox is used to indicate limits.
So it will be impossible for a WFS client to retrieve feature outside  
this
geobbox extent limits.

> I was curious to find what happened in there, what is the best way of
> getting an output at runtime? Is it by sending it to the log-file or
> what is the preferred way. There is no prepared debug output, is it?

Activate debugs logs in src/ows_define.h then use all the flush
functions to print your stuff.
And yes in fast-cgi mode logging is indeed a good way to procede
(so activate log in config file)

> Then I wanted to continue trying here at home where I only have a 64  
> bit
> box . I installed a 64 bit ( I will download 32 bit too, to try, next
> time I get some time) ubuntu server 10.10 virtulized in kvm.
> I wanted to try the same upset so I installed Lighttpd and compiled
> fastcgi.
>
> Something that I think is not working as expected is the error-message
> if you give wrong connection-parameters to postgis. When I
> tried ./tinyows --check with wrong port-number I had an error at  
> line 77
> in ows_error.c and no error message telling me what was wrong.

Thanks to this report !
I've commited a fix as r330


> My attemt to write to the log looked like this:
>
> 	    ows_log(o, 1, "Ok, start");
>
> But I had nothing in the log.


If you use fast-cgi there's an inherent buffer mechanism.

Not always easy to flush on my own i must admit.
I anyone has a good practices on this, he's welcome !

> I am sorry for the long post, but when I success with this I intend to
> write a small tutorial how to get things going with TinyOWS and
> lighttpd. I can put it in the wiki if you want.

Oh yes with pleasure,
i didn't yet took the time to explore lighthttpd, depsite my will...

--
Olivier


More information about the TinyOWS-dev mailing list