I think there might be something wrong with the way changeset queries
get filtered. Specifically, whenever I've tried to get changeset
query filtered by a single feature, I end up getting back a changeset
with only one revision in it: the revision with the same number as the
feature's fid. (The revision has nothing to do with the feature
actually filtered for).
Anyone know what's going on here?
Thanks,
Seb
--------------------------
XML stuff below...
--------------------------
When I send the following request to my locally installed Geoserver v.
1.6-beta3:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" version="1.0.0"
service="WFSV" outputFormat="GML2">
<wfs:Query typeName="topp:changesets">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:FeatureId fid="archsites.19"/>
</ogc:Filter>
<ogc:PropertyName xmlns:ogc="http://www.opengis.net/ogc">
date
</ogc:PropertyName>
<ogc:PropertyName xmlns:ogc="http://www.opengis.net/ogc">
message
</ogc:PropertyName>
</wfs:Query>
</wfs:GetFeature>
I get back the following response:
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns="http://www.opengis.net/wfs"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:topp="http://www.openplans.org/topp"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openplans.org/topp
http://localhost:8080/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=topp:changesets
http://www.opengis.net/wfs
http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">
<gml:boundedBy>
<gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates xmlns:gml="http://www.opengis.net/gml"
decimal="." cs="," ts=" ">
0,0 1,1
</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<topp:changesets fid="changesets.19">
<topp:revision>
19
</topp:revision>
<topp:date>
2007-10-03T15:37:07.985
</topp:date>
<topp:message>
Deleting archsites.17
</topp:message>
</topp:changesets>
</gml:featureMember>
</wfs:FeatureCollection>
Here. revision number 19 didn't have anything to do with archsite.19,
but rather with deleting archsites.17
Sebastian Benthall ha scritto:
I think there might be something wrong with the way changeset queries
get filtered. Specifically, whenever I've tried to get changeset
query filtered by a single feature, I end up getting back a changeset
with only one revision in it: the revision with the same number as the
feature's fid. (The revision has nothing to do with the feature
actually filtered for).
Anyone know what's going on here?
I see two issues here.
The first one is that you requested fid archsites.19, but you get as
an answer changelog.19. This is because we don't check the prefix,
just strip it and look for 19 in the database.
I opened a jira issue for this:
http://jira.codehaus.org/browse/GEOS-1373
The second one is conceptual. The changesets feature type is not
a "get me the logs and allow me to filter" meta table, it's really
just the table where I keep the changelogs in the database, as is,
without any intermediation. So it makes sense to filter on user,
eventually on the message, the modified area, but you cannot
filter on the fid or a modified feature because it's really
not there.
(quick notice, if you try to alter the logs with WFS-T you'll
notice this feature type is read only).
If you really need the above, you'll have to use the GetLog request,
which is instead designed to give you what you asked, that is, "give
me the logs and allow me to filter them based on the features that
where affected between the two revisions _and_ that are matching
the specified filter".
Can you try GetLog and tell me if it works for you?
Cheers
Andrea
I tried GetLog, and this time the filter seems to be ignored entirely.
The response to this request is identical to the response to the
request below it (without the Filter):
<wfsv:GetLog xmlns:wfsv="http://www.opengis.net/wfsv"
version="1.0.0" service="WFSV"
outputFormat="HTML"
xmlns:topp="http://www.openplans.org/topp"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfsv
http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-versioning.xsd">
<wfsv:DifferenceQuery typeName="topp:archsites"
fromFeatureVersion="1" toFeatureVersion="13">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:FeatureId fid="archsites.16"/>
</ogc:Filter>
</wfsv:DifferenceQuery>
</wfsv:GetLog>
<wfsv:GetLog xmlns:wfsv="http://www.opengis.net/wfsv"
version="1.0.0" service="WFSV"
outputFormat="HTML"
xmlns:topp="http://www.openplans.org/topp"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfsv
http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-versioning.xsd">
<wfsv:DifferenceQuery typeName="topp:archsites"
fromFeatureVersion="1" toFeatureVersion="13">
</wfsv:DifferenceQuery>
</wfsv:GetLog>
On 10/4/07, Andrea Aime <aaime@anonymised.com> wrote:
Sebastian Benthall ha scritto:
> I think there might be something wrong with the way changeset queries
> get filtered. Specifically, whenever I've tried to get changeset
> query filtered by a single feature, I end up getting back a changeset
> with only one revision in it: the revision with the same number as the
> feature's fid. (The revision has nothing to do with the feature
> actually filtered for).
>
> Anyone know what's going on here?
I see two issues here.
The first one is that you requested fid archsites.19, but you get as
an answer changelog.19. This is because we don't check the prefix,
just strip it and look for 19 in the database.
I opened a jira issue for this:
http://jira.codehaus.org/browse/GEOS-1373
The second one is conceptual. The changesets feature type is not
a "get me the logs and allow me to filter" meta table, it's really
just the table where I keep the changelogs in the database, as is,
without any intermediation. So it makes sense to filter on user,
eventually on the message, the modified area, but you cannot
filter on the fid or a modified feature because it's really
not there.
(quick notice, if you try to alter the logs with WFS-T you'll
notice this feature type is read only).
If you really need the above, you'll have to use the GetLog request,
which is instead designed to give you what you asked, that is, "give
me the logs and allow me to filter them based on the features that
where affected between the two revisions _and_ that are matching
the specified filter".
Can you try GetLog and tell me if it works for you?
Cheers
Andrea
Sebastian Benthall ha scritto:
I tried GetLog, and this time the filter seems to be ignored entirely.
The response to this request is identical to the response to the
request below it (without the Filter):
Ouch, you're right, the xml parser was ignoring the filter.
Here is the report:
http://jira.codehaus.org/browse/GEOS-1378
I'm committing the fix. Have a look at the nightly build output
directory here:
http://geo.openplans.org/nightly/trunk/
Unfortunately it seems the nightlies generation is still blocked (we are
having issues with the server), but as soon as we fix them, you'll
have a test geoserver to try out.
Thanks a lot for the report
Cheers
Andrea