[Geoserver-users] group layers and bbox filtering

Hi

I have a group layer that contains several shapefiles, each one of these shapefiles represent a region of the country.

When I render the group layers Geoserver take a long time to generate the tiles even when I zoom to one of the regions,

but when I try to render the shapefile of a specific region the response time is OK.

Did Geoserver take in account the BBOX of the shapefile (layer) when rendering a group layer?

Thanks

Adil TAHRI
Expert Research

Well layer groups are really just syntactic sugar, so when you request a layer group with N layers GeoServer behind the scenes will do N separate queries to the back end, which can be expensive.

That said yes, the index should be taken into account on each shapefile... so there could be an issue there. Tough to say. Can you provide the response times? Are we talking about seconds? Or more?

Also, have you considered just merging all the shapefiles into a single database, postgis or something else, with a spatial index? That will be the best way to get the performance you seek.

-Justin

Adil Tahri wrote:

Hi

I have a group layer that contains several shapefiles, each one of these shapefiles represent a region of the country.

When I render the group layers Geoserver take a long time to generate the tiles even when I zoom to one of the regions,

but when I try to render the shapefile of a specific region the response time is OK.

Did Geoserver take in account the BBOX of the shapefile (layer) when rendering a group layer?

Thanks

--

Adil TAHRI
Expert Research

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

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

I have missed to set the “create index” to “true”.

I though that the “create index” option means that Geoserver will create the index from scratch, but in fact it just tell Geoserver to use the index files (as far as I have understood).

The use of the Postgis database is a good option but we are planing to make very often updates and dropping a shapefile with it pre-calculated index appear to be the fastest way to do it.

Adil

On Mon, Jun 1, 2009 at 9:29 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Well layer groups are really just syntactic sugar, so when you request a layer group with N layers GeoServer behind the scenes will do N separate queries to the back end, which can be expensive.

That said yes, the index should be taken into account on each shapefile… so there could be an issue there. Tough to say. Can you provide the response times? Are we talking about seconds? Or more?

Also, have you considered just merging all the shapefiles into a single database, postgis or something else, with a spatial index? That will be the best way to get the performance you seek.

-Justin

Adil Tahri wrote:

Hi

I have a group layer that contains several shapefiles, each one of these shapefiles represent a region of the country.

When I render the group layers Geoserver take a long time to generate the tiles even when I zoom to one of the regions,

but when I try to render the shapefile of a specific region the response time is OK.

Did Geoserver take in account the BBOX of the shapefile (layer) when rendering a group layer?

Thanks

Adil TAHRI
Expert Research



Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com



Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Adil TAHRI
Expert Research

Adil Tahri wrote:

I have missed to set the "create index" to "true".

I though that the "create index" option means that Geoserver will create the index from scratch, but in fact it just tell Geoserver to use the index files (as far as I have understood).

Hmmm... this is news to me. I thought the index was used regardless if they are there. Andrea? Are there cases where an index won't be used?

The use of the Postgis database is a good option but we are planing to make very often updates and dropping a shapefile with it pre-calculated index appear to be the fastest way to do it.

Adil

On Mon, Jun 1, 2009 at 9:29 PM, Justin Deoliveira <jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>> wrote:

    Well layer groups are really just syntactic sugar, so when you
    request a layer group with N layers GeoServer behind the scenes will
    do N separate queries to the back end, which can be expensive.

    That said yes, the index should be taken into account on each
    shapefile... so there could be an issue there. Tough to say. Can you
    provide the response times? Are we talking about seconds? Or more?

    Also, have you considered just merging all the shapefiles into a
    single database, postgis or something else, with a spatial index?
    That will be the best way to get the performance you seek.

    -Justin

    Adil Tahri wrote:

        Hi

        I have a group layer that contains several shapefiles, each one
        of these shapefiles represent a region of the country.

        When I render the group layers Geoserver take a long time to
        generate the tiles even when I zoom to one of the regions,

        but when I try to render the shapefile of a specific region the
        response time is OK.

        Did Geoserver take in account the BBOX of the shapefile (layer)
        when rendering a group layer?

        Thanks

        --

        Adil TAHRI
        Expert Research

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

        ------------------------------------------------------------------------------
        Register Now for Creativity and Technology (CaT), June 3rd, NYC.
        CaT is a gathering of tech-side developers & brand creativity
        professionals. Meet
        the minds behind Google Creative Lab, Visual Complexity,
        Processing, & iPhoneDevCamp as they present alongside digital
        heavyweights like Barbarian Group, R/GA, & Big Spaceship.
        http://p.sf.net/sfu/creativitycat-com

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

        _______________________________________________
        Geoserver-users mailing list
        Geoserver-users@lists.sourceforge.net
        <mailto:Geoserver-users@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/geoserver-users

    -- Justin Deoliveira
    OpenGeo - http://opengeo.org
    Enterprise support for open source geospatial.

--

Adil TAHRI
Expert Research

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Justin Deoliveira ha scritto:

Adil Tahri wrote:

I have missed to set the "create index" to "true".

I though that the "create index" option means that Geoserver will create the index from scratch, but in fact it just tell Geoserver to use the index files (as far as I have understood).

Hmmm... this is news to me. I thought the index was used regardless if they are there. Andrea? Are there cases where an index won't be used?

"Create index" will force the creation of the .qix
file if missing, but as long as the .qix file is there and its date
is not older than the .shp file one it's going to be used.
So the only case in which the .qix won't be used should be if it's there
but its last modified date is older than the .shp file one

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.