[Geoserver-users] Setting up a complex entity element that may return multipleresults

Hi,

Hope I got the subject vaguely right:-)

I am trying to set GeoServer up to use a PostgreSQL table that contains
multiple rows for a single point. I assume that I need to set it up as a
complex valued property with maxOccurs="unbounded". Can I do this in
GeoServer? How do I tell it about the structure of my database?

For instance if I have a buoy which reports temperature and salinity at
a number of different depths how do I get GeoServer to return this. What
I currently get is multiple features all with the same id.

I am comfortable setting stuff up using the web interface and I have
read through the feature type schema tutorial but I can't pull it all
together. If anyone has some example of how to do this it would be
really useful.

Cheers,

Pete

--------------------------------------------------------
Plymouth Marine Laboratory
Prospect Place
Plymouth
PL1 3DH

Website: www.pml.ac.uk
Registered Charity No. 1091222
Company No. 4178503
--------------------------------------------------------
This e-mail, its content and any file attachments are confidential.
If you have received this e-mail in error please do not copy, disclose
it to any third party or use the contents or attachments in any way.
Please notify the sender by replying to this e-mail or e-mail
forinfo@anonymised.com and then delete the email without making any copies
or using it in any other way.

The content of this message may contain personal views which are not
the views of Plymouth Marine Laboratory unless specifically stated.

Email transmission cannot be guaranteed to be secure or error free as
information may be intercepted, corrupted, lost, destroyed, arrive
late or incomplete or contain viruses. Plymouth Marine Laboratory
accepts no liability for any loss or damage which may be caused by
software viruses.

The complex features branch of geoserver/geotools may help you, although I am not sure of the status of it. I know it isn't finished and needs some more work.
Right now geoserver just supports simple/flat features. Maybe creating a view of your data would solve your problem?

Brent Owens
(The Open Planning Project)

Peter Walker wrote:

Hi,

Hope I got the subject vaguely right:-)

I am trying to set GeoServer up to use a PostgreSQL table that contains
multiple rows for a single point. I assume that I need to set it up as a
complex valued property with maxOccurs="unbounded". Can I do this in
GeoServer? How do I tell it about the structure of my database?

For instance if I have a buoy which reports temperature and salinity at
a number of different depths how do I get GeoServer to return this. What
I currently get is multiple features all with the same id.

I am comfortable setting stuff up using the web interface and I have
read through the feature type schema tutorial but I can't pull it all
together. If anyone has some example of how to do this it would be
really useful.

Cheers,

Pete

--------------------------------------------------------
Plymouth Marine Laboratory
Prospect Place
Plymouth
PL1 3DH

Website: www.pml.ac.uk
Registered Charity No. 1091222
Company No. 4178503
--------------------------------------------------------
This e-mail, its content and any file attachments are confidential.
If you have received this e-mail in error please do not copy, disclose
it to any third party or use the contents or attachments in any way.
Please notify the sender by replying to this e-mail or e-mail
forinfo@anonymised.com and then delete the email without making any copies
or using it in any other way.

The content of this message may contain personal views which are not
the views of Plymouth Marine Laboratory unless specifically stated.

Email transmission cannot be guaranteed to be secure or error free as
information may be intercepted, corrupted, lost, destroyed, arrive
late or incomplete or contain viruses. Plymouth Marine Laboratory
accepts no liability for any loss or damage which may be caused by
software viruses.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Brent,

On Fri, 2006-11-17 at 16:53 -0800, Brent Owens wrote:

The complex features branch of geoserver/geotools may help you, although
I am not sure of the status of it. I know it isn't finished and needs
some more work.

After I posted my question I found the docs for the complex features
branch and it does look like what I need.

Right now geoserver just supports simple/flat features. Maybe creating a
view of your data would solve your problem?

I don't think a view would help. I am just getting into WFS so I might
not have all this correct but I thought that a WFS should not return
multiple features with the same feature id. What I get when I use a view
(joining the measurements to the location) is

<wfs:FeatureCollection ... >
...
gml:featureMember>
<topp:l4wfs fid="l4wfs.1">
<topp:obs_time>2002-01-07 00:00:00.0</topp:obs_time>
<topp:site_name>L4</topp:site_name>
<topp:temp>10.6825</topp:temp>
<topp:depth>48.000</topp:depth>
<topp:location>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;
<gml:coordinates decimal="." cs="," ts="
">-4.125,50.15</gml:coordinates>
</gml:Point>
</topp:location>
</topp:l4wfs>
</gml:featureMember>
<gml:featureMember>
<topp:l4wfs fid="l4wfs.1">
<topp:obs_time>2002-01-07 00:00:00.0</topp:obs_time>
<topp:site_name>L4</topp:site_name>
<topp:temp>10.6827</topp:temp>
<topp:depth>47.500</topp:depth>
<topp:location>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;
<gml:coordinates decimal="." cs="," ts="
">-4.125,50.15</gml:coordinates>
</gml:Point>
</topp:location>
</topp:l4wfs>
</gml:featureMember>
...
</wfs:FeatureCollection>

which I assume is not valid.

Thanks for your help.

Pete
--------------------------------------------------------
Plymouth Marine Laboratory
Prospect Place
Plymouth
PL1 3DH

Website: www.pml.ac.uk
Registered Charity No. 1091222
Company No. 4178503
--------------------------------------------------------
This e-mail, its content and any file attachments are confidential.
If you have received this e-mail in error please do not copy, disclose
it to any third party or use the contents or attachments in any way.
Please notify the sender by replying to this e-mail or e-mail
forinfo@anonymised.com and then delete the email without making any copies
or using it in any other way.

The content of this message may contain personal views which are not
the views of Plymouth Marine Laboratory unless specifically stated.

Email transmission cannot be guaranteed to be secure or error free as
information may be intercepted, corrupted, lost, destroyed, arrive
late or incomplete or contain viruses. Plymouth Marine Laboratory
accepts no liability for any loss or damage which may be caused by
software viruses.