[Geoserver-users] Intersect query doesn't work

Dear All,
I try to get some feature by a wfs 1.1.0 intersect query. My geoserver version is 1.7.2., the same query works, instead, on geoserver 1.7.1.

Attached is the request I post to the server and the response (I have omitted the huge list of coordinates).

Thanks for your support,
Marianna Borriello

request.txt (5.23 KB)

Marianna Borriello wrote:

Dear All,
I try to get some feature by a wfs 1.1.0 intersect query. My geoserver version is 1.7.2., the same query works, instead, on geoserver 1.7.1.

Attached is the request I post to the server and the response (I have omitted the huge list of coordinates).

The first request returns an encoder error, which is quite strange,
as GeoServer can definitely encode multipolygons (topp:states is made
of them). It keeps on looking like a broken install, but I'm not sure
about it.

The second error reminds me of a Oracle specific limitation, function
arguments cannot be longer than 2000 chars, so if your geometry is
really big, it will exceed that limit and probably return that error
(not sure).
To work around that you can try to use the new oracle-ng datastore, it
uses prepared statements to make queries and thus by-passes the
function argument length limit entirely. An improved version of this
new datastore is going to be released in 1.7.3, the one shipped
along with 1.7.2 could not handle properly tables without primary keys
(you can also grab a nightly build, the problem has already been fixed:
http://gridlock.openplans.org/geoserver/1.7.x/)

Cheers
Andrea

Dear Andrea,
I replaced the “old” Oracle extension with the NG one and the query works!
Thanks for you support.

Now I have another question:

  • with Geoserver 1.7.1 doing wfs 1.1.0 queries (as getFeature by ID, or intersect) I received a response like this one:
    <wfs:FeatureCollection …>
    gml:featureMembers
    <idtcal:CITTA gml:id=“CITTA.3”>
    gml:boundedBy
    <gml:Envelope srsName=“urn:x-ogc:def:crs:EPSG:32633”>
    gml:lowerCorner609946.902670262 4311058.83546428</gml:lowerCorner>
    gml:upperCorner609946.902670262 4311058.83546428</gml:upperCorner>
    </gml:Envelope>
    </gml:boundedBy>

    </idtcal:CITTA>

    </gml:featureMembers>
    </wfs:FeatureCollection>

-with Geoserver 1.7.2 doing the same requests produces a response that doesn’t contain the bounds (gml:boundedBy).

I need bounds information in order to zoom the map tho the query results.

How can I calculate this bounds?
Is it possibile to have a response which contains bounds?

Thanks,
Marianna

Andrea Aime ha scritto:

Marianna Borriello wrote:

Dear Andrea,
I replaced the "old" Oracle extension with the NG one and the query works!
Thanks for you support.

Now I have another question:

- with Geoserver 1.7.1 doing wfs 1.1.0 queries (as getFeature by ID, or intersect) I received a response like this one:
<wfs:FeatureCollection ...>
    <gml:featureMembers>
        <idtcal:CITTA gml:id="CITTA.3">
        * <gml:boundedBy>
                <gml:Envelope srsName="urn:x-ogc:def:crs:EPSG:32633">
                    <gml:lowerCorner>609946.902670262 4311058.83546428</gml:lowerCorner>
                    <gml:upperCorner>609946.902670262 4311058.83546428</gml:upperCorner>
                </gml:Envelope>
        </gml:boundedBy>*
          ....
       </idtcal:CITTA>
       ...
    </gml:featureMembers>
</wfs:FeatureCollection>

-with Geoserver 1.7.2 doing the same requests produces a response that *doesn't contain the bounds* (gml:boundedBy).

I need bounds information in order to zoom the map tho the query results.

How can I calculate this bounds?
Is it possibile to have a response which contains bounds?

There is a configuration option available from Config -> WFS and turn featureBounding on. Then it should produce bounds on each feature. This behavior changed slightly in order to have the gml3 encoder respect that property, as opposed to always outputting the bounds.

-Justin

Thanks,
Marianna

Andrea Aime ha scritto:

Marianna Borriello wrote:

Dear All,
I try to get some feature by a wfs 1.1.0 intersect query. My geoserver version is 1.7.2., the same query works, instead, on geoserver 1.7.1.

Attached is the request I post to the server and the response (I have omitted the huge list of coordinates).

The first request returns an encoder error, which is quite strange,
as GeoServer can definitely encode multipolygons (topp:states is made
of them). It keeps on looking like a broken install, but I'm not sure
about it.

The second error reminds me of a Oracle specific limitation, function
arguments cannot be longer than 2000 chars, so if your geometry is
really big, it will exceed that limit and probably return that error
(not sure).
To work around that you can try to use the new oracle-ng datastore, it
uses prepared statements to make queries and thus by-passes the
function argument length limit entirely. An improved version of this
new datastore is going to be released in 1.7.3, the one shipped
along with 1.7.2 could not handle properly tables without primary keys
(you can also grab a nightly build, the problem has already been fixed:
http://gridlock.openplans.org/geoserver/1.7.x/)

Cheers
Andrea

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H

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

_______________________________________________
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.

Marianna Borriello wrote:

Dear Andrea,
I replaced the "old" Oracle extension with the NG one and the query works!
Thanks for you support.

Now I have another question:

- with Geoserver 1.7.1 doing wfs 1.1.0 queries (as getFeature by ID, or intersect) I received a response like this one:
<wfs:FeatureCollection ...>
    <gml:featureMembers>
        <idtcal:CITTA gml:id="CITTA.3">
        * <gml:boundedBy>
                <gml:Envelope srsName="urn:x-ogc:def:crs:EPSG:32633">
                    <gml:lowerCorner>609946.902670262 4311058.83546428</gml:lowerCorner>
                    <gml:upperCorner>609946.902670262 4311058.83546428</gml:upperCorner>
                </gml:Envelope>
        </gml:boundedBy>*
          ....
       </idtcal:CITTA>
       ...
    </gml:featureMembers>
</wfs:FeatureCollection>

-with Geoserver 1.7.2 doing the same requests produces a response that *doesn't contain the bounds* (gml:boundedBy).

I need bounds information in order to zoom the map tho the query results.

How can I calculate this bounds?
Is it possibile to have a response which contains bounds?

Bounds computation is optional in GML and has been disabled by default
after complaints from users that have seriously big datasets on which
Oracle takes forever (minutes) to compute bounds.
You can enabled it back by going to the WFS configuration and enable
"feature bounding"

Cheers
Andrea