[Geoserver-users] WFS: resultType question; How te get only the identities of the results of a query.

Hi everybody,

The current way to use the WFS of GeoServer gives me a big result (5-6MB) for certain queries, and I am only interested in the identifiers of the returned objects. I send a wfs query with a filter and want only the identities of all the objects that intersect with a polygon that I specify in the query, and not the GML coordinates together with it. Downloading 5-6MB for such a query is slows up the website too much. And I don’t want to display it at once. So I want to filter through all those gml:enities before I start downloading them and showing them on a map.

The current two resultTypes that are possible with WFS querries are hits and results but neither are what I need.

Can somebody give me bone? All solutions, even the ones out of the box, are of interest to me.

Thanks

Erik Hupkes

Hi Eric,

in the GetFeature request you can specify which PropertyNames you want to
get back. That should help you.

http://article.gmane.org/gmane.comp.gis.geoserver.user/15478

Best regards,
Bart

Hi everybody,

The current way to use the WFS of GeoServer gives me a big result (5-6MB)
for certain queries, and I am only interested in the identifiers of the
returned objects. I send a wfs query with a filter and want only the
identities of all the objects that intersect with a polygon that I specify
in the query, and not the GML coordinates together with it. Downloading
5-6MB for such a query is slows up the website too much. And I don't want
to
display it at once. So I want to filter through all those gml:enities
before
I start downloading them and showing them on a map.

The current two resultTypes that are possible with WFS querries are hits
and
results but neither are what I need.

Can somebody give me bone? All solutions, even the ones out of the box,
are
of interest to me.

Thanks

Erik Hupkes

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Thanks for the quick reply. But it does not look like it is working. I show
you the queries.

http://darius.leibnizcenter.org:8080/geoserver/wfs?request=GetFeature&versio
n=1.0.0&typeName=topp:states

This query returns all the features from the topp:states layer.

Now if I only want to get the STATE_NAME I should fire the following query;

http://darius.leibnizcenter.org:8080/geoserver/wfs?request=GetFeature&versio
n=1.0.0&typeName=topp:states&propertyname=topp:STATE_NAME

but the result is the same. I can still see all the other values as well. So
something is not working right. I also tried to omit the namespace prefix
for the property name specification.

Besides this problem, I seem to have another issue. The identifier of the
object is not in one of the properties, but in the parent element, see the
example:

<topp:states fid="states.43">
<topp:the_geom/>
<topp:STATE_NAME/>
......
<topp:SAMP_POP/>
</top:states>

Can I access this too with the propertyname system?

Thanks again,

Erik Hupkes

-----Original Message-----
From: bartvde@anonymised.com [mailto:bartvde@anonymised.com]
Sent: maandag 15 juni 2009 15:32
To: Erik Hupkes
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] WFS: resultType question; How te get only the
identities of the results of a query.

Hi Eric,

in the GetFeature request you can specify which PropertyNames you want to
get back. That should help you.

http://article.gmane.org/gmane.comp.gis.geoserver.user/15478

Best regards,
Bart

Hi everybody,

The current way to use the WFS of GeoServer gives me a big result (5-6MB)
for certain queries, and I am only interested in the identifiers of the
returned objects. I send a wfs query with a filter and want only the
identities of all the objects that intersect with a polygon that I specify
in the query, and not the GML coordinates together with it. Downloading
5-6MB for such a query is slows up the website too much. And I don't want
to
display it at once. So I want to filter through all those gml:enities
before
I start downloading them and showing them on a map.

The current two resultTypes that are possible with WFS querries are hits
and
results but neither are what I need.

Can somebody give me bone? All solutions, even the ones out of the box,
are
of interest to me.

Thanks

Erik Hupkes

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

Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.

http://p.sf.net/sfu/businessobjects_________________________________________
______

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

Hi Eric,

Erik Hupkes wrote:

Thanks for the quick reply. But it does not look like it is working. I show
you the queries.

http://darius.leibnizcenter.org:8080/geoserver/wfs?request=GetFeature&versio
n=1.0.0&typeName=topp:states

This query returns all the features from the topp:states layer.

Try dropping the prefix when you use propertyname:

propertyname=STATE_NAME

This is probably a bug, in that it won't work with the prefix attached. Would you mind filing an issue in the bug tracker for it?

Now if I only want to get the STATE_NAME I should fire the following query;

http://darius.leibnizcenter.org:8080/geoserver/wfs?request=GetFeature&versio
n=1.0.0&typeName=topp:states&propertyname=topp:STATE_NAME

but the result is the same. I can still see all the other values as well. So
something is not working right. I also tried to omit the namespace prefix
for the property name specification.

Besides this problem, I seem to have another issue. The identifier of the
object is not in one of the properties, but in the parent element, see the
example:

<topp:states fid="states.43">
<topp:the_geom/>
<topp:STATE_NAME/>
......
<topp:SAMP_POP/>
</top:states>

Can I access this too with the propertyname system?

How identifiers are generated in geoserver, is datastore dependent. For shapefiles it is a row number. For databases it is a primary key (if one is set).

Also as a rule, the feature id is never made available as a regular property because then it would be editable. You can however query on it with a filter, like you can normal properties. For example if you append "&featureid=states.43" to your above query, you will get only that feature back. The id can also be used in ogc/xml filters.

-Justin

Thanks again,

Erik Hupkes

-----Original Message-----
From: bartvde@anonymised.com [mailto:bartvde@anonymised.com] Sent: maandag 15 juni 2009 15:32
To: Erik Hupkes
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] WFS: resultType question; How te get only the
identities of the results of a query.

Hi Eric,

in the GetFeature request you can specify which PropertyNames you want to
get back. That should help you.

http://article.gmane.org/gmane.comp.gis.geoserver.user/15478

Best regards,
Bart

Hi everybody,

The current way to use the WFS of GeoServer gives me a big result (5-6MB)
for certain queries, and I am only interested in the identifiers of the
returned objects. I send a wfs query with a filter and want only the
identities of all the objects that intersect with a polygon that I specify
in the query, and not the GML coordinates together with it. Downloading
5-6MB for such a query is slows up the website too much. And I don't want
to
display it at once. So I want to filter through all those gml:enities
before
I start downloading them and showing them on a map.

The current two resultTypes that are possible with WFS querries are hits
and
results but neither are what I need.

Can somebody give me bone? All solutions, even the ones out of the box,
are
of interest to me.

Thanks

Erik Hupkes

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

Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.

http://p.sf.net/sfu/businessobjects_________________________________________
______

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

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
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.

Thanks for the reply.

I got it now, there is a bug where the demo_requests in the geoserver 2.0 is not updating the return page. So that is why it did not work properly. (added the bug in jira)

It is not possible to change the query a bit and fire the changed query, it always send the default one.

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

A workaround for getting the FID values is to query with a propertyname that is not the_geom. So know I can query for the STATE_NAME, and I get the FID with it. Too bad I cannot ommit all properties. That would be even better, but not possible if I read your reply.

Thanks

Erik

Justin Deoliveira schreef:

Hi Eric,

Erik Hupkes wrote:

Thanks for the quick reply. But it does not look like it is working. I show
you the queries.

http://darius.leibnizcenter.org:8080/geoserver/wfs?request=GetFeature&versio

n=1.0.0&typeName=topp:states

This query returns all the features from the topp:states layer.

Try dropping the prefix when you use propertyname:

propertyname=STATE_NAME

This is probably a bug, in that it won't work with the prefix attached. Would you mind filing an issue in the bug tracker for it?

Now if I only want to get the STATE_NAME I should fire the following query;
http://darius.leibnizcenter.org:8080/geoserver/wfs?request=GetFeature&versio

n=1.0.0&typeName=topp:states&propertyname=topp:STATE_NAME

but the result is the same. I can still see all the other values as well. So
something is not working right. I also tried to omit the namespace prefix
for the property name specification.

Besides this problem, I seem to have another issue. The identifier of the
object is not in one of the properties, but in the parent element, see the
example:

<topp:states fid="states.43">
<topp:the_geom/>
<topp:STATE_NAME/>
......
<topp:SAMP_POP/>
</top:states>

Can I access this too with the propertyname system?

How identifiers are generated in geoserver, is datastore dependent. For shapefiles it is a row number. For databases it is a primary key (if one is set).

Also as a rule, the feature id is never made available as a regular property because then it would be editable. You can however query on it with a filter, like you can normal properties. For example if you append "&featureid=states.43" to your above query, you will get only that feature back. The id can also be used in ogc/xml filters.

-Justin

Thanks again,

Erik Hupkes

-----Original Message-----
From: bartvde@anonymised.com [mailto:bartvde@anonymised.com] Sent: maandag 15 juni 2009 15:32
To: Erik Hupkes
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] WFS: resultType question; How te get only the
identities of the results of a query.

Hi Eric,

in the GetFeature request you can specify which PropertyNames you want to
get back. That should help you.

http://article.gmane.org/gmane.comp.gis.geoserver.user/15478

Best regards,
Bart

Hi everybody,

The current way to use the WFS of GeoServer gives me a big result (5-6MB)
for certain queries, and I am only interested in the identifiers of the
returned objects. I send a wfs query with a filter and want only the
identities of all the objects that intersect with a polygon that I specify
in the query, and not the GML coordinates together with it. Downloading
5-6MB for such a query is slows up the website too much. And I don't want
to
display it at once. So I want to filter through all those gml:enities
before
I start downloading them and showing them on a map.

The current two resultTypes that are possible with WFS querries are hits
and
results but neither are what I need.

Can somebody give me bone? All solutions, even the ones out of the box,
are
of interest to me.

Thanks

Erik Hupkes

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

--

Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.

http://p.sf.net/sfu/businessobjects_________________________________________

______

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

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

Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users