[Geoserver-users] Serve GML Structure via WFS?

Hello,

I've got a very general but not too obvious question: is it possible to serve geographic information in a defined XML structure (Observations and Measurements - O&M) via a WFS (GeoServer) by using a "complex datastore" (cf. PostGIS GML)? In practice, this means that I want to query a Sensor Observation Service returning an O&M structure, which I would like to serve via a WFS (e.g. GeoServer). Therefore, I have to convert the O&M element tree to a GML conformal structure in an application, which offers GML as its response type. In my opinion, this could happen via
1.) a Java "plug-in", which can be integrated in GeoServer or
2.) a separate servlet, which converts the XML structure. In the second case, the URL of the servlet is the link to the data repository of the WFS.
Could this work and if not, which steps would I have to change?

Thanks,
Bernd.

Hi Bernd,

A third option to consider would be to write a geotools datastore which does the transform from your O&M service to normal geotools / geoserver features. The benefit of this approach is that you would not have to touch any geoserver code. The downside is that geotools datastores are quite a bit of work to write.

Question for you. Is the gml that you wish to output "simple". Ie does it have a flat structure that could map directly to a postgis table. If so then another approach could be to have a service running elsewhere that continuously updated a postgis database with the O&M data. That way you would just have to configure geoserver against the postgis database which is pretty easy to do.

The benefit of these approaches is that they use the existing datastore infrastructure and you will not have to write any gml writing code. In my experience writing gml is hard so if you can use the existing infrastructure i would suggest you do so.

Hope that helps.

-Justin

Bernd Resch wrote:

Hello,

I've got a very general but not too obvious question: is it possible to serve geographic information in a defined XML structure (Observations and Measurements - O&M) via a WFS (GeoServer) by using a "complex datastore" (cf. PostGIS GML)? In practice, this means that I want to query a Sensor Observation Service returning an O&M structure, which I would like to serve via a WFS (e.g. GeoServer). Therefore, I have to convert the O&M element tree to a GML conformal structure in an application, which offers GML as its response type. In my opinion, this could happen via
1.) a Java "plug-in", which can be integrated in GeoServer or
2.) a separate servlet, which converts the XML structure. In the second case, the URL of the servlet is the link to the data repository of the WFS.
Could this work and if not, which steps would I have to change?

Thanks,
Bernd.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,46433fb462302092453641!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Hi Justin,

thanks for your reply. Writing a separate datastore seems like a good choice. Why do you think it is a lot of work to implement our own datastore? Would it be simpler if we assume that we only have to map a very static data structure to another static GML document without dynamic parts, just including a mapping of elements?
Our data structure is rather simple and flat. However, to continuously update a PostGIS database is not our approach of choice.

Best,
Bernd.

Justin Deoliveira wrote:

Hi Bernd,

A third option to consider would be to write a geotools datastore which does the transform from your O&M service to normal geotools / geoserver features. The benefit of this approach is that you would not have to touch any geoserver code. The downside is that geotools datastores are quite a bit of work to write.

Question for you. Is the gml that you wish to output "simple". Ie does it have a flat structure that could map directly to a postgis table. If so then another approach could be to have a service running elsewhere that continuously updated a postgis database with the O&M data. That way you would just have to configure geoserver against the postgis database which is pretty easy to do.

The benefit of these approaches is that they use the existing datastore infrastructure and you will not have to write any gml writing code. In my experience writing gml is hard so if you can use the existing infrastructure i would suggest you do so.

Hope that helps.

-Justin

Bernd Resch wrote:

Hello,

I've got a very general but not too obvious question: is it possible to serve geographic information in a defined XML structure (Observations and Measurements - O&M) via a WFS (GeoServer) by using a "complex datastore" (cf. PostGIS GML)? In practice, this means that I want to query a Sensor Observation Service returning an O&M structure, which I would like to serve via a WFS (e.g. GeoServer). Therefore, I have to convert the O&M element tree to a GML conformal structure in an application, which offers GML as its response type. In my opinion, this could happen via
1.) a Java "plug-in", which can be integrated in GeoServer or
2.) a separate servlet, which converts the XML structure. In the second case, the URL of the servlet is the link to the data repository of the WFS.
Could this work and if not, which steps would I have to change?

Thanks,
Bernd.

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

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,46433fb462302092453641!

Hi Bernd,

I just meant that you will have to write a bit of code. Getting a data
store which is read only is relatively simple. Once you start getting
into writing and transactions then things start to become more complex.
But definitely doable. If you have any questions about datastores feel
free to ask here or on the geotools-devel list.

-Justin

Bernd Resch wrote:

Hi Justin,

thanks for your reply. Writing a separate datastore seems like a good
choice. Why do you think it is a lot of work to implement our own
datastore? Would it be simpler if we assume that we only have to map a
very static data structure to another static GML document without
dynamic parts, just including a mapping of elements?
Our data structure is rather simple and flat. However, to continuously
update a PostGIS database is not our approach of choice.

Best,
Bernd.

Justin Deoliveira wrote:

Hi Bernd,

A third option to consider would be to write a geotools datastore
which does the transform from your O&M service to normal geotools /
geoserver features. The benefit of this approach is that you would not
have to touch any geoserver code. The downside is that geotools
datastores are quite a bit of work to write.

Question for you. Is the gml that you wish to output "simple". Ie does
it have a flat structure that could map directly to a postgis table.
If so then another approach could be to have a service running
elsewhere that continuously updated a postgis database with the O&M
data. That way you would just have to configure geoserver against the
postgis database which is pretty easy to do.

The benefit of these approaches is that they use the existing
datastore infrastructure and you will not have to write any gml
writing code. In my experience writing gml is hard so if you can use
the existing infrastructure i would suggest you do so.

Hope that helps.

-Justin

Bernd Resch wrote:

Hello,

I've got a very general but not too obvious question: is it possible
to serve geographic information in a defined XML structure
(Observations and Measurements - O&M) via a WFS (GeoServer) by using
a "complex datastore" (cf. PostGIS GML)? In practice, this means that
I want to query a Sensor Observation Service returning an O&M
structure, which I would like to serve via a WFS (e.g. GeoServer).
Therefore, I have to convert the O&M element tree to a GML conformal
structure in an application, which offers GML as its response type.
In my opinion, this could happen via
1.) a Java "plug-in", which can be integrated in GeoServer or
2.) a separate servlet, which converts the XML structure. In the
second case, the URL of the servlet is the link to the data
repository of the WFS.
Could this work and if not, which steps would I have to change?

Thanks,
Bernd.

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

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,464b10f6253641015089218!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com